@adyen/bento-mcp 0.0.0 → 0.1.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 (410) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +113 -0
  4. package/dist/assets/components/accordion/accordion.docs.mdx +77 -0
  5. package/dist/assets/components/accordion/accordion.stories.ts +1 -0
  6. package/dist/assets/components/accordion/accordion.vue +1 -0
  7. package/dist/assets/components/accordion/components/accordion-item.stories.ts +1 -0
  8. package/dist/assets/components/accordion/components/accordion-item.vue +1 -0
  9. package/dist/assets/components/action-bar/action-bar.docs.mdx +103 -0
  10. package/dist/assets/components/action-bar/action-bar.stories.ts +1 -0
  11. package/dist/assets/components/action-bar/action-bar.vue +1 -0
  12. package/dist/assets/components/alert/alert.docs.mdx +106 -0
  13. package/dist/assets/components/alert/alert.stories.ts +1 -0
  14. package/dist/assets/components/alert/alert.vue +1 -0
  15. package/dist/assets/components/avatar/avatar.docs.mdx +44 -0
  16. package/dist/assets/components/avatar/avatar.stories.ts +1 -0
  17. package/dist/assets/components/avatar/avatar.vue +1 -0
  18. package/dist/assets/components/avatar/components/avatar-image/avatar-image.vue +1 -0
  19. package/dist/assets/components/button/button.docs.mdx +137 -0
  20. package/dist/assets/components/button/button.stories.ts +1 -0
  21. package/dist/assets/components/button/button.vue +1 -0
  22. package/dist/assets/components/button/components/ai-button/ai-button.docs.mdx +40 -0
  23. package/dist/assets/components/button/components/ai-button/ai-button.stories.ts +1 -0
  24. package/dist/assets/components/button/components/ai-button/ai-button.vue +1 -0
  25. package/dist/assets/components/button/components/button-actions/button-actions.docs.mdx +169 -0
  26. package/dist/assets/components/button/components/button-actions/button-actions.stories.ts +1 -0
  27. package/dist/assets/components/button/components/button-actions/button-actions.vue +1 -0
  28. package/dist/assets/components/button/components/loading-button/loading-button.docs.mdx +106 -0
  29. package/dist/assets/components/button/components/loading-button/loading-button.stories.ts +1 -0
  30. package/dist/assets/components/button/components/loading-button/loading-button.vue +1 -0
  31. package/dist/assets/components/button/components/toggle-button/toggle-button.docs.mdx +81 -0
  32. package/dist/assets/components/button/components/toggle-button/toggle-button.stories.ts +1 -0
  33. package/dist/assets/components/button/components/toggle-button/toggle-button.vue +1 -0
  34. package/dist/assets/components/card/card.docs.mdx +166 -0
  35. package/dist/assets/components/card/card.stories.ts +1 -0
  36. package/dist/assets/components/card/card.vue +1 -0
  37. package/dist/assets/components/checkbox/checkbox.docs.mdx +116 -0
  38. package/dist/assets/components/checkbox/checkbox.stories.ts +1 -0
  39. package/dist/assets/components/checkbox/checkbox.vue +1 -0
  40. package/dist/assets/components/checkbox/components/checkbox-group/checkbox-group.docs.mdx +134 -0
  41. package/dist/assets/components/checkbox/components/checkbox-group/checkbox-group.stories.ts +1 -0
  42. package/dist/assets/components/checkbox/components/checkbox-group/checkbox-group.vue +1 -0
  43. package/dist/assets/components/chip/chip.docs.mdx +51 -0
  44. package/dist/assets/components/chip/chip.stories.ts +1 -0
  45. package/dist/assets/components/chip/chip.vue +1 -0
  46. package/dist/assets/components/click-outside/click-outside.docs.mdx +30 -0
  47. package/dist/assets/components/click-outside/click-outside.stories.ts +1 -0
  48. package/dist/assets/components/code-snippet/code-snippet.docs.mdx +73 -0
  49. package/dist/assets/components/code-snippet/code-snippet.stories.ts +1 -0
  50. package/dist/assets/components/code-snippet/code-snippet.vue +1 -0
  51. package/dist/assets/components/country/country.docs.mdx +61 -0
  52. package/dist/assets/components/country/country.stories.ts +1 -0
  53. package/dist/assets/components/country/country.vue +1 -0
  54. package/dist/assets/components/currency/currency.docs.mdx +38 -0
  55. package/dist/assets/components/currency/currency.stories.ts +1 -0
  56. package/dist/assets/components/currency/currency.vue +1 -0
  57. package/dist/assets/components/dashed-underline/dashed-underline.docs.mdx +57 -0
  58. package/dist/assets/components/dashed-underline/dashed-underline.stories.ts +1 -0
  59. package/dist/assets/components/dashed-underline/dashed-underline.vue +1 -0
  60. package/dist/assets/components/data-grid/components/data-grid-cell/data-grid-cell.vue +1 -0
  61. package/dist/assets/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue +1 -0
  62. package/dist/assets/components/data-grid/components/data-grid-columns/data-grid-columns.vue +1 -0
  63. package/dist/assets/components/data-grid/components/data-grid-config-settings/components/data-grid-config-settings-column-row/data-grid-config-settings-column-row.vue +1 -0
  64. package/dist/assets/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue +1 -0
  65. package/dist/assets/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue +1 -0
  66. package/dist/assets/components/data-grid/components/data-grid-row/data-grid-row.vue +1 -0
  67. package/dist/assets/components/data-grid/components/data-grid-static-icon/data-grid-static-icon.docs.mdx +61 -0
  68. package/dist/assets/components/data-grid/components/data-grid-static-icon/data-grid-static-icon.stories.ts +1 -0
  69. package/dist/assets/components/data-grid/components/data-grid-static-icon/data-grid-static-icon.vue +1 -0
  70. package/dist/assets/components/data-grid/components/data-grid-summary-cell/data-grid-summary-cell.docs.mdx +56 -0
  71. package/dist/assets/components/data-grid/components/data-grid-summary-cell/data-grid-summary-cell.stories.ts +1 -0
  72. package/dist/assets/components/data-grid/components/data-grid-summary-cell/data-grid-summary-cell.vue +1 -0
  73. package/dist/assets/components/data-grid/components/data-grid-trend-cell/data-grid-trend-cell.docs.mdx +48 -0
  74. package/dist/assets/components/data-grid/components/data-grid-trend-cell/data-grid-trend-cell.stories.ts +1 -0
  75. package/dist/assets/components/data-grid/components/data-grid-trend-cell/data-grid-trend-cell.vue +1 -0
  76. package/dist/assets/components/data-grid/data-grid.docs.mdx +951 -0
  77. package/dist/assets/components/data-grid/data-grid.stories.ts +1 -0
  78. package/dist/assets/components/data-grid/data-grid.vue +1 -0
  79. package/dist/assets/components/date/date.docs.mdx +49 -0
  80. package/dist/assets/components/date/date.stories.ts +1 -0
  81. package/dist/assets/components/date/date.vue +1 -0
  82. package/dist/assets/components/date-picker/date-picker.docs.mdx +69 -0
  83. package/dist/assets/components/date-picker/date-picker.stories.ts +1 -0
  84. package/dist/assets/components/date-picker/date-picker.vue +1 -0
  85. package/dist/assets/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue +1 -0
  86. package/dist/assets/components/date-range-picker/date-range-picker.docs.mdx +168 -0
  87. package/dist/assets/components/date-range-picker/date-range-picker.stories.ts +1 -0
  88. package/dist/assets/components/date-range-picker/date-range-picker.vue +1 -0
  89. package/dist/assets/components/divider/divider.docs.mdx +27 -0
  90. package/dist/assets/components/divider/divider.stories.ts +1 -0
  91. package/dist/assets/components/divider/divider.vue +1 -0
  92. package/dist/assets/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue +1 -0
  93. package/dist/assets/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue +1 -0
  94. package/dist/assets/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue +1 -0
  95. package/dist/assets/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue +1 -0
  96. package/dist/assets/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.stories.ts +1 -0
  97. package/dist/assets/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue +1 -0
  98. package/dist/assets/components/dropdown/components/variants/dropdown-country/dropdown-country.stories.ts +1 -0
  99. package/dist/assets/components/dropdown/components/variants/dropdown-country/dropdown-country.vue +1 -0
  100. package/dist/assets/components/dropdown/components/variants/dropdown-currency/dropdown-currency.stories.ts +1 -0
  101. package/dist/assets/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue +1 -0
  102. package/dist/assets/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.stories.ts +1 -0
  103. package/dist/assets/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue +1 -0
  104. package/dist/assets/components/dropdown/components/variants/dropdown-tag/dropdown-tag.stories.ts +1 -0
  105. package/dist/assets/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue +1 -0
  106. package/dist/assets/components/dropdown/dropdown.docs.mdx +420 -0
  107. package/dist/assets/components/dropdown/dropdown.stories.ts +1 -0
  108. package/dist/assets/components/dropdown/dropdown.vue +1 -0
  109. package/dist/assets/components/empty-state/empty-state.docs.mdx +115 -0
  110. package/dist/assets/components/empty-state/empty-state.stories.ts +1 -0
  111. package/dist/assets/components/empty-state/empty-state.vue +1 -0
  112. package/dist/assets/components/file-uploader/components/file-uploader-file-card/components/file-uploader-file-card-animation/file-uploader-file-card-animation.vue +1 -0
  113. package/dist/assets/components/file-uploader/components/file-uploader-file-card/file-uploader-file-card.stories.ts +1 -0
  114. package/dist/assets/components/file-uploader/components/file-uploader-file-card/file-uploader-file-card.vue +1 -0
  115. package/dist/assets/components/file-uploader/components/file-uploader-restrictions/file-uploader-restrictions.stories.ts +1 -0
  116. package/dist/assets/components/file-uploader/components/file-uploader-restrictions/file-uploader-restrictions.vue +1 -0
  117. package/dist/assets/components/file-uploader/file-uploader.docs.mdx +117 -0
  118. package/dist/assets/components/file-uploader/file-uploader.stories.ts +1 -0
  119. package/dist/assets/components/file-uploader/file-uploader.vue +1 -0
  120. package/dist/assets/components/filter-bar/components/all-filters-modal/all-filters-modal.stories.ts +1 -0
  121. package/dist/assets/components/filter-bar/components/all-filters-modal/all-filters-modal.vue +1 -0
  122. package/dist/assets/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue +1 -0
  123. package/dist/assets/components/filter-bar/components/base-filter/base-filter.docs.mdx +90 -0
  124. package/dist/assets/components/filter-bar/components/base-filter/base-filter.stories.ts +1 -0
  125. package/dist/assets/components/filter-bar/components/base-filter/base-filter.vue +1 -0
  126. package/dist/assets/components/filter-bar/components/base-filter-button/base-filter-button.vue +1 -0
  127. package/dist/assets/components/filter-bar/components/boolean-filter/boolean-filter.vue +1 -0
  128. package/dist/assets/components/filter-bar/components/checkbox-group-filter/checkbox-group-filter.stories.ts +1 -0
  129. package/dist/assets/components/filter-bar/components/checkbox-group-filter/checkbox-group-filter.vue +1 -0
  130. package/dist/assets/components/filter-bar/components/date-filter/date-filter.stories.ts +1 -0
  131. package/dist/assets/components/filter-bar/components/date-filter/date-filter.vue +1 -0
  132. package/dist/assets/components/filter-bar/components/date-range-filter/date-range-filter.stories.ts +1 -0
  133. package/dist/assets/components/filter-bar/components/date-range-filter/date-range-filter.vue +1 -0
  134. package/dist/assets/components/filter-bar/components/filter-bar-button/filter-bar-button.vue +1 -0
  135. package/dist/assets/components/filter-bar/components/filter-bar-button-group/filter-bar-button-group.vue +1 -0
  136. package/dist/assets/components/filter-bar/components/input-filter/input-filter.docs.mdx +18 -0
  137. package/dist/assets/components/filter-bar/components/input-filter/input-filter.stories.ts +1 -0
  138. package/dist/assets/components/filter-bar/components/input-filter/input-filter.vue +1 -0
  139. package/dist/assets/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.docs.mdx +18 -0
  140. package/dist/assets/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.stories.ts +1 -0
  141. package/dist/assets/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.vue +1 -0
  142. package/dist/assets/components/filter-bar/components/radio-group-filter/radio-group-filter.stories.ts +1 -0
  143. package/dist/assets/components/filter-bar/components/radio-group-filter/radio-group-filter.vue +1 -0
  144. package/dist/assets/components/filter-bar/components/range-filter/range-filter.vue +1 -0
  145. package/dist/assets/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue +1 -0
  146. package/dist/assets/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue +1 -0
  147. package/dist/assets/components/filter-bar/components/select-filter/select-filter.stories.ts +1 -0
  148. package/dist/assets/components/filter-bar/components/select-filter/select-filter.vue +1 -0
  149. package/dist/assets/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.stories.ts +1 -0
  150. package/dist/assets/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue +1 -0
  151. package/dist/assets/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.stories.ts +1 -0
  152. package/dist/assets/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue +1 -0
  153. package/dist/assets/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.stories.ts +1 -0
  154. package/dist/assets/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue +1 -0
  155. package/dist/assets/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.stories.ts +1 -0
  156. package/dist/assets/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue +1 -0
  157. package/dist/assets/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.stories.ts +1 -0
  158. package/dist/assets/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue +1 -0
  159. package/dist/assets/components/filter-bar/components/toggle-filter/toggle-filter.stories.ts +1 -0
  160. package/dist/assets/components/filter-bar/components/toggle-filter/toggle-filter.vue +1 -0
  161. package/dist/assets/components/filter-bar/filter-bar.docs.mdx +1005 -0
  162. package/dist/assets/components/filter-bar/filter-bar.stories.ts +1 -0
  163. package/dist/assets/components/filter-bar/filter-bar.vue +1 -0
  164. package/dist/assets/components/focus-trap/focus-trap.docs.mdx +10 -0
  165. package/dist/assets/components/focus-trap/focus-trap.stories.ts +1 -0
  166. package/dist/assets/components/focus-trap/focus-trap.vue +1 -0
  167. package/dist/assets/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue +1 -0
  168. package/dist/assets/components/form-layout/components/form-layout-group/form-layout-group.vue +1 -0
  169. package/dist/assets/components/form-layout/components/form-layout-title/form-layout-title.vue +1 -0
  170. package/dist/assets/components/form-layout/form-layout.docs.mdx +452 -0
  171. package/dist/assets/components/form-layout/form-layout.stories.ts +1 -0
  172. package/dist/assets/components/form-layout/form-layout.vue +1 -0
  173. package/dist/assets/components/header/header.docs.mdx +85 -0
  174. package/dist/assets/components/header/header.stories.ts +1 -0
  175. package/dist/assets/components/header/header.vue +1 -0
  176. package/dist/assets/components/header-with-views/components/header-with-views-all-views/header-with-views-all-views.vue +1 -0
  177. package/dist/assets/components/header-with-views/components/header-with-views-item-edit-form/header-with-views-edit-form.vue +1 -0
  178. package/dist/assets/components/header-with-views/header-with-views.docs.mdx +103 -0
  179. package/dist/assets/components/header-with-views/header-with-views.stories.ts +1 -0
  180. package/dist/assets/components/header-with-views/header-with-views.vue +1 -0
  181. package/dist/assets/components/image/image.docs.mdx +34 -0
  182. package/dist/assets/components/image/image.stories.ts +1 -0
  183. package/dist/assets/components/image/image.vue +1 -0
  184. package/dist/assets/components/info-icon/info-icon.docs.mdx +57 -0
  185. package/dist/assets/components/info-icon/info-icon.stories.ts +1 -0
  186. package/dist/assets/components/info-icon/info-icon.vue +1 -0
  187. package/dist/assets/components/input-field/input-field.docs.mdx +141 -0
  188. package/dist/assets/components/input-field/input-field.stories.ts +1 -0
  189. package/dist/assets/components/input-field/input-field.vue +1 -0
  190. package/dist/assets/components/input-field-password/input-field-password.docs.mdx +292 -0
  191. package/dist/assets/components/input-field-password/input-field-password.stories.ts +1 -0
  192. package/dist/assets/components/input-field-password/input-field-password.vue +1 -0
  193. package/dist/assets/components/input-field-phone-number/input-field-phone-number.docs.mdx +72 -0
  194. package/dist/assets/components/input-field-phone-number/input-field-phone-number.stories.ts +1 -0
  195. package/dist/assets/components/input-field-phone-number/input-field-phone-number.vue +1 -0
  196. package/dist/assets/components/inspector/inspector.docs.mdx +118 -0
  197. package/dist/assets/components/inspector/inspector.stories.ts +1 -0
  198. package/dist/assets/components/inspector/inspector.vue +1 -0
  199. package/dist/assets/components/internal/base-button/base-button.vue +1 -0
  200. package/dist/assets/components/internal/button-actions-with-menu/button-actions-with-menu.stories.ts +1 -0
  201. package/dist/assets/components/internal/button-actions-with-menu/button-actions-with-menu.vue +1 -0
  202. package/dist/assets/components/internal/calendar/calendar.stories.ts +1 -0
  203. package/dist/assets/components/internal/calendar/calendar.vue +1 -0
  204. package/dist/assets/components/internal/calendar/components/calendar-month/calendar-month.stories.ts +1 -0
  205. package/dist/assets/components/internal/calendar/components/calendar-month/calendar-month.vue +1 -0
  206. package/dist/assets/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue +1 -0
  207. package/dist/assets/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.stories.ts +1 -0
  208. package/dist/assets/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue +1 -0
  209. package/dist/assets/components/internal/calendar/components/calendar-year/calendar-year.vue +1 -0
  210. package/dist/assets/components/internal/calendar/components/calendar-year/components/calendar-year-month/__test__/calendar-year-month-stub.vue +1 -0
  211. package/dist/assets/components/internal/calendar/components/calendar-year/components/calendar-year-month/calendar-year-month.vue +1 -0
  212. package/dist/assets/components/internal/checkbox-input/checkbox-input.stories.ts +1 -0
  213. package/dist/assets/components/internal/checkbox-input/checkbox-input.vue +1 -0
  214. package/dist/assets/components/internal/controls-group/controls-group.vue +1 -0
  215. package/dist/assets/components/internal/copy/copy.docs.mdx +43 -0
  216. package/dist/assets/components/internal/copy/copy.stories.ts +1 -0
  217. package/dist/assets/components/internal/copy/copy.vue +1 -0
  218. package/dist/assets/components/internal/decorative-checkbox/decorative-checkbox.vue +1 -0
  219. package/dist/assets/components/internal/dialog-page/dialog-page.vue +1 -0
  220. package/dist/assets/components/internal/error-message/error-message.vue +1 -0
  221. package/dist/assets/components/internal/field-label/field-label.vue +1 -0
  222. package/dist/assets/components/internal/fixed-scroller/fixed-scroller.docs.mdx +21 -0
  223. package/dist/assets/components/internal/fixed-scroller/fixed-scroller.stories.ts +1 -0
  224. package/dist/assets/components/internal/fixed-scroller/fixed-scroller.vue +1 -0
  225. package/dist/assets/components/internal/footer-actions/footer-actions.vue +1 -0
  226. package/dist/assets/components/internal/grid-layout/grid-layout.vue +1 -0
  227. package/dist/assets/components/internal/header-meta/header-meta.vue +1 -0
  228. package/dist/assets/components/internal/info-icon-with-popover/info-icon-with-popover.vue +1 -0
  229. package/dist/assets/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue +1 -0
  230. package/dist/assets/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue +1 -0
  231. package/dist/assets/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue +1 -0
  232. package/dist/assets/components/internal/listbox/components/listbox-option/listbox-option.vue +1 -0
  233. package/dist/assets/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue +1 -0
  234. package/dist/assets/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue +1 -0
  235. package/dist/assets/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue +1 -0
  236. package/dist/assets/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue +1 -0
  237. package/dist/assets/components/internal/listbox/listbox.stories.ts +1 -0
  238. package/dist/assets/components/internal/listbox/listbox.vue +1 -0
  239. package/dist/assets/components/internal/radio-input/radio-input.stories.ts +1 -0
  240. package/dist/assets/components/internal/radio-input/radio-input.vue +1 -0
  241. package/dist/assets/components/internal/teleport/teleport.vue +1 -0
  242. package/dist/assets/components/internal/tooltip/tooltip.test.vue +1 -0
  243. package/dist/assets/components/internal/tooltip/tooltip.vue +1 -0
  244. package/dist/assets/components/layout/components/layout-row/layout-row.stories.ts +1 -0
  245. package/dist/assets/components/layout/components/layout-row/layout-row.vue +1 -0
  246. package/dist/assets/components/layout/layout.docs.mdx +108 -0
  247. package/dist/assets/components/layout/layout.stories.ts +1 -0
  248. package/dist/assets/components/layout/layout.vue +1 -0
  249. package/dist/assets/components/link/link.docs.mdx +119 -0
  250. package/dist/assets/components/link/link.stories.ts +1 -0
  251. package/dist/assets/components/link/link.vue +1 -0
  252. package/dist/assets/components/loading-indicator/loading-indicator.docs.mdx +65 -0
  253. package/dist/assets/components/loading-indicator/loading-indicator.stories.ts +1 -0
  254. package/dist/assets/components/loading-indicator/loading-indicator.vue +1 -0
  255. package/dist/assets/components/menu/components/menu-item/menu-item.vue +1 -0
  256. package/dist/assets/components/menu/components/menu-item-list/menu-item-list.vue +1 -0
  257. package/dist/assets/components/menu/components/menu-list-container/menu-list-container.vue +1 -0
  258. package/dist/assets/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue +1 -0
  259. package/dist/assets/components/menu/menu.docs.mdx +121 -0
  260. package/dist/assets/components/menu/menu.stories.ts +1 -0
  261. package/dist/assets/components/menu/menu.vue +1 -0
  262. package/dist/assets/components/modal/components/base-modal/base-modal.vue +1 -0
  263. package/dist/assets/components/modal/components/modal-default/modal-default.vue +1 -0
  264. package/dist/assets/components/modal/components/modal-dialog/modal-dialog.vue +1 -0
  265. package/dist/assets/components/modal/components/modal-page/modal-page.vue +1 -0
  266. package/dist/assets/components/modal/modal.docs.mdx +215 -0
  267. package/dist/assets/components/modal/modal.stories.ts +1 -0
  268. package/dist/assets/components/modal/modal.vue +1 -0
  269. package/dist/assets/components/modal-fullscreen/components/modal-fullscreen-page.vue +1 -0
  270. package/dist/assets/components/modal-fullscreen/modal-fullscreen.docs.mdx +217 -0
  271. package/dist/assets/components/modal-fullscreen/modal-fullscreen.stories.ts +1 -0
  272. package/dist/assets/components/modal-fullscreen/modal-fullscreen.vue +1 -0
  273. package/dist/assets/components/pagination/components/pagination-context/pagination-context.vue +1 -0
  274. package/dist/assets/components/pagination/components/pagination-controls/pagination-controls.vue +1 -0
  275. package/dist/assets/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue +1 -0
  276. package/dist/assets/components/pagination/pagination.docs.mdx +116 -0
  277. package/dist/assets/components/pagination/pagination.stories.ts +1 -0
  278. package/dist/assets/components/pagination/pagination.vue +1 -0
  279. package/dist/assets/components/payment-method/payment-method.docs.mdx +34 -0
  280. package/dist/assets/components/payment-method/payment-method.stories.ts +1 -0
  281. package/dist/assets/components/payment-method/payment-method.vue +1 -0
  282. package/dist/assets/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue +1 -0
  283. package/dist/assets/components/popover/components/popover-image/popover-image.vue +1 -0
  284. package/dist/assets/components/popover/components/popover-title/popover-title.vue +1 -0
  285. package/dist/assets/components/popover/popover.docs.mdx +89 -0
  286. package/dist/assets/components/popover/popover.stories.ts +1 -0
  287. package/dist/assets/components/popover/popover.vue +1 -0
  288. package/dist/assets/components/popper-container/popper-container.docs.mdx +11 -0
  289. package/dist/assets/components/popper-container/popper-container.stories.ts +1 -0
  290. package/dist/assets/components/popper-container/popper-container.vue +1 -0
  291. package/dist/assets/components/promo-banner/promo-banner.docs.mdx +94 -0
  292. package/dist/assets/components/promo-banner/promo-banner.stories.ts +1 -0
  293. package/dist/assets/components/promo-banner/promo-banner.vue +1 -0
  294. package/dist/assets/components/radio-group/components/radio-button/radio-button.docs.mdx +76 -0
  295. package/dist/assets/components/radio-group/components/radio-button/radio-button.stories.ts +1 -0
  296. package/dist/assets/components/radio-group/components/radio-button/radio-button.vue +1 -0
  297. package/dist/assets/components/radio-group/radio-group.docs.mdx +154 -0
  298. package/dist/assets/components/radio-group/radio-group.stories.ts +1 -0
  299. package/dist/assets/components/radio-group/radio-group.vue +1 -0
  300. package/dist/assets/components/rich-text-editor/components/rich-text-editor-content-area/rich-text-editor-content-area.vue +1 -0
  301. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-code-block/rich-text-editor-code-block.vue +1 -0
  302. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-inline-code/rich-text-editor-inline-code.vue +1 -0
  303. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-link/rich-text-editor-link.vue +1 -0
  304. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-list-item/rich-text-editor-list-item.vue +1 -0
  305. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-table/rich-text-editor-table.vue +1 -0
  306. package/dist/assets/components/rich-text-editor/rich-text-editor.docs.mdx +52 -0
  307. package/dist/assets/components/rich-text-editor/rich-text-editor.stories.ts +1 -0
  308. package/dist/assets/components/rich-text-editor/rich-text-editor.vue +1 -0
  309. package/dist/assets/components/search-bar/search-bar.docs.mdx +117 -0
  310. package/dist/assets/components/search-bar/search-bar.stories.ts +1 -0
  311. package/dist/assets/components/search-bar/search-bar.vue +1 -0
  312. package/dist/assets/components/secondary-nav/components/secondary-nav-category/secondary-nav-category.vue +1 -0
  313. package/dist/assets/components/secondary-nav/components/secondary-nav-item/secondary-nav-item.vue +1 -0
  314. package/dist/assets/components/secondary-nav/secondary-nav.docs.mdx +40 -0
  315. package/dist/assets/components/secondary-nav/secondary-nav.stories.ts +1 -0
  316. package/dist/assets/components/secondary-nav/secondary-nav.vue +1 -0
  317. package/dist/assets/components/segmented-control/components/segmented-control-button/segmented-control-button.vue +1 -0
  318. package/dist/assets/components/segmented-control/segmented-control.docs.mdx +90 -0
  319. package/dist/assets/components/segmented-control/segmented-control.stories.ts +1 -0
  320. package/dist/assets/components/segmented-control/segmented-control.vue +1 -0
  321. package/dist/assets/components/selection-card/components/selection-card-group/selection-card-group.docs.mdx +119 -0
  322. package/dist/assets/components/selection-card/components/selection-card-group/selection-card-group.stories.ts +1 -0
  323. package/dist/assets/components/selection-card/components/selection-card-group/selection-card-group.vue +1 -0
  324. package/dist/assets/components/selection-card/selection-card.docs.mdx +108 -0
  325. package/dist/assets/components/selection-card/selection-card.stories.ts +1 -0
  326. package/dist/assets/components/selection-card/selection-card.vue +1 -0
  327. package/dist/assets/components/sidepanel/components/sidepanel-page.stories.ts +1 -0
  328. package/dist/assets/components/sidepanel/components/sidepanel-page.vue +1 -0
  329. package/dist/assets/components/sidepanel/sidepanel.docs.mdx +129 -0
  330. package/dist/assets/components/sidepanel/sidepanel.stories.ts +1 -0
  331. package/dist/assets/components/sidepanel/sidepanel.vue +1 -0
  332. package/dist/assets/components/status/status.docs.mdx +62 -0
  333. package/dist/assets/components/status/status.stories.ts +1 -0
  334. package/dist/assets/components/status/status.vue +1 -0
  335. package/dist/assets/components/stepper/components/step/step.stories.ts +1 -0
  336. package/dist/assets/components/stepper/components/step/step.vue +1 -0
  337. package/dist/assets/components/stepper/stepper.docs.mdx +127 -0
  338. package/dist/assets/components/stepper/stepper.stories.ts +1 -0
  339. package/dist/assets/components/stepper/stepper.vue +1 -0
  340. package/dist/assets/components/structured-list/components/structered-list-item/structured-list-item.stories.ts +1 -0
  341. package/dist/assets/components/structured-list/components/structered-list-item/structured-list-item.vue +1 -0
  342. package/dist/assets/components/structured-list/structured-list.docs.mdx +68 -0
  343. package/dist/assets/components/structured-list/structured-list.stories.ts +1 -0
  344. package/dist/assets/components/structured-list/structured-list.vue +1 -0
  345. package/dist/assets/components/summary-grid/components/summary-grid-item/summary-grid-item.vue +1 -0
  346. package/dist/assets/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.stories.ts +1 -0
  347. package/dist/assets/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue +1 -0
  348. package/dist/assets/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.stories.ts +1 -0
  349. package/dist/assets/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue +1 -0
  350. package/dist/assets/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.stories.ts +1 -0
  351. package/dist/assets/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue +1 -0
  352. package/dist/assets/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.stories.ts +1 -0
  353. package/dist/assets/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue +1 -0
  354. package/dist/assets/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.stories.ts +1 -0
  355. package/dist/assets/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue +1 -0
  356. package/dist/assets/components/summary-grid/summary-grid.docs.mdx +152 -0
  357. package/dist/assets/components/summary-grid/summary-grid.stories.ts +1 -0
  358. package/dist/assets/components/summary-grid/summary-grid.vue +1 -0
  359. package/dist/assets/components/tabs/components/tab.vue +1 -0
  360. package/dist/assets/components/tabs/tabs.docs.mdx +98 -0
  361. package/dist/assets/components/tabs/tabs.stories.ts +1 -0
  362. package/dist/assets/components/tabs/tabs.vue +1 -0
  363. package/dist/assets/components/tag/tag.docs.mdx +137 -0
  364. package/dist/assets/components/tag/tag.stories.ts +1 -0
  365. package/dist/assets/components/tag/tag.vue +1 -0
  366. package/dist/assets/components/textarea/textarea.docs.mdx +53 -0
  367. package/dist/assets/components/textarea/textarea.stories.ts +1 -0
  368. package/dist/assets/components/textarea/textarea.vue +1 -0
  369. package/dist/assets/components/timeline/components/timeline-item/timeline-item.stories.ts +1 -0
  370. package/dist/assets/components/timeline/components/timeline-item/timeline-item.vue +1 -0
  371. package/dist/assets/components/timeline/timeline.docs.mdx +131 -0
  372. package/dist/assets/components/timeline/timeline.stories.ts +1 -0
  373. package/dist/assets/components/timeline/timeline.vue +1 -0
  374. package/dist/assets/components/toast/components/toast-item/toast-item.vue +1 -0
  375. package/dist/assets/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue +1 -0
  376. package/dist/assets/components/toast/toast.docs.mdx +151 -0
  377. package/dist/assets/components/toast/toast.stories.ts +1 -0
  378. package/dist/assets/components/toast/toast.vue +1 -0
  379. package/dist/assets/components/toggle/toggle.docs.mdx +81 -0
  380. package/dist/assets/components/toggle/toggle.stories.ts +1 -0
  381. package/dist/assets/components/toggle/toggle.vue +1 -0
  382. package/dist/assets/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue +1 -0
  383. package/dist/assets/components/tutorial/components/tutorial-popover/tutorial-popover.vue +1 -0
  384. package/dist/assets/components/tutorial/tutorial.docs.mdx +85 -0
  385. package/dist/assets/components/tutorial/tutorial.stories.ts +1 -0
  386. package/dist/assets/components/tutorial/tutorial.vue +1 -0
  387. package/dist/assets/components/typography/typography.docs.mdx +124 -0
  388. package/dist/assets/components/typography/typography.stories.ts +1 -0
  389. package/dist/assets/components/typography/typography.vue +1 -0
  390. package/dist/assets/composables/use-bento-currency/use-bento-currency.docs.mdx +28 -0
  391. package/dist/assets/composables/use-bento-currency/use-bento-currency.stories.ts +1 -0
  392. package/dist/assets/composables/use-click-outside/use-click-outside.docs.mdx +10 -0
  393. package/dist/assets/composables/use-click-outside/use-click-outside.stories.ts +1 -0
  394. package/dist/assets/directives/highlight/highlight.docs.mdx +64 -0
  395. package/dist/assets/directives/highlight/highlight.stories.ts +1 -0
  396. package/dist/assets/directives/keyboard-navigation/keyboard-navigation.docs.mdx +41 -0
  397. package/dist/assets/directives/keyboard-navigation/keyboard-navigation.stories.ts +1 -0
  398. package/dist/assets/directives/tooltip/tooltip.docs.mdx +86 -0
  399. package/dist/assets/directives/tooltip/tooltip.stories.ts +1 -0
  400. package/dist/assets/index.ts +1 -0
  401. package/dist/assets/templates/dashboard-template/components/dashboard-section/dashboard-section.stories.ts +1 -0
  402. package/dist/assets/templates/dashboard-template/components/dashboard-section/dashboard-section.vue +1 -0
  403. package/dist/assets/templates/dashboard-template/dashboard-template.docs.mdx +148 -0
  404. package/dist/assets/templates/dashboard-template/dashboard-template.stories.ts +1 -0
  405. package/dist/assets/templates/dashboard-template/dashboard-template.vue +1 -0
  406. package/dist/assets/templates/data-grid-template/data-grid-template.docs.mdx +117 -0
  407. package/dist/assets/templates/data-grid-template/data-grid-template.stories.ts +1 -0
  408. package/dist/assets/templates/data-grid-template/data-grid-template.vue +1 -0
  409. package/dist/main.js +30031 -0
  410. package/package.json +45 -3
@@ -0,0 +1,1005 @@
1
+ import { Canvas, Story, Meta, Source } from '@storybook/blocks';
2
+ import * as FilterBarStories from './filter-bar.stories';
3
+ import FilterBarConfigFilterValuesExample from './__tests__/filter-bar-config-filter-values-example.vue?raw';
4
+ import FilterBarConfigFilterValuesObjectExample from './__tests__/filter-bar-config-filter-values-object-example.vue?raw';
5
+
6
+ <Meta title="Filter bar" name="Filter bar" of={FilterBarStories} />
7
+
8
+ # Filter Bar
9
+
10
+ <Canvas withSource="closed">
11
+ <Story of={FilterBarStories.Default} />
12
+ </Canvas>
13
+
14
+ Filter bar allows users to filter the content so that only the information they're interested in is displayed.
15
+
16
+ ## Table of contents
17
+
18
+ - [Filter Bar](#filter-bar)
19
+ - [Table of contents](#table-of-contents)
20
+ - [Behavior](#behavior)
21
+ - [Search bar](#search-bar)
22
+ - [Filter configuration and Filter values](#filter-configuration-and-filter-values)
23
+ - [Applying a filter](#applying-a-filter)
24
+ - [Clearing a filter](#clearing-a-filter)
25
+ - [Clear all](#clear-all)
26
+ - [Persistent filters](#persistent-filters)
27
+ - [Resetting a filter](#resetting-a-filter)
28
+ - [Reset all](#reset-all)
29
+ - [Use Cases](#use-cases)
30
+ - [Do not use](#do-not-use)
31
+ - [Variations](#variations)
32
+ - [Available filter configurations](#available-filter-configurations)
33
+ - [Input filter](#input-filter)
34
+ - [Options](#options)
35
+ - [Configuration Interface](#configuration-interface)
36
+ - [Input with dropdown filter](#input-with-dropdown-filter)
37
+ - [Options](#options-1)
38
+ - [Configuration Interface](#configuration-interface-1)
39
+ - [Value Interface](#value-interface)
40
+ - [Range filter](#range-filter)
41
+ - [Configuration Interface](#configuration-interface-2)
42
+ - [Value Interface](#value-interface-1)
43
+ - [~~Boolean filter~~ (`DEPRECATED`)](#boolean-filter-deprecated)
44
+ - [Configuration Interface](#configuration-interface-3)
45
+ - [Filter value Interface](#filter-value-interface)
46
+ - [Custom boolean options](#custom-boolean-options)
47
+ - [Select filter](#select-filter)
48
+ - [Options](#options-2)
49
+ - [Configuration Interface](#configuration-interface-4)
50
+ - [Value Interface](#value-interface-2)
51
+ - [External filtering](#external-filtering)
52
+ - [External filtering and Lazy Loading simultaneously](#external-filtering-and-lazy-loading-simultaneously)
53
+ - [Nested multi-select filter](#nested-multi-select-filter)
54
+ - [Date filter](#date-filter)
55
+ - [Options](#options-3)
56
+ - [Configuration Interface](#configuration-interface-5)
57
+ - [Value Interface](#value-interface-3)
58
+ - [Date range filter](#date-range-filter)
59
+ - [Options](#options-4)
60
+ - [Configuration Interface](#configuration-interface-6)
61
+ - [Value Interface](#value-interface-4)
62
+ - [Radio group filter](#radio-group-filter)
63
+ - [Configuration Interface](#configuration-interface-7)
64
+ - [Checkbox group filter](#checkbox-group-filter)
65
+ - [Options](#options-5)
66
+ - [Configuration Interface](#configuration-interface-7)
67
+ - [Value Interface](#value-interface-5)
68
+ - [Custom filters](#custom-filters)
69
+ - [Creating a custom filter](#creating-a-custom-filter)
70
+ - [Custom filter component](#custom-filter-component)
71
+ - [Connecting internal values and events](#connecting-internal-values-and-events)
72
+ - [Configure fields in `bento-filter-bar`](#configure-fields-in-bento-filter-bar)
73
+ - [Responsiveness](#responsiveness)
74
+ - [Accessibility 🚧](#accessibility-)
75
+ - [Roles, States, and Properties](#roles-states-and-properties)
76
+
77
+ ## Behavior
78
+
79
+ By default filter bar displays the most common filters for that particular page/component.
80
+
81
+ Pressing the filter button opens a popover where a filter can be applied. Only one filter can be opened at a time.
82
+
83
+ ## Search bar
84
+
85
+ The search bar allows general filtering of the data by adding a `bento-search-bar` to the `bento-filter-bar`.
86
+
87
+ > Important!
88
+ >
89
+ > `searchTerm` needs to be `''` (at minimum) to be able to display the search bar
90
+
91
+ Properties:
92
+
93
+ | Available props | |
94
+ | --------------- | ---------------------------------------------------- |
95
+ | `search` | Allows to set properties to the search bar. |
96
+ | `searchTerm` | Set the value of the search bar. Works with `.sync`. |
97
+
98
+ <Source
99
+ format={'html'}
100
+ code={`
101
+ <template>
102
+ <bento-filter-bar
103
+ :search-term.sync="searchTerm"
104
+ :search="searchProps"
105
+ @search-input="onSearchUpdate"
106
+ @update:search-term="onSearchUpdate"
107
+ />
108
+ </template>
109
+ <script setup lang="ts">
110
+ import {
111
+ BentoFilterBar,
112
+ BentoFilterBarSearchBarProps,
113
+ BentoFilterBarSearchTerm,
114
+ } from '@adyen/bento-vue2'
115
+ const searchTerm = ref<BentoFilterBarSearchTerm>('');
116
+ const searchProps: BentoFilterBarSearchBarProps = {
117
+ inputFieldAriaLabel: 'Input field aria label description',
118
+ debounceTime: 500,
119
+ hint: 'Hint',
120
+ placeholder: 'Placeholder content',
121
+ }
122
+ const onSearchUpdate = (newTerm: string) => {
123
+ // ...
124
+ }
125
+ </script>
126
+ `}
127
+ />
128
+
129
+ ## Filter configuration and Filter values
130
+
131
+ The `BentoFilterBar` allows you to separate its configuration from its values. Use the `config` prop to define the
132
+ filters' structure and appearance, and manage their state using either the `filterValues` (array) or
133
+ `filterValuesObject` (object) props. When a filter's value is updated, the component emits `update:filter-values` or
134
+ `update:filter-values-object` events. For convenience, you can use the `.sync` modifier (in Vue 2) or `v-model` (in
135
+ Vue 3) to keep your local data synchronized.
136
+
137
+ The `filterValues` prop uses an array of objects, which can be a bit verbose:
138
+
139
+ <Source dark format={'html'} code={FilterBarConfigFilterValuesExample} />
140
+
141
+ As an alternative, you can use the `filter-values-object` prop, which uses a simpler key-value object structure. This is
142
+ often more convenient to work with.
143
+
144
+ <Source dark format={'html'} code={FilterBarConfigFilterValuesObjectExample} />
145
+
146
+ > **Note**
147
+ >
148
+ > If both `filterValues` and `filterValuesObject` are provided for the same filter field, `filterValuesObject` will take
149
+ > precedence.
150
+
151
+ ### Applying a filter
152
+
153
+ Selecting an option or typing the value and pressing the filter's "Apply" button closes the popover and applies the
154
+ filter. When no changes have been made, the "Apply" button is disabled.
155
+
156
+ Applying a filter triggers the `@update:filter-values` event, returning a new array of filter values
157
+ (`BentoFilterValues`).
158
+
159
+ ### Clearing a filter
160
+
161
+ Pressing the filter's "Clear" button clears the applied filter and closes the popover. If no filter is applied, the
162
+ "Clear" button is disabled. This also applies when a user selects/types a filter, but hasn't applied it yet.
163
+
164
+ Clearing a filter triggers the `@update:filter-values` event, returning a new array of filter values
165
+ (`BentoFilterValues`).
166
+
167
+ ### Clear all
168
+
169
+ Clearing all filters removes all the applied filters and shows a toast. If there are no filters applied, the "Clear all"
170
+ button is hidden.
171
+
172
+ Clearing all filters triggers the `@update:filter-values` event, returning a new array of filter values
173
+ (`BentoFilterValues`).
174
+
175
+ ## Persistent filters
176
+
177
+ <Canvas withSource="closed">
178
+ <Story of={FilterBarStories.Persistent} />
179
+ </Canvas>
180
+
181
+ Persistent filters are filters that cannot be fully cleared. For technical reasons (to limit the amount of data that
182
+ needs to be fetched) some pages may have a persistent filter applied with a default value. The default value can be
183
+ defined by teams implementing the filter using the `defaultValue` property on any filter.
184
+
185
+ If no `value` is set for the filter the `defaultValue` will be used as the initial value.
186
+
187
+ ### Resetting a filter
188
+
189
+ Pressing Reset button resets the applied persistent filter back to default value and closes the popover. If currently
190
+ applied filter is the persistent filter's default value, Reset button should be disabled. This also applies when a user
191
+ selects/types a new filter, but hasn't applied it yet.
192
+
193
+ ### Reset all
194
+
195
+ Resetting/Clearing all filters removes (or resets, in case of persistent filters) all the applied filters and shows a
196
+ toast.
197
+
198
+ Note: When persistent filter is present, the button says "Reset all". When there are no persistent filters, the button
199
+ says "Clear all".
200
+
201
+ If there are no filters applied or when persistent filter values have not been changed, Reset all/Clear all button is
202
+ hidden.
203
+
204
+ ## Use Cases
205
+
206
+ Here are some examples:
207
+
208
+ - Used in the data grid component to filter data sets. Accessible via the `filters` prop in the data grid.
209
+ - Filtering a custom list of items.
210
+
211
+ ### Do not use
212
+
213
+ Here are some some "don't dos":
214
+
215
+ - Filtering a custom `table` of items. Please use the data grid.
216
+ - Using the component inside of `header` slot of the data grid. Please use the `filter` component.
217
+
218
+ ## Variations
219
+
220
+ ### Available filter configurations
221
+
222
+ - `BentoFilterItemType.INPUT`: Input filter
223
+ - `BentoFilterItemType.INPUT_DROPDOWN`: Input with dropdown filter
224
+ - ~~`BentoFilterItemType.BOOLEAN`~~ (DEPRECATED): Boolean (yes/no) filter
225
+ - `BentoFilterItemType.RANGE`: Range (from/to) filter
226
+ - `BentoFilterItemType.SELECT`: Select filter
227
+ - `BentoFilterItemType.SELECT_AVATAR`: Avatar select filter
228
+ - `BentoFilterItemType.SELECT_COUNTRY`: Country select filter
229
+ - `BentoFilterItemType.SELECT_CURRENCY`: Currency select filter
230
+ - `BentoFilterItemType.SELECT_PAYMENT_METHOD`: Payment method select filter
231
+ - `BentoFilterItemType.SELECT_TAG`: Tag select filter
232
+ - `BentoFilterItemType.DATE`: Single date filter
233
+ - `BentoFilterItemType.DATE_RANGE`: Date range filter
234
+ - `BentoFilterItemType.RADIO_GROUP`: Radio group filter
235
+ - `BentoFilterItemType.CHECKBOX_GROUP`: Checkbox group filter
236
+
237
+ ### Input filter
238
+
239
+ Single input field to filter by a string of text and/or numbers. Provided by the `BentoFilterItemType.INPUT` filter
240
+ type.
241
+
242
+ #### Options
243
+
244
+ - `placeholder: string`: Sets a placeholder in the input field.
245
+
246
+ #### Configuration Interface
247
+
248
+ ```typescript
249
+ {
250
+ field: string;
251
+ label: string;
252
+ type: BentoFilterItemType.INPUT;
253
+ value: string | null;
254
+ options: {
255
+ placeholder: string;
256
+ },
257
+ defaultValue: string | null;
258
+ }
259
+ ```
260
+
261
+ ### Input with dropdown filter
262
+
263
+ Single input field with a dropdown to filter by a string of text and/or numbers and a modifier added by the dropdown
264
+ value. Provided by the `BentoFilterItemType.INPUT_DROPDOWN` filter type
265
+
266
+ #### Options
267
+
268
+ Currently the input with dropdown filter supports the following options:
269
+
270
+ - `dropdown: BentoInputDropdownProps`: Here you can set the input field dropdown properties like `items` to populate the
271
+ inner dropdown.
272
+ - `dropdownPosition?: 'start' | 'end'`: Allows you to set the position of the dropdown inside the input field to the
273
+ beginning or the end of the element.
274
+
275
+ #### Configuration Interface
276
+
277
+ ```typescript
278
+ {
279
+ field: string;
280
+ label: string;
281
+ type: BentoFilterItemType.INPUT;
282
+ value: string | null;
283
+ defaultValue: string | null;
284
+ options: {
285
+ dropdown: BentoInputDropdownProps;
286
+ dropdownPosition?: 'start' | 'end';
287
+ };
288
+ }
289
+ ```
290
+
291
+ #### Value Interface
292
+
293
+ ```typescript
294
+ {
295
+ inputValue: string;
296
+ dropdownValue: string:
297
+ }
298
+ ```
299
+
300
+ ### Range filter
301
+
302
+ Two input fields allowing the user to provide a range between 2 values. Provided by the `BentoFilterItemType.RANGE`
303
+ filter type.
304
+
305
+ #### Configuration Interface
306
+
307
+ ```typescript
308
+ {
309
+ field: string;
310
+ label: string;
311
+ type: BentoFilterItemType.RANGE;
312
+ defaultValue: string[] | null;
313
+ }
314
+ ```
315
+
316
+ #### Value Interface
317
+
318
+ ```typescript
319
+ {
320
+ field: string;
321
+ value: string[] | null;
322
+ }
323
+ ```
324
+
325
+ ### ~~Boolean filter~~ (`DEPRECATED`)
326
+
327
+ > Deprecated filter
328
+ >
329
+ > Use "`BentoFilterItemType.RADIO_GROUP`" instead. See the [Radio group filter](#radio-group-filter) documentation for
330
+ > more details
331
+
332
+ A 'yes' / 'no' filter allowing the user to choose between these 2 options. Provided by the
333
+ ~~`BentoFilterItemType.BOOLEAN`~~ filter type. By default, the options `yes` & `no` are displayed but they can be
334
+ customized through the `options` property.
335
+
336
+ #### Configuration Interface
337
+
338
+ ```typescript
339
+ {
340
+ field: string;
341
+ label: string;
342
+ type: BentoFilterItemType.BOOLEAN;
343
+ options: {
344
+ positiveOption: {
345
+ label: string;
346
+ value: string;
347
+ }
348
+ negativeOption: {
349
+ label: string;
350
+ value: string;
351
+ }
352
+ }
353
+ defaultValue: 'yes' | 'no' | null;
354
+ }
355
+ ```
356
+
357
+ #### Filter value Interface
358
+
359
+ ```typescript
360
+ {
361
+ field: string;
362
+ value: 'yes' | 'no' | null;
363
+ }
364
+ ```
365
+
366
+ #### Custom boolean options
367
+
368
+ Custom boolean options can be displayed instead of the default `yes` / `no`:
369
+
370
+ ```typescript
371
+
372
+ <bento-filter-bar
373
+ :config="[{
374
+ field: 'my-boolean-filter',
375
+ label: 'Boolean',
376
+ type: BentoFilterItemType.BOOLEAN,
377
+ visible: true,
378
+ :options="{
379
+ positiveOption: {
380
+ value: 'first-option';
381
+ label: 'My first option';
382
+ }
383
+ negativeOption: {
384
+ value: 'second-option';
385
+ label: 'My second option';
386
+ }
387
+ }"
388
+ }]"
389
+ :filter-values="[{
390
+ field: 'my-boolean-filter',
391
+ value: 'second-option'
392
+ }]"
393
+ />
394
+ ```
395
+
396
+ ### Select filter
397
+
398
+ Single input field to filter by a string of text and/or numbers. Provided by the `BentoFilterItemType.SELECT` filter
399
+ type.
400
+
401
+ #### Options
402
+
403
+ - `dynamicFiltering?: boolean`: Enables the search bar on popovers and search behaviour on the "all filters" modal.
404
+ **Default** is `true`
405
+ - `enableValueLabelPair?: boolean`: Enables value/label value handling. When `true`, the component expects and emits
406
+ value/label pair objects instead of primitive values. This affects both the `value` prop and the `input` event
407
+ payload.
408
+
409
+ - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for
410
+ multi-select).
411
+ - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon
412
+ selection.
413
+
414
+ This is particularly useful when a selected item's label is not available in the `items` prop, allowing the
415
+ component to display the correct label for values loaded from external sources. Default is `false`.
416
+
417
+ - `emptyState?: BentoListboxEmptyStateProps`: Empty state props that will be used with the inner empty state component
418
+ to be displayed when no search results are found.
419
+ - `isOptionDisabled?: BentoListboxIsOptionDisabled`: A function that defines which option in the list-box is disabled.
420
+ - `lazy?: object`:
421
+ - `hasMoreItems: boolean`: Indicates whether there are more items to load.
422
+ - `lazyLoadType: BentoListboxLazyLoadType | string`: The type of `Lazy Load`. Type "automatic" will enable infinite
423
+ scrolling. Type "button" will enable lazy loading with "Show more" button.
424
+ - `loading: boolean`: Indicates if new options are loading.
425
+ - `showMoreEvent?: () => void`: The click event that fires when the user press on the "show more" button OR when the
426
+ user scrolls down to bottom of the select filter box.
427
+ - `listboxItems: BentoListboxOptions`: Option items for the list-box.
428
+ - `loading?: boolean`: Toggles the loading state of the listbox.
429
+ - `multiple?: boolean`: Defines if the list-box should be a multi-select filter.
430
+ - `onOpen?: () => void`: This event fires when the dropdown is opened.
431
+ - `search?: object`:
432
+ - `debounceTime?`: The debounce time for when the searchEvent is fired.
433
+ - `searchEvent`: The event that triggers upon user filtering the listbox items.
434
+ - `staticCategories?: boolean`: Defines if the list-box should support static categories.
435
+ - `tooltipPosition?: BentoTooltipPosition | string`: Position the tooltip should take if space is available.
436
+ - `tooltipText?: string`: Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.
437
+ - `virtualScroll?: BentoListboxVirtulisationOptions`: Enables virtual scrolling if set to true or by providing an object
438
+ with itemHeight function. The itemHeight function is used to calculate the height of rendered item given it's index.
439
+
440
+ #### Configuration Interface
441
+
442
+ ```typescript
443
+ {
444
+ field: string;
445
+ label: string;
446
+ type: BentoFilterItemType.SELECT;
447
+ defaultValue: Array<string | number>;
448
+ options: {
449
+ dynamicFiltering?: boolean;
450
+ emptyState?: BentoListboxEmptyStateProps;
451
+ listboxItems: BentoListboxOptions;
452
+ multiple?: boolean;
453
+ onOpen?: () => void;
454
+ lazy?: {
455
+ hasMoreItems: boolean;
456
+ lazyLoadType: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;
457
+ loading: boolean;
458
+ showMoreEvent?: () => void;
459
+ };
460
+ loading?: boolean;
461
+ search?: BentoListboxSearchOptions;
462
+ staticCategories?: boolean;
463
+ isOptionDisabled?: BentoListboxIsOptionDisabled;
464
+ virtualScroll?: BentoListboxVirtulisationOptions;
465
+ tooltipText?: string;
466
+ tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;
467
+ enableValueLabelPair?: boolean;
468
+ };
469
+ }
470
+ ```
471
+
472
+ #### Value Interface
473
+
474
+ ```typescript
475
+ {
476
+ field: string;
477
+ value: Array<string | number>,
478
+ }
479
+ ```
480
+
481
+ #### External filtering
482
+
483
+ <Canvas withSource="closed">
484
+ <Story of={FilterBarStories.ExternalFilteringSelectFilter} />
485
+ </Canvas>
486
+
487
+ To handle filtering via an external source, like an API, you can configure the select filter's `options` to manage the
488
+ search event and loading state. This is ideal for large datasets where client-side filtering is not performant.
489
+
490
+ Here's how to set it up:
491
+
492
+ 1. **Implement the `searchEvent`**: Add a `search` object to your filter's `options`. The `searchEvent` function within
493
+ this object will be called whenever the user types in the search input. This is where you should trigger your API
494
+ call with the search term.
495
+
496
+ 2. **Manage the loading state**: While your API is fetching the results, set the top-level `loading` property in
497
+ `options` to `true`. This will display a loading indicator over the list, providing visual feedback to the user.
498
+
499
+ 3. **Update `listboxItems`**: Once the API call is complete, update the `listboxItems` array in your `options` with the
500
+ new data and set `loading` back to `false`.
501
+
502
+ #### External filtering and Lazy Loading simultaneously
503
+
504
+ <Canvas withSource="closed">
505
+ <Story of={FilterBarStories.ExternalFilteringAndLazyLoadingSelectFilter} />
506
+ </Canvas>
507
+
508
+ To implement a select filter that both searches a remote source and lazy-loads more results, you need to manage two
509
+ separate loading states and handle two distinct events.
510
+
511
+ **State Management**
512
+
513
+ You'll need to maintain several state variables:
514
+
515
+ - `listboxItems`: An array to hold the items currently displayed in the dropdown.
516
+ - `isSearchLoading`: A boolean to indicate when a new search is being performed. This controls the main loading
517
+ indicator for the select filter.
518
+ - `isLazyLoading`: A boolean for when more items are being fetched via scrolling. This controls the loading spinner at
519
+ the bottom of the list.
520
+ - `hasMoreItems`: A boolean to know if the API has more items to provide.
521
+ - `currentPage`: To keep track of the pagination for lazy loading.
522
+ - `currentSearchTerm`: To store the current search query.
523
+
524
+ **Event Handlers**
525
+
526
+ 1. **`onSearch` function**: This function is triggered by the `search.searchEvent`. It should:
527
+ - Reset `currentPage` to `1`.
528
+ - Set `isSearchLoading` to `true`.
529
+ - Fetch the initial set of data from your API based on the new search term.
530
+ - Replace `listboxItems` with the new data.
531
+ - Update `hasMoreItems`.
532
+ - Set `isSearchLoading` to `false` when done.
533
+ 2. **`onLazyLoad` function**: This function is triggered by `lazy.showMoreEvent`. It should:
534
+ - Check if a lazy load is already in progress or if there are no more items.
535
+ - Increment `currentPage`.
536
+ - Set `isLazyLoading` to `true`.
537
+ - Fetch the next page of data from your API.
538
+ - Append the new items to the existing `listboxItems`.
539
+ - Update `hasMoreItems`.
540
+ - Set `isLazyLoading` to `false` when done.
541
+
542
+ **Configuration**
543
+
544
+ In your filter configuration, you'll pass these states and handlers to the `options` of your select filter:
545
+
546
+ - `options.loading` should be bound to `isSearchLoading`.
547
+ - `options.search.searchEvent` should be your `onSearch` handler.
548
+ - `options.lazy.loading` should be bound to `isLazyLoading`.
549
+ - `options.lazy.showMoreEvent` should be your `onLazyLoad` handler.
550
+ - `options.lazy.hasMoreItems` should be bound to `hasMoreItems`.
551
+
552
+ #### Nested multi-select filter
553
+
554
+ The Multi select can also be set up as a nested multi-select with the following settings:
555
+
556
+ - `type`: `BentoFilterItemType.SELECT`
557
+ - `options.multiple`: `true`
558
+ - `options.listboxItems`: An array with the `Array<BentoListboxOptionItem>` type. For example:
559
+
560
+ ```tyepscript
561
+ [
562
+ {
563
+ label: 'Belgium',
564
+ description: 'Country',
565
+ value: 'belgium',
566
+ },
567
+ {
568
+ label: 'Netherlands',
569
+ description: 'Country',
570
+ value: 'netherlands',
571
+ items: [
572
+ {
573
+ label: 'Amsterdam',
574
+ description: 'City',
575
+ value: 'amsterdam',
576
+ },
577
+ {
578
+ label: 'Den Haag',
579
+ description: 'City',
580
+ value: 'den-haag',
581
+ },
582
+ ],
583
+ },
584
+ ],
585
+ ```
586
+
587
+ For more details see the `bento-dropdown` documentation.
588
+
589
+ ### Date filter
590
+
591
+ #### Options
592
+
593
+ - `firstDayOfWeek: BentoDatePickerFirstDayOfWeek`: Allows you to set the first day of the week: MONDAY, SUNDAY,
594
+ SATURDAY. (Default: MONDAY)
595
+ - `isDateDisabled: (date: Date) => boolean`: Function that allows to disable individual dates
596
+
597
+ #### Configuration Interface
598
+
599
+ ```typescript
600
+ {
601
+ field: string;
602
+ label: string;
603
+ type: BentoFilterItemType.DATE;
604
+ options: {
605
+ firstDayOfWeek?: BentoDatePickerFirstDayOfWeek,
606
+ isDateDisabled?: (date: Date) => boolean,
607
+ },
608
+ }
609
+ ```
610
+
611
+ #### Value Interface
612
+
613
+ ```typescript
614
+ {
615
+ field: string;
616
+ value: Date;
617
+ }
618
+ ```
619
+
620
+ ### Date range filter
621
+
622
+ #### Options
623
+
624
+ - `allowTimeInput: boolean`: Allows user to enter time values in the form
625
+ - `firstDayOfWeek: BentoDatePickerFirstDayOfWeek`: Allows user to set the first day of the week: MONDAY, SUNDAY
626
+ SATURDAY. (Default: MONDAY)
627
+ - `isDateDisabled: (date: Date) => boolean`: Function that allows to disable individual dates
628
+ - `maxRange: number`: Set a maximum number of dates to be selectable by the range.
629
+ - `numberOfMonths: number`: Number of months rendered in the filter
630
+ - `quickSelectRanges`:
631
+ `Array<{ label: string, value: string, data: { startDate: Date, endDate?: Date, isRelativeToNow?: boolean } }>`: An
632
+ array of predefined date range options for the user to select. Please see more info
633
+ [here](../?path=/docs/components-date-picker-range-dates--docs#quick-select-ranges).
634
+ - `showEndDateOnOpen: boolean`: Toggles whether the picker will open on the end date's month
635
+
636
+ #### Configuration Interface
637
+
638
+ ```typescript
639
+ {
640
+ field: string;
641
+ label: string;
642
+ type: BentoFilterItemType.DATE;
643
+ options: {
644
+ allowTimeInput?: boolean;
645
+ firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;
646
+ isDateDisabled?: (date: Date) => boolean;
647
+ maxRange?: number;
648
+ numberOfMonths?: number;
649
+ quickSelectRanges: { label: string, value: string, data: { startDate: Date, endDate?: Date, isRelativeToNow?: boolean } }[];
650
+ showEndDateOnOpen?: boolean;
651
+ }; // i.e. BentoDateRangeFilterOptions
652
+ }
653
+ ```
654
+
655
+ #### Value Interface
656
+
657
+ ```typescript
658
+ {
659
+ field: string;
660
+ value: { startDate: Date, endDate: Date} // i.e. BentoDateRangeFilterValue
661
+ }
662
+ ```
663
+
664
+ ### Checkbox group filter
665
+
666
+ A filter that displays a group of checkboxes. Provided by the `BentoFilterItemType.CHECKBOX_GROUP` filter type.
667
+
668
+ #### Options
669
+
670
+ - `checkboxItems: BentoCheckboxGroupOption[]`: An array of objects to create the checkboxes. Each object must have a
671
+ `label` and `value` property.
672
+ - `tooltipPosition?: BentoTooltipPosition | string`: Position the tooltip should take if space is available.
673
+ - `tooltipText?: string`: Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.
674
+
675
+ #### Configuration Interface
676
+
677
+ ```typescript
678
+ {
679
+ field: string;
680
+ label: string;
681
+ type: BentoFilterItemType.CHECKBOX_GROUP;
682
+ defaultValue?: Array<string | number | null>;
683
+ options: {
684
+ checkboxItems: BentoCheckboxGroupItems;
685
+ tooltipText?: string;
686
+ tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
687
+ };
688
+ }
689
+ ```
690
+
691
+ #### Value Interface
692
+
693
+ ```typescript
694
+ {
695
+ field: string;
696
+ value: Array<string | number | null>;
697
+ }
698
+ ```
699
+
700
+ ### Radio group filter
701
+
702
+ - `items: BentoRadioGroupFilterValue`: Sets a placeholder in the input field.
703
+ - `tooltipText?: string`: Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.
704
+ - `tooltipPosition?: BentoTooltipPosition | string`: Position the tooltip should take if space is available.
705
+
706
+ #### Configuration Interface
707
+
708
+ ```typescript
709
+ {
710
+ field: string;
711
+ label: string;
712
+ type: BentoFilterItemType.RADIO_GROUP;
713
+ defaultValue: BentoRadioGroupFilterValue;
714
+ value: BentoRadioGroupFilterValue;
715
+ options: {
716
+ items: BentoRadioGroupFilterValue;
717
+ tooltipText?: string;
718
+ tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;
719
+ }
720
+ visible: boolean;
721
+ }
722
+ ```
723
+
724
+ #### Value Interface
725
+
726
+ ```typescript
727
+ {
728
+ field: string;
729
+ value: Array<string | number>;
730
+ }
731
+ ```
732
+
733
+ ### Toggle filter
734
+
735
+ A 'true' / 'false' (on/off) filter allowing the user to choose between these 2 options. Provided by the
736
+ `BentoFilterItemType.TOGGLE` filter type.
737
+
738
+ #### Options
739
+
740
+ - `tooltipPosition?: BentoTooltipPosition | string`: Position the tooltip should take if space is available.Expand
741
+ commentComment on line R660ResolvedCode has comments. Press enter to view.
742
+ - `tooltipText?: string`: Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.
743
+
744
+ #### Configuration Interface
745
+
746
+ ```typescript
747
+ {
748
+ field: string;
749
+ label: string;
750
+ type: BentoFilterItemType.TOGGLE;
751
+ options: {
752
+ description?: string
753
+ tooltipText?: string;
754
+ tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;
755
+ };
756
+ }
757
+ ```
758
+
759
+ #### Value Interface
760
+
761
+ ```typescript
762
+ {
763
+ field: string;
764
+ value: boolean; // i.e. BentoToggleFilterValue
765
+ }
766
+ ```
767
+
768
+ ## Custom filters
769
+
770
+ Custom filters are supported through the use of the `config` prop and the values settings `filter-values-object`.
771
+
772
+ > All custom filters must implement the `bento-base-filter` component and it's recommended to use the
773
+ > `useBentoBaseFilter` composable to easily wire and control the events and buttons of the filter.
774
+
775
+ By setting a custom filter with these properties and components we ensure the correct functioning of the `reset`
776
+ (persistent filters) & `clear` (non-persistent filters) events alongside with the correct integration with the
777
+ `All filters` modal.
778
+
779
+ <Canvas withSource="closed">
780
+ <Story of={FilterBarStories.CustomFilters} />
781
+ </Canvas>
782
+
783
+ ### Creating a custom filter
784
+
785
+ For a detail usage of the `bento-base-filter`
786
+ [see the documentation](../?path=/docs/components-filter-bar-base-filters--docs).
787
+
788
+ #### Custom filter component
789
+
790
+ Every custom filter must:
791
+
792
+ - Use the `bento-base-filter` component.
793
+ - Define the events from the `BentoBaseFilterEvents` interface.
794
+ - Define properties from the `BentoBaseFilterProps` interface.
795
+
796
+ With types:
797
+
798
+ <Source
799
+ format={'html'}
800
+ dark
801
+ code={`
802
+ <template>
803
+ <bento-base-filter
804
+ :label="label"
805
+ :field="field"
806
+ :disabled="disabled"
807
+ :only-slot="onlySlot"
808
+ class="my-custom-filter"
809
+ >
810
+ <!-- your filter here -->
811
+ </bento-base-filter>
812
+ </template>
813
+ <script setup lang="ts">
814
+ import {
815
+ BentoBaseFilter
816
+ type BentoBaseFilterEvents,
817
+ type BentoBaseFilterProps
818
+ } from '@adyen/bento-vue2'
819
+ // Value and Options type definitions
820
+ type FilterValue = string;
821
+ interface FilterOptions {};
822
+ type CustomFilterProps = BentoBaseFilterProps<FilterValue, FilterOptions>
823
+ // Define emits
824
+ const emit = defineEmits<BentoBaseFilterEvents<CustomFilterProps>>();
825
+ // Define props
826
+ const props = withDefaults(defineProps<CustomFilterProps>(), {
827
+ defaultValue: null,
828
+ });
829
+ </script>
830
+ <style lang="scss" scoped>
831
+ /* The styles must be provided by the implementer. */
832
+ .my-custom-filter {
833
+ /* Use --b-spacer-070 when the padding is needed */
834
+ padding: var(--b-spacer-070);
835
+ }
836
+ </style>
837
+ `}
838
+ />
839
+
840
+ Without types:
841
+
842
+ <Source
843
+ format={'html'}
844
+ dark
845
+ code={`
846
+ <template>
847
+ <bento-base-filter
848
+ :label="label"
849
+ :field="field"
850
+ :disabled="disabled"
851
+ :only-slot="onlySlot"
852
+ class="my-custom-filter"
853
+ >
854
+ <!-- your filter here -->
855
+ </bento-base-filter>
856
+ </template>
857
+ <script setup lang="ts">
858
+ import {
859
+ BentoBaseFilter
860
+ BentoBaseFilterEvents,
861
+ BentoBaseFilterProps
862
+ } from '@adyen/bento-vue2'
863
+ // Define emits
864
+ const emit = defineEmits(BentoBaseFilterEvents);
865
+ // Define props
866
+ const props = defineProps(BentoBaseFilterProps);
867
+ </script>
868
+ <style lang="scss" scoped>
869
+ /* The styles must be provided by the implementer. */
870
+ .my-custom-filter {
871
+ /* Use --b-spacer-070 when the padding is needed */
872
+ padding: var(--b-spacer-070);
873
+ }
874
+ </style>
875
+ `}
876
+
877
+ />
878
+
879
+ #### Connecting internal values and events
880
+
881
+ - Connect button events
882
+ - Events provided by `useBentoBaseFilter` receive a callback that allows intercepting the events
883
+ - `buttonSecondaryLabel` use on _Single value_ filters, indicate the state of the filter
884
+ - `appliedFiltersCount` use on _Multi value_ filters, indicates how many values of the filter have been applied
885
+
886
+ <Source
887
+ format={'html'}
888
+ dark
889
+ code={`
890
+ <template>
891
+ <bento-base-filter
892
+ :label="label"
893
+ :field="field"
894
+ :disabled="disabled"
895
+ :only-slot="onlySlot"
896
+ :applied-filters-count="appliedFiltersCount"
897
+ :button-secondary-label="buttonSecondaryLabel"
898
+ :disable-apply-button="isApplyButtonDisabled"
899
+ :disable-secondary-button="isSecondaryButtonDisabled"
900
+ @apply="updateFilter"
901
+ @clear="clearFilter(updateFilter)"
902
+ @open="openFilter"
903
+ @reset="resetFilter(updateFilter)"
904
+ >
905
+ <!-- v-model binding-->
906
+ <input v-model="internalFilterValue" @input="onValueChanged">
907
+ </bento-base-filter>
908
+ </template>
909
+ <script setup lang="ts">
910
+ import {
911
+ // ...
912
+ useBentoBaseFilter
913
+ } from '@adyen/bento-vue2'
914
+ type FilterValue = string;
915
+ const {
916
+ // Fields
917
+ internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled,
918
+ // Methods
919
+ clearFilter, openFilter, resetFilter
920
+ } = useBentoBaseFilter<FilterValue>(
921
+ toRef(props, 'value'),
922
+ toRef(props, 'defaultValue')
923
+ );
924
+ const appliedFiltersCount = ref();
925
+ const buttonSecondaryLabel = computed(() => (/* Content depends on "internalFilterValue" */));
926
+ function updateFilter() {
927
+ appliedFiltersCount.value = 12; // Depends on "internalFilterValue"
928
+ /* Both events must be emitted */
929
+ emit('input', { ...props, value: internalFilterValue.value });
930
+ emit('update', { ...props, value: internalFilterValue.value });
931
+ }
932
+ function onValueChanged() {
933
+ /* Must be emitted to update the "All filters" modal before applying */
934
+ emit('input', { ...props, value: internalFilterValue.value });
935
+ }
936
+ </script>
937
+ `}
938
+ />
939
+
940
+ ### Configure fields in `bento-filter-bar`
941
+
942
+ - Pass the _custom filter_ as `type` inside the `config` property
943
+ - Define the filter value `filter-values-object`
944
+ - Extend from `BentoFilterBarValue` if there are filters provided by Bento
945
+
946
+ <Source
947
+ format={'html'}
948
+ dark
949
+ code={`
950
+ <template>
951
+ <bento-filter-bar
952
+ :config="filtersConfig"
953
+ :filter-values-object="filterValues"
954
+ @update:filter-values-object="filterValuesChanged"
955
+ />
956
+ </template>
957
+ <script setup lang="ts">
958
+ import {
959
+ BentoFilterBar,
960
+ type BentoFilterBarModel,
961
+ type BentoFilterBarValue,
962
+ type BentoFilterValueObject,
963
+ } from '@adyen/bento-vue2';
964
+ import {
965
+ CustomFilter,
966
+ FilterValue,
967
+ FilterOptions,
968
+ } from './custom-filter'
969
+ const filtersConfig = ref<BentoFilterBarModel<FilterOptions>>([
970
+ // ...Other filter definitions
971
+ {
972
+ field: 'custom-filter',
973
+ label: 'Custom filter',
974
+ type: CustomFilter,
975
+ visible: true,
976
+ },
977
+ ])
978
+ type FilterKeys = 'custom-filter';
979
+ type CustomFilterValues = BentoFilterBarValue | FilterValue; // Extend BentoFilterBarValue
980
+ const filterValues = ref<BentoFilterValueObject<FilterKeys, CustomFilterValues>>({
981
+ 'custom-filter': undefined,
982
+ });
983
+ function filterValuesChanged(newFilterValues: BentoFilterValueObject<FilterKeys, CustomFilterValues>) {
984
+ filterValues.value = newFilterValues;
985
+ }
986
+ </script>
987
+ `}
988
+ />
989
+
990
+ ## Responsiveness
991
+
992
+ The `bento-filter-var` component uses
993
+ [container queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries) to adapt its
994
+ styles responsively based on the size of its container.
995
+
996
+ If you want to place this component in a flexbox, you should set `flex: 1` to the filter bar in your css in order for
997
+ the container query to work correctly.
998
+
999
+ ## Accessibility 🚧
1000
+
1001
+ ### Roles, States, and Properties
1002
+
1003
+ The full accessibility implementation for this component is still under development, so changes to this section are to
1004
+ be expected. However, as for all the other `bento` components we are adhering to
1005
+ [WAI-ARIA 1.2](https://www.w3.org/TR/wai-aria-1.2/) standard.