@adyen/bento-mcp 0.0.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +21 -0
  3. package/README.md +58 -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/ai-tag/ai-tag.docs.mdx +75 -0
  13. package/dist/assets/components/ai-tag/ai-tag.stories.ts +1 -0
  14. package/dist/assets/components/ai-tag/ai-tag.vue +1 -0
  15. package/dist/assets/components/alert/alert.docs.mdx +106 -0
  16. package/dist/assets/components/alert/alert.stories.ts +1 -0
  17. package/dist/assets/components/alert/alert.vue +1 -0
  18. package/dist/assets/components/avatar/avatar.docs.mdx +44 -0
  19. package/dist/assets/components/avatar/avatar.stories.ts +1 -0
  20. package/dist/assets/components/avatar/avatar.vue +1 -0
  21. package/dist/assets/components/avatar/components/avatar-image/avatar-image.vue +1 -0
  22. package/dist/assets/components/button/button.docs.mdx +137 -0
  23. package/dist/assets/components/button/button.stories.ts +1 -0
  24. package/dist/assets/components/button/button.vue +1 -0
  25. package/dist/assets/components/button/components/ai-button/ai-button.docs.mdx +40 -0
  26. package/dist/assets/components/button/components/ai-button/ai-button.stories.ts +1 -0
  27. package/dist/assets/components/button/components/ai-button/ai-button.vue +1 -0
  28. package/dist/assets/components/button/components/button-actions/button-actions.docs.mdx +169 -0
  29. package/dist/assets/components/button/components/button-actions/button-actions.stories.ts +1 -0
  30. package/dist/assets/components/button/components/button-actions/button-actions.vue +1 -0
  31. package/dist/assets/components/button/components/loading-button/loading-button.docs.mdx +106 -0
  32. package/dist/assets/components/button/components/loading-button/loading-button.stories.ts +1 -0
  33. package/dist/assets/components/button/components/loading-button/loading-button.vue +1 -0
  34. package/dist/assets/components/button/components/toggle-button/toggle-button.docs.mdx +81 -0
  35. package/dist/assets/components/button/components/toggle-button/toggle-button.stories.ts +1 -0
  36. package/dist/assets/components/button/components/toggle-button/toggle-button.vue +1 -0
  37. package/dist/assets/components/card/card.docs.mdx +166 -0
  38. package/dist/assets/components/card/card.stories.ts +1 -0
  39. package/dist/assets/components/card/card.vue +1 -0
  40. package/dist/assets/components/checkbox/checkbox.docs.mdx +116 -0
  41. package/dist/assets/components/checkbox/checkbox.stories.ts +1 -0
  42. package/dist/assets/components/checkbox/checkbox.vue +1 -0
  43. package/dist/assets/components/checkbox/components/checkbox-group/checkbox-group.docs.mdx +134 -0
  44. package/dist/assets/components/checkbox/components/checkbox-group/checkbox-group.stories.ts +1 -0
  45. package/dist/assets/components/checkbox/components/checkbox-group/checkbox-group.vue +1 -0
  46. package/dist/assets/components/chip/chip.docs.mdx +51 -0
  47. package/dist/assets/components/chip/chip.stories.ts +1 -0
  48. package/dist/assets/components/chip/chip.vue +1 -0
  49. package/dist/assets/components/click-outside/click-outside.docs.mdx +30 -0
  50. package/dist/assets/components/click-outside/click-outside.stories.ts +1 -0
  51. package/dist/assets/components/code-snippet/code-snippet.docs.mdx +73 -0
  52. package/dist/assets/components/code-snippet/code-snippet.stories.ts +1 -0
  53. package/dist/assets/components/code-snippet/code-snippet.vue +1 -0
  54. package/dist/assets/components/country/country.docs.mdx +61 -0
  55. package/dist/assets/components/country/country.stories.ts +1 -0
  56. package/dist/assets/components/country/country.vue +1 -0
  57. package/dist/assets/components/currency/currency.docs.mdx +38 -0
  58. package/dist/assets/components/currency/currency.stories.ts +1 -0
  59. package/dist/assets/components/currency/currency.vue +1 -0
  60. package/dist/assets/components/dashed-underline/dashed-underline.docs.mdx +57 -0
  61. package/dist/assets/components/dashed-underline/dashed-underline.stories.ts +1 -0
  62. package/dist/assets/components/dashed-underline/dashed-underline.vue +1 -0
  63. package/dist/assets/components/data-grid/components/data-grid-cell/data-grid-cell.vue +1 -0
  64. package/dist/assets/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue +1 -0
  65. package/dist/assets/components/data-grid/components/data-grid-columns/data-grid-columns.vue +1 -0
  66. 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
  67. package/dist/assets/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue +1 -0
  68. package/dist/assets/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue +1 -0
  69. package/dist/assets/components/data-grid/components/data-grid-row/data-grid-row.vue +1 -0
  70. package/dist/assets/components/data-grid/components/data-grid-static-icon/data-grid-static-icon.docs.mdx +61 -0
  71. package/dist/assets/components/data-grid/components/data-grid-static-icon/data-grid-static-icon.stories.ts +1 -0
  72. package/dist/assets/components/data-grid/components/data-grid-static-icon/data-grid-static-icon.vue +1 -0
  73. package/dist/assets/components/data-grid/components/data-grid-summary-cell/data-grid-summary-cell.docs.mdx +56 -0
  74. package/dist/assets/components/data-grid/components/data-grid-summary-cell/data-grid-summary-cell.stories.ts +1 -0
  75. package/dist/assets/components/data-grid/components/data-grid-summary-cell/data-grid-summary-cell.vue +1 -0
  76. package/dist/assets/components/data-grid/components/data-grid-tag-with-text-cell/data-grid-tag-with-text-cell.docs.mdx +35 -0
  77. package/dist/assets/components/data-grid/components/data-grid-tag-with-text-cell/data-grid-tag-with-text-cell.stories.ts +1 -0
  78. package/dist/assets/components/data-grid/components/data-grid-tag-with-text-cell/data-grid-tag-with-text-cell.vue +1 -0
  79. package/dist/assets/components/data-grid/components/data-grid-trend-cell/data-grid-trend-cell.docs.mdx +48 -0
  80. package/dist/assets/components/data-grid/components/data-grid-trend-cell/data-grid-trend-cell.stories.ts +1 -0
  81. package/dist/assets/components/data-grid/components/data-grid-trend-cell/data-grid-trend-cell.vue +1 -0
  82. package/dist/assets/components/data-grid/data-grid.docs.mdx +963 -0
  83. package/dist/assets/components/data-grid/data-grid.stories.ts +1 -0
  84. package/dist/assets/components/data-grid/data-grid.vue +1 -0
  85. package/dist/assets/components/date/date.docs.mdx +49 -0
  86. package/dist/assets/components/date/date.stories.ts +1 -0
  87. package/dist/assets/components/date/date.vue +1 -0
  88. package/dist/assets/components/date-picker/date-picker.docs.mdx +69 -0
  89. package/dist/assets/components/date-picker/date-picker.stories.ts +1 -0
  90. package/dist/assets/components/date-picker/date-picker.vue +1 -0
  91. package/dist/assets/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue +1 -0
  92. package/dist/assets/components/date-range-picker/date-range-picker.docs.mdx +168 -0
  93. package/dist/assets/components/date-range-picker/date-range-picker.stories.ts +1 -0
  94. package/dist/assets/components/date-range-picker/date-range-picker.vue +1 -0
  95. package/dist/assets/components/divider/divider.docs.mdx +27 -0
  96. package/dist/assets/components/divider/divider.stories.ts +1 -0
  97. package/dist/assets/components/divider/divider.vue +1 -0
  98. package/dist/assets/components/draggable-handle/draggable-handle.docs.mdx +61 -0
  99. package/dist/assets/components/draggable-handle/draggable-handle.stories.ts +1 -0
  100. package/dist/assets/components/draggable-handle/draggable-handle.vue +1 -0
  101. package/dist/assets/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue +1 -0
  102. package/dist/assets/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue +1 -0
  103. package/dist/assets/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue +1 -0
  104. package/dist/assets/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue +1 -0
  105. package/dist/assets/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.stories.ts +1 -0
  106. package/dist/assets/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue +1 -0
  107. package/dist/assets/components/dropdown/components/variants/dropdown-country/dropdown-country.stories.ts +1 -0
  108. package/dist/assets/components/dropdown/components/variants/dropdown-country/dropdown-country.vue +1 -0
  109. package/dist/assets/components/dropdown/components/variants/dropdown-currency/dropdown-currency.stories.ts +1 -0
  110. package/dist/assets/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue +1 -0
  111. package/dist/assets/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.stories.ts +1 -0
  112. package/dist/assets/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue +1 -0
  113. package/dist/assets/components/dropdown/components/variants/dropdown-tag/dropdown-tag.stories.ts +1 -0
  114. package/dist/assets/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue +1 -0
  115. package/dist/assets/components/dropdown/dropdown.docs.mdx +420 -0
  116. package/dist/assets/components/dropdown/dropdown.stories.ts +1 -0
  117. package/dist/assets/components/dropdown/dropdown.vue +1 -0
  118. package/dist/assets/components/empty-state/empty-state.docs.mdx +115 -0
  119. package/dist/assets/components/empty-state/empty-state.stories.ts +1 -0
  120. package/dist/assets/components/empty-state/empty-state.vue +1 -0
  121. 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
  122. package/dist/assets/components/file-uploader/components/file-uploader-file-card/file-uploader-file-card.stories.ts +1 -0
  123. package/dist/assets/components/file-uploader/components/file-uploader-file-card/file-uploader-file-card.vue +1 -0
  124. package/dist/assets/components/file-uploader/components/file-uploader-restrictions/file-uploader-restrictions.stories.ts +1 -0
  125. package/dist/assets/components/file-uploader/components/file-uploader-restrictions/file-uploader-restrictions.vue +1 -0
  126. package/dist/assets/components/file-uploader/file-uploader.docs.mdx +117 -0
  127. package/dist/assets/components/file-uploader/file-uploader.stories.ts +1 -0
  128. package/dist/assets/components/file-uploader/file-uploader.vue +1 -0
  129. package/dist/assets/components/filter-bar/components/all-filters-modal/all-filters-modal.stories.ts +1 -0
  130. package/dist/assets/components/filter-bar/components/all-filters-modal/all-filters-modal.vue +1 -0
  131. package/dist/assets/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue +1 -0
  132. package/dist/assets/components/filter-bar/components/base-filter/base-filter.docs.mdx +90 -0
  133. package/dist/assets/components/filter-bar/components/base-filter/base-filter.stories.ts +1 -0
  134. package/dist/assets/components/filter-bar/components/base-filter/base-filter.vue +1 -0
  135. package/dist/assets/components/filter-bar/components/base-filter-button/base-filter-button.vue +1 -0
  136. package/dist/assets/components/filter-bar/components/boolean-filter/boolean-filter.vue +1 -0
  137. package/dist/assets/components/filter-bar/components/checkbox-group-filter/checkbox-group-filter.stories.ts +1 -0
  138. package/dist/assets/components/filter-bar/components/checkbox-group-filter/checkbox-group-filter.vue +1 -0
  139. package/dist/assets/components/filter-bar/components/date-filter/date-filter.stories.ts +1 -0
  140. package/dist/assets/components/filter-bar/components/date-filter/date-filter.vue +1 -0
  141. package/dist/assets/components/filter-bar/components/date-range-filter/date-range-filter.stories.ts +1 -0
  142. package/dist/assets/components/filter-bar/components/date-range-filter/date-range-filter.vue +1 -0
  143. package/dist/assets/components/filter-bar/components/filter-bar-button/filter-bar-button.vue +1 -0
  144. package/dist/assets/components/filter-bar/components/filter-bar-button-group/filter-bar-button-group.vue +1 -0
  145. package/dist/assets/components/filter-bar/components/input-filter/input-filter.docs.mdx +18 -0
  146. package/dist/assets/components/filter-bar/components/input-filter/input-filter.stories.ts +1 -0
  147. package/dist/assets/components/filter-bar/components/input-filter/input-filter.vue +1 -0
  148. package/dist/assets/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.docs.mdx +18 -0
  149. package/dist/assets/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.stories.ts +1 -0
  150. package/dist/assets/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.vue +1 -0
  151. package/dist/assets/components/filter-bar/components/radio-group-filter/radio-group-filter.stories.ts +1 -0
  152. package/dist/assets/components/filter-bar/components/radio-group-filter/radio-group-filter.vue +1 -0
  153. package/dist/assets/components/filter-bar/components/range-filter/range-filter.vue +1 -0
  154. package/dist/assets/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue +1 -0
  155. package/dist/assets/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue +1 -0
  156. package/dist/assets/components/filter-bar/components/select-filter/select-filter.stories.ts +1 -0
  157. package/dist/assets/components/filter-bar/components/select-filter/select-filter.vue +1 -0
  158. package/dist/assets/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.stories.ts +1 -0
  159. package/dist/assets/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue +1 -0
  160. package/dist/assets/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.stories.ts +1 -0
  161. package/dist/assets/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue +1 -0
  162. package/dist/assets/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.stories.ts +1 -0
  163. package/dist/assets/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue +1 -0
  164. package/dist/assets/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.stories.ts +1 -0
  165. package/dist/assets/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue +1 -0
  166. package/dist/assets/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.stories.ts +1 -0
  167. package/dist/assets/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue +1 -0
  168. package/dist/assets/components/filter-bar/components/toggle-filter/toggle-filter.stories.ts +1 -0
  169. package/dist/assets/components/filter-bar/components/toggle-filter/toggle-filter.vue +1 -0
  170. package/dist/assets/components/filter-bar/filter-bar.docs.mdx +1005 -0
  171. package/dist/assets/components/filter-bar/filter-bar.stories.ts +1 -0
  172. package/dist/assets/components/filter-bar/filter-bar.vue +1 -0
  173. package/dist/assets/components/focus-trap/focus-trap.docs.mdx +10 -0
  174. package/dist/assets/components/focus-trap/focus-trap.stories.ts +1 -0
  175. package/dist/assets/components/focus-trap/focus-trap.vue +1 -0
  176. package/dist/assets/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue +1 -0
  177. package/dist/assets/components/form-layout/components/form-layout-group/form-layout-group.vue +1 -0
  178. package/dist/assets/components/form-layout/components/form-layout-title/form-layout-title.vue +1 -0
  179. package/dist/assets/components/form-layout/form-layout.docs.mdx +452 -0
  180. package/dist/assets/components/form-layout/form-layout.stories.ts +1 -0
  181. package/dist/assets/components/form-layout/form-layout.vue +1 -0
  182. package/dist/assets/components/header/header.docs.mdx +85 -0
  183. package/dist/assets/components/header/header.stories.ts +1 -0
  184. package/dist/assets/components/header/header.vue +1 -0
  185. package/dist/assets/components/header-with-views/components/header-with-views-all-views/header-with-views-all-views.vue +1 -0
  186. package/dist/assets/components/header-with-views/components/header-with-views-item-edit-form/header-with-views-edit-form.vue +1 -0
  187. package/dist/assets/components/header-with-views/header-with-views.docs.mdx +103 -0
  188. package/dist/assets/components/header-with-views/header-with-views.stories.ts +1 -0
  189. package/dist/assets/components/header-with-views/header-with-views.vue +1 -0
  190. package/dist/assets/components/image/image.docs.mdx +34 -0
  191. package/dist/assets/components/image/image.stories.ts +1 -0
  192. package/dist/assets/components/image/image.vue +1 -0
  193. package/dist/assets/components/info-icon/info-icon.docs.mdx +57 -0
  194. package/dist/assets/components/info-icon/info-icon.stories.ts +1 -0
  195. package/dist/assets/components/info-icon/info-icon.vue +1 -0
  196. package/dist/assets/components/input-field/input-field.docs.mdx +141 -0
  197. package/dist/assets/components/input-field/input-field.stories.ts +1 -0
  198. package/dist/assets/components/input-field/input-field.vue +1 -0
  199. package/dist/assets/components/input-field-password/input-field-password.docs.mdx +292 -0
  200. package/dist/assets/components/input-field-password/input-field-password.stories.ts +1 -0
  201. package/dist/assets/components/input-field-password/input-field-password.vue +1 -0
  202. package/dist/assets/components/input-field-phone-number/input-field-phone-number.docs.mdx +72 -0
  203. package/dist/assets/components/input-field-phone-number/input-field-phone-number.stories.ts +1 -0
  204. package/dist/assets/components/input-field-phone-number/input-field-phone-number.vue +1 -0
  205. package/dist/assets/components/inspector/inspector.docs.mdx +118 -0
  206. package/dist/assets/components/inspector/inspector.stories.ts +1 -0
  207. package/dist/assets/components/inspector/inspector.vue +1 -0
  208. package/dist/assets/components/internal/base-button/base-button.vue +1 -0
  209. package/dist/assets/components/internal/button-actions-with-menu/button-actions-with-menu.stories.ts +1 -0
  210. package/dist/assets/components/internal/button-actions-with-menu/button-actions-with-menu.vue +1 -0
  211. package/dist/assets/components/internal/calendar/calendar.stories.ts +1 -0
  212. package/dist/assets/components/internal/calendar/calendar.vue +1 -0
  213. package/dist/assets/components/internal/calendar/components/calendar-month/calendar-month.stories.ts +1 -0
  214. package/dist/assets/components/internal/calendar/components/calendar-month/calendar-month.vue +1 -0
  215. package/dist/assets/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue +1 -0
  216. package/dist/assets/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.stories.ts +1 -0
  217. package/dist/assets/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue +1 -0
  218. package/dist/assets/components/internal/calendar/components/calendar-year/calendar-year.vue +1 -0
  219. package/dist/assets/components/internal/calendar/components/calendar-year/components/calendar-year-month/__test__/calendar-year-month-stub.vue +1 -0
  220. package/dist/assets/components/internal/calendar/components/calendar-year/components/calendar-year-month/calendar-year-month.vue +1 -0
  221. package/dist/assets/components/internal/checkbox-input/checkbox-input.stories.ts +1 -0
  222. package/dist/assets/components/internal/checkbox-input/checkbox-input.vue +1 -0
  223. package/dist/assets/components/internal/controls-group/controls-group.vue +1 -0
  224. package/dist/assets/components/internal/copy/copy.docs.mdx +43 -0
  225. package/dist/assets/components/internal/copy/copy.stories.ts +1 -0
  226. package/dist/assets/components/internal/copy/copy.vue +1 -0
  227. package/dist/assets/components/internal/decorative-checkbox/decorative-checkbox.vue +1 -0
  228. package/dist/assets/components/internal/dialog-page/dialog-page.vue +1 -0
  229. package/dist/assets/components/internal/error-message/error-message.vue +1 -0
  230. package/dist/assets/components/internal/field-label/field-label.vue +1 -0
  231. package/dist/assets/components/internal/fixed-scroller/fixed-scroller.docs.mdx +21 -0
  232. package/dist/assets/components/internal/fixed-scroller/fixed-scroller.stories.ts +1 -0
  233. package/dist/assets/components/internal/fixed-scroller/fixed-scroller.vue +1 -0
  234. package/dist/assets/components/internal/footer-actions/footer-actions.vue +1 -0
  235. package/dist/assets/components/internal/grid-layout/grid-layout.vue +1 -0
  236. package/dist/assets/components/internal/header-meta/header-meta.vue +1 -0
  237. package/dist/assets/components/internal/info-icon-with-popover/info-icon-with-popover.vue +1 -0
  238. 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
  239. package/dist/assets/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue +1 -0
  240. package/dist/assets/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue +1 -0
  241. package/dist/assets/components/internal/listbox/components/listbox-option/listbox-option.vue +1 -0
  242. package/dist/assets/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue +1 -0
  243. package/dist/assets/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue +1 -0
  244. package/dist/assets/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue +1 -0
  245. package/dist/assets/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue +1 -0
  246. package/dist/assets/components/internal/listbox/listbox.stories.ts +1 -0
  247. package/dist/assets/components/internal/listbox/listbox.vue +1 -0
  248. package/dist/assets/components/internal/radio-input/radio-input.stories.ts +1 -0
  249. package/dist/assets/components/internal/radio-input/radio-input.vue +1 -0
  250. package/dist/assets/components/internal/teleport/teleport.vue +1 -0
  251. package/dist/assets/components/internal/tooltip/tooltip.test.vue +1 -0
  252. package/dist/assets/components/internal/tooltip/tooltip.vue +1 -0
  253. package/dist/assets/components/layout/components/layout-row/layout-row.stories.ts +1 -0
  254. package/dist/assets/components/layout/components/layout-row/layout-row.vue +1 -0
  255. package/dist/assets/components/layout/layout.docs.mdx +108 -0
  256. package/dist/assets/components/layout/layout.stories.ts +1 -0
  257. package/dist/assets/components/layout/layout.vue +1 -0
  258. package/dist/assets/components/link/link.docs.mdx +119 -0
  259. package/dist/assets/components/link/link.stories.ts +1 -0
  260. package/dist/assets/components/link/link.vue +1 -0
  261. package/dist/assets/components/loading-indicator/loading-indicator.docs.mdx +65 -0
  262. package/dist/assets/components/loading-indicator/loading-indicator.stories.ts +1 -0
  263. package/dist/assets/components/loading-indicator/loading-indicator.vue +1 -0
  264. package/dist/assets/components/menu/components/menu-item/menu-item.vue +1 -0
  265. package/dist/assets/components/menu/components/menu-item-list/menu-item-list.vue +1 -0
  266. package/dist/assets/components/menu/components/menu-list-container/menu-list-container.vue +1 -0
  267. package/dist/assets/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue +1 -0
  268. package/dist/assets/components/menu/menu.docs.mdx +121 -0
  269. package/dist/assets/components/menu/menu.stories.ts +1 -0
  270. package/dist/assets/components/menu/menu.vue +1 -0
  271. package/dist/assets/components/modal/components/base-modal/base-modal.vue +1 -0
  272. package/dist/assets/components/modal/components/modal-default/modal-default.vue +1 -0
  273. package/dist/assets/components/modal/components/modal-dialog/modal-dialog.vue +1 -0
  274. package/dist/assets/components/modal/components/modal-page/modal-page.vue +1 -0
  275. package/dist/assets/components/modal/modal.docs.mdx +215 -0
  276. package/dist/assets/components/modal/modal.stories.ts +1 -0
  277. package/dist/assets/components/modal/modal.vue +1 -0
  278. package/dist/assets/components/modal-fullscreen/components/modal-fullscreen-page.vue +1 -0
  279. package/dist/assets/components/modal-fullscreen/modal-fullscreen.docs.mdx +217 -0
  280. package/dist/assets/components/modal-fullscreen/modal-fullscreen.stories.ts +1 -0
  281. package/dist/assets/components/modal-fullscreen/modal-fullscreen.vue +1 -0
  282. package/dist/assets/components/pagination/components/pagination-context/pagination-context.vue +1 -0
  283. package/dist/assets/components/pagination/components/pagination-controls/pagination-controls.vue +1 -0
  284. package/dist/assets/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue +1 -0
  285. package/dist/assets/components/pagination/pagination.docs.mdx +116 -0
  286. package/dist/assets/components/pagination/pagination.stories.ts +1 -0
  287. package/dist/assets/components/pagination/pagination.vue +1 -0
  288. package/dist/assets/components/payment-method/payment-method.docs.mdx +34 -0
  289. package/dist/assets/components/payment-method/payment-method.stories.ts +1 -0
  290. package/dist/assets/components/payment-method/payment-method.vue +1 -0
  291. package/dist/assets/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue +1 -0
  292. package/dist/assets/components/popover/components/popover-image/popover-image.vue +1 -0
  293. package/dist/assets/components/popover/components/popover-title/popover-title.vue +1 -0
  294. package/dist/assets/components/popover/popover.docs.mdx +89 -0
  295. package/dist/assets/components/popover/popover.stories.ts +1 -0
  296. package/dist/assets/components/popover/popover.vue +1 -0
  297. package/dist/assets/components/popper-container/popper-container.docs.mdx +11 -0
  298. package/dist/assets/components/popper-container/popper-container.stories.ts +1 -0
  299. package/dist/assets/components/popper-container/popper-container.vue +1 -0
  300. package/dist/assets/components/promo-banner/promo-banner.docs.mdx +94 -0
  301. package/dist/assets/components/promo-banner/promo-banner.stories.ts +1 -0
  302. package/dist/assets/components/promo-banner/promo-banner.vue +1 -0
  303. package/dist/assets/components/radio-group/components/radio-button/radio-button.docs.mdx +76 -0
  304. package/dist/assets/components/radio-group/components/radio-button/radio-button.stories.ts +1 -0
  305. package/dist/assets/components/radio-group/components/radio-button/radio-button.vue +1 -0
  306. package/dist/assets/components/radio-group/radio-group.docs.mdx +154 -0
  307. package/dist/assets/components/radio-group/radio-group.stories.ts +1 -0
  308. package/dist/assets/components/radio-group/radio-group.vue +1 -0
  309. package/dist/assets/components/rich-text-editor/components/rich-text-editor-content-area/rich-text-editor-content-area.vue +1 -0
  310. 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
  311. 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
  312. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-link/rich-text-editor-link.vue +1 -0
  313. 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
  314. package/dist/assets/components/rich-text-editor/components/rich-text-editor-renderer/components/rich-text-editor-table/rich-text-editor-table.vue +1 -0
  315. package/dist/assets/components/rich-text-editor/rich-text-editor.docs.mdx +52 -0
  316. package/dist/assets/components/rich-text-editor/rich-text-editor.stories.ts +1 -0
  317. package/dist/assets/components/rich-text-editor/rich-text-editor.vue +1 -0
  318. package/dist/assets/components/search-bar/search-bar.docs.mdx +117 -0
  319. package/dist/assets/components/search-bar/search-bar.stories.ts +1 -0
  320. package/dist/assets/components/search-bar/search-bar.vue +1 -0
  321. package/dist/assets/components/secondary-nav/components/secondary-nav-category/secondary-nav-category.vue +1 -0
  322. package/dist/assets/components/secondary-nav/components/secondary-nav-item/secondary-nav-item.vue +1 -0
  323. package/dist/assets/components/secondary-nav/secondary-nav.docs.mdx +40 -0
  324. package/dist/assets/components/secondary-nav/secondary-nav.stories.ts +1 -0
  325. package/dist/assets/components/secondary-nav/secondary-nav.vue +1 -0
  326. package/dist/assets/components/segmented-control/components/segmented-control-button/segmented-control-button.vue +1 -0
  327. package/dist/assets/components/segmented-control/segmented-control.docs.mdx +90 -0
  328. package/dist/assets/components/segmented-control/segmented-control.stories.ts +1 -0
  329. package/dist/assets/components/segmented-control/segmented-control.vue +1 -0
  330. package/dist/assets/components/selection-card/components/selection-card-group/selection-card-group.docs.mdx +119 -0
  331. package/dist/assets/components/selection-card/components/selection-card-group/selection-card-group.stories.ts +1 -0
  332. package/dist/assets/components/selection-card/components/selection-card-group/selection-card-group.vue +1 -0
  333. package/dist/assets/components/selection-card/selection-card.docs.mdx +108 -0
  334. package/dist/assets/components/selection-card/selection-card.stories.ts +1 -0
  335. package/dist/assets/components/selection-card/selection-card.vue +1 -0
  336. package/dist/assets/components/sidepanel/components/sidepanel-page.stories.ts +1 -0
  337. package/dist/assets/components/sidepanel/components/sidepanel-page.vue +1 -0
  338. package/dist/assets/components/sidepanel/sidepanel.docs.mdx +129 -0
  339. package/dist/assets/components/sidepanel/sidepanel.stories.ts +1 -0
  340. package/dist/assets/components/sidepanel/sidepanel.vue +1 -0
  341. package/dist/assets/components/status/status.docs.mdx +62 -0
  342. package/dist/assets/components/status/status.stories.ts +1 -0
  343. package/dist/assets/components/status/status.vue +1 -0
  344. package/dist/assets/components/stepper/components/step/step.stories.ts +1 -0
  345. package/dist/assets/components/stepper/components/step/step.vue +1 -0
  346. package/dist/assets/components/stepper/stepper.docs.mdx +127 -0
  347. package/dist/assets/components/stepper/stepper.stories.ts +1 -0
  348. package/dist/assets/components/stepper/stepper.vue +1 -0
  349. package/dist/assets/components/structured-list/components/structered-list-item/structured-list-item.stories.ts +1 -0
  350. package/dist/assets/components/structured-list/components/structered-list-item/structured-list-item.vue +1 -0
  351. package/dist/assets/components/structured-list/structured-list.docs.mdx +68 -0
  352. package/dist/assets/components/structured-list/structured-list.stories.ts +1 -0
  353. package/dist/assets/components/structured-list/structured-list.vue +1 -0
  354. package/dist/assets/components/summary-grid/components/summary-grid-item/summary-grid-item.vue +1 -0
  355. package/dist/assets/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.stories.ts +1 -0
  356. package/dist/assets/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue +1 -0
  357. package/dist/assets/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.stories.ts +1 -0
  358. package/dist/assets/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue +1 -0
  359. package/dist/assets/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.stories.ts +1 -0
  360. package/dist/assets/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue +1 -0
  361. package/dist/assets/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.stories.ts +1 -0
  362. package/dist/assets/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue +1 -0
  363. package/dist/assets/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.stories.ts +1 -0
  364. package/dist/assets/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue +1 -0
  365. package/dist/assets/components/summary-grid/summary-grid.docs.mdx +152 -0
  366. package/dist/assets/components/summary-grid/summary-grid.stories.ts +1 -0
  367. package/dist/assets/components/summary-grid/summary-grid.vue +1 -0
  368. package/dist/assets/components/tabs/components/tab.vue +1 -0
  369. package/dist/assets/components/tabs/tabs.docs.mdx +98 -0
  370. package/dist/assets/components/tabs/tabs.stories.ts +1 -0
  371. package/dist/assets/components/tabs/tabs.vue +1 -0
  372. package/dist/assets/components/tag/tag.docs.mdx +137 -0
  373. package/dist/assets/components/tag/tag.stories.ts +1 -0
  374. package/dist/assets/components/tag/tag.vue +1 -0
  375. package/dist/assets/components/textarea/textarea.docs.mdx +53 -0
  376. package/dist/assets/components/textarea/textarea.stories.ts +1 -0
  377. package/dist/assets/components/textarea/textarea.vue +1 -0
  378. package/dist/assets/components/timeline/components/timeline-item/timeline-item.stories.ts +1 -0
  379. package/dist/assets/components/timeline/components/timeline-item/timeline-item.vue +1 -0
  380. package/dist/assets/components/timeline/timeline.docs.mdx +131 -0
  381. package/dist/assets/components/timeline/timeline.stories.ts +1 -0
  382. package/dist/assets/components/timeline/timeline.vue +1 -0
  383. package/dist/assets/components/toast/components/toast-item/toast-item.vue +1 -0
  384. package/dist/assets/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue +1 -0
  385. package/dist/assets/components/toast/toast.docs.mdx +151 -0
  386. package/dist/assets/components/toast/toast.stories.ts +1 -0
  387. package/dist/assets/components/toast/toast.vue +1 -0
  388. package/dist/assets/components/toggle/toggle.docs.mdx +81 -0
  389. package/dist/assets/components/toggle/toggle.stories.ts +1 -0
  390. package/dist/assets/components/toggle/toggle.vue +1 -0
  391. package/dist/assets/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue +1 -0
  392. package/dist/assets/components/tutorial/components/tutorial-popover/tutorial-popover.vue +1 -0
  393. package/dist/assets/components/tutorial/tutorial.docs.mdx +85 -0
  394. package/dist/assets/components/tutorial/tutorial.stories.ts +1 -0
  395. package/dist/assets/components/tutorial/tutorial.vue +1 -0
  396. package/dist/assets/components/typography/typography.docs.mdx +124 -0
  397. package/dist/assets/components/typography/typography.stories.ts +1 -0
  398. package/dist/assets/components/typography/typography.vue +1 -0
  399. package/dist/assets/composables/use-bento-currency/use-bento-currency.docs.mdx +28 -0
  400. package/dist/assets/composables/use-bento-currency/use-bento-currency.stories.ts +1 -0
  401. package/dist/assets/composables/use-click-outside/use-click-outside.docs.mdx +10 -0
  402. package/dist/assets/composables/use-click-outside/use-click-outside.stories.ts +1 -0
  403. package/dist/assets/directives/highlight/highlight.docs.mdx +64 -0
  404. package/dist/assets/directives/highlight/highlight.stories.ts +1 -0
  405. package/dist/assets/directives/keyboard-navigation/keyboard-navigation.docs.mdx +41 -0
  406. package/dist/assets/directives/keyboard-navigation/keyboard-navigation.stories.ts +1 -0
  407. package/dist/assets/directives/tooltip/tooltip.docs.mdx +86 -0
  408. package/dist/assets/directives/tooltip/tooltip.stories.ts +1 -0
  409. package/dist/assets/index.ts +1 -0
  410. package/dist/assets/templates/dashboard-template/components/dashboard-section/dashboard-section.stories.ts +1 -0
  411. package/dist/assets/templates/dashboard-template/components/dashboard-section/dashboard-section.vue +1 -0
  412. package/dist/assets/templates/dashboard-template/dashboard-template.docs.mdx +148 -0
  413. package/dist/assets/templates/dashboard-template/dashboard-template.stories.ts +1 -0
  414. package/dist/assets/templates/dashboard-template/dashboard-template.vue +1 -0
  415. package/dist/assets/templates/data-grid-template/data-grid-template.docs.mdx +117 -0
  416. package/dist/assets/templates/data-grid-template/data-grid-template.stories.ts +1 -0
  417. package/dist/assets/templates/data-grid-template/data-grid-template.vue +1 -0
  418. package/dist/main.js +30051 -0
  419. package/package.json +46 -3
@@ -0,0 +1,963 @@
1
+ import { Canvas, Meta, Source, Story } from '@storybook/blocks';
2
+ import * as ComponentStories from './data-grid.stories';
3
+ import DataGridFitContentInCardExample from './__tests__/data-grid-fit-content-in-card-example.vue?raw';
4
+ import DataGridFitContentInModalExample from './__tests__/data-grid-fit-content-in-modal-example.vue?raw';
5
+ import DataGridFitContentInModalFullscreenExample from './__tests__/data-grid-fit-content-in-modal-fullscreen-example.vue?raw';
6
+
7
+ <Meta of={ComponentStories} />
8
+
9
+ # Data Grid
10
+
11
+ <Canvas of={ComponentStories.Default} />
12
+
13
+ The data grid is used to display set of data of information to the user. Using this they will be able to interact with
14
+ the data items through the use of links or buttons. Depending on how the data grid has been configured they can also
15
+ filter and sort the information.
16
+
17
+ ## Table of contents
18
+
19
+ - [Use Cases](#use-cases)
20
+ - [Do not use](#do-not-use)
21
+ - [Configurations](#configurations)
22
+ - [Columns](#columns)
23
+ - [Column width](#column-width)
24
+ - [Fluid Column width](#fluid-column-width)
25
+ - [Automatic width](#automatic-width)
26
+ - [Column padding](#column-padding)
27
+ - [Numeric column](#numeric-column)
28
+ - [Column (text) overflow](#column-text-overflow)
29
+ - [Column visibility](#column-visibility)
30
+ - [Freezing (Column pinning)](#freezing-column-pinning)
31
+ - [Column reactivity and emits](#column-reactivity-and-emits)
32
+ - [Data](#data)
33
+ - [Modifiers](#modifiers)
34
+ - [Custom slots](#custom-slots)
35
+ - [Sorting](#sorting)
36
+ - [Filtering](#filtering)
37
+ - [Usage](#usage)
38
+ - [Filter search bar](#filter-search-bar)
39
+ - [Empty state](#empty-state)
40
+ - [Sticky filters](#sticky-filters)
41
+ - [Pagination](#pagination)
42
+ - [Pagination slot](#pagination-slot)
43
+ - [Lazy loading](#lazy-loading)
44
+ - [Selection and Bulk Actions](#selection-and-bulk-actions)
45
+ - [Bulk selection](#bulk-selection)
46
+ - [Resizing](#resizing)
47
+ - [Condensed](#condensed)
48
+ - [Zebra rows](#zebra-rows)
49
+ - [Slashed zero](#slashed-zero)
50
+ - [Truncate headers](#truncate-headers)
51
+ - [Fitting content within a container (`fit-content`)](#fitting-content-within-a-container-fit-content)
52
+ - [In containers with a fixed height](#in-containers-with-a-fixed-height)
53
+ - [Inside a `bento-modal`](#inside-a-bento-modal)
54
+ - [In containers with a dynamic height](#in-containers-with-a-dynamic-height)
55
+ - [Inside padded containers](#inside-padded-containers)
56
+ - [Dragging](#dragging)
57
+ - [Column Panel (Display options)](#column-panel-display-options)
58
+ - [Nested content slot](#nested-content-slot)
59
+ - [Sticky horizontal scrollbar](#sticky-horizontal-scrollbar)
60
+ - [Nested Rows](#nested-rows)
61
+ - [Prepopulate data with children](#prepopulate-data-with-children)
62
+ - [Asynchronously populate the children when parent is toggled](#asynchronously-populate-the-children-when-parent-is-toggled)
63
+ - [Actions](#actions)
64
+ - [Cell Actions](#cell-actions)
65
+ - [Row Actions](#row-actions)
66
+ - [Action types](#action-types)
67
+ - [Components](#components)
68
+ - [Summary Cell](#summary-cell)
69
+ - [Tag with Text Cell](#tag-with-text-cell)
70
+ - [Trend Cell](#trend-cell)
71
+ - [Everything Bagel Example](#everything-bagel-example)
72
+ - [Server side filtering and sorting](#server-side-filtering-and-sorting)
73
+ - [Accessibility 🚧](#accessibility-🚧)
74
+ - [Roles, States, and Properties](#roles-states-and-properties)
75
+ - [Resources](#resources)
76
+
77
+ ## Use Cases
78
+
79
+ Here are some examples:
80
+
81
+ - Show a user a data set where they can edit and delete items.
82
+ - Show a list of data items that can be ordered by status and filtered by name.
83
+
84
+ ### Do not use
85
+
86
+ When using the data grid:
87
+
88
+ - do not add the filter-bar component in the header slot but use the filters prop instead.
89
+
90
+ ## Configurations
91
+
92
+ ### Columns
93
+
94
+ An array of column definitions must be provided to the data grid.
95
+
96
+ ```
97
+ [{
98
+ autoWidth?: boolean;
99
+ field: string;
100
+ flex?: number;
101
+ label: string;
102
+ mandatory?: boolean;
103
+ minWidth?: number;
104
+ numeric: boolean;
105
+ padding?: {
106
+ left?: boolean;
107
+ right?: boolean;
108
+ };
109
+ sortable?: boolean;
110
+ width?: number;
111
+ }]
112
+ ```
113
+
114
+ The following properties are required in each definition:
115
+
116
+ `field` - the name of the key in the data item in the `data` array of items.
117
+
118
+ `label` - the label of the column header.
119
+
120
+ While `mandatory` is not required, it is best practice to have at least one `mandatory` column to ensure data always
121
+ stays displayed even if the user hides all columns.
122
+
123
+ #### Column width
124
+
125
+ For each column the following width properties can be applied:
126
+
127
+ `width` - the initial width of the column.
128
+
129
+ `minWidth` - the minimum width the column.
130
+
131
+ #### Fluid Column width
132
+
133
+ You can also set a fluid width for achieving column fluidity & responsiveness (similar to the CSS flexbox). This can be
134
+ by done by setting the following properties:
135
+
136
+ `minWidth` - the minimum width the column can be resized to.
137
+
138
+ `flex` - can be between 0 and ∞. It works by dividing the remaining space in the grid among all flex columns in
139
+ proportion to their flex value. It works a lot like the `flex` used in
140
+ [CSS flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/flex).
141
+
142
+ <Canvas of={ComponentStories.Fluid} />
143
+
144
+ #### Automatic width
145
+
146
+ You can also set the column's width to automatic by setting `autoWidth` to `true`. This will automatically scale the
147
+ column's width depending on its data. The scaling chooses the largest width for that columns row cells and column header
148
+ label so that the text does not overflow.
149
+
150
+ Is it important however to make sure you do not use this on all columns especially the ones you know that will have a
151
+ fixed width or that have been specified in the Figma design your designer has provided to you.
152
+
153
+ #### Column padding
154
+
155
+ It is possible to remove padding from columns - note that this will affect on all row cells for that column including
156
+ the column header.
157
+
158
+ This can be done by using the properties:
159
+
160
+ `padding` - is an object with 2 boolean properties `left` and `right` which can be set to false to remove padding from
161
+ that side for that given column.
162
+
163
+ #### Numeric column
164
+
165
+ It's possible to indicate that the column will contain only numeric values. With this, the column name and cell values
166
+ for this column will be aligned to the right
167
+
168
+ This can be done by using the `numeric` boolean property
169
+
170
+ #### Column (text) overflow
171
+
172
+ <Canvas of={ComponentStories.EverythingBagelExample} />
173
+
174
+ It is possible to customize the text overflow for columns - note that this will affect on all row cells for that column.
175
+
176
+ This can be done by using the properties:
177
+
178
+ `overflow` - which can set to `BentoColumnOverflow.WRAP` (default) or `BentoColumnOverflow.ELLIPSIS`.
179
+
180
+ The result of using the values are explained below:
181
+
182
+ `BentoColumnOverflow.WRAP` - Wraps the cell's text upon overflow.
183
+
184
+ `BentoColumnOverflow.ELLIPSIS` - Truncates cell's text with a `...` ellipsis upon overflow. NOTE: when using this option
185
+ set a `title` attribute on the cell's content if using the `item-{columnKey}` slot. This will allow the user to hover
186
+ over the truncated content to see the whole content.
187
+
188
+ #### Column visibility
189
+
190
+ It is possible to set a column's visibility by changing the `visible` property in it's Column definition.
191
+
192
+ `mandatory` columns cannot be hidden and will stay visible even when the user hides all columns.
193
+
194
+ #### Freezing (Column pinning)
195
+
196
+ To pin a column to the left-hand side of the screen (i.e. pinning the column in place for horizontal scrolling) you can
197
+ set the `frozen` property to `true` in the it's Column definition
198
+
199
+ #### Column reactivity and emits
200
+
201
+ In order to make sure the consumer's column definition and the internal Datagrid are in sync, it required for the
202
+ [**Dragging**](#dragging) and [**Column panel**](#column-panel-display-options) features to update the `columns` prop
203
+ when the `update:columns` emit is fired.
204
+
205
+ This can easily be done by creating the `columns` array as a
206
+ [Vue reference](https://vuejs.org/guide/essentials/reactivity-fundamentals.html#ref).
207
+
208
+ e.g.
209
+
210
+ ```typescript
211
+ const columns = ref([
212
+ { field: 'payment', label: 'Payment' },
213
+ { field: 'countryCode', label: 'Country' },
214
+ ]);
215
+ ```
216
+
217
+ and then setting this as a [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier) on
218
+ the Datagrid:
219
+
220
+ ```html
221
+ <bento-data-grid :data="dataArray" :columns.sync="columns" />
222
+ ```
223
+
224
+ ### Data
225
+
226
+ Data is simply an array of objects that are a string keyed object of data values.
227
+
228
+ ```
229
+ [
230
+ {
231
+ "id": "03c0a799-1ced-4017-aea3-0cebb0106335",
232
+ "name": "Shepherd Kane",
233
+ "payment": 1604,
234
+ "company": "VURBO",
235
+ "registered": "2017-07-17T02:50:50 -02:00",
236
+ },
237
+ {
238
+ "id": "b6d4f1fd-b1f6-40a6-a443-f785c89604ef",
239
+ "name": "Santos Palmer",
240
+ "payment": 1635,
241
+ "company": "POLARAX",
242
+ "registered": "2020-04-20T09:56:06 -02:00",
243
+ },
244
+ ]
245
+ ```
246
+
247
+ ## Modifiers
248
+
249
+ ### Custom slots
250
+
251
+ The Data Grid provides the following customizeable slots:
252
+
253
+ - Header: `#header`
254
+ - Table header: `#head-FIELD="{column}"`
255
+ - Table cell: `#item-FIELD="{item}"`
256
+ - Footer: `#footer`
257
+
258
+ > Please note if you use a `BentoLink` inside a table cell its style will automatically be adjusted for you.
259
+
260
+ With descriptions:
261
+
262
+ All descriptions must use the color **Label secondary** (`--b-color-label-secondary`). The use of CSS variables is
263
+ encouraged to be able to support _themes_ (e.g. `dark` & `light`) over the use of JS variables or hard coded values.
264
+
265
+ <Canvas of={ComponentStories.Slots} />
266
+
267
+ ### Sorting
268
+
269
+ You can sort columns by using the `sortBy` and `@update:sort-by` / `@sort` events.
270
+
271
+ `sortBy` is an array of `BentoDatagridSortByColumn` items with a structure of:
272
+
273
+ ```typescript
274
+ {
275
+ field: string;
276
+ direction: BentoDatagridSortDirection;
277
+ }
278
+ ```
279
+
280
+ `sortBy` can be used with the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier)
281
+ for automatic updating of the `sortBy` ref.
282
+
283
+ | Prop / Events | Purpose |
284
+ | ------------- | ------------------------------------------------------------------------------------------------------------------- |
285
+ | `sortBy` | Array of `BentoDatagridSortByColumn` items noting the `field` that was sorted and the `direction` it was sorted in. |
286
+ | `@sort` | Event emitted when the `sortBy` has changed. |
287
+
288
+ <Canvas of={ComponentStories.Sorting} />
289
+
290
+ ### Filtering
291
+
292
+ You can add filtering to the data grid by adding an array of filter configurations (`BentoFilterBarModel`) to `filters`
293
+ property & filter values (`BentoFilterValues`) to the `filter-values` property (NOTE: in order to watch `filter-values`
294
+ you will need to do a [deep watch](https://vuejs.org/guide/essentials/watchers.html#deep-watchers)).
295
+
296
+ To see more about what filter can be set on the `filters` property, go to the
297
+ [filter bar documentation](../?path=/docs/components-filter-bar--docs#available-filter-configurations)
298
+
299
+ You can automatically update `filter-values` using the
300
+ [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier) (in vue 2) or the `v-model`
301
+ (in vue 3) or independently with the `@update:filter-values` event.
302
+
303
+ | Prop | Purpose |
304
+ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
305
+ | `filters` | Array of filter objects. Each one of the elements in the array corresponds to a filter that will be created and rendered in the FilterBar. |
306
+ | `filterValues` | Array of filter values. Each one of the elements in the array corresponds to a filter's value to be set in the filter bar. |
307
+ | `filterSearchTerm` | String that contains the search term used to filter the data with, it is displayed in the search input of the filter bar. |
308
+ | `filterSearchConfig` | Sets the configuration options (`hint`, `placeholder`, `debounceTime` and `inputFieldAriaLabel`) for the filter's search bar. |
309
+
310
+ <Canvas of={ComponentStories.Filtering} />
311
+
312
+ #### Usage
313
+
314
+ `bento-data-grid` filters internally rely on the `bento-toast` component.
315
+
316
+ If you want to use filtering in your `bento-data-grid` component, then it's needed to initialize the **Bento plugin**
317
+ with the toast enabled by setting the `withToast` property set to `true`
318
+
319
+ More information with example can be found in [Toast usage documentation](../?path=/docs/components-toast--docs#usage)
320
+
321
+ #### Filter search bar
322
+
323
+ It is also possible to filter using the search bar. Typing the word dynamically filters the content to show relevant
324
+ results.
325
+
326
+ - Can be used with `filterSearchTerm.sync` or independently with `filterSearchTerm` and `@filter-search-input`.
327
+ - When the search is cleared, the event `@filter-search-clear` is emitted, updating `filterSearchTerm` if the `sync`
328
+ option is set
329
+
330
+ <Canvas of={ComponentStories.Filtering} />
331
+
332
+ ### Empty state
333
+
334
+ The empty state will be shown when an empty array is set on the `data` property.
335
+
336
+ Setting the `emptyState` property can be used to configure the inner `bento-empty-state` component. For more information
337
+ about what properties can be set, [see the EmptyState documentation](../?path=/docs/components-empty-state--docs).
338
+
339
+ Please note there is limitation for which values can be set on the `emptyState.image` property, please use the following
340
+ UX rules to decide which one to set:
341
+
342
+ - 'embedded' - When only one single data grid has been rendered on the page.
343
+ - 'basic' - When multiple datagrid are being rendered on the page.
344
+
345
+ <Canvas of={ComponentStories.NoResults} />
346
+
347
+ #### Sticky filters
348
+
349
+ By default, filters will be sticky, showing always on top of the page as the user scrolls, along with the column
350
+ headers. This behavior can be disabled by setting `stickyFilters` to false.
351
+
352
+ ### Pagination
353
+
354
+ You can add the pagination component to the data grid using the `pagination` prop. This prop accepts an object
355
+ containing all the properties available for the `bento-pagination` component (see the Pagination component story for
356
+ more details).
357
+
358
+ To handle pagination changes, such as a user navigating to a new page, you have two primary methods:
359
+
360
+ - **Using the `@update:pagination` event:** This event is emitted whenever the pagination state changes. You can listen
361
+ for this event to trigger a method that fetches new data or updates the currently displayed data slice.
362
+ - **Using the `.sync` modifier:** You can use the
363
+ [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier) on the `pagination` prop
364
+ (`:pagination.sync="yourPaginationRef"`) to create a two-way binding with a local reactive property. When the user
365
+ interacts with the pagination, your local property is automatically updated. You can then use a `watch`er on this
366
+ property to react to changes, which is a common pattern for triggering API calls for server-side pagination.
367
+
368
+ <Canvas of={ComponentStories.Pagination} />
369
+
370
+ #### Pagination slot
371
+
372
+ You can use the pagination slot to pass content to the default slot in `bento-pagination`, which will be displayed on
373
+ the left side of the component. The slot will only be visible if `hidePageSize` is true, as the slot takes up the same
374
+ space in the component.
375
+
376
+ ### Lazy loading
377
+
378
+ You can enable lazy loading of data by passing the `lazy-load-type` property. This property defaults to `none` (no lazy
379
+ loading provided), but can take up the following values:
380
+
381
+ - `automatic`: an infinite scroll will be provided and an `update:show-more` event will be emitted by the data-grd every
382
+ time the user reaches the bottom of the data list
383
+ - `button`: a `Show more` button will be displayed and the `update:show-more` event will be emitted on button click
384
+
385
+ Note that the loading state has to be handled by the consumer via the `loading` property.
386
+
387
+ When the lazy load variant is enabled, the pagination component will be automatically hidden if present.
388
+
389
+ <Canvas of={ComponentStories.lazyLoading} />
390
+
391
+ ### Selection and Bulk Actions
392
+
393
+ <Canvas of={ComponentStories.Selection} />
394
+
395
+ The prop `selectable` enables the selection of rows in the data grid to perform some action on them. The selected items
396
+ will be kept in sync with the component through the `selection` prop, which expects an array of IDs.
397
+
398
+ Rows can also be disabled for selection, with `isDataItemDisabled` prop.
399
+
400
+ In order for the action bar to be rendered, you must also pass the actions into the `bulk-actions` prop.
401
+
402
+ #### Bulk selection
403
+
404
+ If a data grid is selectable, a checkbox will be rendered as the column header to be able to select every item in the
405
+ page.
406
+
407
+ By default, this will select every item in the page that is enabled, but in situations where you want to select items
408
+ from other pages too you can pass the `selectableAcrossPages` prop. This will render a selection menu with the option to
409
+ select all items on the page or across all pages (the menu will only render if there is more than one page, therefore
410
+ pagination needs to be set up too with the correct total count).
411
+
412
+ While selection on the page is handled by the component, to select items across all pages, we emit an event
413
+ `select-all-across-pages` and the data needs to be handled externally, by updating the `selection` array to contain all
414
+ the selected items from different pages.
415
+
416
+ Here's an example on how to use all selection functionalities:
417
+
418
+ ```html
419
+ <template>
420
+ <bento-data-grid
421
+ :data="data"
422
+ :columns.sync="columns"
423
+ selectable
424
+ :selection.sync="selection"
425
+ :bulk-actions="actions"
426
+ :is-data-item-disabled="isDataItemDisabledForSelection"
427
+ selectable-across-pages
428
+ @select-all-across-pages="onSelectAll"
429
+ :pagination="pagination"
430
+ />
431
+ </template>
432
+ <script setup lang="ts">
433
+ import { BentoDataGrid } from '@adyen/bento-vue2';
434
+ import type { BentoDatagridData, BentoDatagridDataItem, BentoDatagridSelection } from '@adyen/bento-vue2';
435
+
436
+ const data = ref<BentoDatagridData>([
437
+ {
438
+ id: '03c0a799-1ced-4017-aea3-0cebb0106335',
439
+ name: 'Shepherd Kane',
440
+ },
441
+ {
442
+ id: 'b6d4f1fd-b1f6-40a6-a443-f785c89604ef',
443
+ name: 'Santos Palmer',
444
+ },
445
+ {
446
+ id: '8f9e7877-1ca2-4929-9217-f1ec78709291',
447
+ name: 'Joyce Johns',
448
+ },
449
+ ]);
450
+
451
+ // Selection
452
+ const isDataItemDisabledForSelection = (row: BentoDatagridDataItem) =>
453
+ row.id === 'b6d4f1fd-b1f6-40a6-a443-f785c89604ef';
454
+ const selection = ref<BentoDatagridSelection>(['03c0a799-1ced-4017-aea3-0cebb0106335']);
455
+
456
+ const onSelectAll = () => {
457
+ const enabledIdsInThisPage = ['03c0a799-1ced-4017-aea3-0cebb0106335', '8f9e7877-1ca2-4929-9217-f1ec78709291'];
458
+ const idsFromOtherPages = [
459
+ 'b7d95f8a-953c-4f9a-afcf-ea97d5a2fbf0',
460
+ 'de10f8dc-4f9b-4b78-b30b-27ea6b9c2c20',
461
+ 'a9b5e6c9-35c4-40be-aa2b-2651c9f70f36',
462
+ ];
463
+ selection.value = [
464
+ ...enabledIdsInThisPage
465
+ ...idsFromOtherPages,
466
+ ];
467
+ };
468
+
469
+ // Bulk actions
470
+ const actions = [
471
+ {
472
+ title: 'Edit',
473
+ event: () => true,
474
+ },
475
+ {
476
+ title: 'Delete',
477
+ critical: true,
478
+ event: () => true,
479
+ },
480
+ ];
481
+
482
+ // Pagination object
483
+ const pagination = { size: 20, totalCount: 100 }
484
+ </script>
485
+ ```
486
+
487
+ | Prop / Events | Purpose |
488
+ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
489
+ | `selectable` | Boolean value that toggles on / off selection functionality. |
490
+ | `selection` | Array of selected row IDs. |
491
+ | `update:selection` | Event that fires upon selecting a row. This allows the use of the [sync modifier](https://v2.vuejs.org/v2/guide/components-custom-events.html#sync-Modifier) |
492
+ | `actions` | Array of actions to be displayed to the user in the action bar |
493
+ | `getDataItemId` | Function to tell the data grid the unique identifier for the data item, if none provided `row.id` is used. |
494
+ | `isDataItemDisabled` | Function that tells the data grid if the row is disabled from selection. |
495
+ | `select` | Event that fires upon selecting a row. |
496
+
497
+ ### Resizing
498
+
499
+ Enables resizing of the columns by dragging the column divider.
500
+
501
+ | Prop / Events | Purpose |
502
+ | --------------------- | ----------------------------------------------- |
503
+ | `hasResizableColumns` | enable / disable the ability to resize columns. |
504
+ | `@column-resize` | Resize event. |
505
+
506
+ ### Condensed
507
+
508
+ _NOTE: You must sync the `condensed` property using the emits as explained [here](#column-reactivity-and-emits)_.
509
+
510
+ Enables the condensed view for the data grid. This essentially reduces the row cells to a smaller vertical padding.
511
+
512
+ ### Zebra rows
513
+
514
+ _NOTE: You must sync the `zebraRows` property using the emits as explained [here](#column-reactivity-and-emits)_.
515
+
516
+ Enables the zebra-like rows for the data grid, where each even row is displayed in a darker shade than the odd-numbered
517
+ rows.
518
+
519
+ ### Slashed zero
520
+
521
+ If the `slashedZero` prop is set to `true`, the data grid will render zeroes in a slashed font numeric style.
522
+
523
+ ### Truncate headers
524
+
525
+ You can pass the `truncateColumnHeaders` prop to the `bento-data-grid` to truncate headers that are breaking into
526
+ multiple lines.
527
+
528
+ ### Fitting content within a container (`fit-content`)
529
+
530
+ _NOTE: Using a `bento-data-grid` inside a small container (e.g. modal) is not recommended and using alternatives such as
531
+ creating a new view and redirecting are encouraged. If no alternative can be found here are some guidelines._
532
+
533
+ When you need the data grid to fill the available vertical space of its parent container, you can use the `fit-content`
534
+ prop. This makes the data grid's body scrollable while the headers remain fixed, which is useful for both containers
535
+ with a fixed height and those that are dynamically sized.
536
+
537
+ <Canvas of={ComponentStories.GridInCard} />
538
+
539
+ #### In containers with a fixed height
540
+
541
+ When placing the data grid inside a container with a defined height, like a `bento-card`, the `fit-content` prop allows
542
+ the grid to adapt to that specific height. You must ensure the parent element of the data grid has a `height` defined.
543
+
544
+ **Example inside a `bento-card`:**
545
+
546
+ <Source dark language="html" code={DataGridFitContentInCardExample} />
547
+
548
+ #### Inside a `bento-modal`
549
+
550
+ <Source dark language="html" code={DataGridFitContentInModalExample} />
551
+
552
+ #### In containers with a dynamic height
553
+
554
+ <Source dark language="html" code={DataGridFitContentInModalFullscreenExample} />
555
+
556
+ ### Inside padded containers
557
+
558
+ When `bento-data-grid` is rendered inside components that already have their own content padding, like
559
+ `bento-accordion`, you can pass the `noSpacingTop` prop to remove the extra spacing.
560
+
561
+ ### Dragging
562
+
563
+ _NOTE: You must sync the `column` property using the emits as explained [here](#column-reactivity-and-emits)_.
564
+
565
+ If the `allowColumnDragAndDrop` property is set to true, users can drag and drop columns to re-arrange their order. Also
566
+ note the users can drag and drop column to and from the frozen section.
567
+
568
+ ### Column Panel (Display options)
569
+
570
+ _NOTE: You must sync the `column` and `condensed` property using the emits as explained
571
+ [here](#column-reactivity-and-emits)_.
572
+
573
+ Enabling this boolean property will add the Column wiew settings functionality. This allows users to toggle:
574
+
575
+ - condensed view
576
+ - column visibility
577
+ - column freezing (using the freeze icon)
578
+
579
+ <Canvas of={ComponentStories.DisplayOptions} />
580
+
581
+ ### Nested content slot
582
+
583
+ <Canvas of={ComponentStories.NestedContentSlot} />
584
+
585
+ It's possible to nest content inside of each data row in the Datagrid. In order to do this you have to set the
586
+ `hasNestedContent` to true and then use the `nested-slot` slot to render elements in the slot. This slot passes on the
587
+ `BentoDatagridDataItem` object which you can use to customize the slot.
588
+
589
+ You can also use the `shouldShowNestedContent` property to filter which rows should show the nested content slot. This
590
+ property accepts a function of type `BentoDatagridShouldShowNestedContentFn`. i.e.
591
+ `(item: BentoDatagridDataItem) => boolean;`.
592
+
593
+ ### Sticky horizontal scrollbar
594
+
595
+ <Canvas of={ComponentStories.StickyHorizontalScrollbar} />
596
+
597
+ If you have a very large data grid and prefer not to limit its height, you can enable a sticky horizontal scrollbar
598
+ instead. Simply set the `stickyHorizontalScrollbar` property to `true`.
599
+
600
+ This ensures users can scroll horizontally without needing to reach the bottom of the data grid.
601
+
602
+ ### Nested Rows
603
+
604
+ <Canvas of={ComponentStories.NestedRows} />
605
+
606
+ It's possible to show nested rows (of the same data structure) for each data row in the Datagrid. In order to do this
607
+ you have to set `hasNestedRows` to `true` and do either of the following:
608
+
609
+ #### Prepopulate data with children
610
+
611
+ If you set in each data item i.e. `BentoDatagridDataItem`, the `children` attribte to an array of
612
+ `BentoDatagridDataItem` objects. These data rows will be shown when the parent data item is toggled.
613
+
614
+ #### Asynchronously populate the children when parent is toggled
615
+
616
+ If you hook into the `nested-content-toggled` you can asynchronously populate the children by updating the `data`
617
+ property of that parent's `BentoDatagridDataItem.children` attribute.
618
+
619
+ ### Actions
620
+
621
+ #### Cell Actions
622
+
623
+ <Canvas of={ComponentStories.CellActions} />
624
+
625
+ Cell Actions are inline buttons that appear within a specific table cell, typically on hover. They are ideal for actions
626
+ directly related to the cell's content.
627
+
628
+ You can configure these by providing an array or function to the `cellActions` property within a specific column's
629
+ definition. Using the function will allow you to conditionally display actions based on the row's state.
630
+
631
+ The available configurations for each action object are detailed in the Action Types section below.
632
+
633
+ #### Row Actions
634
+
635
+ <Canvas of={ComponentStories.RowActions} />
636
+
637
+ Row Actions provide a persistent set of buttons in a dedicated column at the end of each row. They are best suited for
638
+ record-level operations, such as editing or deleting an entire entry.
639
+
640
+ To implement them, pass an array or function to the `rowActions` prop. Using the function will allow you to
641
+ conditionally display actions based on the row's state.
642
+
643
+ Please see "Types of actions" in the below section to see what type of actions you can render.
644
+
645
+ #### Action types
646
+
647
+ The following action types can be used to build the array for both the `cellActions` and `rowActions` properties.
648
+
649
+ Note: For `rowActions`, the columnKey parameter is not applicable and will not be passed to event handlers.
650
+
651
+ ##### Copy action
652
+
653
+ | Prop | type | value |
654
+ | ------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
655
+ | `variant` | `string` | Must be set to 'copy'. |
656
+ | `isShort` | `boolean` | If set to true, will only show icon. |
657
+ | `getCopyData` | `(rowDataItem: BentoDatagridDataItem, columnKey: string) => string` | A function that can be used to customize what data is copied upon the user clicking the button. |
658
+
659
+ ##### Edit action
660
+
661
+ | Prop | type | value |
662
+ | --------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- |
663
+ | `variant` | `string` | Must be set to 'edit'. |
664
+ | `isShort` | `boolean` | If set to true, will only show icon. |
665
+ | `event` | `(rowDataItem: BentoDatagridDataItem, columnKey: string) => void` | Click event that will emit the row data and the column key of the cell. |
666
+
667
+ ##### Open action
668
+
669
+ | Prop | type | value |
670
+ | ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
671
+ | `variant` | `string` | Must be set to 'open'. |
672
+ | `isShort` | `boolean` | If set to true, will only show icon. |
673
+ | `menuData` | `BentoColumnCellActionMenuItem[]` | Can be set to an array of `BentoColumnCellActionMenuItem` to create a menu button. |
674
+ | `menuData[menuItemIndex].event` | `(rowDataItem: BentoDatagridDataItem, columnKey: string) => void` | The menu item click event that will emit the row data and the column key of the cell. |
675
+
676
+ ##### More action
677
+
678
+ | Prop | type | value |
679
+ | ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
680
+ | `variant` | `string` | Must be set to 'more'. |
681
+ | `isShort` | `boolean` | If set to true, will only show icon. |
682
+ | `menuData` | `BentoColumnCellActionMenuItem[]` | Can be set to an array of `BentoColumnCellActionMenuItem` to create a menu button. |
683
+ | `menuData[menuItemIndex].event` | `(rowDataItem: BentoDatagridDataItem, columnKey: string) => void` | The menu item click event that will emit the row data and the column key of the cell. |
684
+
685
+ ##### Custom action
686
+
687
+ | Prop | type | value |
688
+ | ------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
689
+ | `title` | `string` | Sets the button title. |
690
+ | `critical` | `boolean` | Toggles the critical state of the `BentoButton`. |
691
+ | `disabled` | `boolean` | Toggles the disabled state of the `BentoButton`. |
692
+ | `event` | `(rowDataItem: BentoDatagridDataItem, columnKey: string) => void` | Click event that will emit the row data and the column key of the cell. |
693
+ | `iconLeft` | An icon from the `@adyen/ui-assets-icons-16` NPM package. | e.g. `import StarIcon from '@adyen/ui-assets-icons-16/vue/star';` |
694
+ | `iconRight` | An icon from the `@adyen/ui-assets-icons-16` NPM package. | e.g. `import StarIcon from '@adyen/ui-assets-icons-16/vue/star';` |
695
+ | `link` | An object containing `BentoLink` properties. | e.g. `{ to: 'https://adyen.com', external: true }` |
696
+ | `menuData` | `BentoColumnCellActionMenuItem[]` | Can be set to an array of `BentoColumnCellActionMenuItem` to create a menu button. |
697
+ | `menuData[menuItemIndex].event` | `(rowDataItem: BentoDatagridDataItem, columnKey: string) => void` | The menu item click event that will emit the row data and the column key of the cell. |
698
+
699
+ ## Components
700
+
701
+ ### Summary Cell
702
+
703
+ <Canvas of={ComponentStories.SummaryCell} />
704
+
705
+ The `bento-data-grid-summary-cell` is a specialized component designed to be used within a data grid cell when the
706
+ underlying data for that cell is an array of items. It elegantly displays a summary (e.g., "2 merchants") and reveals
707
+ the full list in a popover on hover. This is particularly useful for representing one-to-many relationships in your
708
+ data.
709
+
710
+ When there's only one item in the array, it will be rendered as plain text. If there are multiple items, the summary
711
+ `label` is shown with a dashed underline, which triggers the popover.
712
+
713
+ To use it, use a specific column's item slot, like `#item-company`. Then pass the relevant array of strings using cell's
714
+ data to the `items` property.
715
+
716
+ Passing a `searchTerm` (from the filter bar or global search) to the summary cell will add a tooltip to each cell whose
717
+ `items` array contains a match. When the popover is opened, the component automatically highlights the matching items.
718
+
719
+ You can also use the `tooltipText` property to override the default tooltip text. By default, the tooltip displays
720
+ `"{numberOfResultsInItems} results"`.
721
+
722
+ ### Tag With Text Cell
723
+
724
+ <Canvas of={ComponentStories.TagWithTextCell} />
725
+
726
+ The `bento-data-grid-tag-with-text-cell` is a specialized component for `bento-data-grid` that displays a tag alongside
727
+ a text value. This is useful for showing categorized data with labels, such as status indicators with descriptions.
728
+
729
+ To use it, place `bento-data-grid-tag-with-text-cell` inside a column's item slot (e.g., `#item-endpoint`). Pass a `tag`
730
+ object with [BentoTag properties](../?path=/docs/components-tag--docs#properties) and a `value` string for the text
731
+ content.
732
+
733
+ ### Trend Cell
734
+
735
+ <Canvas of={ComponentStories.TrendCell} />
736
+
737
+ The `bento-data-grid-trend-cell` is a specialized component for `bento-data-grid` that displays a percentage value with
738
+ an optional arrow icon. This is useful for showing changes in data, such as growth or decline. It always displays a `%`
739
+ regardless of the value passed and supports up to 10 decimal places.
740
+
741
+ To use it, place `bento-data-grid-trend-cell` inside a column's item slot (e.g., `#item-yourColumn`). Then pass the
742
+ relevant cell's data to the `items` property.
743
+
744
+ ## Everything Bagel Example
745
+
746
+ <Canvas of={ComponentStories.EverythingBagelExample} />
747
+
748
+ Above is an example of using all the above features in one single Datagrid.
749
+
750
+ This example uses local filtering, searching and sorting of the data using the `setup` function defined below. Please
751
+ note of course this is a contrived example which may require more complex filtering methods for different data types.
752
+
753
+ As you can see from the example we use the `computed` function to react to changes on the `sortBy`, `filters` and
754
+ `searchTerm` variables.
755
+
756
+ ```typescript
757
+ setup(props) {
758
+ // References
759
+ const columns = ref<BentoColumn[]>([
760
+ { field: 'name', label: 'Name', minWidth: 300, mandatory: true, frozen: true, autoWidth: true, sortable: true },
761
+ { field: 'company', label: 'Reference' },
762
+ { field: 'payment', label: 'Payment', width: 200, minWidth: 150 },
763
+ ]);
764
+ const filtersSet = ref<BentoFilterBarModel>([
765
+ {
766
+ field: 'company',
767
+ label: 'Company',
768
+ value: null,
769
+ type: BentoFilterItemType.INPUT,
770
+ },
771
+ {
772
+ field: 'countryCode',
773
+ label: 'Country',
774
+ value: undefined,
775
+ options: {
776
+ listboxItems: [
777
+ {
778
+ value: BentoCountryCode.NL,
779
+ },
780
+ {
781
+ value: BentoCountryCode.BE,
782
+ },
783
+ ],
784
+ variant: 'name',
785
+ },
786
+ type: BentoFilterItemType.SELECT_COUNTRY,
787
+ },
788
+ ]);
789
+
790
+ const sortBy = ref<BentoDatagridSortByColumn[]>([]);
791
+ const searchTerm = ref('');
792
+ const isCondensed = ref(false);
793
+
794
+ // Methods
795
+ const getPaymentStatus = (paymentStatus: number) => {
796
+ switch (paymentStatus) {
797
+ case 2:
798
+ return BentoStatusVariant.GREEN;
799
+ case 1:
800
+ return BentoStatusVariant.YELLOW;
801
+ case 0:
802
+ default:
803
+ return BentoStatusVariant.RED;
804
+ }
805
+ };
806
+
807
+ const getPaymentText = (paymentStatus: number) => {
808
+ switch (paymentStatus) {
809
+ case 2:
810
+ return 'Paid';
811
+ case 1:
812
+ return 'In progress';
813
+ case 0:
814
+ default:
815
+ return 'Not paid';
816
+ }
817
+ };
818
+
819
+ const onRowClick = (item: BentoDatagridDataItem) => {
820
+ action('row-click')(item);
821
+ };
822
+
823
+ // Computed Values
824
+ // Filtering data
825
+ const filteredData = computed(() =>
826
+ // If any filters or search terms have been set
827
+ filtersSet.value?.length === 0 && searchTerm.value === ''
828
+ ? props.data
829
+ : props.data.filter(item => {
830
+ const foundFilteredItem =
831
+ filtersSet.value?.length > 0
832
+ ? filtersSet.value.every(filter =>
833
+ filter.value
834
+ ? (item[filter.field] as string)
835
+ .toLowerCase()
836
+ .includes((filter.value as string).toLowerCase())
837
+ : true
838
+ )
839
+ : true;
840
+ const foundSearchFilteredItem = searchTerm.value
841
+ ? (item?.company as string)
842
+ .toLowerCase()
843
+ .includes((searchTerm.value as string).toLowerCase())
844
+ : true;
845
+
846
+ return foundFilteredItem && foundSearchFilteredItem;
847
+ })
848
+ );
849
+
850
+ // Sorting data
851
+ const filteredAndSortedData = computed(() => {
852
+ if (sortBy.value?.length === 0) {
853
+ return filteredData.value;
854
+ }
855
+ return sortBy.value[0].direction === BentoDatagridSortDirection.ASCENDING
856
+ ? filteredData.value.sort((a, b) =>
857
+ (a[sortBy.value[0].field] as string).localeCompare(b[sortBy.value[0].field] as string)
858
+ )
859
+ : filteredData.value
860
+ .sort((a, b) =>
861
+ (a[sortBy.value[0].field] as string).localeCompare(b[sortBy.value[0].field] as string)
862
+ )
863
+ .reverse();
864
+ });
865
+
866
+ return {
867
+ // Methods
868
+ getPaymentStatus,
869
+ getPaymentText,
870
+
871
+ // Functions
872
+ onRowClick,
873
+
874
+ // Values
875
+ columns,
876
+ filteredAndSortedData,
877
+ sortBy,
878
+ filtersSet,
879
+ searchTerm,
880
+ isCondensed,
881
+
882
+ // Enums
883
+ BentoDateFormat,
884
+ };
885
+ },
886
+ ```
887
+
888
+ ### Server side filtering and sorting
889
+
890
+ It can be that you have filtering and sorting set up on a backend API and simply have to pass on these values to query
891
+ string values of the HTTP request.
892
+
893
+ To do this simply watch the `sortBy`, `filters` and `searchTerm` reative references and perform a HTTP request when a
894
+ change occurs. One thing to note would be to make sure to toggle the `isLoading` which we pass on to the `is-loading`
895
+ property on the Datagrid.
896
+
897
+ 🚧 NOTE: we are working on an erroneous state for the data-grid for a upcoming future release! When this work has been
898
+ completed this documentation will be updated. 🚧
899
+
900
+ ```typescript
901
+ const serverData = ref([]);
902
+ const isLoading = ref(false);
903
+
904
+ watch(
905
+ () => [sortBy.value, filtersSet.value, searchTerm.value],
906
+ async () => {
907
+ isLoading.value = true;
908
+ const { data } = await axios.get('/api/api-name/get', {
909
+ params: {
910
+ ...filtersSet.value?.reduce((acc, { field, value }) => {
911
+ acc[field] = value;
912
+ return acc;
913
+ }, {});
914
+ // assign params for search and sorting as well
915
+ },
916
+ paramsSerializer: params => {
917
+ return qs.stringify(params);
918
+ },
919
+ });
920
+
921
+ serverData.value = data;
922
+ isLoading.value = false;
923
+ }
924
+ );
925
+ ```
926
+
927
+ Another method would be to wrap up all these reactive refs into a `reactive` reference and deeply watch the reactive ref
928
+
929
+ ```typescript
930
+ const filteringAndSortingVals = reactive({ sortBy: [], filtersSet: [], searchTerm: '' });
931
+ watch(
932
+ () => [filteringAndSortingVals.sortBy, filteringAndSortingVals.filtersSet, filteringAndSortingVals.searchTerm],
933
+ async () => {
934
+ // etc...
935
+ }
936
+ );
937
+ ```
938
+
939
+ ## Accessibility 🚧
940
+
941
+ The full accessibility implementation for this component is still under development, so changes to this section are to
942
+ be expected. However, as for all the other `bento` components we are adhering to
943
+ [WAI-ARIA 1.2](https://www.w3.org/TR/wai-aria-1.2/) standard and using the
944
+ [Interactive Tabular Data pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
945
+
946
+ ### Roles, States, and Properties
947
+
948
+ | ARIA role / attribute | is automatic? | fallback used | manual override |
949
+ | --------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------- | --------------- |
950
+ | `role="grid"` | Yes, to container. | - | - |
951
+ | `role="rowgroup"` | Yes, set on the group of columns and rows. | - | - |
952
+ | `role="columnheader"` | Yes, set on the column header cells. | - | - |
953
+ | `role="gridcell"` | Yes, set data cells. | - | - |
954
+ | `aria-rowcount` | Yes, set data grid container to show the number of rows shown. | - | - |
955
+ | `aria-colcount` | Yes, set data grid container to show the number of columns shown. | - | - |
956
+ | `aria-colindex` | Yes, set on the columns. | - | - |
957
+ | `aria-label` | Yes, the data grid container has a label that uses `header` slot text. The column headers using the column `label` property | 'data grid' | - |
958
+ | `aria-label (column)` | Yes, set on the columns using the column `label` property. | - | - |
959
+
960
+ ## Resources
961
+
962
+ - [Figma link](https://www.figma.com/file/uLabwF3243jdMDsNSP7U9I/ADL-2.0---Components?node-id=1232-26553&t=YcnfGpJjnXqTOdu5-0)
963
+ - [Aria sort](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort)