@adyen/bento-vue2 1.48.0 → 1.50.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 (187) hide show
  1. package/dist/@types/index.d.ts +253 -244
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/dialog-page.css +1 -1
  9. package/dist/assets/dropdown.css +1 -1
  10. package/dist/assets/file-uploader.css +1 -1
  11. package/dist/assets/filter-bar.css +1 -1
  12. package/dist/assets/header.css +1 -1
  13. package/dist/assets/inspector.css +1 -1
  14. package/dist/assets/menu.css +1 -1
  15. package/dist/assets/modal-fullscreen.css +1 -1
  16. package/dist/assets/payment-method.css +1 -1
  17. package/dist/assets/popover.css +1 -1
  18. package/dist/assets/sidepanel.css +1 -1
  19. package/dist/assets/toggle-button.css +1 -1
  20. package/dist/button.js +1 -1
  21. package/dist/checkbox.js +2 -2
  22. package/dist/chunks/{action-bar.CSgrrcK0.js → action-bar.CGJJrMpa.js} +4 -4
  23. package/dist/chunks/{action-bar.CSgrrcK0.js.map → action-bar.CGJJrMpa.js.map} +1 -1
  24. package/dist/chunks/{base-modal.47Xa68h9.js → base-modal.8kcvtFRx.js} +2 -2
  25. package/dist/chunks/{base-modal.47Xa68h9.js.map → base-modal.8kcvtFRx.js.map} +1 -1
  26. package/dist/chunks/{button-actions-with-menu.D13mJiKO.js → button-actions-with-menu.C5OE7oOu.js} +3 -3
  27. package/dist/chunks/{button-actions-with-menu.D13mJiKO.js.map → button-actions-with-menu.C5OE7oOu.js.map} +1 -1
  28. package/dist/chunks/{checkbox-group.BXfJo9NR.js → checkbox-group.wa6Mtmxa.js} +4 -4
  29. package/dist/chunks/{checkbox-group.BXfJo9NR.js.map → checkbox-group.wa6Mtmxa.js.map} +1 -1
  30. package/dist/chunks/{checkbox.BEHpJDrF.js → checkbox.BPvnJrvd.js} +17 -17
  31. package/dist/chunks/{checkbox.BEHpJDrF.js.map → checkbox.BPvnJrvd.js.map} +1 -1
  32. package/dist/chunks/{code-snippet.CUx6b252.js → code-snippet.3s8WCnke.js} +5 -5
  33. package/dist/chunks/{code-snippet.CUx6b252.js.map → code-snippet.3s8WCnke.js.map} +1 -1
  34. package/dist/chunks/{controls-group.C3RDqB9H.js → controls-group.BnDPMaGI.js} +2 -2
  35. package/dist/chunks/{controls-group.C3RDqB9H.js.map → controls-group.BnDPMaGI.js.map} +1 -1
  36. package/dist/chunks/{copy.adSQlAOY.js → copy.DMlIj53I.js} +3 -3
  37. package/dist/chunks/{copy.adSQlAOY.js.map → copy.DMlIj53I.js.map} +1 -1
  38. package/dist/chunks/currency.B1F9YOIx.js.map +1 -1
  39. package/dist/chunks/{dashboard-section.q1XXEUZc.js → dashboard-section.BgyN5u0K.js} +3 -3
  40. package/dist/chunks/{dashboard-section.q1XXEUZc.js.map → dashboard-section.BgyN5u0K.js.map} +1 -1
  41. package/dist/chunks/{dashed-underline.CpVP3VDL.js → dashed-underline.Cvn5IoHT.js} +3 -3
  42. package/dist/chunks/{dashed-underline.CpVP3VDL.js.map → dashed-underline.Cvn5IoHT.js.map} +1 -1
  43. package/dist/chunks/{data-grid-template.kCxfVaW7.js → data-grid-template.DtWM0Tnu.js} +2 -2
  44. package/dist/chunks/{data-grid-template.kCxfVaW7.js.map → data-grid-template.DtWM0Tnu.js.map} +1 -1
  45. package/dist/chunks/{data-grid.DgxC3G4n.js → data-grid.N5Rxo6QB.js} +671 -665
  46. package/dist/chunks/data-grid.N5Rxo6QB.js.map +1 -0
  47. package/dist/chunks/{date-picker.DqsQJ7P7.js → date-picker.Byv5Z-Xj.js} +3 -3
  48. package/dist/chunks/{date-picker.DqsQJ7P7.js.map → date-picker.Byv5Z-Xj.js.map} +1 -1
  49. package/dist/chunks/{date-range-picker.VZlIz83o.js → date-range-picker.CUS9Q53T.js} +6 -6
  50. package/dist/chunks/{date-range-picker.VZlIz83o.js.map → date-range-picker.CUS9Q53T.js.map} +1 -1
  51. package/dist/chunks/{dropdown-tag.BLAjuup5.js → dropdown-tag.ClUMccWv.js} +4 -4
  52. package/dist/chunks/{dropdown-tag.BLAjuup5.js.map → dropdown-tag.ClUMccWv.js.map} +1 -1
  53. package/dist/chunks/{dropdown.DWgwNFNB.js → dropdown.CC1i41NX.js} +264 -264
  54. package/dist/chunks/dropdown.CC1i41NX.js.map +1 -0
  55. package/dist/chunks/{error-message.Da-p1QIA.js → error-message.xTNEaNn8.js} +2 -2
  56. package/dist/chunks/{error-message.Da-p1QIA.js.map → error-message.xTNEaNn8.js.map} +1 -1
  57. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  58. package/dist/chunks/{file-uploader.DT7GsNqI.js → file-uploader.DTkxh9Ct.js} +400 -395
  59. package/dist/chunks/file-uploader.DTkxh9Ct.js.map +1 -0
  60. package/dist/chunks/{filter-bar.D2YR4Tpz.js → filter-bar.gj9sdW5T.js} +17 -18
  61. package/dist/chunks/{filter-bar.D2YR4Tpz.js.map → filter-bar.gj9sdW5T.js.map} +1 -1
  62. package/dist/chunks/{focus-trap.CGypVwG6.js → focus-trap._RrLaKlq.js} +6 -3
  63. package/dist/chunks/{focus-trap.CGypVwG6.js.map → focus-trap._RrLaKlq.js.map} +1 -1
  64. package/dist/chunks/{header.D5MLt9hG.js → header.5rAXro_L.js} +48 -48
  65. package/dist/chunks/{header.D5MLt9hG.js.map → header.5rAXro_L.js.map} +1 -1
  66. package/dist/chunks/{index.D8ivUe7P.js → index.CU8GKq4C.js} +8 -7
  67. package/dist/chunks/{index.D8ivUe7P.js.map → index.CU8GKq4C.js.map} +1 -1
  68. package/dist/chunks/{info-icon-with-popover.CO0mky_N.js → info-icon-with-popover.B0zJWJZn.js} +2 -2
  69. package/dist/chunks/{info-icon-with-popover.CO0mky_N.js.map → info-icon-with-popover.B0zJWJZn.js.map} +1 -1
  70. package/dist/chunks/{info-icon.0d0GzDe2.js → info-icon.C4_l0WAf.js} +3 -3
  71. package/dist/chunks/{info-icon.0d0GzDe2.js.map → info-icon.C4_l0WAf.js.map} +1 -1
  72. package/dist/chunks/{input-field-password.CQtzruQM.js → input-field-password.PU9SY4FC.js} +5 -5
  73. package/dist/chunks/{input-field-password.CQtzruQM.js.map → input-field-password.PU9SY4FC.js.map} +1 -1
  74. package/dist/chunks/{input-field-phone-number.DWKZy2-k.js → input-field-phone-number.D2juJ9ZD.js} +2 -2
  75. package/dist/chunks/{input-field-phone-number.DWKZy2-k.js.map → input-field-phone-number.D2juJ9ZD.js.map} +1 -1
  76. package/dist/chunks/{input-field.3V5IblWw.js → input-field.BPbe00eB.js} +3 -3
  77. package/dist/chunks/{input-field.3V5IblWw.js.map → input-field.BPbe00eB.js.map} +1 -1
  78. package/dist/chunks/inspector.types.BtgXpTC7.js +101 -0
  79. package/dist/chunks/inspector.types.BtgXpTC7.js.map +1 -0
  80. package/dist/chunks/{layout-row.BfS-cPky.js → layout-row.CHwDU8yK.js} +7 -7
  81. package/dist/chunks/{layout-row.BfS-cPky.js.map → layout-row.CHwDU8yK.js.map} +1 -1
  82. package/dist/chunks/{listbox-option-tag.XbvBQqlt.js → listbox-option-tag.BJBWnC2r.js} +2 -2
  83. package/dist/chunks/{listbox-option-tag.XbvBQqlt.js.map → listbox-option-tag.BJBWnC2r.js.map} +1 -1
  84. package/dist/chunks/{menu.DYopJZ12.js → menu.BC7ynpgF.js} +24 -24
  85. package/dist/chunks/{menu.DYopJZ12.js.map → menu.BC7ynpgF.js.map} +1 -1
  86. package/dist/chunks/{modal-fullscreen.Pp5mp7hD.js → modal-fullscreen.Dz3kSuTz.js} +2 -2
  87. package/dist/chunks/{modal-fullscreen.Pp5mp7hD.js.map → modal-fullscreen.Dz3kSuTz.js.map} +1 -1
  88. package/dist/chunks/{modal.CCjAy7Hv.js → modal.DV55hSPn.js} +2 -2
  89. package/dist/chunks/{modal.CCjAy7Hv.js.map → modal.DV55hSPn.js.map} +1 -1
  90. package/dist/chunks/{pagination.8g4bC4tv.js → pagination.CT-h2q0J.js} +2 -2
  91. package/dist/chunks/{pagination.8g4bC4tv.js.map → pagination.CT-h2q0J.js.map} +1 -1
  92. package/dist/chunks/payment-method.Bu76jY3c.js +59 -0
  93. package/dist/chunks/payment-method.Bu76jY3c.js.map +1 -0
  94. package/dist/chunks/payment-method.types.CJKfZQN5.js.map +1 -1
  95. package/dist/chunks/{popover.C-LwO38X.js → popover.CRdrSmFW.js} +17 -16
  96. package/dist/chunks/popover.CRdrSmFW.js.map +1 -0
  97. package/dist/chunks/{popper-container.B1iB2ovW.js → popper-container.CsW4R0-t.js} +2 -2
  98. package/dist/chunks/{popper-container.B1iB2ovW.js.map → popper-container.CsW4R0-t.js.map} +1 -1
  99. package/dist/chunks/{promo-banner.DS0_aROF.js → promo-banner.BNXfyv3h.js} +6 -6
  100. package/dist/chunks/{promo-banner.DS0_aROF.js.map → promo-banner.BNXfyv3h.js.map} +1 -1
  101. package/dist/chunks/{radio-group.1z-IZvLU.js → radio-group.CUgib4vp.js} +4 -4
  102. package/dist/chunks/{radio-group.1z-IZvLU.js.map → radio-group.CUgib4vp.js.map} +1 -1
  103. package/dist/chunks/{search-bar.Bu12OC-l.js → search-bar.bMOGN8_E.js} +3 -3
  104. package/dist/chunks/{search-bar.Bu12OC-l.js.map → search-bar.bMOGN8_E.js.map} +1 -1
  105. package/dist/chunks/{secondary-nav.CLDlWCXX.js → secondary-nav.C9sm93do.js} +3 -3
  106. package/dist/chunks/{secondary-nav.CLDlWCXX.js.map → secondary-nav.C9sm93do.js.map} +1 -1
  107. package/dist/chunks/{segmented-control.BJIlas0M.js → segmented-control.BxCcPbKd.js} +2 -2
  108. package/dist/chunks/{segmented-control.BJIlas0M.js.map → segmented-control.BxCcPbKd.js.map} +1 -1
  109. package/dist/chunks/{selection-card-group.usHcqYKO.js → selection-card-group.0O3gmtoi.js} +11 -11
  110. package/dist/chunks/{selection-card-group.usHcqYKO.js.map → selection-card-group.0O3gmtoi.js.map} +1 -1
  111. package/dist/chunks/{sidepanel.C_ff-PEn.js → sidepanel.Dp6dKRnq.js} +2 -2
  112. package/dist/chunks/{sidepanel.C_ff-PEn.js.map → sidepanel.Dp6dKRnq.js.map} +1 -1
  113. package/dist/chunks/{structured-list-item.TC8mVrrA.js → structured-list-item.DrY71Ndc.js} +4 -4
  114. package/dist/chunks/{structured-list-item.TC8mVrrA.js.map → structured-list-item.DrY71Ndc.js.map} +1 -1
  115. package/dist/chunks/{summary-grid-item-custom.A11AzfH0.js → summary-grid-item-custom.CXs6AMS4.js} +4 -4
  116. package/dist/chunks/{summary-grid-item-custom.A11AzfH0.js.map → summary-grid-item-custom.CXs6AMS4.js.map} +1 -1
  117. package/dist/chunks/{tag.3fthBtwc.js → tag.CevG31iQ.js} +2 -2
  118. package/dist/chunks/{tag.3fthBtwc.js.map → tag.CevG31iQ.js.map} +1 -1
  119. package/dist/chunks/{textarea.CpXux8qX.js → textarea.DHbXaxdU.js} +2 -2
  120. package/dist/chunks/{textarea.CpXux8qX.js.map → textarea.DHbXaxdU.js.map} +1 -1
  121. package/dist/chunks/{timeline-item.Ca9RJt0z.js → timeline-item.C4HOsaEG.js} +4 -4
  122. package/dist/chunks/{timeline-item.Ca9RJt0z.js.map → timeline-item.C4HOsaEG.js.map} +1 -1
  123. package/dist/chunks/{toggle-button.BX_9vB0d.js → toggle-button.DK4H4sHT.js} +5 -5
  124. package/dist/chunks/toggle-button.DK4H4sHT.js.map +1 -0
  125. package/dist/chunks/{tooltip.R2sqydIE.js → tooltip.Bu8o7uyZ.js} +2 -2
  126. package/dist/chunks/{tooltip.R2sqydIE.js.map → tooltip.Bu8o7uyZ.js.map} +1 -1
  127. package/dist/chunks/{tutorial.Cc0tv59x.js → tutorial.BbQox1EZ.js} +4 -4
  128. package/dist/chunks/{tutorial.Cc0tv59x.js.map → tutorial.BbQox1EZ.js.map} +1 -1
  129. package/dist/chunks/{use-cached-selected-values.C24AnZ-w.js → use-cached-selected-values.a_5Iw6Dh.js} +258 -254
  130. package/dist/chunks/use-cached-selected-values.a_5Iw6Dh.js.map +1 -0
  131. package/dist/code-snippet.js +1 -1
  132. package/dist/dashboard-template.js +1 -1
  133. package/dist/dashed-underline.js +1 -1
  134. package/dist/data-grid-template.js +1 -1
  135. package/dist/data-grid.js +1 -1
  136. package/dist/date-picker.js +1 -1
  137. package/dist/date-range-picker.js +1 -1
  138. package/dist/dropdown.js +3 -3
  139. package/dist/file-uploader.js +1 -1
  140. package/dist/filter-bar.js +1 -1
  141. package/dist/focus-trap.js +1 -1
  142. package/dist/header.js +1 -1
  143. package/dist/index.js +44 -44
  144. package/dist/info-icon.js +1 -1
  145. package/dist/input-field-password.js +1 -1
  146. package/dist/input-field-phone-number.js +1 -1
  147. package/dist/input-field.js +1 -1
  148. package/dist/inspector.js +1 -1
  149. package/dist/internal.js +8 -8
  150. package/dist/layout.js +1 -1
  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/payment-method.js +1 -1
  156. package/dist/popover.js +1 -1
  157. package/dist/popper-container.js +1 -1
  158. package/dist/promo-banner.js +1 -1
  159. package/dist/radio-group.js +1 -1
  160. package/dist/search-bar.js +2 -2
  161. package/dist/secondary-nav.js +1 -1
  162. package/dist/segmented-control.js +1 -1
  163. package/dist/selection-card.js +1 -1
  164. package/dist/sidepanel.js +1 -1
  165. package/dist/structured-list.js +1 -1
  166. package/dist/styles/bento-dark.css +2 -1
  167. package/dist/styles/bento-light.css +2 -1
  168. package/dist/styles/bento.css +2 -1
  169. package/dist/styles/legacy.css +3 -0
  170. package/dist/styles/styleguide.css +2 -1
  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/tutorial.js +1 -1
  176. package/dist/web-types.json +71 -41
  177. package/package.json +5 -5
  178. package/dist/chunks/data-grid.DgxC3G4n.js.map +0 -1
  179. package/dist/chunks/dropdown.DWgwNFNB.js.map +0 -1
  180. package/dist/chunks/file-uploader.DT7GsNqI.js.map +0 -1
  181. package/dist/chunks/inspector.types.GOl_-hXm.js +0 -70
  182. package/dist/chunks/inspector.types.GOl_-hXm.js.map +0 -1
  183. package/dist/chunks/payment-method.BKr_q5cZ.js +0 -84
  184. package/dist/chunks/payment-method.BKr_q5cZ.js.map +0 -1
  185. package/dist/chunks/popover.C-LwO38X.js.map +0 -1
  186. package/dist/chunks/toggle-button.BX_9vB0d.js.map +0 -1
  187. package/dist/chunks/use-cached-selected-values.C24AnZ-w.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"selection-card-group.usHcqYKO.js","sources":["../../src/components/selection-card/selection-card.types.ts","../../src/components/selection-card/selection-card.keys.ts","../../src/components/selection-card/selection-card.vue","../../src/components/selection-card/components/selection-card-group/selection-card-group.vue"],"sourcesContent":["import { RadioInputValue } from '@/components/internal/radio-input';\nimport { BentoCheckboxType } from '@/core/components/checkbox/checkbox.types';\nimport { VueNodeElement } from '@/types';\n\nexport enum BentoSelectionCardState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\nexport type BentoSelectionCardValue = string | number;\n\nexport type BentoSelectionCardModelValue = BentoCheckboxType | RadioInputValue;\n\nexport interface BentoSelectionCardItem {\n content?: string | object;\n description?: string;\n disabled?: boolean;\n dynamicContent?: string | object;\n fullyClickable?: boolean;\n hasError?: boolean;\n icon?: VueNodeElement;\n readonly?: boolean;\n subtitle?: string;\n title: string;\n value: BentoSelectionCardValue;\n}\n","export const SELECTION_CARD_RADIO_INPUT_INJECTION_KEY = Symbol('selection card radio input injection key');\n","<template>\n <div class=\"b-selection-card\" :class=\"conditionalClasses\" @click=\"handleCardClick\">\n <div class=\"b-selection-card__container\" :class=\"containerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container\" :class=\"checkboxContainerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container-text\" :class=\"checkboxContainerTextConditionalClasses\">\n <div v-if=\"hasSlot('icon')\" class=\"b-selection-card__icon\" role=\"presentation\">\n <slot name=\"icon\" />\n </div>\n <label :for=\"inputId\" class=\"b-selection-card__text\" @click.stop.prevent=\"handleCardClick\">\n <bento-typography\n v-if=\"subtitle\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ subtitle }}\n </bento-typography>\n <bento-typography el=\"span\" variant=\"title\">{{ title }}</bento-typography>\n <bento-typography\n v-if=\"description\"\n id=\"descriptionId\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"body\"\n >\n {{ description }}\n </bento-typography>\n </label>\n </div>\n <radio-input\n v-if=\"isRadioInput\"\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedRadioInputModelValue\"\n />\n <checkbox-input\n v-else\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedCheckboxInputModelValue\"\n />\n </div>\n <bento-typography\n v-if=\"hasSlot('content')\"\n ref=\"slotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"content\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('dynamicContent') && isChecked\"\n ref=\"dynamicSlotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"dynamicContent\" />\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { BentoCheckboxType, BentoMultiCheckboxType, CheckboxInput } from '../internal/checkbox-input';\n import { RadioInput, RadioInputValue } from '../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, ComputedRef, inject, PropType, Ref, ref, useSlots } from 'vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSelectionCardModelValue, BentoSelectionCardValue } from './selection-card.types';\n import { BentoSelectionCardState } from './selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from './selection-card.keys';\n\n const props = defineProps({\n /**\n * The description of the selection card\n */\n description: {\n type: String,\n default: undefined,\n },\n\n /**\n * Disables the selection card\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Makes the entire selection card clickable. Clicking over interactive elements inside the card with this prop enabled will not be possible.\n */\n fullyClickable: { type: Boolean, default: false },\n\n /**\n * Shows the selection card in error state\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on selection card component.\n *\n * When handling a single input, use a string or a number.\n *\n * When handling multiple inputs, use an array of keys.\n * These keys exist as a set \"value\" prop for each input.\n */\n modelValue: {\n type: [Boolean, String, Array] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Sets the selection card to readonly\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The subtitle of the selection card\n */\n subtitle: {\n type: String,\n default: undefined,\n },\n\n /**\n * The title of the selection card\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates the value of the input that will be returned when it's checked.\n */\n value: {\n type: [String, Number] as PropType<BentoSelectionCardValue>,\n required: true,\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const inputId = generateUid('selection-card-input-id');\n const descriptionId = generateUid('selection-card-description');\n\n const computedRadioInputModelValue: ComputedRef<RadioInputValue> = computed(\n () => props.modelValue as RadioInputValue\n );\n const computedCheckboxInputModelValue: ComputedRef<BentoCheckboxType> = computed(\n () => props.modelValue as BentoCheckboxType\n );\n\n const conditionalClasses = computed(() => ({\n 'b-selection-card--checked': isChecked.value,\n 'b-selection-card--fully-clickable': props.fullyClickable,\n }));\n\n const containerConditionalClasses = computed(() => ({\n [`b-selection-card--${BentoSelectionCardState.DISABLED}`]: props.disabled,\n [`b-selection-card--${BentoSelectionCardState.ERROR}`]: props.hasError,\n [`b-selection-card--${BentoSelectionCardState.READONLY}`]: props.readonly,\n 'b-selection-card--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerTextConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container-text--center-aligned': isTitleOnly.value,\n }));\n\n const slotConditionalClasses = computed(() => ({\n 'b-selection-card__slot--with-icon': hasSlot('icon'),\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: props.title,\n label: props.value as string,\n });\n\n const isCheckboxGroup = computed(() => Array.isArray(props.modelValue));\n\n const isChecked: ComputedRef<boolean> = computed(() => {\n if (isRadioInput.value) {\n return props.value === props.modelValue;\n }\n if (!isCheckboxGroup.value) {\n return props.modelValue as boolean;\n }\n\n return (props.modelValue as BentoMultiCheckboxType).some(item => item === props.value);\n });\n\n const isRadioInput: Ref<boolean> = inject(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, ref(false));\n\n const isTitleOnly = computed(() => !props.subtitle && !props.description);\n\n const inputRef = ref<InstanceType<typeof RadioInput> | InstanceType<typeof CheckboxInput>>(null);\n const slotRef = ref(null);\n const dynamicSlotRef = ref(null);\n\n // Handle click on the whole card area\n const handleCardClick = (event: Event) => {\n if (inputRef.value.$refs.inputRef === event.target) {\n const newValue = toggleInput();\n onChange(newValue);\n return;\n }\n\n // Do nothing if disabled or readonly\n if (props.disabled && props.readonly) {\n return;\n }\n\n // If it's not fully clickable prevent selecting the card if the click\n // originated in a slot\n if (!props.fullyClickable) {\n // Check if the click originated from the slot - in that case, do nothng\n if (slotRef.value && slotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the dynamic slot - in that case, do nothng\n if (dynamicSlotRef.value && dynamicSlotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the input - in that case do nothing, as the input will emit the event already\n if (inputRef.value && inputRef.value?.$el?.contains(event.target as Node)) {\n return;\n }\n }\n\n // If the click originated outside of these two areas, emit the change event\n const newValue = toggleInput();\n\n onChange(newValue);\n };\n\n const toggleInput = (): BentoSelectionCardModelValue => {\n const currentValue: boolean = (inputRef.value?.$refs.inputRef as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(props.modelValue as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(props.value);\n\n if (index === -1) {\n newCheckedList.push(props.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n return newCheckedList;\n }\n\n if (isRadioInput.value) {\n return props.value;\n }\n return currentValue;\n };\n\n const onChange = newValue => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', newValue);\n emit('input', newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Selection card component. If used standalone, only the checkbox variant can be used. If the checkbox variant is needed, please use the bento-selection-card-group component.\n *\n * @example\n * import { BentoSelectionCard } from '@adyen/bento-vue2';\n * import EmoticonHappyIcon from '@adyen/ui-assets-icons-16/vue/emoticon-happy';\n *\n * export default {\n * components: { BentoSelectionCard, EmoticonHappyIcon },\n * template: `\n * <bento-selection-card title=\"Card title\" :model-value.sync=\"yourModelValue\">\n * <template #icon>\n * <emoticon-happy-icon />\n * </template>\n * </bento-selection-card>\n * `\n * }\n */\n export default {\n name: 'bento-selection-card',\n };\n</script>\n<style lang=\"scss\" scoped src=\"./selection-card.scss\" />\n","<template>\n <controls-group\n ref=\"containerRef\"\n :aria-describedby=\"shouldShowGroupError ? errorMessageId : null\"\n :label=\"label\"\n :hide-label=\"hideLabel\"\n :description=\"description\"\n :disabled=\"disabled\"\n :tooltip-text=\"tooltipText\"\n :readonly=\"readonly\"\n :required=\"required\"\n :optional=\"optional\"\n class=\"b-selection-card-group\"\n component-name=\"selection-card-group\"\n >\n <div\n v-if=\"!itemsPerRow || layout === 'vertical'\"\n class=\"b-selection-card-group__items\"\n :class=\"conditionalItemsClasses\"\n >\n <bento-selection-card\n v-for=\"item in items\"\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </div>\n <template v-else>\n <div :key=\"`selection-card-group-layout-breakpoint-${currentBreakpoint}`\">\n <grid-layout\n v-for=\"(row, rowIndex) in computedRows\"\n :key=\"`selection-card-group-row-${rowIndex}-cols-${computedItemsPerRow}`\"\n class=\"b-selection-card-group__items--wrap\"\n :column-width=\"computedColumnWidth\"\n >\n <template v-for=\"(item, columnIndex) in row\" #[`col-${columnIndex+1}`]>\n <bento-selection-card\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item b-selection-card-group__item--full-height\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </template>\n </grid-layout>\n </div>\n </template>\n <error-message\n v-if=\"shouldShowGroupError\"\n :id=\"errorMessageId\"\n :error-message=\"errorMessage\"\n class=\"b-selection-card-group__error-message\"\n />\n </controls-group>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, PropType, provide, ref, useSlots, watch } from 'vue';\n import { useElementSize } from '@vueuse/core';\n import { BMediaQueryMMax, BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n import {\n BentoSelectionCardGroupItemsPerRow,\n BentoSelectionCardGroupLayout,\n BentoSelectionCardGroupVariant,\n } from './selection-card-group.types';\n import BentoSelectionCard from '../../selection-card.vue';\n import { ControlsGroup, ErrorMessage, GridLayout } from '../../../internal';\n import { BentoSelectionCardItem, BentoSelectionCardModelValue } from '../../selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from '../../selection-card.keys';\n import { generateUid } from '@/core/utils/ts';\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all cards in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all cards in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * Label of the group. Required for accessibility purposes, even if it's not shown\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.\n * @values horizontal, vertical\n */\n layout: {\n type: String as PropType<BentoSelectionCardGroupLayout>,\n default: 'vertical',\n },\n\n /**\n * The selection card group's items.\n */\n items: {\n type: Array as PropType<BentoSelectionCardItem[]>,\n required: true,\n },\n\n /**\n * Sets the responsive number of items rendered in each row.\n */\n itemsPerRow: {\n type: Object as PropType<BentoSelectionCardGroupItemsPerRow>,\n default: undefined,\n },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: [Array, String, Number] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * If set to true, renders all cards in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.\n * @values checkbox, radio\n */\n variant: { type: String as PropType<BentoSelectionCardGroupVariant>, default: 'checkbox' },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n const slots = useSlots();\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for vue3 named scoped slots\n // We do the same in bento-checkbox-group\n const hasSlot = name => !!slots[name];\n\n const conditionalItemsClasses = computed(() => ({\n 'b-selection-card-group__items--horizontal': props.layout === 'horizontal',\n }));\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n // Error message logic\n const errorMessageId = generateUid('error');\n const shouldShowGroupError = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // itemsPerRow logic\n const containerRef = ref<HTMLElement | null>(null);\n const { width } = useElementSize(containerRef);\n\n const smallBreakpoint = computed(() => BMediaQuerySMax.split('px')[0]);\n const mediumBreakpoint = computed(() => BMediaQueryMMax.split('px')[0]);\n\n const currentBreakpoint = computed(() => {\n if (width.value < smallBreakpoint.value) {\n return 'small';\n }\n if (width.value >= smallBreakpoint.value && width.value < mediumBreakpoint.value) {\n return 'medium';\n }\n return 'large';\n });\n\n const computedItemsPerRow = computed(() => {\n return (props.itemsPerRow?.[currentBreakpoint?.value] as number) || props.items.length;\n });\n\n const computedRows = computed(() => {\n if (!props.itemsPerRow) {\n return [];\n }\n const rows = [];\n for (let i = 0; i < props.items.length; i += computedItemsPerRow?.value) {\n rows.push(props.items.slice(i, i + computedItemsPerRow?.value));\n }\n return rows;\n });\n\n // We need to compute the column width on 12 because we're using a 12-column system for out grid-layout logic\n const itemColumnWidth = computed(() => 12 / computedItemsPerRow?.value);\n\n /**\n * Filling the columnWidth array with the same parameters per item to pass\n * to the `grid-layout` layout so the each card can have\n * the same width according to the screen size.\n */\n const computedColumnWidth = computed(() => {\n return computedItemsPerRow?.value\n ? new Array(computedItemsPerRow?.value).fill({\n // Instead of passing the actual screen sizes values, passing the same values per each screen size and recomputing it makes sure visually the change is smoother and not laggy\n small: itemColumnWidth.value,\n medium: itemColumnWidth.value,\n large: itemColumnWidth.value,\n })\n : [];\n });\n\n const onInput = value => {\n inputValue.value = value;\n emit('update:model-value', value);\n emit('input', value);\n };\n\n const isRadioVariant = computed(() => props.variant === 'radio');\n\n provide(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, isRadioVariant);\n\n onMounted(() => {\n if (props.itemsPerRow) {\n Object.values(props.itemsPerRow).forEach(el => {\n if (el && (el < 2 || el > 6)) {\n throw new Error(\n 'itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information.'\n );\n }\n });\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Group of bento-selection-cards.\n *\n * @example\n * import { BentoSelectionCardGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectionCardGroup },\n * template: `\n * <bento-selection-card-group\n * :items=\"[\n * {\n * title: 'Card 1',\n * value: 'card-1',\n * content: 'Slot content 1',\n * icon: RetailIcon,\n * },\n * {\n * title: 'Card 2',\n * value: 'card-2',\n * content: 'Slot content 2',\n * icon: LeafIcon,\n * },\n * ]\"\n * >\n * <template #icon=\"{ icon }\">\n * <component :is=\"icon\"/>\n * </template>\n * <template #content=\"{ content }\">\n * <div>{{ content }}</div>\n * </template>\n * </bento-selection-card-group>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./selection-card-group.scss\" />\n"],"names":["BentoSelectionCardState","BentoSelectionCardState2","SELECTION_CARD_RADIO_INPUT_INJECTION_KEY","__default__$1","slots","useSlots","hasSlot","useHasSlot","inputId","generateUid","descriptionId","computedRadioInputModelValue","computed","props","computedCheckboxInputModelValue","conditionalClasses","isChecked","containerConditionalClasses","isTitleOnly","checkboxContainerConditionalClasses","checkboxContainerTextConditionalClasses","slotConditionalClasses","ariaLabel","useAriaLabel","isCheckboxGroup","isRadioInput","item","inject","ref","inputRef","slotRef","dynamicSlotRef","handleCardClick","event","newValue2","toggleInput","onChange","_b","_a","_d","_c","_f","_e","newValue","currentValue","newCheckedList","index","emit","__default__","name","conditionalItemsClasses","inputValue","watch","errorMessageId","shouldShowGroupError","containerRef","width","useElementSize","smallBreakpoint","BMediaQuerySMax","mediumBreakpoint","BMediaQueryMMax","currentBreakpoint","computedItemsPerRow","computedRows","rows","i","itemColumnWidth","computedColumnWidth","onInput","value","isRadioVariant","provide","onMounted","el"],"mappings":";;;;;;;;;;;;;;AAIY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACJC,MAAAE,IAAA,OAAA,0CAAA,GCmTTC,KAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArJAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,yBAAA,GACAC,IAAAD,EAAA,4BAAA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AA,IAAA,MAAAA,KAAA,gBAAAA,EAAA,KAAA,EAAA,KAAA;AAAA;AAAA,MACiD,OAAAI,EAAA;AAAA,MAEhB,QAAAA,EAAA;AAAA,MACC,OAAAA,EAAA;AAAA,IACD,CAAA,IAAA,CAAA,CAE1B,GAGXE,IAAA,CAAAC,MAAA;AACI,MAAAnB,EAAA,QAAAmB,GACAvB,EAAA,sBAAAuB,CAAA,GACAvB,EAAA,SAAAuB,CAAA;AAAA,IAAmB,GAGvBC,IAAA3D,EAAA,MAAAC,EAAA,YAAA,OAAA;AAEA,WAAA2D,EAAAtE,GAAAqE,CAAA,GAEAE,EAAA,MAAA;AACI,MAAA5D,EAAA,eACI,OAAA,OAAAA,EAAA,WAAA,EAAA,QAAA,CAAA6D,MAAA;AACI,YAAAA,MAAAA,IAAA,KAAAA,IAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER,CAAA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"selection-card-group.0O3gmtoi.js","sources":["../../src/components/selection-card/selection-card.types.ts","../../src/components/selection-card/selection-card.keys.ts","../../src/components/selection-card/selection-card.vue","../../src/components/selection-card/components/selection-card-group/selection-card-group.vue"],"sourcesContent":["import { RadioInputValue } from '@/components/internal/radio-input';\nimport { BentoCheckboxType } from '@/core/components/checkbox/checkbox.types';\nimport { VueNodeElement } from '@/types';\n\nexport enum BentoSelectionCardState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\nexport type BentoSelectionCardValue = string | number;\n\nexport type BentoSelectionCardModelValue = BentoCheckboxType | RadioInputValue;\n\nexport interface BentoSelectionCardItem {\n content?: string | object;\n description?: string;\n disabled?: boolean;\n dynamicContent?: string | object;\n fullyClickable?: boolean;\n hasError?: boolean;\n icon?: VueNodeElement;\n readonly?: boolean;\n subtitle?: string;\n title: string;\n value: BentoSelectionCardValue;\n}\n","export const SELECTION_CARD_RADIO_INPUT_INJECTION_KEY = Symbol('selection card radio input injection key');\n","<template>\n <div class=\"b-selection-card\" :class=\"conditionalClasses\" @click=\"handleCardClick\">\n <div class=\"b-selection-card__container\" :class=\"containerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container\" :class=\"checkboxContainerConditionalClasses\">\n <div class=\"b-selection-card__checkbox-container-text\" :class=\"checkboxContainerTextConditionalClasses\">\n <div v-if=\"hasSlot('icon')\" class=\"b-selection-card__icon\" role=\"presentation\">\n <slot name=\"icon\" />\n </div>\n <label :for=\"inputId\" class=\"b-selection-card__text\" @click.stop.prevent=\"handleCardClick\">\n <bento-typography\n v-if=\"subtitle\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ subtitle }}\n </bento-typography>\n <bento-typography el=\"span\" variant=\"title\">{{ title }}</bento-typography>\n <bento-typography\n v-if=\"description\"\n id=\"descriptionId\"\n class=\"b-selection-card__description\"\n el=\"span\"\n variant=\"body\"\n >\n {{ description }}\n </bento-typography>\n </label>\n </div>\n <radio-input\n v-if=\"isRadioInput\"\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedRadioInputModelValue\"\n />\n <checkbox-input\n v-else\n :id=\"inputId\"\n ref=\"inputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"description ? descriptionId : undefined\"\n :disabled=\"disabled\"\n :has-error=\"hasError\"\n :aria-readonly=\"readonly ?? undefined\"\n :value=\"value\"\n :readonly=\"readonly\"\n :model-value=\"computedCheckboxInputModelValue\"\n />\n </div>\n <bento-typography\n v-if=\"hasSlot('content')\"\n ref=\"slotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"content\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('dynamicContent') && isChecked\"\n ref=\"dynamicSlotRef\"\n el=\"div\"\n class=\"b-selection-card__slot\"\n :class=\"slotConditionalClasses\"\n >\n <slot name=\"dynamicContent\" />\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { BentoCheckboxType, BentoMultiCheckboxType, CheckboxInput } from '../internal/checkbox-input';\n import { RadioInput, RadioInputValue } from '../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, ComputedRef, inject, PropType, Ref, ref, useSlots } from 'vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSelectionCardModelValue, BentoSelectionCardValue } from './selection-card.types';\n import { BentoSelectionCardState } from './selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from './selection-card.keys';\n\n const props = defineProps({\n /**\n * The description of the selection card\n */\n description: {\n type: String,\n default: undefined,\n },\n\n /**\n * Disables the selection card\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Makes the entire selection card clickable. Clicking over interactive elements inside the card with this prop enabled will not be possible.\n */\n fullyClickable: { type: Boolean, default: false },\n\n /**\n * Shows the selection card in error state\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on selection card component.\n *\n * When handling a single input, use a string or a number.\n *\n * When handling multiple inputs, use an array of keys.\n * These keys exist as a set \"value\" prop for each input.\n */\n modelValue: {\n type: [Boolean, String, Array] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Sets the selection card to readonly\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The subtitle of the selection card\n */\n subtitle: {\n type: String,\n default: undefined,\n },\n\n /**\n * The title of the selection card\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates the value of the input that will be returned when it's checked.\n */\n value: {\n type: [String, Number] as PropType<BentoSelectionCardValue>,\n required: true,\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const inputId = generateUid('selection-card-input-id');\n const descriptionId = generateUid('selection-card-description');\n\n const computedRadioInputModelValue: ComputedRef<RadioInputValue> = computed(\n () => props.modelValue as RadioInputValue\n );\n const computedCheckboxInputModelValue: ComputedRef<BentoCheckboxType> = computed(\n () => props.modelValue as BentoCheckboxType\n );\n\n const conditionalClasses = computed(() => ({\n 'b-selection-card--checked': isChecked.value,\n 'b-selection-card--fully-clickable': props.fullyClickable,\n }));\n\n const containerConditionalClasses = computed(() => ({\n [`b-selection-card--${BentoSelectionCardState.DISABLED}`]: props.disabled,\n [`b-selection-card--${BentoSelectionCardState.ERROR}`]: props.hasError,\n [`b-selection-card--${BentoSelectionCardState.READONLY}`]: props.readonly,\n 'b-selection-card--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container--center-aligned': isTitleOnly.value,\n }));\n\n const checkboxContainerTextConditionalClasses = computed(() => ({\n 'b-selection-card__checkbox-container-text--center-aligned': isTitleOnly.value,\n }));\n\n const slotConditionalClasses = computed(() => ({\n 'b-selection-card__slot--with-icon': hasSlot('icon'),\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: props.title,\n label: props.value as string,\n });\n\n const isCheckboxGroup = computed(() => Array.isArray(props.modelValue));\n\n const isChecked: ComputedRef<boolean> = computed(() => {\n if (isRadioInput.value) {\n return props.value === props.modelValue;\n }\n if (!isCheckboxGroup.value) {\n return props.modelValue as boolean;\n }\n\n return (props.modelValue as BentoMultiCheckboxType).some(item => item === props.value);\n });\n\n const isRadioInput: Ref<boolean> = inject(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, ref(false));\n\n const isTitleOnly = computed(() => !props.subtitle && !props.description);\n\n const inputRef = ref<InstanceType<typeof RadioInput> | InstanceType<typeof CheckboxInput>>(null);\n const slotRef = ref(null);\n const dynamicSlotRef = ref(null);\n\n // Handle click on the whole card area\n const handleCardClick = (event: Event) => {\n if (inputRef.value.$refs.inputRef === event.target) {\n const newValue = toggleInput();\n onChange(newValue);\n return;\n }\n\n // Do nothing if disabled or readonly\n if (props.disabled && props.readonly) {\n return;\n }\n\n // If it's not fully clickable prevent selecting the card if the click\n // originated in a slot\n if (!props.fullyClickable) {\n // Check if the click originated from the slot - in that case, do nothng\n if (slotRef.value && slotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the dynamic slot - in that case, do nothng\n if (dynamicSlotRef.value && dynamicSlotRef.value?.$el?.contains(event.target)) {\n return;\n }\n // Check if the click originated from the input - in that case do nothing, as the input will emit the event already\n if (inputRef.value && inputRef.value?.$el?.contains(event.target as Node)) {\n return;\n }\n }\n\n // If the click originated outside of these two areas, emit the change event\n const newValue = toggleInput();\n\n onChange(newValue);\n };\n\n const toggleInput = (): BentoSelectionCardModelValue => {\n const currentValue: boolean = (inputRef.value?.$refs.inputRef as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(props.modelValue as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(props.value);\n\n if (index === -1) {\n newCheckedList.push(props.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n return newCheckedList;\n }\n\n if (isRadioInput.value) {\n return props.value;\n }\n return currentValue;\n };\n\n const onChange = newValue => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', newValue);\n emit('input', newValue);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Selection card component. If used standalone, only the checkbox variant can be used. If the checkbox variant is needed, please use the bento-selection-card-group component.\n *\n * @example\n * import { BentoSelectionCard } from '@adyen/bento-vue2';\n * import EmoticonHappyIcon from '@adyen/ui-assets-icons-16/vue/emoticon-happy';\n *\n * export default {\n * components: { BentoSelectionCard, EmoticonHappyIcon },\n * template: `\n * <bento-selection-card title=\"Card title\" :model-value.sync=\"yourModelValue\">\n * <template #icon>\n * <emoticon-happy-icon />\n * </template>\n * </bento-selection-card>\n * `\n * }\n */\n export default {\n name: 'bento-selection-card',\n };\n</script>\n<style lang=\"scss\" scoped src=\"./selection-card.scss\" />\n","<template>\n <controls-group\n ref=\"containerRef\"\n :aria-describedby=\"shouldShowGroupError ? errorMessageId : null\"\n :label=\"label\"\n :hide-label=\"hideLabel\"\n :description=\"description\"\n :disabled=\"disabled\"\n :tooltip-text=\"tooltipText\"\n :readonly=\"readonly\"\n :required=\"required\"\n :optional=\"optional\"\n class=\"b-selection-card-group\"\n component-name=\"selection-card-group\"\n >\n <div\n v-if=\"!itemsPerRow || layout === 'vertical'\"\n class=\"b-selection-card-group__items\"\n :class=\"conditionalItemsClasses\"\n >\n <bento-selection-card\n v-for=\"item in items\"\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </div>\n <template v-else>\n <div :key=\"`selection-card-group-layout-breakpoint-${currentBreakpoint}`\">\n <grid-layout\n v-for=\"(row, rowIndex) in computedRows\"\n :key=\"`selection-card-group-row-${rowIndex}-cols-${computedItemsPerRow}`\"\n class=\"b-selection-card-group__items--wrap\"\n :column-width=\"computedColumnWidth\"\n >\n <template v-for=\"(item, columnIndex) in row\" #[`col-${columnIndex+1}`]>\n <bento-selection-card\n :key=\"`selection-card-${item.value}`\"\n class=\"b-selection-card-group__item b-selection-card-group__item--full-height\"\n v-bind=\"item\"\n :model-value=\"inputValue\"\n :readonly=\"readonly || item.readonly\"\n :has-error=\"shouldShowGroupError\"\n :disabled=\"disabled || item.disabled\"\n @update:model-value=\"onInput\"\n >\n <template v-if=\"hasSlot('icon') && item.icon\" #icon>\n <slot name=\"icon\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('content') && item.content\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n <template v-if=\"hasSlot('dynamicContent') && item.dynamicContent\" #dynamicContent>\n <slot name=\"dynamicContent\" v-bind=\"item\"></slot>\n </template>\n </bento-selection-card>\n </template>\n </grid-layout>\n </div>\n </template>\n <error-message\n v-if=\"shouldShowGroupError\"\n :id=\"errorMessageId\"\n :error-message=\"errorMessage\"\n class=\"b-selection-card-group__error-message\"\n />\n </controls-group>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, PropType, provide, ref, useSlots, watch } from 'vue';\n import { useElementSize } from '@vueuse/core';\n import { BMediaQueryMMax, BMediaQuerySMax } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n import {\n BentoSelectionCardGroupItemsPerRow,\n BentoSelectionCardGroupLayout,\n BentoSelectionCardGroupVariant,\n } from './selection-card-group.types';\n import BentoSelectionCard from '../../selection-card.vue';\n import { ControlsGroup, ErrorMessage, GridLayout } from '../../../internal';\n import { BentoSelectionCardItem, BentoSelectionCardModelValue } from '../../selection-card.types';\n import { SELECTION_CARD_RADIO_INPUT_INJECTION_KEY } from '../../selection-card.keys';\n import { generateUid } from '@/core/utils/ts';\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all cards in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all cards in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the selection card group is associated with. Defaults to null, as a selection card group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * Label of the group. Required for accessibility purposes, even if it's not shown\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * The selection card group's layout. It can be vertical or horizontal. Defaults to vertical.\n * @values horizontal, vertical\n */\n layout: {\n type: String as PropType<BentoSelectionCardGroupLayout>,\n default: 'vertical',\n },\n\n /**\n * The selection card group's items.\n */\n items: {\n type: Array as PropType<BentoSelectionCardItem[]>,\n required: true,\n },\n\n /**\n * Sets the responsive number of items rendered in each row.\n */\n itemsPerRow: {\n type: Object as PropType<BentoSelectionCardGroupItemsPerRow>,\n default: undefined,\n },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoSelectionCardItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: [Array, String, Number] as PropType<BentoSelectionCardModelValue>,\n default: null,\n },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * If set to true, renders all cards in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Renders the cards with a checkbox or a radio input. Selection logic will also apply in accordance.\n * @values checkbox, radio\n */\n variant: { type: String as PropType<BentoSelectionCardGroupVariant>, default: 'checkbox' },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n const slots = useSlots();\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for vue3 named scoped slots\n // We do the same in bento-checkbox-group\n const hasSlot = name => !!slots[name];\n\n const conditionalItemsClasses = computed(() => ({\n 'b-selection-card-group__items--horizontal': props.layout === 'horizontal',\n }));\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n // Error message logic\n const errorMessageId = generateUid('error');\n const shouldShowGroupError = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // itemsPerRow logic\n const containerRef = ref<HTMLElement | null>(null);\n const { width } = useElementSize(containerRef);\n\n const smallBreakpoint = computed(() => BMediaQuerySMax.split('px')[0]);\n const mediumBreakpoint = computed(() => BMediaQueryMMax.split('px')[0]);\n\n const currentBreakpoint = computed(() => {\n if (width.value < smallBreakpoint.value) {\n return 'small';\n }\n if (width.value >= smallBreakpoint.value && width.value < mediumBreakpoint.value) {\n return 'medium';\n }\n return 'large';\n });\n\n const computedItemsPerRow = computed(() => {\n return (props.itemsPerRow?.[currentBreakpoint?.value] as number) || props.items.length;\n });\n\n const computedRows = computed(() => {\n if (!props.itemsPerRow) {\n return [];\n }\n const rows = [];\n for (let i = 0; i < props.items.length; i += computedItemsPerRow?.value) {\n rows.push(props.items.slice(i, i + computedItemsPerRow?.value));\n }\n return rows;\n });\n\n // We need to compute the column width on 12 because we're using a 12-column system for out grid-layout logic\n const itemColumnWidth = computed(() => 12 / computedItemsPerRow?.value);\n\n /**\n * Filling the columnWidth array with the same parameters per item to pass\n * to the `grid-layout` layout so the each card can have\n * the same width according to the screen size.\n */\n const computedColumnWidth = computed(() => {\n return computedItemsPerRow?.value\n ? new Array(computedItemsPerRow?.value).fill({\n // Instead of passing the actual screen sizes values, passing the same values per each screen size and recomputing it makes sure visually the change is smoother and not laggy\n small: itemColumnWidth.value,\n medium: itemColumnWidth.value,\n large: itemColumnWidth.value,\n })\n : [];\n });\n\n const onInput = value => {\n inputValue.value = value;\n emit('update:model-value', value);\n emit('input', value);\n };\n\n const isRadioVariant = computed(() => props.variant === 'radio');\n\n provide(SELECTION_CARD_RADIO_INPUT_INJECTION_KEY, isRadioVariant);\n\n onMounted(() => {\n if (props.itemsPerRow) {\n Object.values(props.itemsPerRow).forEach(el => {\n if (el && (el < 2 || el > 6)) {\n throw new Error(\n 'itemsPerRow values must have a value between 2 and 6 items per row. Read the documentation for more information.'\n );\n }\n });\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Group of bento-selection-cards.\n *\n * @example\n * import { BentoSelectionCardGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectionCardGroup },\n * template: `\n * <bento-selection-card-group\n * :items=\"[\n * {\n * title: 'Card 1',\n * value: 'card-1',\n * content: 'Slot content 1',\n * icon: RetailIcon,\n * },\n * {\n * title: 'Card 2',\n * value: 'card-2',\n * content: 'Slot content 2',\n * icon: LeafIcon,\n * },\n * ]\"\n * >\n * <template #icon=\"{ icon }\">\n * <component :is=\"icon\"/>\n * </template>\n * <template #content=\"{ content }\">\n * <div>{{ content }}</div>\n * </template>\n * </bento-selection-card-group>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./selection-card-group.scss\" />\n"],"names":["BentoSelectionCardState","BentoSelectionCardState2","SELECTION_CARD_RADIO_INPUT_INJECTION_KEY","__default__$1","slots","useSlots","hasSlot","useHasSlot","inputId","generateUid","descriptionId","computedRadioInputModelValue","computed","props","computedCheckboxInputModelValue","conditionalClasses","isChecked","containerConditionalClasses","isTitleOnly","checkboxContainerConditionalClasses","checkboxContainerTextConditionalClasses","slotConditionalClasses","ariaLabel","useAriaLabel","isCheckboxGroup","isRadioInput","item","inject","ref","inputRef","slotRef","dynamicSlotRef","handleCardClick","event","newValue2","toggleInput","onChange","_b","_a","_d","_c","_f","_e","newValue","currentValue","newCheckedList","index","emit","__default__","name","conditionalItemsClasses","inputValue","watch","errorMessageId","shouldShowGroupError","containerRef","width","useElementSize","smallBreakpoint","BMediaQuerySMax","mediumBreakpoint","BMediaQueryMMax","currentBreakpoint","computedItemsPerRow","computedRows","rows","i","itemColumnWidth","computedColumnWidth","onInput","value","isRadioVariant","provide","onMounted","el"],"mappings":";;;;;;;;;;;;;;AAIY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACJC,MAAAE,IAAA,OAAA,0CAAA,GCmTTC,KAAA;AAAA,EAAe,MAAA;AAEf;;;;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,gBAAAA,EAAA,MAAA,CAAA;AAEJ,aAAAE;AAAA,IAAO,CAAA,GAIXE,IAAAvD,EAAA,MAAA,MAAAmD,KAAA,gBAAAA,EAAA,MAAA,GAOAK,IAAAxD,EAAA,MACImD,KAAA,QAAAA,EAAA,QAAA,IAAA,MAAAA,KAAA,gBAAAA,EAAA,KAAA,EAAA,KAAA;AAAA;AAAA,MACiD,OAAAI,EAAA;AAAA,MAEhB,QAAAA,EAAA;AAAA,MACC,OAAAA,EAAA;AAAA,IACD,CAAA,IAAA,CAAA,CAE1B,GAGXE,IAAA,CAAAC,MAAA;AACI,MAAAnB,EAAA,QAAAmB,GACAvB,EAAA,sBAAAuB,CAAA,GACAvB,EAAA,SAAAuB,CAAA;AAAA,IAAmB,GAGvBC,IAAA3D,EAAA,MAAAC,EAAA,YAAA,OAAA;AAEA,WAAA2D,EAAAtE,GAAAqE,CAAA,GAEAE,EAAA,MAAA;AACI,MAAA5D,EAAA,eACI,OAAA,OAAAA,EAAA,WAAA,EAAA,QAAA,CAAA6D,MAAA;AACI,YAAAA,MAAAA,IAAA,KAAAA,IAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER,CAAA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ import { F as L } from "./footer-actions.BsoofCrv.js";
4
4
  import { D as R, B as U, b as w, a as J } from "./dialog-page.Bf07JxdG.js";
5
5
  import { n as b } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import { B as V } from "./button.CdAFZa4V.js";
7
- import { B as K } from "./focus-trap.CGypVwG6.js";
7
+ import { B as K } from "./focus-trap._RrLaKlq.js";
8
8
  import { C as Y } from "./cross.CsUPDmaA.js";
9
9
  import { S as H } from "./sidepanel.keys.R0DKQuYx.js";
10
10
  import { u as $ } from "./i18n.BQkEbtPM.js";
@@ -207,4 +207,4 @@ export {
207
207
  Ce as a,
208
208
  ge as s
209
209
  };
210
- //# sourceMappingURL=sidepanel.C_ff-PEn.js.map
210
+ //# sourceMappingURL=sidepanel.Dp6dKRnq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidepanel.C_ff-PEn.js","sources":["../../src/components/sidepanel/components/sidepanel-page.vue","../../src/components/sidepanel/sidepanel.types.ts","../../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v2.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","activePage","isOpen","toRefs","props","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","conditionalClasses","computed","closeSidepanelAfterAnimation","emit","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;AA2II,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IQ,IAAAC,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;GCoPRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA1JA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GACA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,EAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,EAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GACAS,IAAAT,EAAA,EAAA,GAGAU,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAN,EAAA;AAAA,MACR,0BAAAI,EAAA;AAAA,IACa,EAAA,GAIhDG,IAAA,MAAA;AACI,MAAAP,EAAA,UACIN,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAAA,KACIW,EAAAxB,EAAA,oBAAAa,EAAA,MAAA,CAAA,CAAA,GAEJA,EAAA,QAAA,CAAA,GACAG,EAAA,QAAA,IACAG,EAAA,QAAA,IACAK,EAAAxB,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJyB,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","../../src/components/sidepanel/sidepanel.types.ts","../../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v2.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","activePage","isOpen","toRefs","props","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","conditionalClasses","computed","closeSidepanelAfterAnimation","emit","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_IN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AA,OACIA,EAAA,kBAGJ,CAAAA,EAAA,aAAc;AAIlB,IAAAqB;AAAA,MAAA,MAAAvB,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAwB,EAAA,GAEAnB,EAAA,UAIAL,EAAA,SACIc,EAAA,QAAA,IACAT,EAAA,MAAA,UAAA,GACAG,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAT,EAAA,KAAA,KACJM,EAAA,MAAA,QAEAe,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAK,IAAA,CAAAC,MAAAP,EAAAxB,EAAA,oBAAA+B,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAArB,EAAA,SAAAsB,IAAAtB,EAAA,UAAA,gBAAAsB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACIvB,EAAA,MAAA,KAAAuB,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,GAAA;AAAA,MAAqE,YAAAlC;AAAA,MACjE,WAAAU;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAiB;AAAA,IACA,CAAA,GAEJO,EAAAE,GAAAH,CAAA,GAGAC,EAAAG,GAAAvB,CAAA,GAEA,CAAAV,EAAA,iBAAAA,EAAA,oBAAA,QACIkC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as c, inject as n, computed as r, provide as y, ref as b } from "vue";
2
2
  import { n as i } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
3
3
  import { B as v } from "./button.CdAFZa4V.js";
4
- import { B as h } from "./info-icon.0d0GzDe2.js";
4
+ import { B as h } from "./info-icon.C4_l0WAf.js";
5
5
  import { B as C } from "./typography.J1v_SPG3.js";
6
- import { C as B } from "./copy.adSQlAOY.js";
6
+ import { C as B } from "./copy.DMlIj53I.js";
7
7
  import { S as T } from "./search.CBKhp7zB.js";
8
8
  import { u as S } from "./i18n.BQkEbtPM.js";
9
- import { B as I } from "./tooltip.R2sqydIE.js";
9
+ import { B as I } from "./tooltip.Bu8o7uyZ.js";
10
10
  import "../assets/structured-list-item.css";
11
11
  const u = Symbol("structured list condensed style injection key"), _ = Symbol("structured list labels width injection key"), L = ["25-75", "33-66", "42-58", "50-50"], x = {}, E = /* @__PURE__ */ c({
12
12
  ...x,
@@ -84,4 +84,4 @@ export {
84
84
  u as S,
85
85
  z as a
86
86
  };
87
- //# sourceMappingURL=structured-list-item.TC8mVrrA.js.map
87
+ //# sourceMappingURL=structured-list-item.DrY71Ndc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structured-list-item.TC8mVrrA.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\n});\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps({\n label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAa,MAAAA,IAAA,OAAA,+CAAA,GACAC,IAAA,OAAA,4CAAA,GCANC,IAAA,CAAA,SAAA,SAAA,SAAA,OAAA,GC6DHC,IAAA,CAAA;;;;;;;;iBA3CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GC+DAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;iBApDAC,IAAA,OAWA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAAd,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"structured-list-item.DrY71Ndc.js","sources":["../../src/components/structured-list/structured-list.keys.ts","../../src/components/structured-list/structured-list.types.ts","../../src/components/structured-list/structured-list.vue","../../src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n labelsWidth: { default: null },\n layout: { default: '33-66' }\n});\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"computedLabelStyle\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\" :class=\"valueConditionalClasses\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps({\n label: null,\n labelInfo: null,\n copy: null,\n search: { type: Function },\n searchTooltip: null,\n truncate: { type: Boolean }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\" :value=\"123456\" />\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__$1","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAa,MAAAA,IAAA,OAAA,+CAAA,GACAC,IAAA,OAAA,4CAAA,GCANC,IAAA,CAAA,SAAA,SAAA,SAAA,OAAA,GC6DHC,IAAA,CAAA;;;;;;;;iBA3CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAF,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAI,EAAAT,GAAAQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GC+DAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;iBApDAC,IAAA,OAWA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAX,IAAAC,EAAAL,GAAA,EAAA,GACAgB,IAAAX,EAAAJ,GAAAgB,EAAAJ,CAAA,CAAA,GACAK,IAAAX,EAAA,MAAA,cAAAS,EAAA,KAAA,EAAA,GACAG,IAAAZ,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCgB,IAAAb,EAAA,OAAA;AAAA,MAAgD,2CAAAC,EAAA;AAAA,IACK,EAAA,GAGrDa,IAAAd,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;"}
@@ -3,10 +3,10 @@ import { u as S } from "./use-has-slot.C9lQZ6nz.js";
3
3
  import { S as P, a as T } from "./summary-grid.keys.CxTf_FOc.js";
4
4
  import { G as A } from "./grid-layout.HvTAa4to.js";
5
5
  import { n as u } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
- import { B as D } from "./info-icon.0d0GzDe2.js";
6
+ import { B as D } from "./info-icon.C4_l0WAf.js";
7
7
  import { B as V, a as v } from "./typography.J1v_SPG3.js";
8
- import { B as j, a as _ } from "./tag.3fthBtwc.js";
9
- import { C as B } from "./copy.adSQlAOY.js";
8
+ import { B as j, a as _ } from "./tag.CevG31iQ.js";
9
+ import { C as B } from "./copy.DMlIj53I.js";
10
10
  import "../assets/summary-grid-item-custom.css";
11
11
  const G = c({
12
12
  name: "bento-summary-grid",
@@ -575,4 +575,4 @@ export {
575
575
  o as f,
576
576
  bt as s
577
577
  };
578
- //# sourceMappingURL=summary-grid-item-custom.A11AzfH0.js.map
578
+ //# sourceMappingURL=summary-grid-item-custom.CXs6AMS4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"summary-grid-item-custom.A11AzfH0.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/summary-grid.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType, provide, toRef } from 'vue';\n import { BentoSummaryGridColumnWidth, BentoSummaryGridLayout } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid',\n components: { GridLayout },\n props: {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth: {\n type: Object as PropType<BentoSummaryGridColumnWidth>,\n default: null,\n },\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero: { type: Boolean, default: false },\n },\n\n setup(props, { slots }) {\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n }\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n\n return {\n hasSlot: useHasSlot(slots),\n numberOfRows,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum SummaryGridItemType {\n AMOUNT = 'amount',\n PERCENTAGE = 'percentage',\n NUMERIC = 'numeric',\n TEXT = 'text',\n CUSTOM = 'custom',\n}\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n {{ title }}\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, PropType, ref, toRefs } from 'vue';\n\n // Components\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import { SummaryGridItemType } from './summary-grid-item.types';\n\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default defineComponent({\n name: 'summary-grid-item',\n components: { BentoInfoIcon, BentoTypography, BentoTag, Copy },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Applies styling based on content type\n */\n // TODO add text truncation for SummaryGridItemType.TEXT\n itemType: {\n type: String as PropType<SummaryGridItemType | `${SummaryGridItemType}`>,\n default: SummaryGridItemType.CUSTOM,\n validator: (value: SummaryGridItemType) => Object.values(SummaryGridItemType).includes(value),\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n\n // amount, percentage and numeric props\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n // TODO implement logic for Large size\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored trend tag next to secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of secondary trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n },\n setup(props, { slots }) {\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = direction => {\n switch (direction) {\n case BentoSummaryGridItemTrendDirection.POSITIVE:\n return BentoTagVariant.GREEN;\n case BentoSummaryGridItemTrendDirection.NEGATIVE:\n return BentoTagVariant.RED;\n default:\n return BentoTagVariant.BLUE;\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed(() => {\n if (size.value === BentoSummaryGridItemSize.SMALL) {\n return BentoTypographyVariant.BODY;\n }\n if (itemType.value !== SummaryGridItemType.TEXT) {\n return BentoTypographyVariant.TITLE;\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === BentoSummaryGridItemSize.LARGE,\n strongest: size.value === BentoSummaryGridItemSize.SMALL,\n wide: size.value === BentoSummaryGridItemSize.SMALL,\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const summaryBarItemTrendConditionalClasses = computed(() => ({\n [`b-summary-grid-item__content-trend--${props.trend}`]: props.trend,\n }));\n\n return {\n // Values\n trendVariant,\n secondaryTrendVariant,\n typographyProps,\n\n // Styles\n conditionalClasses,\n computedStyles,\n summaryBarItemTrendConditionalClasses,\n\n // Utils\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n class=\"b-summary-grid-item-amount\"\n >\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-amount',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Adds additional label next to amount content\n */\n secondaryLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows colored trend label next to main label\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n class=\"b-summary-grid-item-numeric\"\n >\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-numeric',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to main numeric content\n */\n trend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n class=\"b-summary-grid-item-percentage\"\n >\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-percentage',\n components: { SummaryGridItem },\n props: {\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n class=\"b-summary-grid-item-text\"\n >\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-text',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n },\n });\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n @copy-to-clipoard=\"$emit('copy-to-clipboard')\"\n >\n <slot />\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-custom',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n },\n emits: ['copy-to-clipboard'],\n });\n</script>\n"],"names":["_sfc_main$6","defineComponent","GridLayout","props","slots","numberOfRows","slotRows","_b","_a","slotName","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","useHasSlot","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2","SummaryGridItemType","SummaryGridItemType2","_sfc_main$5","BentoInfoIcon","BentoTypography","BentoTag","Copy","value","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","BentoTagVariant","trendVariant","computed","secondaryTrendVariant","typographyContentElement","BentoTypographyVariant","typographyProps","computedStyles","conditionalClasses","summaryBarItemTrendConditionalClasses","_sfc_main$4","SummaryGridItem","_sfc_main$3","_sfc_main$2","_sfc_main$1","_sfc_main"],"mappings":";;;;;;;;;;AA8DA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA,EAIA;AAAA,EACA,MAAAC,GAAA,EAAA,OAAAC,EAAA,GAAA;;AAGA,QAAAC,IAAA;AACA,QAAAD,GAAA;AACA,YAAAE,KAAAC,KAAAC,IAAA,OAAA,KAAAJ,CAAA,MAAA,gBAAAI,EAAA,OAAA,CAAAC,MAAAA,EAAA,SAAA,OAAA,OAAA,gBAAAF,EAAA,IAAA,CAAAE,MAAA;;AAAA,yBAAAD,IAAAC,EAAA,MAAA,GAAA,MAAA,gBAAAD,EAAA,IAAA,EAAA;AAAA;AAIA,UADAH,IAAA,KAAA,IAAA,GAAAC,CAAA,GACAD,IAAA;AACA,cAAA,IAAA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A,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;uBC1CAI,KAAAnD,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAA+C,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA,EAAA,MAAA,QAAA,SAAA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,qBAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA,EAKA;AAAA,EACA,OAAA,CAAA,mBAAA;AAEA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"summary-grid-item-custom.CXs6AMS4.js","sources":["../../src/components/summary-grid/summary-grid.vue","../../src/components/summary-grid/summary-grid.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.types.ts","../../src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType, provide, toRef } from 'vue';\n import { BentoSummaryGridColumnWidth, BentoSummaryGridLayout } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid',\n components: { GridLayout },\n props: {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth: {\n type: Object as PropType<BentoSummaryGridColumnWidth>,\n default: null,\n },\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero: { type: Boolean, default: false },\n },\n\n setup(props, { slots }) {\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n }\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n\n return {\n hasSlot: useHasSlot(slots),\n numberOfRows,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum SummaryGridItemType {\n AMOUNT = 'amount',\n PERCENTAGE = 'percentage',\n NUMERIC = 'numeric',\n TEXT = 'text',\n CUSTOM = 'custom',\n}\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n {{ title }}\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, PropType, ref, toRefs } from 'vue';\n\n // Components\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import { SummaryGridItemType } from './summary-grid-item.types';\n\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default defineComponent({\n name: 'summary-grid-item',\n components: { BentoInfoIcon, BentoTypography, BentoTag, Copy },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Applies styling based on content type\n */\n // TODO add text truncation for SummaryGridItemType.TEXT\n itemType: {\n type: String as PropType<SummaryGridItemType | `${SummaryGridItemType}`>,\n default: SummaryGridItemType.CUSTOM,\n validator: (value: SummaryGridItemType) => Object.values(SummaryGridItemType).includes(value),\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n\n // amount, percentage and numeric props\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n // TODO implement logic for Large size\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored trend tag next to secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the color of secondary trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n },\n setup(props, { slots }) {\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = direction => {\n switch (direction) {\n case BentoSummaryGridItemTrendDirection.POSITIVE:\n return BentoTagVariant.GREEN;\n case BentoSummaryGridItemTrendDirection.NEGATIVE:\n return BentoTagVariant.RED;\n default:\n return BentoTagVariant.BLUE;\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed(() => {\n if (size.value === BentoSummaryGridItemSize.SMALL) {\n return BentoTypographyVariant.BODY;\n }\n if (itemType.value !== SummaryGridItemType.TEXT) {\n return BentoTypographyVariant.TITLE;\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === BentoSummaryGridItemSize.LARGE,\n strongest: size.value === BentoSummaryGridItemSize.SMALL,\n wide: size.value === BentoSummaryGridItemSize.SMALL,\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const summaryBarItemTrendConditionalClasses = computed(() => ({\n [`b-summary-grid-item__content-trend--${props.trend}`]: props.trend,\n }));\n\n return {\n // Values\n trendVariant,\n secondaryTrendVariant,\n typographyProps,\n\n // Styles\n conditionalClasses,\n computedStyles,\n summaryBarItemTrendConditionalClasses,\n\n // Utils\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n class=\"b-summary-grid-item-amount\"\n >\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-amount',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Adds additional label next to amount content\n */\n secondaryLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows colored trend label next to main label\n */\n trend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n class=\"b-summary-grid-item-numeric\"\n >\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-numeric',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to main numeric content\n */\n trend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: null,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n class=\"b-summary-grid-item-percentage\"\n >\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import {\n BentoSummaryGridItemSize,\n BentoSummaryGridItemTrendDirection,\n } from '@/components/summary-grid/summary-grid.types';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-percentage',\n components: { SummaryGridItem },\n props: {\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Amount to be shown as the secondary metric value\n */\n secondaryMetric: {\n type: String,\n default: null,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows colored trend label next to text content\n */\n trend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the trend label\n */\n trendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Shows colored secondary trend tag next to the secondary metric value\n */\n secondaryTrend: {\n type: String,\n default: undefined,\n },\n /**\n * Defines the direction (color) of the secondary metric's trend tag\n */\n secondaryTrendDirection: {\n type: String as PropType<BentoSummaryGridItemTrendDirection | `${BentoSummaryGridItemTrendDirection}`>,\n default: BentoSummaryGridItemTrendDirection.POSITIVE,\n validator: (value: BentoSummaryGridItemTrendDirection) =>\n Object.values(BentoSummaryGridItemTrendDirection).includes(value),\n },\n /**\n * Defines the size of the `summary-grid-item` text content\n */\n size: {\n type: String as PropType<BentoSummaryGridItemSize | `${BentoSummaryGridItemSize}`>,\n default: BentoSummaryGridItemSize.SMALL,\n validator: (value: BentoSummaryGridItemSize) => Object.values(BentoSummaryGridItemSize).includes(value),\n },\n },\n });\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n class=\"b-summary-grid-item-text\"\n >\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-text',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Amount to be shown as the main value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Text used as a title\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: {\n type: String,\n default: null,\n },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: {\n type: Boolean,\n default: false,\n },\n },\n });\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n @copy-to-clipoard=\"$emit('copy-to-clipboard')\"\n >\n <slot />\n </summary-grid-item>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-summary-grid-item-custom',\n components: { SummaryGridItem },\n props: {\n /**\n * Text to copy to the clipboard\n */\n copy: { type: String, default: undefined },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: String, default: null },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * The width of `summary-grid-item` fits its content\n */\n fitContent: { type: Boolean, default: false },\n },\n emits: ['copy-to-clipboard'],\n });\n</script>\n"],"names":["_sfc_main$6","defineComponent","GridLayout","props","slots","numberOfRows","slotRows","_b","_a","slotName","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","useHasSlot","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2","SummaryGridItemType","SummaryGridItemType2","_sfc_main$5","BentoInfoIcon","BentoTypography","BentoTag","Copy","value","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","BentoTagVariant","trendVariant","computed","secondaryTrendVariant","typographyContentElement","BentoTypographyVariant","typographyProps","computedStyles","conditionalClasses","summaryBarItemTrendConditionalClasses","_sfc_main$4","SummaryGridItem","_sfc_main$3","_sfc_main$2","_sfc_main$1","_sfc_main"],"mappings":";;;;;;;;;;AA8DA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA,EAIA;AAAA,EACA,MAAAC,GAAA,EAAA,OAAAC,EAAA,GAAA;;AAGA,QAAAC,IAAA;AACA,QAAAD,GAAA;AACA,YAAAE,KAAAC,KAAAC,IAAA,OAAA,KAAAJ,CAAA,MAAA,gBAAAI,EAAA,OAAA,CAAAC,MAAAA,EAAA,SAAA,OAAA,OAAA,gBAAAF,EAAA,IAAA,CAAAE,MAAA;;AAAA,yBAAAD,IAAAC,EAAA,MAAA,GAAA,MAAA,gBAAAD,EAAA,IAAA,EAAA;AAAA;AAIA,UADAH,IAAA,KAAA,IAAA,GAAAC,CAAA,GACAD,IAAA;AACA,cAAA,IAAA;AAAA,UAAA;AAAA,QACA;AAAA,IAEA;AASA,WAAAK,EAAAC,GANA,OAGA,EAAA,wBAAA,EAGA,GACAD,EAAAE,GAAAC,EAAAV,GAAA,aAAA,CAAA,GAEA;AAAA,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