@adyen/bento-vue2 1.92.2 → 1.93.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 (215) hide show
  1. package/dist/@types/components.d.ts +8 -0
  2. package/dist/@types/index.d.ts +483 -136
  3. package/dist/action-bar.js +1 -1
  4. package/dist/ai-tag.js +1 -1
  5. package/dist/anchor-scroller.js +1 -1
  6. package/dist/assets/accordion-item.css +1 -1
  7. package/dist/assets/action-bar.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions.css +1 -1
  10. package/dist/assets/card.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/drawer.css +1 -0
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/modal-fullscreen.css +1 -1
  17. package/dist/assets/navigation-menu-group.css +1 -0
  18. package/dist/assets/secondary-nav.css +1 -1
  19. package/dist/assets/sidepanel.css +1 -1
  20. package/dist/button.js +1 -1
  21. package/dist/card.js +1 -1
  22. package/dist/checkbox.js +2 -2
  23. package/dist/chunks/{action-bar.ChuPTyQG.js → action-bar.BPsug0x7.js} +4 -4
  24. package/dist/chunks/{action-bar.ChuPTyQG.js.map → action-bar.BPsug0x7.js.map} +1 -1
  25. package/dist/chunks/{ai-tag.Dt8nijLW.js → ai-tag.BfAbJI_v.js} +2 -2
  26. package/dist/chunks/{ai-tag.Dt8nijLW.js.map → ai-tag.BfAbJI_v.js.map} +1 -1
  27. package/dist/chunks/{anchor-scroller.DWaykZQj.js → anchor-scroller.cFxql5sk.js} +2 -2
  28. package/dist/chunks/{anchor-scroller.DWaykZQj.js.map → anchor-scroller.cFxql5sk.js.map} +1 -1
  29. package/dist/chunks/{base-modal.DMdzcBrq.js → base-modal.ByhHqRuT.js} +5 -5
  30. package/dist/chunks/{base-modal.DMdzcBrq.js.map → base-modal.ByhHqRuT.js.map} +1 -1
  31. package/dist/chunks/{button-actions-with-menu.CXFziNUr.js → button-actions-with-menu.Ctu2EwxW.js} +3 -3
  32. package/dist/chunks/{button-actions-with-menu.CXFziNUr.js.map → button-actions-with-menu.Ctu2EwxW.js.map} +1 -1
  33. package/dist/chunks/{button-actions.CXD6_9qN.js → button-actions.CdsmKyvj.js} +3 -3
  34. package/dist/chunks/{button-actions.CXD6_9qN.js.map → button-actions.CdsmKyvj.js.map} +1 -1
  35. package/dist/chunks/{calendar.rZsIZPxm.js → calendar.BaPh-1UW.js} +2 -2
  36. package/dist/chunks/{calendar.rZsIZPxm.js.map → calendar.BaPh-1UW.js.map} +1 -1
  37. package/dist/chunks/{card.Brma5kdb.js → card.BHssPRpx.js} +2 -2
  38. package/dist/chunks/{card.Brma5kdb.js.map → card.BHssPRpx.js.map} +1 -1
  39. package/dist/chunks/{checkbox-group.DmKZQlxZ.js → checkbox-group.KJvcjvpx.js} +3 -3
  40. package/dist/chunks/{checkbox-group.DmKZQlxZ.js.map → checkbox-group.KJvcjvpx.js.map} +1 -1
  41. package/dist/chunks/{checkbox.BObXaofv.js → checkbox.B2lQl9BE.js} +2 -2
  42. package/dist/chunks/{checkbox.BObXaofv.js.map → checkbox.B2lQl9BE.js.map} +1 -1
  43. package/dist/chunks/{code-snippet.DHAymIXp.js → code-snippet.7SHuhPxc.js} +5 -5
  44. package/dist/chunks/{code-snippet.DHAymIXp.js.map → code-snippet.7SHuhPxc.js.map} +1 -1
  45. package/dist/chunks/{controls-group.DSm2Ujwt.js → controls-group.DNmVV2pt.js} +2 -2
  46. package/dist/chunks/{controls-group.DSm2Ujwt.js.map → controls-group.DNmVV2pt.js.map} +1 -1
  47. package/dist/chunks/{copy.qqGYFbKJ.js → copy.DcpG08B_.js} +3 -3
  48. package/dist/chunks/{copy.qqGYFbKJ.js.map → copy.DcpG08B_.js.map} +1 -1
  49. package/dist/chunks/{dashboard-section.D9rS8myE.js → dashboard-section.BWhw2hvx.js} +3 -3
  50. package/dist/chunks/{dashboard-section.D9rS8myE.js.map → dashboard-section.BWhw2hvx.js.map} +1 -1
  51. package/dist/chunks/{dashed-underline.D_FhFRXM.js → dashed-underline.CPTkubjQ.js} +3 -3
  52. package/dist/chunks/{dashed-underline.D_FhFRXM.js.map → dashed-underline.CPTkubjQ.js.map} +1 -1
  53. package/dist/chunks/{data-grid-template.CRijG20n.js → data-grid-template.ZB5anthH.js} +3 -3
  54. package/dist/chunks/{data-grid-template.CRijG20n.js.map → data-grid-template.ZB5anthH.js.map} +1 -1
  55. package/dist/chunks/{data-grid.CJzEtn4Q.js → data-grid.CuLOPenn.js} +18 -18
  56. package/dist/chunks/{data-grid.CJzEtn4Q.js.map → data-grid.CuLOPenn.js.map} +1 -1
  57. package/dist/chunks/{date-picker.C9DIeaWH.js → date-picker.NdHdiufy.js} +8 -8
  58. package/dist/chunks/{date-picker.C9DIeaWH.js.map → date-picker.NdHdiufy.js.map} +1 -1
  59. package/dist/chunks/date-range-picker.BFgnw81F.js +1133 -0
  60. package/dist/chunks/{date-range-picker.zT42F9r4.js.map → date-range-picker.BFgnw81F.js.map} +1 -1
  61. package/dist/chunks/{dialog-page.EdejG53a.js → dialog-page.CziegEuc.js} +2 -2
  62. package/dist/chunks/{dialog-page.EdejG53a.js.map → dialog-page.CziegEuc.js.map} +1 -1
  63. package/dist/chunks/{draggable-handle.BR_aQH5N.js → draggable-handle.BsGnEMAT.js} +2 -2
  64. package/dist/chunks/{draggable-handle.BR_aQH5N.js.map → draggable-handle.BsGnEMAT.js.map} +1 -1
  65. package/dist/chunks/drawer.BqqodvlR.js +47 -0
  66. package/dist/chunks/drawer.BqqodvlR.js.map +1 -0
  67. package/dist/chunks/{dropdown-tag.z3rsxbpW.js → dropdown-tag.C6hkNptM.js} +3 -3
  68. package/dist/chunks/{dropdown-tag.z3rsxbpW.js.map → dropdown-tag.C6hkNptM.js.map} +1 -1
  69. package/dist/chunks/{dropdown.BYJwx-JD.js → dropdown.CF6Gf7ya.js} +5 -5
  70. package/dist/chunks/{dropdown.BYJwx-JD.js.map → dropdown.CF6Gf7ya.js.map} +1 -1
  71. package/dist/chunks/{es6.C1DXQV6f.js → es6.Cu3DYUPA.js} +3 -3
  72. package/dist/chunks/es6.Cu3DYUPA.js.map +1 -0
  73. package/dist/chunks/{field-label.DjjjkcO6.js → field-label.D7w7mHvW.js} +2 -2
  74. package/dist/chunks/{field-label.DjjjkcO6.js.map → field-label.D7w7mHvW.js.map} +1 -1
  75. package/dist/chunks/{file-uploader.Djl0xaDN.js → file-uploader.CX48W2BT.js} +3 -3
  76. package/dist/chunks/{file-uploader.Djl0xaDN.js.map → file-uploader.CX48W2BT.js.map} +1 -1
  77. package/dist/chunks/{filter-bar.C5NxhUhF.js → filter-bar.CFXeAK8X.js} +17 -17
  78. package/dist/chunks/{filter-bar.C5NxhUhF.js.map → filter-bar.CFXeAK8X.js.map} +1 -1
  79. package/dist/chunks/{focus-trap.DRqjHzt6.js → focus-trap.D4WDxUwu.js} +2 -2
  80. package/dist/chunks/{focus-trap.DRqjHzt6.js.map → focus-trap.D4WDxUwu.js.map} +1 -1
  81. package/dist/chunks/{footer-actions.D9mHwk5l.js → footer-actions.BoAzqs48.js} +2 -2
  82. package/dist/chunks/{footer-actions.D9mHwk5l.js.map → footer-actions.BoAzqs48.js.map} +1 -1
  83. package/dist/chunks/{header-meta.BSPnWWmi.js → header-meta.pubDFdDH.js} +3 -3
  84. package/dist/chunks/{header-meta.BSPnWWmi.js.map → header-meta.pubDFdDH.js.map} +1 -1
  85. package/dist/chunks/{header-with-views.DKD7O8pU.js → header-with-views.wMqUhzME.js} +10 -10
  86. package/dist/chunks/{header-with-views.DKD7O8pU.js.map → header-with-views.wMqUhzME.js.map} +1 -1
  87. package/dist/chunks/{header.DyZG7qWe.js → header.9h-5ZCv8.js} +3 -3
  88. package/dist/chunks/{header.DyZG7qWe.js.map → header.9h-5ZCv8.js.map} +1 -1
  89. package/dist/chunks/{index.CwzYJHw2.js → index.ByaCaB1Z.js} +15 -15
  90. package/dist/chunks/{index.CwzYJHw2.js.map → index.ByaCaB1Z.js.map} +1 -1
  91. package/dist/chunks/{info-icon.DCR42Kvm.js → info-icon.BOX4oIVD.js} +3 -3
  92. package/dist/chunks/{info-icon.DCR42Kvm.js.map → info-icon.BOX4oIVD.js.map} +1 -1
  93. package/dist/chunks/{input-field-password.hd-w1gkL.js → input-field-password.Ir5jAkAn.js} +6 -6
  94. package/dist/chunks/{input-field-password.hd-w1gkL.js.map → input-field-password.Ir5jAkAn.js.map} +1 -1
  95. package/dist/chunks/{input-field-phone-number.BRmSDrCn.js → input-field-phone-number.DmC5am2a.js} +3 -3
  96. package/dist/chunks/{input-field-phone-number.BRmSDrCn.js.map → input-field-phone-number.DmC5am2a.js.map} +1 -1
  97. package/dist/chunks/{input-field.BgzXEyxn.js → input-field.Cwep4H_C.js} +3 -3
  98. package/dist/chunks/input-field.Cwep4H_C.js.map +1 -0
  99. package/dist/chunks/{input-time.CF2kTtAp.js → input-time.CNgIob-u.js} +4 -4
  100. package/dist/chunks/{input-time.CF2kTtAp.js.map → input-time.CNgIob-u.js.map} +1 -1
  101. package/dist/chunks/{inspector.BzBPlz-5.js → inspector._xqiBe9X.js} +3 -3
  102. package/dist/chunks/{inspector.BzBPlz-5.js.map → inspector._xqiBe9X.js.map} +1 -1
  103. package/dist/chunks/{layout-row.B_IQC9Nq.js → layout-row.Du_4NPVx.js} +8 -8
  104. package/dist/chunks/{layout-row.B_IQC9Nq.js.map → layout-row.Du_4NPVx.js.map} +1 -1
  105. package/dist/chunks/{list-item.DqTHh8-Z.js → list-item.Disq4nSZ.js} +2 -2
  106. package/dist/chunks/{list-item.DqTHh8-Z.js.map → list-item.Disq4nSZ.js.map} +1 -1
  107. package/dist/chunks/{listbox-option-tag.CvbE-EuG.js → listbox-option-tag.B28d45lY.js} +2 -2
  108. package/dist/chunks/{listbox-option-tag.CvbE-EuG.js.map → listbox-option-tag.B28d45lY.js.map} +1 -1
  109. package/dist/chunks/{modal-fullscreen.De6mevyD.js → modal-fullscreen.CEGc-wKf.js} +4 -4
  110. package/dist/chunks/{modal-fullscreen.De6mevyD.js.map → modal-fullscreen.CEGc-wKf.js.map} +1 -1
  111. package/dist/chunks/{modal.B6n5AWs2.js → modal.DMMqMdJF.js} +4 -4
  112. package/dist/chunks/{modal.B6n5AWs2.js.map → modal.DMMqMdJF.js.map} +1 -1
  113. package/dist/chunks/navigation-menu-group.KJvGw1tX.js +231 -0
  114. package/dist/chunks/navigation-menu-group.KJvGw1tX.js.map +1 -0
  115. package/dist/chunks/{pagination.BzsKZFnw.js → pagination.hOIvu4hj.js} +2 -2
  116. package/dist/chunks/{pagination.BzsKZFnw.js.map → pagination.hOIvu4hj.js.map} +1 -1
  117. package/dist/chunks/popover.types.DhuEjpRI.js +6 -0
  118. package/dist/chunks/{popover.types.hA13DZPg.js.map → popover.types.DhuEjpRI.js.map} +1 -1
  119. package/dist/chunks/{popper-container.C_n9Ds1W.js → popper-container.D7-KbKnN.js} +2 -2
  120. package/dist/chunks/{popper-container.C_n9Ds1W.js.map → popper-container.D7-KbKnN.js.map} +1 -1
  121. package/dist/chunks/{promo-banner.Dc_kK1x9.js → promo-banner.BzKZCMJp.js} +2 -2
  122. package/dist/chunks/{promo-banner.Dc_kK1x9.js.map → promo-banner.BzKZCMJp.js.map} +1 -1
  123. package/dist/chunks/{radio-group.Bb-L-0io.js → radio-group.U3G8U7p0.js} +3 -3
  124. package/dist/chunks/{radio-group.Bb-L-0io.js.map → radio-group.U3G8U7p0.js.map} +1 -1
  125. package/dist/chunks/{rich-text-editor.CmsmiW87.js → rich-text-editor.BHo3e81W.js} +4 -4
  126. package/dist/chunks/{rich-text-editor.CmsmiW87.js.map → rich-text-editor.BHo3e81W.js.map} +1 -1
  127. package/dist/chunks/{search-bar.Brb3OP-y.js → search-bar.CHINuvXx.js} +4 -4
  128. package/dist/chunks/{search-bar.Brb3OP-y.js.map → search-bar.CHINuvXx.js.map} +1 -1
  129. package/dist/chunks/{secondary-nav.BBL5zZPK.js → secondary-nav.BWn_I33v.js} +4 -4
  130. package/dist/chunks/{secondary-nav.BBL5zZPK.js.map → secondary-nav.BWn_I33v.js.map} +1 -1
  131. package/dist/chunks/{segmented-control.DDtjX-V5.js → segmented-control.Dww21VC2.js} +2 -2
  132. package/dist/chunks/{segmented-control.DDtjX-V5.js.map → segmented-control.Dww21VC2.js.map} +1 -1
  133. package/dist/chunks/{selection-card-group.5jzX23fU.js → selection-card-group.DRP4Vk2d.js} +21 -21
  134. package/dist/chunks/{selection-card-group.5jzX23fU.js.map → selection-card-group.DRP4Vk2d.js.map} +1 -1
  135. package/dist/chunks/{sidepanel.nW0Bhk_u.js → sidepanel.B9ecjbyC.js} +5 -5
  136. package/dist/chunks/{sidepanel.nW0Bhk_u.js.map → sidepanel.B9ecjbyC.js.map} +1 -1
  137. package/dist/chunks/{structured-list-item.BBBtie1s.js → structured-list-item.De_yYayn.js} +4 -4
  138. package/dist/chunks/{structured-list-item.BBBtie1s.js.map → structured-list-item.De_yYayn.js.map} +1 -1
  139. package/dist/chunks/{summary-grid.types.Dp_efYVN.js → summary-grid.types.Dc-PJlfH.js} +5 -5
  140. package/dist/chunks/{summary-grid.types.Dp_efYVN.js.map → summary-grid.types.Dc-PJlfH.js.map} +1 -1
  141. package/dist/chunks/{tag.D2xagTJv.js → tag.DPNSUeue.js} +2 -2
  142. package/dist/chunks/{tag.D2xagTJv.js.map → tag.DPNSUeue.js.map} +1 -1
  143. package/dist/chunks/{textarea.CJS-1I41.js → textarea.C2gJX1kj.js} +3 -3
  144. package/dist/chunks/{textarea.CJS-1I41.js.map → textarea.C2gJX1kj.js.map} +1 -1
  145. package/dist/chunks/{timeline-item.CF9jbIRr.js → timeline-item.BKc5c9sS.js} +6 -6
  146. package/dist/chunks/{timeline-item.CF9jbIRr.js.map → timeline-item.BKc5c9sS.js.map} +1 -1
  147. package/dist/chunks/{tooltip.BxtnF3is.js → tooltip.Bl6kedql.js} +3 -3
  148. package/dist/chunks/{tooltip.BxtnF3is.js.map → tooltip.Bl6kedql.js.map} +1 -1
  149. package/dist/chunks/{tutorial.CoWDVs7_.js → tutorial.C1dZpvsz.js} +4 -4
  150. package/dist/chunks/{tutorial.CoWDVs7_.js.map → tutorial.C1dZpvsz.js.map} +1 -1
  151. package/dist/chunks/{use-cached-selected-values.Du8-wWR2.js → use-cached-selected-values.C6aShVBp.js} +2 -2
  152. package/dist/chunks/{use-cached-selected-values.Du8-wWR2.js.map → use-cached-selected-values.C6aShVBp.js.map} +1 -1
  153. package/dist/chunks/{use-date-input-formatter.ibZeLD_V.js → use-date-input-formatter.CrkJ_UfS.js} +2 -2
  154. package/dist/chunks/{use-date-input-formatter.ibZeLD_V.js.map → use-date-input-formatter.CrkJ_UfS.js.map} +1 -1
  155. package/dist/code-snippet.js +1 -1
  156. package/dist/dashboard-template.js +1 -1
  157. package/dist/dashed-underline.js +1 -1
  158. package/dist/data-grid-template.js +1 -1
  159. package/dist/data-grid.js +1 -1
  160. package/dist/date-picker.js +2 -2
  161. package/dist/date-range-picker.js +2 -2
  162. package/dist/draggable.js +1 -1
  163. package/dist/drawer.js +5 -0
  164. package/dist/drawer.js.map +1 -0
  165. package/dist/dropdown.js +3 -3
  166. package/dist/file-uploader.js +1 -1
  167. package/dist/filter-bar.js +1 -1
  168. package/dist/focus-trap.js +1 -1
  169. package/dist/header-with-views.js +1 -1
  170. package/dist/header.js +1 -1
  171. package/dist/index.js +291 -285
  172. package/dist/index.js.map +1 -1
  173. package/dist/info-icon.js +1 -1
  174. package/dist/input-field-password.js +1 -1
  175. package/dist/input-field-phone-number.js +1 -1
  176. package/dist/input-field.js +1 -1
  177. package/dist/input-time.js +1 -1
  178. package/dist/inspector.js +1 -1
  179. package/dist/internal.js +11 -11
  180. package/dist/layout.js +1 -1
  181. package/dist/list.js +1 -1
  182. package/dist/menu.js +1 -1
  183. package/dist/modal-fullscreen.js +1 -1
  184. package/dist/modal.js +2 -2
  185. package/dist/navigation-menu.js +7 -0
  186. package/dist/navigation-menu.js.map +1 -0
  187. package/dist/pagination.js +1 -1
  188. package/dist/popover.js +2 -2
  189. package/dist/popper-container.js +1 -1
  190. package/dist/promo-banner.js +1 -1
  191. package/dist/radio-group.js +1 -1
  192. package/dist/rich-text-editor.js +1 -1
  193. package/dist/search-bar.js +2 -2
  194. package/dist/secondary-nav.js +1 -1
  195. package/dist/segmented-control.js +1 -1
  196. package/dist/selection-card.js +1 -1
  197. package/dist/sidepanel.js +1 -1
  198. package/dist/structured-list.js +1 -1
  199. package/dist/styles/bento-dark.css +3 -0
  200. package/dist/styles/bento-light.css +3 -0
  201. package/dist/styles/bento.css +3 -0
  202. package/dist/styles/legacy.css +3 -0
  203. package/dist/styles/styleguide.css +3 -0
  204. package/dist/styles/utility.css +9 -0
  205. package/dist/summary-grid.js +1 -1
  206. package/dist/tag.js +1 -1
  207. package/dist/textarea.js +1 -1
  208. package/dist/timeline.js +1 -1
  209. package/dist/tutorial.js +1 -1
  210. package/dist/web-types.json +236 -2
  211. package/package.json +5 -5
  212. package/dist/chunks/date-range-picker.zT42F9r4.js +0 -1097
  213. package/dist/chunks/es6.C1DXQV6f.js.map +0 -1
  214. package/dist/chunks/input-field.BgzXEyxn.js.map +0 -1
  215. package/dist/chunks/popover.types.hA13DZPg.js +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-section.D9rS8myE.js","sources":["../../src/templates/dashboard-template/dashboard-template.vue","../../src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = defineProps({\n header: null,\n tabs: { default: undefined },\n stickyTabs: { type: Boolean, default: false },\n stickyFilters: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = defineProps({\n header: null,\n halfWidth: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","props","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;AA6II,MAAAA,IAAA,CAAA;;;;;;;;;;iBAtFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,MAAAL,EAAA,SAAAM,EAAA,aAAA,GACAC,IAAAF,EAAA,MAAAP,EAAA,SAAAQ,EAAA,UAAA,GAEAE,IAAAH,EAAA,OAAA;AAAA,MAA2D,yCAAAC,EAAA;AAAA,MACR,8CAAAF,EAAA,SAAA,CAAAG,EAAA,SAAAN,EAAA;AAAA,IAEuB,EAAA,GAG1EQ,IAAAJ,EAAA,OAAA;AAAA,MAA8D,6CAAAC,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EI,IAAAL,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAT,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAS,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEAG,IAAAX,EAAA,MAAAF,EAAA,QAAA,EAAA,KAAAA,EAAA,MAAA,IAAA,MAAA,GAEA,EAAA,GAAAc,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAAnB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAkB,EAAApB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAO,EAAA,OAAA;AACI,kBAAAc,IAAArB,EAAA,MAAA;AACA,YAAAG,EAAA,QAAAC,EAAA,QAAAiB,IAAA;AAAA,UAA8D;AAAA,QAClE,CAAA;AAAA,MAER;AAAA,IACJ,GAGJF;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAb,EAAA,UACIH,EAAA,UAAAc,IAAAf,EAAA,UAAA,gBAAAe,EAAA,wBAAA,SAAA;AAAA,MACJ;AAAA,IACJ,GAGJO,EAAA,MAAA;AACI,MAAApB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;qBCnCvCqB,IAAA,CAAA;;;;;;;;iBAzCA7B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA8B,IAAAnB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAmB,EAAA,MAAA;AACI,WAAA7B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAU,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dashboard-section.BWhw2hvx.js","sources":["../../src/templates/dashboard-template/dashboard-template.vue","../../src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = defineProps({\n header: null,\n tabs: { default: undefined },\n stickyTabs: { type: Boolean, default: false },\n stickyFilters: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = defineProps({\n header: null,\n halfWidth: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","props","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;AA6II,MAAAA,IAAA,CAAA;;;;;;;;;;iBAtFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,MAAAL,EAAA,SAAAM,EAAA,aAAA,GACAC,IAAAF,EAAA,MAAAP,EAAA,SAAAQ,EAAA,UAAA,GAEAE,IAAAH,EAAA,OAAA;AAAA,MAA2D,yCAAAC,EAAA;AAAA,MACR,8CAAAF,EAAA,SAAA,CAAAG,EAAA,SAAAN,EAAA;AAAA,IAEuB,EAAA,GAG1EQ,IAAAJ,EAAA,OAAA;AAAA,MAA8D,6CAAAC,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EI,IAAAL,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAT,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAS,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEAG,IAAAX,EAAA,MAAAF,EAAA,QAAA,EAAA,KAAAA,EAAA,MAAA,IAAA,MAAA,GAEA,EAAA,GAAAc,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAAnB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAkB,EAAApB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAO,EAAA,OAAA;AACI,kBAAAc,IAAArB,EAAA,MAAA;AACA,YAAAG,EAAA,QAAAC,EAAA,QAAAiB,IAAA;AAAA,UAA8D;AAAA,QAClE,CAAA;AAAA,MAER;AAAA,IACJ,GAGJF;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAb,EAAA,UACIH,EAAA,UAAAc,IAAAf,EAAA,UAAA,gBAAAe,EAAA,wBAAA,SAAA;AAAA,MACJ;AAAA,IACJ,GAGJO,EAAA,MAAA;AACI,MAAApB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;qBCnCvCqB,IAAA,CAAA;;;;;;;;iBAzCA7B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA8B,IAAAnB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAmB,EAAA,MAAA;AACI,WAAA7B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAU,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as T, useSlots as P, ref as u, computed as c, watch as b } from "vue";
2
- import { e as O, h as x } from "./button-actions.CXD6_9qN.js";
2
+ import { e as O, h as x } from "./button-actions.CdsmKyvj.js";
3
3
  import { B } from "./typography.C8lPlsbD.js";
4
4
  import { u as g } from "./use-has-slot.C9lQZ6nz.js";
5
- import { b as S } from "./tooltip.BxtnF3is.js";
5
+ import { b as S } from "./tooltip.Bl6kedql.js";
6
6
  import { n as C } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
7
7
  import "../assets/dashed-underline.css";
8
8
  const E = {}, U = /* @__PURE__ */ T({
@@ -74,4 +74,4 @@ const k = z.exports;
74
74
  export {
75
75
  k as B
76
76
  };
77
- //# sourceMappingURL=dashed-underline.D_FhFRXM.js.map
77
+ //# sourceMappingURL=dashed-underline.CPTkubjQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashed-underline.D_FhFRXM.js","sources":["../../src/components/dashed-underline/dashed-underline.vue"],"sourcesContent":["<template>\n <span\n ref=\"element\"\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n class=\"b-dashed-underline\"\n tabindex=\"0\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"dashedUnderlineOnFocus\"\n @focusout=\"dashedUnderlineOnFocusOut\"\n >\n <span class=\"b-dashed-underline__content\">\n <slot></slot>\n </span>\n <bento-teleport v-if=\"element && hasPopover\" :disabled=\"teleport?.disabled\" :to=\"teleport?.to\">\n <span v-on=\"computedPopoverContainerEvents\">\n <bento-popover\n :open=\"isOpen\"\n :target-element=\"element\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n :fit-content=\"popoverSize === 'fit-content' || undefined\"\n :large=\"popoverSize === 'large' || undefined\"\n :small=\"popoverSize === 'small' || undefined\"\n :title=\"popoverTitle\"\n disable-focus-trap\n >\n <slot name=\"popover-content\">\n <bento-typography>\n {{ popoverText }}\n </bento-typography>\n </slot>\n </bento-popover>\n </span>\n </bento-teleport>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useSlots, watch } from 'vue';\n import { BentoPopover } from '@/components/popover';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip/index';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { BentoTeleport } from '@/internal';\n import { type BentoDashedUnderlineProps } from './dashed-underline.types';\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n const props = defineProps({\n popoverText: { default: null },\n popoverTitle: { default: null },\n popoverPosition: { default: 'top' },\n popoverSize: { default: 'fit-content' },\n teleport: { default: () => ({\n disabled: true,\n }) },\n tooltipText: { default: null },\n tooltipPosition: { default: 'top' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const element = ref<HTMLSpanElement>(null);\n const isOpen = ref(false);\n\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const dashedUnderlineOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const dashedUnderlineOnFocusOut = (e: FocusEvent) => {\n if (!element.value || !(e?.relatedTarget instanceof Element) || !element.value.contains(e.relatedTarget)) {\n closePopover();\n }\n };\n\n const hasPopover = computed(() => props.popoverText || hasSlot('popover-content'));\n\n const shouldShowTooltipPopoverError = computed(() => !props.tooltipText && !hasPopover.value);\n\n watch(\n shouldShowTooltipPopoverError,\n value => {\n if (value) {\n throw new Error(\n 'BentoDashedUnderline requires either a tooltip or a popover to be configured. Check the docs for more info.'\n );\n }\n },\n { immediate: true }\n );\n\n /**\n * When the popover is teleported, it is no longer a DOM descendant of the trigger element.\n * We add these event listeners to the popover's container to keep the popover open when\n * the user moves their mouse or focuses out from the trigger to the popover BUT then mouses over\n * or focuses on the popover content.\n */\n const computedPopoverContainerEvents = computed(() =>\n props.teleport?.disabled === false\n ? {\n mouseenter: openPopover,\n mouseleave: closePopover,\n focus: dashedUnderlineOnFocus,\n focusout: dashedUnderlineOnFocusOut,\n }\n : {}\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Provides a dashed underline to text, indicating that more information is available on\n * hover or focus. The additional information is displayed in a tooltip or a popover.\n *\n * @example\n * import { BentoDashedUnderline } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashedUnderline },\n * template: `\n * <p>\n * This is some <bento-dashed-underline tooltip-text=\"A short explanation\">annotated text</bento-dashed-underline>.\n * </p>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashed-underline.scss\" />\n"],"names":["__default__","CLOSING_POPOVER_DELAY_MS","slots","useSlots","hasSlot","useHasSlot","element","ref","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","dashedUnderlineOnFocus","dashedUnderlineOnFocusOut","e","hasPopover","computed","props","shouldShowTooltipPopoverError","watch","value","computedPopoverContainerEvents","_a"],"mappings":";;;;;;;AAsJI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;iBAvGAC,IAAA,KAcAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GAEAE,IAAAF,EAAA,GAEAG,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAAP,CAAA;AAEnB,MAAAQ,EAAA,QAAAG;AAAA,IAAyB,GAG7BC,IAAA,MAAA;AACI,MAAAH,EAAA;AAAA,IAAY,GAOhBI,IAAA,CAAAC,MAAA;AACI,OAAA,CAAAT,EAAA,SAAA,GAAAS,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAT,EAAA,MAAA,SAAAS,EAAA,aAAA,MACIJ,EAAA;AAAA,IACJ,GAGJK,IAAAC,EAAA,MAAAC,EAAA,eAAAd,EAAA,iBAAA,CAAA,GAEAe,IAAAF,EAAA,MAAA,CAAAC,EAAA,eAAA,CAAAF,EAAA,KAAA;AAEA,IAAAI;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAStB,UAAAC,IAAAL;AAAA,MAAuC,MAAA;;AAAA,iBAAAM,IAAAL,EAAA,aAAA,gBAAAK,EAAA,cAAA,KAAA;AAAA,UAE7B,YAAAb;AAAA,UACgB,YAAAC;AAAA,UACA,OAAAE;AAAA,UACL,UAAAC;AAAA,QACG,IAAA,CAAA;AAAA;AAAA,IAEb;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dashed-underline.CPTkubjQ.js","sources":["../../src/components/dashed-underline/dashed-underline.vue"],"sourcesContent":["<template>\n <span\n ref=\"element\"\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n class=\"b-dashed-underline\"\n tabindex=\"0\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"dashedUnderlineOnFocus\"\n @focusout=\"dashedUnderlineOnFocusOut\"\n >\n <span class=\"b-dashed-underline__content\">\n <slot></slot>\n </span>\n <bento-teleport v-if=\"element && hasPopover\" :disabled=\"teleport?.disabled\" :to=\"teleport?.to\">\n <span v-on=\"computedPopoverContainerEvents\">\n <bento-popover\n :open=\"isOpen\"\n :target-element=\"element\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n :fit-content=\"popoverSize === 'fit-content' || undefined\"\n :large=\"popoverSize === 'large' || undefined\"\n :small=\"popoverSize === 'small' || undefined\"\n :title=\"popoverTitle\"\n disable-focus-trap\n >\n <slot name=\"popover-content\">\n <bento-typography>\n {{ popoverText }}\n </bento-typography>\n </slot>\n </bento-popover>\n </span>\n </bento-teleport>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useSlots, watch } from 'vue';\n import { BentoPopover } from '@/components/popover';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip/index';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { BentoTeleport } from '@/internal';\n import { type BentoDashedUnderlineProps } from './dashed-underline.types';\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n const props = defineProps({\n popoverText: { default: null },\n popoverTitle: { default: null },\n popoverPosition: { default: 'top' },\n popoverSize: { default: 'fit-content' },\n teleport: { default: () => ({\n disabled: true,\n }) },\n tooltipText: { default: null },\n tooltipPosition: { default: 'top' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const element = ref<HTMLSpanElement>(null);\n const isOpen = ref(false);\n\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const dashedUnderlineOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const dashedUnderlineOnFocusOut = (e: FocusEvent) => {\n if (!element.value || !(e?.relatedTarget instanceof Element) || !element.value.contains(e.relatedTarget)) {\n closePopover();\n }\n };\n\n const hasPopover = computed(() => props.popoverText || hasSlot('popover-content'));\n\n const shouldShowTooltipPopoverError = computed(() => !props.tooltipText && !hasPopover.value);\n\n watch(\n shouldShowTooltipPopoverError,\n value => {\n if (value) {\n throw new Error(\n 'BentoDashedUnderline requires either a tooltip or a popover to be configured. Check the docs for more info.'\n );\n }\n },\n { immediate: true }\n );\n\n /**\n * When the popover is teleported, it is no longer a DOM descendant of the trigger element.\n * We add these event listeners to the popover's container to keep the popover open when\n * the user moves their mouse or focuses out from the trigger to the popover BUT then mouses over\n * or focuses on the popover content.\n */\n const computedPopoverContainerEvents = computed(() =>\n props.teleport?.disabled === false\n ? {\n mouseenter: openPopover,\n mouseleave: closePopover,\n focus: dashedUnderlineOnFocus,\n focusout: dashedUnderlineOnFocusOut,\n }\n : {}\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Provides a dashed underline to text, indicating that more information is available on\n * hover or focus. The additional information is displayed in a tooltip or a popover.\n *\n * @example\n * import { BentoDashedUnderline } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashedUnderline },\n * template: `\n * <p>\n * This is some <bento-dashed-underline tooltip-text=\"A short explanation\">annotated text</bento-dashed-underline>.\n * </p>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashed-underline.scss\" />\n"],"names":["__default__","CLOSING_POPOVER_DELAY_MS","slots","useSlots","hasSlot","useHasSlot","element","ref","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","dashedUnderlineOnFocus","dashedUnderlineOnFocusOut","e","hasPopover","computed","props","shouldShowTooltipPopoverError","watch","value","computedPopoverContainerEvents","_a"],"mappings":";;;;;;;AAsJI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;iBAvGAC,IAAA,KAcAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GAEAE,IAAAF,EAAA,GAEAG,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAAP,CAAA;AAEnB,MAAAQ,EAAA,QAAAG;AAAA,IAAyB,GAG7BC,IAAA,MAAA;AACI,MAAAH,EAAA;AAAA,IAAY,GAOhBI,IAAA,CAAAC,MAAA;AACI,OAAA,CAAAT,EAAA,SAAA,GAAAS,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAT,EAAA,MAAA,SAAAS,EAAA,aAAA,MACIJ,EAAA;AAAA,IACJ,GAGJK,IAAAC,EAAA,MAAAC,EAAA,eAAAd,EAAA,iBAAA,CAAA,GAEAe,IAAAF,EAAA,MAAA,CAAAC,EAAA,eAAA,CAAAF,EAAA,KAAA;AAEA,IAAAI;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAStB,UAAAC,IAAAL;AAAA,MAAuC,MAAA;;AAAA,iBAAAM,IAAAL,EAAA,aAAA,gBAAAK,EAAA,cAAA,KAAA;AAAA,UAE7B,YAAAb;AAAA,UACgB,YAAAC;AAAA,UACA,OAAAE;AAAA,UACL,UAAAC;AAAA,QACG,IAAA,CAAA;AAAA;AAAA,IAEb;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as R, useSlots as S, ref as d, computed as i, provide as I, toRef as _ } from "vue";
2
- import { B as h } from "./header.DyZG7qWe.js";
3
- import { B } from "./inspector.BzBPlz-5.js";
2
+ import { B as h } from "./header.9h-5ZCv8.js";
3
+ import { B } from "./inspector._xqiBe9X.js";
4
4
  import { a as x, B as A } from "./tab.CNIZyfZt.js";
5
5
  import { u as E } from "./use-has-slot.C9lQZ6nz.js";
6
6
  import { D } from "./data-grid-template.keys.VezYtHtM.js";
@@ -108,4 +108,4 @@ const q = $.exports;
108
108
  export {
109
109
  q as d
110
110
  };
111
- //# sourceMappingURL=data-grid-template.CRijG20n.js.map
111
+ //# sourceMappingURL=data-grid-template.ZB5anthH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-grid-template.CRijG20n.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-inspector v-bind=\"computedInspectorProps\" ref=\"inspectorRef\" v-on=\"inspectorEvents\">\n <template #page>\n <div class=\"b-data-grid-template__header\">\n <slot name=\"header\">\n <bento-header v-bind=\"header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n </slot>\n </div>\n\n <div\n v-if=\"hasSlot('additionalContent')\"\n ref=\"additionalContentRef\"\n class=\"b-data-grid-template__additional-content\"\n :class=\"additionalContentConditionalClasses\"\n >\n <slot name=\"additionalContent\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"stickyAdditionalContent ? { top: computedStickyAdditionalContentHeight } : null\"\n @update:active-tab-index=\"emitTabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <slot :name=\"`tab-${index + 1}`\" />\n </bento-tab>\n </bento-tabs>\n\n <slot v-else />\n </template>\n\n <template #content>\n <slot name=\"inspector-content\" />\n </template>\n </bento-inspector>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoHeader } from '@/components/header';\n import { BentoInspector } from '@/components/inspector';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { computed, type PropType, provide, type Ref, ref, toRef, type UnwrapRef, useSlots } from 'vue';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateInspector,\n BentoDataGridTemplateTabs,\n } from './data-grid-template.types';\n\n const props = defineProps({\n /**\n * The header that goes to the top of the template\n */\n header: {\n type: Object as PropType<BentoDataGridTemplateHeader>,\n default: undefined,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currenly active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs: {\n type: Object as PropType<BentoDataGridTemplateTabs>,\n default: undefined,\n },\n\n /**\n * Renders the additional content slot with a sticky positioning\n */\n stickyAdditionalContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n\n /**\n * All the inspector properties that can be set on the inner inspector component.\n */\n inspector: {\n type: Object as PropType<BentoDataGridTemplateInspector>,\n default: undefined,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\", \"update:is-open:inspector\", \"update:active-page:inspector\", \"expand:inspector\"]);\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n const inspectorRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\n }));\n\n const computedInspectorProps = computed(() => ({\n title: '',\n ...props.inspector,\n }));\n\n const computedStickyAdditionalContentHeight = computed(() => additionalContentRef?.value?.offsetHeight);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablistwrapper);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const inspectorEvents = computed(() => ({\n 'update:is-open': (value: boolean) => emit('update:is-open:inspector', value),\n 'update:active-page': (value: string) => emit('update:active-page:inspector', value),\n expand: (value: boolean) => emit('expand:inspector', value),\n }));\n\n const emitTabs = (newActiveTabIndex: number) => {\n emit('update:tabs', { ...props.tabs, activeTabIndex: newActiveTabIndex });\n };\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const registerDatagridInDataGridTemplate: BentoDataGridTemplateDataGrid = () => {\n const isDataGridTemplate = true;\n const stickyTabs: Ref<boolean> = toRef(props, 'stickyTabs');\n const stickyAdditionalContent: Ref<boolean> = toRef(props, 'stickyAdditionalContent');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n const additionalContentSlotRef: Ref<UnwrapRef<HTMLDivElement>> | null = additionalContentRef;\n\n // return values to the Tab component\n return {\n isDataGridTemplate,\n stickyTabs,\n tabsRef,\n stickyAdditionalContent,\n additionalContentSlotRef,\n };\n };\n\n provide(DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY, registerDatagridInDataGridTemplate);\n</script>\n\n<script lang=\"ts\">\n /**\n * The data grid template is a restrictive, full-page data grid used to display information from a data set.\n * You can use this data grid template when your user needs a clear overview of data or a way of organizing and analyzing the data in their own way.\n * This data grid template shouldn’t be confused with the data grid.\n *\n * @example\n * import { BentoDataGridTemplate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDataGridTemplate },\n * template: `\n * // If you want to display multiple data grids in the same page (they will be rendered in different tabs)\n * <bento-data-grid-template>\n * <template #tab-1><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 1\"/></template>\n * <template #tab-2><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 2\"/></template>\n * </bento-data-grid-template>\n * // Alternatively, if you only want to pass one data grid to your template:\n * <bento-data-grid-template>\n * <template #default><bento-data-grid v-bind=\"your-data-grid-args\"/></template>\n * </bento-data-grid-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./data-grid-template.scss\" />\n"],"names":["__default__","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","additionalContentRef","inspectorRef","additionalContentConditionalClasses","computed","props","computedInspectorProps","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","inspectorEvents","value","emit","emitTabs","newActiveTabIndex","getTabTitle","index","registerDatagridInDataGridTemplate","stickyTabs","toRef","stickyAdditionalContent","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;;AAuLI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GAEAG,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAC,EAAA;AAAA,IACE,EAAA,GAG9DC,IAAAF,EAAA,OAAA;AAAA,MAA+C,OAAA;AAAA,MACpC,GAAAC,EAAA;AAAA,IACE,EAAA,GAGbE,IAAAH,EAAA,MAAA;;AAAA,cAAAI,IAAAP,KAAA,gBAAAA,EAAA,UAAA,gBAAAO,EAAA;AAAA,KAAA,GAEAC,IAAAL,EAAA,MAAA;;AAAA,cAAAM,KAAAF,IAAAT,EAAA,UAAA,gBAAAS,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAP,EAAA,MAAA,OAAA,KAAAT,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAAT,EAAA,OAAA;AAAA,MAAwC,kBAAA,CAAAU,MAAAC,EAAA,4BAAAD,CAAA;AAAA,MACwC,sBAAA,CAAAA,MAAAC,EAAA,gCAAAD,CAAA;AAAA,MACO,QAAA,CAAAA,MAAAC,EAAA,oBAAAD,CAAA;AAAA,IACzB,EAAA,GAG9DE,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,eAAA,EAAA,GAAAV,EAAA,MAAA,gBAAAY,EAAA,CAAA;AAAA,IAAwE,GAG5EC,IAAA,CAAAC,MAAA;;AAAA,eAAAT,KAAAF,IAAAH,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAG,EAAAW,OAAA,gBAAAT,EAAA,UAAA,OAAAS,IAAA,CAAA;AAAA,OAEAC,IAAA,MAAA;AAEI,YAAAC,IAAAC,EAAAjB,GAAA,YAAA,GACAkB,IAAAD,EAAAjB,GAAA,yBAAA;AAKA,aAAA;AAAA,QAAO;AAAA,QACH,YAAAgB;AAAA,QACA,SANJZ;AAAA,QAOI,yBAAAc;AAAA,QACA,0BAPJtB;AAAA,MAQI;AAAA,IACJ;AAGJ,WAAAuB,EAAAC,GAAAL,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"data-grid-template.ZB5anthH.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-inspector v-bind=\"computedInspectorProps\" ref=\"inspectorRef\" v-on=\"inspectorEvents\">\n <template #page>\n <div class=\"b-data-grid-template__header\">\n <slot name=\"header\">\n <bento-header v-bind=\"header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n </slot>\n </div>\n\n <div\n v-if=\"hasSlot('additionalContent')\"\n ref=\"additionalContentRef\"\n class=\"b-data-grid-template__additional-content\"\n :class=\"additionalContentConditionalClasses\"\n >\n <slot name=\"additionalContent\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"stickyAdditionalContent ? { top: computedStickyAdditionalContentHeight } : null\"\n @update:active-tab-index=\"emitTabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <slot :name=\"`tab-${index + 1}`\" />\n </bento-tab>\n </bento-tabs>\n\n <slot v-else />\n </template>\n\n <template #content>\n <slot name=\"inspector-content\" />\n </template>\n </bento-inspector>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoHeader } from '@/components/header';\n import { BentoInspector } from '@/components/inspector';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { computed, type PropType, provide, type Ref, ref, toRef, type UnwrapRef, useSlots } from 'vue';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateInspector,\n BentoDataGridTemplateTabs,\n } from './data-grid-template.types';\n\n const props = defineProps({\n /**\n * The header that goes to the top of the template\n */\n header: {\n type: Object as PropType<BentoDataGridTemplateHeader>,\n default: undefined,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currenly active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs: {\n type: Object as PropType<BentoDataGridTemplateTabs>,\n default: undefined,\n },\n\n /**\n * Renders the additional content slot with a sticky positioning\n */\n stickyAdditionalContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n\n /**\n * All the inspector properties that can be set on the inner inspector component.\n */\n inspector: {\n type: Object as PropType<BentoDataGridTemplateInspector>,\n default: undefined,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\", \"update:is-open:inspector\", \"update:active-page:inspector\", \"expand:inspector\"]);\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n const inspectorRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\n }));\n\n const computedInspectorProps = computed(() => ({\n title: '',\n ...props.inspector,\n }));\n\n const computedStickyAdditionalContentHeight = computed(() => additionalContentRef?.value?.offsetHeight);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablistwrapper);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const inspectorEvents = computed(() => ({\n 'update:is-open': (value: boolean) => emit('update:is-open:inspector', value),\n 'update:active-page': (value: string) => emit('update:active-page:inspector', value),\n expand: (value: boolean) => emit('expand:inspector', value),\n }));\n\n const emitTabs = (newActiveTabIndex: number) => {\n emit('update:tabs', { ...props.tabs, activeTabIndex: newActiveTabIndex });\n };\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const registerDatagridInDataGridTemplate: BentoDataGridTemplateDataGrid = () => {\n const isDataGridTemplate = true;\n const stickyTabs: Ref<boolean> = toRef(props, 'stickyTabs');\n const stickyAdditionalContent: Ref<boolean> = toRef(props, 'stickyAdditionalContent');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n const additionalContentSlotRef: Ref<UnwrapRef<HTMLDivElement>> | null = additionalContentRef;\n\n // return values to the Tab component\n return {\n isDataGridTemplate,\n stickyTabs,\n tabsRef,\n stickyAdditionalContent,\n additionalContentSlotRef,\n };\n };\n\n provide(DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY, registerDatagridInDataGridTemplate);\n</script>\n\n<script lang=\"ts\">\n /**\n * The data grid template is a restrictive, full-page data grid used to display information from a data set.\n * You can use this data grid template when your user needs a clear overview of data or a way of organizing and analyzing the data in their own way.\n * This data grid template shouldn’t be confused with the data grid.\n *\n * @example\n * import { BentoDataGridTemplate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDataGridTemplate },\n * template: `\n * // If you want to display multiple data grids in the same page (they will be rendered in different tabs)\n * <bento-data-grid-template>\n * <template #tab-1><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 1\"/></template>\n * <template #tab-2><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 2\"/></template>\n * </bento-data-grid-template>\n * // Alternatively, if you only want to pass one data grid to your template:\n * <bento-data-grid-template>\n * <template #default><bento-data-grid v-bind=\"your-data-grid-args\"/></template>\n * </bento-data-grid-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./data-grid-template.scss\" />\n"],"names":["__default__","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","additionalContentRef","inspectorRef","additionalContentConditionalClasses","computed","props","computedInspectorProps","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","inspectorEvents","value","emit","emitTabs","newActiveTabIndex","getTabTitle","index","registerDatagridInDataGridTemplate","stickyTabs","toRef","stickyAdditionalContent","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;;AAuLI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhFAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GAEAG,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAC,EAAA;AAAA,IACE,EAAA,GAG9DC,IAAAF,EAAA,OAAA;AAAA,MAA+C,OAAA;AAAA,MACpC,GAAAC,EAAA;AAAA,IACE,EAAA,GAGbE,IAAAH,EAAA,MAAA;;AAAA,cAAAI,IAAAP,KAAA,gBAAAA,EAAA,UAAA,gBAAAO,EAAA;AAAA,KAAA,GAEAC,IAAAL,EAAA,MAAA;;AAAA,cAAAM,KAAAF,IAAAT,EAAA,UAAA,gBAAAS,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAP,EAAA,MAAA,OAAA,KAAAT,CAAA,EAAA,OAAA,CAAAiB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAAT,EAAA,OAAA;AAAA,MAAwC,kBAAA,CAAAU,MAAAC,EAAA,4BAAAD,CAAA;AAAA,MACwC,sBAAA,CAAAA,MAAAC,EAAA,gCAAAD,CAAA;AAAA,MACO,QAAA,CAAAA,MAAAC,EAAA,oBAAAD,CAAA;AAAA,IACzB,EAAA,GAG9DE,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,eAAA,EAAA,GAAAV,EAAA,MAAA,gBAAAY,EAAA,CAAA;AAAA,IAAwE,GAG5EC,IAAA,CAAAC,MAAA;;AAAA,eAAAT,KAAAF,IAAAH,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAG,EAAAW,OAAA,gBAAAT,EAAA,UAAA,OAAAS,IAAA,CAAA;AAAA,OAEAC,IAAA,MAAA;AAEI,YAAAC,IAAAC,EAAAjB,GAAA,YAAA,GACAkB,IAAAD,EAAAjB,GAAA,yBAAA;AAKA,aAAA;AAAA,QAAO;AAAA,QACH,YAAAgB;AAAA,QACA,SANJZ;AAAA,QAOI,yBAAAc;AAAA,QACA,0BAPJtB;AAAA,MAQI;AAAA,IACJ;AAGJ,WAAAuB,EAAAC,GAAAL,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,44 +5,44 @@ import { W as kn } from "./alert.CLqcPN0Q.js";
5
5
  import { n as J } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import { C as Nt } from "./cross.CC_B-vG-.js";
7
7
  import { N as rt } from "./minus-small.DJacLGTw.js";
8
- import { b as $n } from "./popper-container.C_n9Ds1W.js";
9
- import { E as j, b as Dt, B as Wn, T as Gn } from "./tooltip.BxtnF3is.js";
10
- import { B as Vn } from "./dashed-underline.D_FhFRXM.js";
8
+ import { b as $n } from "./popper-container.D7-KbKnN.js";
9
+ import { E as j, b as Dt, B as Wn, T as Gn } from "./tooltip.Bl6kedql.js";
10
+ import { B as Vn } from "./dashed-underline.CPTkubjQ.js";
11
11
  import { B as Le, p as Mt } from "./typography.C8lPlsbD.js";
12
12
  import { u as _e } from "./index.B6WW_F-J.js";
13
- import { B as Hn } from "./tag.D2xagTJv.js";
14
- import { B as Zn } from "./action-bar.ChuPTyQG.js";
15
- import { B as jn } from "./pagination.BzsKZFnw.js";
13
+ import { B as Hn } from "./tag.DPNSUeue.js";
14
+ import { B as Zn } from "./action-bar.BPsug0x7.js";
15
+ import { B as jn } from "./pagination.hOIvu4hj.js";
16
16
  import { B as Ze } from "./loading-indicator.PxbRzshH.js";
17
17
  import { u as je } from "./use-has-slot.C9lQZ6nz.js";
18
18
  import { u as qn } from "./use-touch-device.DTqFAbXh.js";
19
19
  import { g as Fe } from "./generate-uid.NJ8tVoha.js";
20
- import { a as Kn } from "./filter-bar.C5NxhUhF.js";
20
+ import { a as Kn } from "./filter-bar.CFXeAK8X.js";
21
21
  import { B as Yn } from "./empty-state.DMV23IZy.js";
22
22
  import { E as Xn } from "./tabs.keys.B4qGhjp2.js";
23
23
  import { D as Jn } from "./data-grid-template.keys.VezYtHtM.js";
24
- import { b as Qn } from "./index.CwzYJHw2.js";
24
+ import { c as Qn } from "./index.ByaCaB1Z.js";
25
25
  import { o as qe } from "./resize.Bqks3WUm.js";
26
26
  import "./index.Cl4_42j5.js";
27
- import { b as Ft } from "./focus-trap.DRqjHzt6.js";
28
- import { B as xt } from "./checkbox.BObXaofv.js";
27
+ import { b as Ft } from "./focus-trap.D4WDxUwu.js";
28
+ import { B as xt } from "./checkbox.B2lQl9BE.js";
29
29
  import { B as Pt } from "./button.C9b2AC9w.js";
30
- import { c as Ke, f as zt, h as es, b as ts, a as ns, O as ct, D as ss } from "./button-actions.CXD6_9qN.js";
30
+ import { c as Ke, f as zt, h as es, b as ts, a as ns, O as ct, D as ss } from "./button-actions.CdsmKyvj.js";
31
31
  import { E as dt } from "./link.DB5g6d48.js";
32
- import { C as ut } from "./copy.qqGYFbKJ.js";
32
+ import { C as ut } from "./copy.DcpG08B_.js";
33
33
  import { C as os } from "./chevron-down.eYtgv5ly.js";
34
34
  import { C as ls } from "./chevron-up.d8cwIlA_.js";
35
35
  import { u as as } from "./use-expandable-content-height.GkjjbmPy.js";
36
- import { B as is } from "./info-icon.DCR42Kvm.js";
37
- import { D as rs } from "./use-cached-selected-values.Du8-wWR2.js";
38
- import { B as ft } from "./popover.types.hA13DZPg.js";
36
+ import { B as is } from "./info-icon.BOX4oIVD.js";
37
+ import { D as rs } from "./use-cached-selected-values.C6aShVBp.js";
38
+ import { B as ft } from "./popover.types.DhuEjpRI.js";
39
39
  import { A as cs } from "./arrow-left.CRREfabP.js";
40
40
  import { A as ds } from "./arrow-right.Dn3AYpUP.js";
41
41
  import { H as us, S as fs } from "./show.B_mKPF6I.js";
42
42
  import { l as gt } from "./events.BQOQSSb7.js";
43
43
  import { B as Bt } from "./toggle.Ca-MM3dt.js";
44
- import { B as gs } from "./search-bar.Brb3OP-y.js";
45
- import { u as ms } from "./dropdown.BYJwx-JD.js";
44
+ import { B as gs } from "./search-bar.CHINuvXx.js";
45
+ import { u as ms } from "./dropdown.CF6Gf7ya.js";
46
46
  import { S as _s } from "./search.D53Ia3rC.js";
47
47
  import { B as Cs } from "./directive.Bfr4fuOy.js";
48
48
  import "../assets/data-grid.css";
@@ -4068,4 +4068,4 @@ export {
4068
4068
  ye as h,
4069
4069
  fe as i
4070
4070
  };
4071
- //# sourceMappingURL=data-grid.CJzEtn4Q.js.map
4071
+ //# sourceMappingURL=data-grid.CuLOPenn.js.map