@adyen/bento-vue2 1.57.1 → 1.58.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 (186) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +190 -51
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid-template.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-range-picker.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/filter-bar.css +1 -1
  14. package/dist/assets/input-field-password.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/menu.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/popover.css +1 -1
  19. package/dist/assets/sidepanel.css +1 -1
  20. package/dist/avatar.js +1 -1
  21. package/dist/button.js +1 -1
  22. package/dist/card.js +1 -1
  23. package/dist/checkbox.js +2 -2
  24. package/dist/chunks/{action-bar.nUvnRVwP.js → action-bar.CErJh_wJ.js} +4 -4
  25. package/dist/chunks/{action-bar.nUvnRVwP.js.map → action-bar.CErJh_wJ.js.map} +1 -1
  26. package/dist/chunks/{avatar.CP1oL5W2.js → avatar.BgwjpLQO.js} +4 -3
  27. package/dist/chunks/{avatar.CP1oL5W2.js.map → avatar.BgwjpLQO.js.map} +1 -1
  28. package/dist/chunks/{base-modal.DdznUtgC.js → base-modal.D4x_tmYO.js} +2 -2
  29. package/dist/chunks/{base-modal.DdznUtgC.js.map → base-modal.D4x_tmYO.js.map} +1 -1
  30. package/dist/chunks/{button-actions-with-menu.CDLJMdJh.js → button-actions-with-menu.BHmj0Xvn.js} +4 -4
  31. package/dist/chunks/{button-actions-with-menu.CDLJMdJh.js.map → button-actions-with-menu.BHmj0Xvn.js.map} +1 -1
  32. package/dist/chunks/{button-actions.DUn_iPDm.js → button-actions.V0te_IrY.js} +2 -2
  33. package/dist/chunks/{button-actions.DUn_iPDm.js.map → button-actions.V0te_IrY.js.map} +1 -1
  34. package/dist/chunks/calendar.C7onA58P.js +1166 -0
  35. package/dist/chunks/calendar.C7onA58P.js.map +1 -0
  36. package/dist/chunks/{card.BYUqSnBy.js → card.CC4BEw-7.js} +2 -2
  37. package/dist/chunks/{card.BYUqSnBy.js.map → card.CC4BEw-7.js.map} +1 -1
  38. package/dist/chunks/{checkbox-group.HhNN-r-o.js → checkbox-group.Bev3ogYa.js} +4 -4
  39. package/dist/chunks/{checkbox-group.HhNN-r-o.js.map → checkbox-group.Bev3ogYa.js.map} +1 -1
  40. package/dist/chunks/{checkbox.CkaV8-b-.js → checkbox.DCIphKqu.js} +3 -3
  41. package/dist/chunks/{checkbox.CkaV8-b-.js.map → checkbox.DCIphKqu.js.map} +1 -1
  42. package/dist/chunks/{code-snippet.BdwtKOEj.js → code-snippet.BjtPvt9m.js} +5 -5
  43. package/dist/chunks/{code-snippet.BdwtKOEj.js.map → code-snippet.BjtPvt9m.js.map} +1 -1
  44. package/dist/chunks/{controls-group.CG5RvOSi.js → controls-group.CtpaKQIg.js} +2 -2
  45. package/dist/chunks/{controls-group.CG5RvOSi.js.map → controls-group.CtpaKQIg.js.map} +1 -1
  46. package/dist/chunks/{copy.MTsLLiC0.js → copy.BggvtZCO.js} +2 -2
  47. package/dist/chunks/{copy.MTsLLiC0.js.map → copy.BggvtZCO.js.map} +1 -1
  48. package/dist/chunks/{dashboard-section.DYk4LVm8.js → dashboard-section.D9LPEZ88.js} +2 -2
  49. package/dist/chunks/{dashboard-section.DYk4LVm8.js.map → dashboard-section.D9LPEZ88.js.map} +1 -1
  50. package/dist/chunks/{dashed-underline.lDp966e8.js → dashed-underline.DGRnOVkG.js} +3 -3
  51. package/dist/chunks/{dashed-underline.lDp966e8.js.map → dashed-underline.DGRnOVkG.js.map} +1 -1
  52. package/dist/chunks/{data-grid-template.Dcnw2_Du.js → data-grid-template.CwqfhYua.js} +2 -2
  53. package/dist/chunks/{data-grid-template.Dcnw2_Du.js.map → data-grid-template.CwqfhYua.js.map} +1 -1
  54. package/dist/chunks/{data-grid.DwdO-UCB.js → data-grid.Dl3xh62_.js} +1163 -1098
  55. package/dist/chunks/data-grid.Dl3xh62_.js.map +1 -0
  56. package/dist/chunks/{date-picker.oVG4b_5b.js → date-picker.DgF85qSC.js} +7 -6
  57. package/dist/chunks/{date-picker.oVG4b_5b.js.map → date-picker.DgF85qSC.js.map} +1 -1
  58. package/dist/chunks/date-range-picker.CAQY6v7g.js +967 -0
  59. package/dist/chunks/date-range-picker.CAQY6v7g.js.map +1 -0
  60. package/dist/chunks/{dropdown-tag.CqcduQgK.js → dropdown-tag.Cn6lz_lG.js} +4 -4
  61. package/dist/chunks/{dropdown-tag.CqcduQgK.js.map → dropdown-tag.Cn6lz_lG.js.map} +1 -1
  62. package/dist/chunks/{dropdown.sRIb4drl.js → dropdown.C01pOog2.js} +4 -4
  63. package/dist/chunks/{dropdown.sRIb4drl.js.map → dropdown.C01pOog2.js.map} +1 -1
  64. package/dist/chunks/{error-message.JskAm-Td.js → error-message.dQtl9mYG.js} +2 -2
  65. package/dist/chunks/{error-message.JskAm-Td.js.map → error-message.dQtl9mYG.js.map} +1 -1
  66. package/dist/chunks/{es6.BtaxuP0b.js → es6.BA9GH7QZ.js} +2 -2
  67. package/dist/chunks/{es6.BtaxuP0b.js.map → es6.BA9GH7QZ.js.map} +1 -1
  68. package/dist/chunks/{file-uploader.DhOTdtfm.js → file-uploader.D81zRKpY.js} +3 -3
  69. package/dist/chunks/{file-uploader.DhOTdtfm.js.map → file-uploader.D81zRKpY.js.map} +1 -1
  70. package/dist/chunks/{filter-bar.DRDC6mhJ.js → filter-bar.CcsUi7Xg.js} +604 -575
  71. package/dist/chunks/filter-bar.CcsUi7Xg.js.map +1 -0
  72. package/dist/chunks/{footer-actions.CWOEDPKJ.js → footer-actions.Cn-793_Z.js} +2 -2
  73. package/dist/chunks/{footer-actions.CWOEDPKJ.js.map → footer-actions.Cn-793_Z.js.map} +1 -1
  74. package/dist/chunks/{header-with-views.B8ncHkZt.js → header-with-views.BTd57MWZ.js} +13 -12
  75. package/dist/chunks/{header-with-views.B8ncHkZt.js.map → header-with-views.BTd57MWZ.js.map} +1 -1
  76. package/dist/chunks/{header.byOrhnHk.js → header.Rr0lnNYz.js} +4 -4
  77. package/dist/chunks/{header.byOrhnHk.js.map → header.Rr0lnNYz.js.map} +1 -1
  78. package/dist/chunks/{info-icon-with-popover.Cfng_pMj.js → info-icon-with-popover.B9QgNl-S.js} +2 -2
  79. package/dist/chunks/{info-icon-with-popover.Cfng_pMj.js.map → info-icon-with-popover.B9QgNl-S.js.map} +1 -1
  80. package/dist/chunks/{info-icon.DgCYoVE3.js → info-icon.BL55W9hd.js} +2 -2
  81. package/dist/chunks/{info-icon.DgCYoVE3.js.map → info-icon.BL55W9hd.js.map} +1 -1
  82. package/dist/chunks/input-field-password.DMcXkdVE.js +251 -0
  83. package/dist/chunks/input-field-password.DMcXkdVE.js.map +1 -0
  84. package/dist/chunks/{input-field-phone-number.DFt3iS_A.js → input-field-phone-number.Cfy_o9aE.js} +3 -3
  85. package/dist/chunks/{input-field-phone-number.DFt3iS_A.js.map → input-field-phone-number.Cfy_o9aE.js.map} +1 -1
  86. package/dist/chunks/{input-field.rHXIJKN8.js → input-field.CP8Qui6G.js} +3 -3
  87. package/dist/chunks/{input-field.rHXIJKN8.js.map → input-field.CP8Qui6G.js.map} +1 -1
  88. package/dist/chunks/{listbox-option-tag.CBGk4m-_.js → listbox-option-tag.DDmqT1rs.js} +2 -2
  89. package/dist/chunks/{listbox-option-tag.CBGk4m-_.js.map → listbox-option-tag.DDmqT1rs.js.map} +1 -1
  90. package/dist/chunks/{menu.DZEDTBYV.js → menu.Dkesc658.js} +2 -2
  91. package/dist/chunks/{menu.DZEDTBYV.js.map → menu.Dkesc658.js.map} +1 -1
  92. package/dist/chunks/{modal-fullscreen.DRQ4V5tT.js → modal-fullscreen.D1pHbGYd.js} +2 -2
  93. package/dist/chunks/{modal-fullscreen.DRQ4V5tT.js.map → modal-fullscreen.D1pHbGYd.js.map} +1 -1
  94. package/dist/chunks/{modal.DDF63uBR.js → modal.bgya0ObK.js} +4 -4
  95. package/dist/chunks/{modal.DDF63uBR.js.map → modal.bgya0ObK.js.map} +1 -1
  96. package/dist/chunks/{pagination.BJ4qwHJn.js → pagination.CaHPf-Ye.js} +2 -2
  97. package/dist/chunks/{pagination.BJ4qwHJn.js.map → pagination.CaHPf-Ye.js.map} +1 -1
  98. package/dist/chunks/{popover.DXo3nXew.js → popover.CuOrBXcF.js} +2 -2
  99. package/dist/chunks/{popover.DXo3nXew.js.map → popover.CuOrBXcF.js.map} +1 -1
  100. package/dist/chunks/{radio-group.DtCgLBuL.js → radio-group.9jAj6AKb.js} +4 -4
  101. package/dist/chunks/{radio-group.DtCgLBuL.js.map → radio-group.9jAj6AKb.js.map} +1 -1
  102. package/dist/chunks/rich-text-editor.Ch-ETIRi.js +6203 -0
  103. package/dist/chunks/rich-text-editor.Ch-ETIRi.js.map +1 -0
  104. package/dist/chunks/{search-bar.Cc8VBCjQ.js → search-bar.Cs60bUZc.js} +3 -3
  105. package/dist/chunks/{search-bar.Cc8VBCjQ.js.map → search-bar.Cs60bUZc.js.map} +1 -1
  106. package/dist/chunks/{secondary-nav.DEDQjtj6.js → secondary-nav.i_Bb4wQF.js} +3 -3
  107. package/dist/chunks/{secondary-nav.DEDQjtj6.js.map → secondary-nav.i_Bb4wQF.js.map} +1 -1
  108. package/dist/chunks/{segmented-control.BQlmGv2x.js → segmented-control.BffWAGrf.js} +2 -2
  109. package/dist/chunks/{segmented-control.BQlmGv2x.js.map → segmented-control.BffWAGrf.js.map} +1 -1
  110. package/dist/chunks/{selection-card-group.BniN7KWU.js → selection-card-group.DTz7k_M7.js} +4 -4
  111. package/dist/chunks/{selection-card-group.BniN7KWU.js.map → selection-card-group.DTz7k_M7.js.map} +1 -1
  112. package/dist/chunks/{sidepanel.DfQaLZEA.js → sidepanel.DuTesKDW.js} +2 -2
  113. package/dist/chunks/{sidepanel.DfQaLZEA.js.map → sidepanel.DuTesKDW.js.map} +1 -1
  114. package/dist/chunks/{structured-list-item.xaedKywV.js → structured-list-item.-vyqAp4Y.js} +4 -4
  115. package/dist/chunks/{structured-list-item.xaedKywV.js.map → structured-list-item.-vyqAp4Y.js.map} +1 -1
  116. package/dist/chunks/{summary-grid.types.CNEeGgWh.js → summary-grid.types.fm_VmUVA.js} +5 -5
  117. package/dist/chunks/{summary-grid.types.CNEeGgWh.js.map → summary-grid.types.fm_VmUVA.js.map} +1 -1
  118. package/dist/chunks/{tag.C7kJJ5Ki.js → tag.DczYlfXd.js} +2 -2
  119. package/dist/chunks/{tag.C7kJJ5Ki.js.map → tag.DczYlfXd.js.map} +1 -1
  120. package/dist/chunks/{textarea.CdA36VsY.js → textarea.B7BgCn_l.js} +2 -2
  121. package/dist/chunks/{textarea.CdA36VsY.js.map → textarea.B7BgCn_l.js.map} +1 -1
  122. package/dist/chunks/{timeline-item.D87PFH_o.js → timeline-item.DdF6EN2w.js} +5 -5
  123. package/dist/chunks/{timeline-item.D87PFH_o.js.map → timeline-item.DdF6EN2w.js.map} +1 -1
  124. package/dist/chunks/{toast.BuxfqZJb.js → toast.B2u2W_TQ.js} +4 -3
  125. package/dist/chunks/{toast.BuxfqZJb.js.map → toast.B2u2W_TQ.js.map} +1 -1
  126. package/dist/chunks/{tooltip.8KbMqaXP.js → tooltip.Bm5S2goP.js} +65 -65
  127. package/dist/chunks/{tooltip.8KbMqaXP.js.map → tooltip.Bm5S2goP.js.map} +1 -1
  128. package/dist/chunks/{tutorial.D74hJVBb.js → tutorial.DIYd-V8c.js} +4 -4
  129. package/dist/chunks/{tutorial.D74hJVBb.js.map → tutorial.DIYd-V8c.js.map} +1 -1
  130. package/dist/chunks/{use-cached-selected-values.CSVs_E5A.js → use-cached-selected-values.BrkzIuaE.js} +3 -3
  131. package/dist/chunks/{use-cached-selected-values.CSVs_E5A.js.map → use-cached-selected-values.BrkzIuaE.js.map} +1 -1
  132. package/dist/code-snippet.js +1 -1
  133. package/dist/dashboard-template.js +1 -1
  134. package/dist/dashed-underline.js +1 -1
  135. package/dist/data-grid-template.js +1 -1
  136. package/dist/data-grid.js +1 -1
  137. package/dist/date-picker.js +2 -2
  138. package/dist/date-range-picker.js +2 -2
  139. package/dist/dropdown.js +3 -3
  140. package/dist/file-uploader.js +1 -1
  141. package/dist/filter-bar.js +1 -1
  142. package/dist/header-with-views.js +1 -1
  143. package/dist/header.js +1 -1
  144. package/dist/index.js +149 -147
  145. package/dist/index.js.map +1 -1
  146. package/dist/info-icon.js +1 -1
  147. package/dist/input-field-password.js +1 -1
  148. package/dist/input-field-phone-number.js +1 -1
  149. package/dist/input-field.js +1 -1
  150. package/dist/internal.js +10 -10
  151. package/dist/menu.js +1 -1
  152. package/dist/modal-fullscreen.js +1 -1
  153. package/dist/modal.js +2 -2
  154. package/dist/pagination.js +1 -1
  155. package/dist/popover.js +1 -1
  156. package/dist/radio-group.js +1 -1
  157. package/dist/rich-text-editor.js +2 -6200
  158. package/dist/rich-text-editor.js.map +1 -1
  159. package/dist/search-bar.js +2 -2
  160. package/dist/secondary-nav.js +1 -1
  161. package/dist/segmented-control.js +1 -1
  162. package/dist/selection-card.js +1 -1
  163. package/dist/sidepanel.js +1 -1
  164. package/dist/structured-list.js +1 -1
  165. package/dist/styles/bento-dark.css +15 -15
  166. package/dist/styles/bento-light.css +95 -95
  167. package/dist/styles/bento.css +95 -95
  168. package/dist/styles/legacy.css +96 -96
  169. package/dist/styles/styleguide.css +96 -96
  170. package/dist/styles/utility.css +64 -64
  171. package/dist/summary-grid.js +1 -1
  172. package/dist/tag.js +1 -1
  173. package/dist/textarea.js +1 -1
  174. package/dist/timeline.js +1 -1
  175. package/dist/toast.js +1 -1
  176. package/dist/tutorial.js +1 -1
  177. package/dist/web-types.json +43 -7
  178. package/package.json +4 -4
  179. package/dist/chunks/calendar.C0iatn5N.js +0 -1127
  180. package/dist/chunks/calendar.C0iatn5N.js.map +0 -1
  181. package/dist/chunks/data-grid.DwdO-UCB.js.map +0 -1
  182. package/dist/chunks/date-range-picker.CbLz3jJx.js +0 -905
  183. package/dist/chunks/date-range-picker.CbLz3jJx.js.map +0 -1
  184. package/dist/chunks/filter-bar.DRDC6mhJ.js.map +0 -1
  185. package/dist/chunks/input-field-password.GhHsOaiD.js +0 -233
  186. package/dist/chunks/input-field-password.GhHsOaiD.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as k, useSlots as v, ref as p, computed as d, provide as S, toRef as _ } from "vue";
2
- import { B as g } from "./header.byOrhnHk.js";
2
+ import { B as g } from "./header.Rr0lnNYz.js";
3
3
  import { a as R, B as h } from "./tabs.DX_Gq12z.js";
4
4
  import { u as A } from "./use-has-slot.C9lQZ6nz.js";
5
5
  import { D as B } from "./data-grid-template.keys.2_AkxuNT.js";
@@ -81,4 +81,4 @@ const F = x.exports;
81
81
  export {
82
82
  F as d
83
83
  };
84
- //# sourceMappingURL=data-grid-template.Dcnw2_Du.js.map
84
+ //# sourceMappingURL=data-grid-template.CwqfhYua.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-grid-template.Dcnw2_Du.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-data-grid-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\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 <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 <slot v-else />\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\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 required: true,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currently 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 const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\"]);\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\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 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 { isDataGridTemplate, stickyTabs, tabsRef, stickyAdditionalContent, additionalContentSlotRef };\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","additionalContentConditionalClasses","computed","props","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","emitTabs","newActiveTabIndex","emit","getTabTitle","index","registerDatagridInDataGridTemplate","stickyTabs","toRef","stickyAdditionalContent","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;AA4II,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GAEAE,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAC,EAAA;AAAA,IACE,EAAA,GAG9DC,IAAAF,EAAA,MAAA;;AAAA,cAAAG,IAAAL,KAAA,gBAAAA,EAAA,UAAA,gBAAAK,EAAA;AAAA,KAAA,GAEAC,IAAAJ,EAAA,MAAA;;AAAA,cAAAK,KAAAF,IAAAP,EAAA,UAAA,gBAAAO,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAN,EAAA,MAAA,OAAA,KAAAR,CAAA,EAAA,OAAA,CAAAe,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,eAAA,EAAA,GAAAT,EAAA,MAAA,gBAAAQ,EAAA,CAAA;AAAA,IAAwE,GAG5EE,IAAA,CAAAC,MAAA;;AAAA,eAAAP,KAAAF,IAAAF,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAE,EAAAS,OAAA,gBAAAP,EAAA,UAAA,OAAAO,IAAA,CAAA;AAAA,OAEAC,IAAA,MAAA;AAEI,YAAAC,IAAAC,EAAAd,GAAA,YAAA,GACAe,IAAAD,EAAAd,GAAA,yBAAA;AAKA,aAAA,EAAA,wBAAA,YAAAa,GAAA,SAJAV,GAIA,yBAAAY,GAAA,0BAHAlB,EAGA;AAAA,IAAoG;AAGxG,WAAAmB,EAAAC,GAAAL,CAAA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"data-grid-template.CwqfhYua.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-data-grid-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\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 <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 <slot v-else />\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\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 required: true,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currently 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 const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\"]);\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\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 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 { isDataGridTemplate, stickyTabs, tabsRef, stickyAdditionalContent, additionalContentSlotRef };\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","additionalContentConditionalClasses","computed","props","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","emitTabs","newActiveTabIndex","emit","getTabTitle","index","registerDatagridInDataGridTemplate","stickyTabs","toRef","stickyAdditionalContent","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;AA4II,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GAEAE,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAC,EAAA;AAAA,IACE,EAAA,GAG9DC,IAAAF,EAAA,MAAA;;AAAA,cAAAG,IAAAL,KAAA,gBAAAA,EAAA,UAAA,gBAAAK,EAAA;AAAA,KAAA,GAEAC,IAAAJ,EAAA,MAAA;;AAAA,cAAAK,KAAAF,IAAAP,EAAA,UAAA,gBAAAO,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAN,EAAA,MAAA,OAAA,KAAAR,CAAA,EAAA,OAAA,CAAAe,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,eAAA,EAAA,GAAAT,EAAA,MAAA,gBAAAQ,EAAA,CAAA;AAAA,IAAwE,GAG5EE,IAAA,CAAAC,MAAA;;AAAA,eAAAP,KAAAF,IAAAF,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAE,EAAAS,OAAA,gBAAAP,EAAA,UAAA,OAAAO,IAAA,CAAA;AAAA,OAEAC,IAAA,MAAA;AAEI,YAAAC,IAAAC,EAAAd,GAAA,YAAA,GACAe,IAAAD,EAAAd,GAAA,yBAAA;AAKA,aAAA,EAAA,wBAAA,YAAAa,GAAA,SAJAV,GAIA,yBAAAY,GAAA,0BAHAlB,EAGA;AAAA,IAAoG;AAGxG,WAAAmB,EAAAC,GAAAL,CAAA;;;;;;;;;;;;;;;;;;;"}