@adyen/bento-vue2 0.10.0 → 0.10.1-2

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 (239) hide show
  1. package/dist/@types/components/currency/currency.vue.d.ts +9 -0
  2. package/dist/@types/components/data-grid/data-grid.vue.d.ts +3 -3
  3. package/dist/@types/components/date/date.vue.d.ts +9 -0
  4. package/dist/@types/components/modal/components/base-modal/base-modal.vue.d.ts +10 -0
  5. package/dist/@types/components/modal/components/modal-default/modal-default.vue.d.ts +9 -0
  6. package/dist/@types/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +9 -0
  7. package/dist/@types/components/modal/modal.vue.d.ts +11 -0
  8. package/dist/@types/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +1 -1
  9. package/dist/@types/components/segmented-control/index.d.ts +2 -0
  10. package/dist/@types/components/segmented-control/segmented-control.types.d.ts +8 -0
  11. package/dist/@types/components/segmented-control/segmented-control.vue.d.ts +53 -0
  12. package/dist/@types/components.d.ts +2 -4
  13. package/dist/@types/index.d.ts +1 -0
  14. package/dist/accordion.js +206 -0
  15. package/dist/accordion.js.map +1 -0
  16. package/dist/alert.js +103 -0
  17. package/dist/alert.js.map +1 -0
  18. package/dist/assets/base-button.css +1 -0
  19. package/dist/assets/button-actions.css +1 -0
  20. package/dist/assets/button.css +1 -0
  21. package/dist/assets/checkbox.css +1 -0
  22. package/dist/assets/checkmark-circle-fill.css +1 -0
  23. package/dist/assets/checkmark-small.css +1 -0
  24. package/dist/assets/chevron-left.css +1 -0
  25. package/dist/assets/chevron-up.css +1 -0
  26. package/dist/assets/copy.css +1 -0
  27. package/dist/assets/cross-circle-fill.css +1 -0
  28. package/dist/assets/cross-small.css +1 -0
  29. package/dist/assets/cross.css +1 -0
  30. package/dist/assets/dropdown.css +1 -0
  31. package/dist/assets/grid-layout.css +1 -0
  32. package/dist/assets/index.css +1 -0
  33. package/dist/assets/index10.css +1 -0
  34. package/dist/assets/index11.css +1 -0
  35. package/dist/assets/index12.css +1 -0
  36. package/dist/assets/index13.css +1 -0
  37. package/dist/assets/index14.css +1 -0
  38. package/dist/assets/index15.css +1 -0
  39. package/dist/assets/index16.css +1 -0
  40. package/dist/assets/index17.css +1 -0
  41. package/dist/assets/index18.css +1 -0
  42. package/dist/assets/index19.css +1 -0
  43. package/dist/assets/index2.css +1 -0
  44. package/dist/assets/index20.css +1 -0
  45. package/dist/assets/index21.css +1 -0
  46. package/dist/assets/index22.css +1 -0
  47. package/dist/assets/index23.css +1 -0
  48. package/dist/assets/index24.css +1 -0
  49. package/dist/assets/index25.css +1 -0
  50. package/dist/assets/index26.css +1 -0
  51. package/dist/assets/index27.css +1 -0
  52. package/dist/assets/index28.css +1 -0
  53. package/dist/assets/index29.css +1 -0
  54. package/dist/assets/index3.css +1 -0
  55. package/dist/assets/index30.css +1 -0
  56. package/dist/assets/index31.css +1 -0
  57. package/dist/assets/index32.css +1 -0
  58. package/dist/assets/index33.css +1 -0
  59. package/dist/assets/index34.css +1 -0
  60. package/dist/assets/index35.css +1 -0
  61. package/dist/assets/index36.css +1 -0
  62. package/dist/assets/index37.css +1 -0
  63. package/dist/assets/index38.css +1 -0
  64. package/dist/assets/index4.css +1 -0
  65. package/dist/assets/index5.css +1 -0
  66. package/dist/assets/index6.css +1 -0
  67. package/dist/assets/index7.css +1 -0
  68. package/dist/assets/index8.css +1 -0
  69. package/dist/assets/index9.css +1 -0
  70. package/dist/assets/info-filled.css +1 -0
  71. package/dist/assets/listbox-option-tag.css +1 -0
  72. package/dist/assets/listbox.css +1 -0
  73. package/dist/assets/search.css +1 -0
  74. package/dist/assets/tooltip.css +1 -0
  75. package/dist/avatar-image.js +7 -0
  76. package/dist/avatar-image.js.map +1 -0
  77. package/dist/badge.js +57 -0
  78. package/dist/badge.js.map +1 -0
  79. package/dist/button.js +110 -0
  80. package/dist/button.js.map +1 -0
  81. package/dist/card.js +178 -0
  82. package/dist/card.js.map +1 -0
  83. package/dist/checkbox.js +94 -0
  84. package/dist/checkbox.js.map +1 -0
  85. package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js +33 -0
  86. package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js.map +1 -0
  87. package/dist/chunks/aria-label.ac9651a5.js +13 -0
  88. package/dist/chunks/aria-label.ac9651a5.js.map +1 -0
  89. package/dist/chunks/base-button.38651156.js +83 -0
  90. package/dist/chunks/base-button.38651156.js.map +1 -0
  91. package/dist/chunks/button-actions.59406268.js +105 -0
  92. package/dist/chunks/button-actions.59406268.js.map +1 -0
  93. package/dist/chunks/button.31b757d1.js +102 -0
  94. package/dist/chunks/button.31b757d1.js.map +1 -0
  95. package/dist/chunks/checkbox.fab16cce.js +138 -0
  96. package/dist/chunks/checkbox.fab16cce.js.map +1 -0
  97. package/dist/chunks/checkmark-circle-fill.d1aa324d.js +26 -0
  98. package/dist/chunks/checkmark-circle-fill.d1aa324d.js.map +1 -0
  99. package/dist/chunks/checkmark-small.1371dd20.js +26 -0
  100. package/dist/chunks/checkmark-small.1371dd20.js.map +1 -0
  101. package/dist/chunks/chevron-left.e3a49e62.js +47 -0
  102. package/dist/chunks/chevron-left.e3a49e62.js.map +1 -0
  103. package/dist/chunks/chevron-up.416431cd.js +47 -0
  104. package/dist/chunks/chevron-up.416431cd.js.map +1 -0
  105. package/dist/chunks/copy.fa9aa27e.js +105 -0
  106. package/dist/chunks/copy.fa9aa27e.js.map +1 -0
  107. package/dist/chunks/cross-circle-fill.0a1d738c.js +26 -0
  108. package/dist/chunks/cross-circle-fill.0a1d738c.js.map +1 -0
  109. package/dist/chunks/cross-small.7ecb1b97.js +26 -0
  110. package/dist/chunks/cross-small.7ecb1b97.js.map +1 -0
  111. package/dist/chunks/cross.db1f9177.js +26 -0
  112. package/dist/chunks/cross.db1f9177.js.map +1 -0
  113. package/dist/chunks/directive.23e35ab0.js +21 -0
  114. package/dist/chunks/directive.23e35ab0.js.map +1 -0
  115. package/dist/chunks/dropdown.0d394d2f.js +771 -0
  116. package/dist/chunks/dropdown.0d394d2f.js.map +1 -0
  117. package/dist/chunks/grid-layout.14423a2e.js +69 -0
  118. package/dist/chunks/grid-layout.14423a2e.js.map +1 -0
  119. package/dist/chunks/hasSlot.dceac207.js +5 -0
  120. package/dist/chunks/hasSlot.dceac207.js.map +1 -0
  121. package/dist/chunks/i18n.8934ef6c.js +1695 -0
  122. package/dist/chunks/i18n.8934ef6c.js.map +1 -0
  123. package/dist/chunks/index.2e54c294.js +801 -0
  124. package/dist/chunks/index.2e54c294.js.map +1 -0
  125. package/dist/chunks/index.34eba2c4.js +107 -0
  126. package/dist/chunks/index.34eba2c4.js.map +1 -0
  127. package/dist/chunks/index.59dc2e3f.js +801 -0
  128. package/dist/chunks/index.59dc2e3f.js.map +1 -0
  129. package/dist/chunks/index.73d7902e.js +29 -0
  130. package/dist/chunks/index.73d7902e.js.map +1 -0
  131. package/dist/chunks/index.8c38e06b.js +441 -0
  132. package/dist/chunks/index.8c38e06b.js.map +1 -0
  133. package/dist/chunks/index.8e9cdc73.js +441 -0
  134. package/dist/chunks/index.8e9cdc73.js.map +1 -0
  135. package/dist/chunks/index.a7a22907.js +929 -0
  136. package/dist/chunks/index.a7a22907.js.map +1 -0
  137. package/dist/chunks/index.ad5e1dbd.js +107 -0
  138. package/dist/chunks/index.ad5e1dbd.js.map +1 -0
  139. package/dist/chunks/index.e2141d95.js +86 -0
  140. package/dist/chunks/index.e2141d95.js.map +1 -0
  141. package/dist/chunks/index.f4582460.js +86 -0
  142. package/dist/chunks/index.f4582460.js.map +1 -0
  143. package/dist/chunks/index.f55fdc32.js +1118 -0
  144. package/dist/chunks/index.f55fdc32.js.map +1 -0
  145. package/dist/chunks/info-filled.9748686e.js +26 -0
  146. package/dist/chunks/info-filled.9748686e.js.map +1 -0
  147. package/dist/chunks/listbox-option-tag.2e5c4012.js +111 -0
  148. package/dist/chunks/listbox-option-tag.2e5c4012.js.map +1 -0
  149. package/dist/chunks/listbox-option-tag.f44b4ee0.js +111 -0
  150. package/dist/chunks/listbox-option-tag.f44b4ee0.js.map +1 -0
  151. package/dist/chunks/listbox.152dab0a.js +485 -0
  152. package/dist/chunks/listbox.152dab0a.js.map +1 -0
  153. package/dist/chunks/on-click-outside.3e0c3e2a.js +91 -0
  154. package/dist/chunks/on-click-outside.3e0c3e2a.js.map +1 -0
  155. package/dist/chunks/search.6be3396b.js +26 -0
  156. package/dist/chunks/search.6be3396b.js.map +1 -0
  157. package/dist/chunks/toastController.b1b08299.js +15 -0
  158. package/dist/chunks/toastController.b1b08299.js.map +1 -0
  159. package/dist/chunks/tooltip.a4625a7b.js +220 -0
  160. package/dist/chunks/tooltip.a4625a7b.js.map +1 -0
  161. package/dist/chunks/unique-id.a2a2b458.js +34 -0
  162. package/dist/chunks/unique-id.a2a2b458.js.map +1 -0
  163. package/dist/chunks/use-default-slot-validator.83d977a1.js +11 -0
  164. package/dist/chunks/use-default-slot-validator.83d977a1.js.map +1 -0
  165. package/dist/chunks/useCountryItems.cbe60557.js +29 -0
  166. package/dist/chunks/useCountryItems.cbe60557.js.map +1 -0
  167. package/dist/click-outside.js +23 -0
  168. package/dist/click-outside.js.map +1 -0
  169. package/dist/controls-group.js +59 -0
  170. package/dist/controls-group.js.map +1 -0
  171. package/dist/country.js +5979 -0
  172. package/dist/country.js.map +1 -0
  173. package/dist/currency.js +119 -0
  174. package/dist/currency.js.map +1 -0
  175. package/dist/data-grid.js +1169 -0
  176. package/dist/data-grid.js.map +1 -0
  177. package/dist/date-picker.js +8 -0
  178. package/dist/date-picker.js.map +1 -0
  179. package/dist/date.js +6 -0
  180. package/dist/date.js.map +1 -0
  181. package/dist/divider.js +35 -0
  182. package/dist/divider.js.map +1 -0
  183. package/dist/dropdown.js +262 -0
  184. package/dist/dropdown.js.map +1 -0
  185. package/dist/filter-bar.js +1735 -0
  186. package/dist/filter-bar.js.map +1 -0
  187. package/dist/focus-trap.js +5 -0
  188. package/dist/focus-trap.js.map +1 -0
  189. package/dist/header.js +205 -0
  190. package/dist/header.js.map +1 -0
  191. package/dist/index.js +335 -21278
  192. package/dist/index.js.map +1 -1
  193. package/dist/info-icon.js +61 -0
  194. package/dist/info-icon.js.map +1 -0
  195. package/dist/input-field.js +168 -0
  196. package/dist/input-field.js.map +1 -0
  197. package/dist/internal.js +13 -0
  198. package/dist/internal.js.map +1 -0
  199. package/dist/link.js +46 -0
  200. package/dist/link.js.map +1 -0
  201. package/dist/loading-indicator.js +51 -0
  202. package/dist/loading-indicator.js.map +1 -0
  203. package/dist/menu.js +474 -0
  204. package/dist/menu.js.map +1 -0
  205. package/dist/modal.js +709 -0
  206. package/dist/modal.js.map +1 -0
  207. package/dist/pagination.js +487 -0
  208. package/dist/pagination.js.map +1 -0
  209. package/dist/payment-method.js +84 -0
  210. package/dist/payment-method.js.map +1 -0
  211. package/dist/popover.js +284 -0
  212. package/dist/popover.js.map +1 -0
  213. package/dist/popper-container.js +225 -0
  214. package/dist/popper-container.js.map +1 -0
  215. package/dist/radio-group.js +192 -0
  216. package/dist/radio-group.js.map +1 -0
  217. package/dist/search-bar.js +106 -0
  218. package/dist/search-bar.js.map +1 -0
  219. package/dist/status.js +47 -0
  220. package/dist/status.js.map +1 -0
  221. package/dist/structured-list.js +98 -0
  222. package/dist/structured-list.js.map +1 -0
  223. package/dist/summary-grid.js +526 -0
  224. package/dist/summary-grid.js.map +1 -0
  225. package/dist/tabs.js +106 -0
  226. package/dist/tabs.js.map +1 -0
  227. package/dist/tag.js +73 -0
  228. package/dist/tag.js.map +1 -0
  229. package/dist/textarea.js +64 -0
  230. package/dist/textarea.js.map +1 -0
  231. package/dist/toast.js +132 -0
  232. package/dist/toast.js.map +1 -0
  233. package/dist/toggle.js +6 -0
  234. package/dist/toggle.js.map +1 -0
  235. package/dist/typography.js +111 -0
  236. package/dist/typography.js.map +1 -0
  237. package/dist/web-types.json +130 -13
  238. package/package.json +6 -4
  239. package/dist/@types/utils/ts/inject-css.d.ts +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.js","sources":["../src/components/modal/modal.types.ts","../src/components/modal/components/base-modal/base-modal.vue","../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["export enum BentoModalVariant {\n DEFAULT = 'BentoModalDefault',\n DIALOG = 'BentoModalDialog',\n}\n\nexport enum BentoModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\nexport enum BentoModalColumnLayoutVariant {\n SMALLER = 'smaller',\n EQUAL = 'equal',\n BIGGER = 'bigger',\n}\n\nexport enum BentoModalRole {\n DIALOG = 'dialog',\n ALERT_DIALOG = 'alertdialog',\n}\n\nexport enum BentoModalDialogType {\n CONFIRMATION = 'confirmation',\n DESTRUCTIVE = 'destructive',\n INFO = 'info',\n ACKNOWLEDGEMENT = 'acknowledgement',\n}\n\nexport enum BentoModalEvent {\n CLOSE_MODAL = 'close-modal',\n}\n","<template>\n <div class=\"b-modal-base\">\n <dialog\n ref=\"modal\"\n :role=\"modalRole\"\n :aria-label=\"computedAriaLabel\"\n class=\"b-modal-base__container\"\n :class=\"modalConditionalClasses\"\n :open=\"initiallyOpen\"\n @click=\"isDismissible && closeModalOnClickOutside($event)\"\n @keydown.esc=\"emitCloseEvent\"\n >\n <bento-focus-trap>\n <div class=\"b-modal-base__wrapper\" :style=\"wrapperStyles\">\n <div v-if=\"hasSlot('default') || !hideCloseButton\" class=\"b-modal-base__header\">\n <bento-typography\n class=\"b-modal-base__title\"\n aria-label=\"base modal title\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.TITLE\"\n stronger\n >\n <slot v-if=\"hasSlot('default')\" />\n </bento-typography>\n <bento-button\n v-if=\"!hideCloseButton\"\n class=\"b-modal-base__close-button\"\n :variant=\"BentoButtonVariant.TERTIARY\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-icon svg-title=\"close\" />\n </bento-button>\n </div>\n <bento-divider\n v-if=\"hasColumnLayout && hasSlot('default')\"\n class=\"b-modal-base__divider\"\n :style=\"dividerStyles\"\n />\n\n <div class=\"b-modal-base__content\" :class=\"modalContentConditionalClasses\">\n <bento-typography\n v-if=\"hasSlot('content')\"\n aria-label=\"base modal content\"\n :el=\"BentoTypographyElement.DIV\"\n :variant=\"BentoTypographyVariant.BODY\"\n stronger\n >\n <grid-layout\n v-if=\"hasColumnLayout\"\n :column-width=\"computedColumnWidth\"\n :container-type=\"GridLayoutContainerType.NORMAL\"\n class=\"b-modal-base__grid\"\n >\n <template #col-1><slot name=\"content-col-1\"></slot></template>\n <template #col-2><slot name=\"content-col-2\"></slot></template>\n </grid-layout>\n <slot v-else name=\"content\" />\n </bento-typography>\n </div>\n <div v-if=\"hasSlot('actions')\" class=\"b-modal-base__actions-container\">\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" :style=\"dividerStyles\" />\n <div\n aria-label=\"modal actions\"\n class=\"b-modal-base__actions\"\n :class=\"modalActionsConditionalClasses\"\n >\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </bento-focus-trap>\n </dialog>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, toRefs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalEvent,\n BentoModalRole,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n\n import { BentoButtonVariant } from '@/components/button/button.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoDivider } from '@/components/divider';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { GridLayout, GridLayoutContainerType } from '@/internal';\n import { hasSlot } from '@/utils/ts/hasSlot';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n components: { CrossIcon, BentoTypography, BentoButton, BentoDivider, BentoFocusTrap, GridLayout },\n props: {\n /**\n * Defines whether the modal will be an alert modal\n */\n modalRole: {\n type: String,\n default: BentoModalRole.DIALOG,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n required: true,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize>,\n default: BentoModalSize.SMALL,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n();\n const modal = ref(null);\n\n const { isOpen, customPadding, overflowVisible } = toRefs(props);\n\n const labelSlot = computed((): string =>\n hasSlot(slots)('default') && slots.default() ? slots.default()[0]?.text : null\n );\n const wrapperStyles = computed(() => (customPadding.value ? { padding: customPadding.value } : {}));\n const dividerStyles = computed(() =>\n customPadding.value\n ? { marginLeft: `-${customPadding.value}`, width: `calc(100% + calc(${customPadding.value} * 2))` }\n : {}\n );\n\n const computedAriaLabel = useAriaLabel({\n label: labelSlot,\n defaultFallback: t('ariaLabelFallback') as string,\n });\n\n const hasColumnLayout = computed(() => props.withColumnLayout && props.size === BentoModalSize.LARGE);\n\n const openModal = (): void => {\n modal.value.showModal();\n };\n\n const emitCloseEvent = (): void => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n const closeModal = (): void => {\n modal.value.close();\n emitCloseEvent();\n };\n\n const onCloseButtonClick = () => {\n closeModal();\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeModalOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === BentoModalRole.DIALOG.toUpperCase()) {\n closeModal();\n }\n };\n\n const modalConditionalClasses = computed(() => ({\n [`b-modal-base__container--${props.size}`]: props.size,\n [`b-modal-base__container--visible`]: isOpen.value,\n [`b-modal-base__container--overflow-visible`]: overflowVisible.value,\n }));\n\n const modalContentConditionalClasses = computed(() => ({\n 'b-modal-base__content--column-layout': hasColumnLayout.value,\n }));\n\n const modalActionsConditionalClasses = computed(() => ({\n 'b-modal-base__actions--column-layout': hasColumnLayout.value,\n }));\n\n const computedColumnWidth = computed(() => {\n if (props.columnsSize === BentoModalColumnLayoutVariant.SMALLER) {\n return [{ small: 4, medium: 4, large: 4 }];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [{ small: 8, medium: 8, large: 8 }];\n }\n return [{ small: 6, medium: 6, large: 6 }];\n });\n\n watch(\n () => [isOpen.value, modal.value],\n (): void => {\n if (isOpen.value && modal.value) {\n openModal();\n } else if (modal.value) {\n closeModal();\n }\n },\n { immediate: true }\n );\n\n onMounted(() => {\n if (isOpen.value && modal.value) {\n openModal();\n }\n });\n\n return {\n // Refs\n modal,\n computedAriaLabel,\n\n // Handling the state\n openModal,\n closeModalOnClickOutside,\n\n // Methods\n onCloseButtonClick,\n hasSlot: hasSlot(slots),\n emitCloseEvent,\n\n // Styles\n modalActionsConditionalClasses,\n modalConditionalClasses,\n modalContentConditionalClasses,\n wrapperStyles,\n dividerStyles,\n hasColumnLayout,\n computedColumnWidth,\n\n // Enums\n BentoButtonVariant,\n BentoTypographyElement,\n BentoTypographyVariant,\n GridLayoutContainerType,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-modal.scss\" />\n","<template>\n <base-modal\n class=\"b-modal-default\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #actions>\n <slot name=\"actions\">\n <bento-typography\n v-if=\"actionsLabel\"\n class=\"b-modal-base__title\"\n aria-label=\"base modal title\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.BODY\"\n stronger\n >\n {{ actionsLabel }}\n </bento-typography>\n\n <bento-button-actions\n v-if=\"alignedActions.leftAligned\"\n :actions=\"alignedActions.leftAligned\"\n :layout=\"BentoButtonActionsLayout.BUTTONS_START\"\n ></bento-button-actions>\n\n <bento-button-actions\n :actions=\"alignedActions.rightAligned\"\n :layout=\"BentoButtonActionsLayout.BUTTONS_END\"\n ></bento-button-actions>\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, toRefs } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { hasSlot } from '@/utils/ts/hasSlot';\n import {\n BentoButtonActions,\n BentoButtonActionsLayout,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n name: 'bento-modal-default',\n components: { BaseModal, BentoButtonActions, BentoTypography },\n inheritAttrs: false,\n props: {\n /**\n * Adds a cross icon on the right side of the alert\n */\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize>,\n required: true,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\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 * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { actions, destructiveActions } = toRefs(props);\n\n const alignedActions = computed(() => {\n const rightAlignedButtons =\n actions.value.length < 3 ? actions.value : actions.value.slice(0, actions.value.length - 1);\n\n if (destructiveActions.value) {\n // Add red color to the 1-st Action button\n rightAlignedButtons[0].critical = true;\n }\n\n return {\n leftAligned:\n actions.value.length === 3\n ? [\n {\n ...actions.value[actions.value.length - 1],\n variant: BentoButtonVariant.SECONDARY,\n },\n ]\n : null,\n rightAligned: rightAlignedButtons,\n };\n });\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n onMounted(() => {\n if (\n !(hasSlot(slots)('content') || (hasSlot(slots)('content-col-1') && hasSlot(slots)('content-col-2')))\n ) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n\n if (props.actions && props.actions.length > 3) {\n throw new Error('Not more than 3 action buttons may be provided to Bento Modal default variant');\n }\n\n if (props.actionsLabel && props.actions && props.actions.length > 2) {\n throw new Error(\n 'Not more than 2 action buttons may be provided with actions label to Bento Modal default variant'\n );\n }\n });\n\n return {\n // Values\n alignedActions,\n\n // Methods\n onCloseModal,\n hasSlot: hasSlot(slots),\n\n // Enums\n BentoButtonActionsLayout,\n BentoTypographyElement,\n BentoTypographyVariant,\n };\n },\n });\n</script>\n","<template>\n <base-modal\n class=\"b-modal-dialog\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n :size=\"BentoModalSize.SMALL\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === BentoModalDialogType.ACKNOWLEDGEMENT\"\n :actions=\"acknowledgementDialogActions\"\n :layout=\"BentoButtonActionsLayout.BUTTONS_END\"\n ></bento-button-actions>\n\n <bento-button-actions\n v-else\n :actions=\"dialogActions\"\n :layout=\"BentoButtonActionsLayout.BUTTONS_END\"\n ></bento-button-actions>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, toRefs } from 'vue';\n import {\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalRole,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { hasSlot } from '@/utils/ts/hasSlot';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsLayout,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n components: { BaseModal, BentoButtonActions },\n inheritAttrs: false,\n props: {\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType>,\n required: true,\n },\n /**\n * Text that is displayed in the content section of modal\n */\n content: {\n type: String,\n required: true,\n },\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n();\n const { actions, dialogType } = toRefs(props);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n const onCloseActionButton = () => {\n onCloseModal();\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot(slots)('default') || !props.content) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error(\n 'Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button'\n );\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n\n return {\n // Values\n dialogActions,\n acknowledgementDialogActions,\n\n // Methods\n onCloseModal,\n onCloseActionButton,\n\n // Styles\n modalDialogConditionalClasses,\n\n // Enums\n BentoModalRole,\n BentoModalSize,\n BentoButtonVariant,\n BentoModalDialogType,\n BentoButtonActionsLayout,\n };\n },\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRefs } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalSize,\n BentoModalVariant,\n } from '@/components/modal/modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { hasSlot } from '@/utils/ts/hasSlot';\n import { BentoButtonActionsList } from '@/components/button';\n\n /**\n * Modal is a window that appear over any other page content and focus user attention exclusively on one task or piece of information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-modal',\n components: { BentoModalDefault, BentoModalDialog },\n inheritAttrs: false,\n props: {\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant>,\n default: BentoModalVariant.DEFAULT,\n },\n\n // Shared Modal Default and Modal Default props\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n default: null,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\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 * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\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 // Specific to Modal Default props\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize>,\n default: BentoModalSize.SMALL,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\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 * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n // Specific to Modal dialog props\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType>,\n default: BentoModalDialogType.CONFIRMATION,\n },\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: {\n type: String,\n default: null,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const {\n variant,\n hideCloseButton,\n size,\n isDismissible,\n overflowVisible,\n dialogType,\n content,\n customPadding,\n actionsLabel,\n destructiveActions,\n withColumnLayout,\n } = toRefs(props);\n\n const customProps = computed(() =>\n variant.value === BentoModalVariant.DEFAULT\n ? {\n hideCloseButton: hideCloseButton.value,\n size: size.value,\n customPadding: customPadding.value,\n actionsLabel: actionsLabel.value,\n destructiveActions: destructiveActions.value,\n isDismissible: isDismissible.value ?? true,\n overflowVisible: overflowVisible.value,\n withColumnLayout: withColumnLayout.value,\n }\n : {\n dialogType: dialogType.value,\n content: content.value,\n isDismissible: isDismissible.value ?? false,\n overflowVisible: overflowVisible.value,\n }\n );\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n return {\n onCloseModal,\n customProps,\n hasSlot: hasSlot(slots),\n };\n },\n });\n</script>\n"],"names":["BentoModalVariant","BentoModalVariant2","BentoModalSize","BentoModalSize2","BentoModalColumnLayoutVariant","BentoModalColumnLayoutVariant2","BentoModalRole","BentoModalRole2","BentoModalDialogType","BentoModalDialogType2","BentoModalEvent","BentoModalEvent2","_sfc_main$3","defineComponent","messages$1","CrossIcon","BentoTypography","BentoButton","BentoDivider","BentoFocusTrap","GridLayout","props","slots","emit","t","useI18n","modal","ref","isOpen","customPadding","overflowVisible","toRefs","labelSlot","computed","hasSlot","_a","wrapperStyles","dividerStyles","computedAriaLabel","useAriaLabel","hasColumnLayout","openModal","emitCloseEvent","closeModal","onCloseButtonClick","closeModalOnClickOutside","target","modalConditionalClasses","modalContentConditionalClasses","modalActionsConditionalClasses","computedColumnWidth","watch","onMounted","BentoButtonVariant","BentoTypographyElement","BentoTypographyVariant","GridLayoutContainerType","_sfc_main$2","BaseModal","BentoButtonActions","actions","destructiveActions","alignedActions","rightAlignedButtons","onCloseModal","BentoButtonActionsLayout","_sfc_main$1","messages","dialogType","onCloseActionButton","acknowledgementDialogActions","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","modalDialogConditionalClasses","_b","_sfc_main","BentoModalDefault","BentoModalDialog","variant","hideCloseButton","size","isDismissible","content","actionsLabel","withColumnLayout","customProps"],"mappings":";;;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,qBACAA,EAAA,SAAA,oBAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,eAAA,eAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,eAAA,gBACAA,EAAA,cAAA,eACAA,EAAA,OAAA,QACAA,EAAA,kBAAA,mBAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;;;;;GCoEZE,IAAAC,EAAA;AAAA,EAAA,MAAA,EAAA,UAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA,iBAAAC,GAAA,a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A,OAAA,CAAAE,EAAA,WAAA;AAAA,EACA,MAAAW,GAAA,EAAA,OAAAC,GAAA,MAAAC,EAAA,GAAA;AAEA,UAAA;AAAA,MAAA,SAAAwD;AAAA,MACA,iBAAAC;AAAA,MACA,MAAAC;AAAA,MACA,eAAAC;AAAA,MACA,iBAAApD;AAAA,MACA,YAAAsC;AAAA,MACA,SAAAe;AAAA,MACA,eAAAtD;AAAA,MACA,cAAAuD;AAAA,MACA,oBAAAvB;AAAA,MACA,kBAAAwB;AAAA,IACA,IAAAtD,EAAAV,CAAA,GAGAiE,IAAArD;AAAA,MAAA,MAAA8C,EAAA,UAAA/E,EAAA,UAAA;AAAA,QAEA,iBAAAgF,EAAA;AAAA,QACA,MAAAC,EAAA;AAAA,QACA,eAAApD,EAAA;AAAA,QACA,cAAAuD,EAAA;AAAA,QACA,oBAAAvB,EAAA;AAAA,QACA,eAAAqB,EAAA,SAAA;AAAA,QACA,iBAAApD,EAAA;AAAA,QACA,kBAAAuD,EAAA;AAAA,MACA,IAAA;AAAA,QAEA,YAAAjB,EAAA;AAAA,QACA,SAAAe,EAAA;AAAA,QACA,eAAAD,EAAA,SAAA;AAAA,QACA,iBAAApD,EAAA;AAAA,MACA;AAAA,IACA;AAOA,WAAA;AAAA,MAAA,cAJA,MAAA;AACA,QAAAP,EAAAb,EAAA,WAAA;AAAA,MAAA;AAAA,MAIA,aAAA4E;AAAA,MACA,SAAApD,EAAAZ,CAAA;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,487 @@
1
+ import "./assets/index25.css";
2
+ import { defineComponent as u, ref as b, computed as s } from "vue";
3
+ import { BentoTypography as m, BentoTypographyElement as h } from "./typography.js";
4
+ import { B as P } from "./chunks/dropdown.0d394d2f.js";
5
+ import { g as C } from "./chunks/unique-id.a2a2b458.js";
6
+ import { n as i } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
7
+ import { B as T, a as y } from "./chunks/button.31b757d1.js";
8
+ const x = {
9
+ "en-US": {
10
+ showingItems: "Showing {itemCount} items",
11
+ showingItemsWithTotal: "Showing {itemCount} of {totalCount} items"
12
+ },
13
+ "de-DE": {
14
+ showingItems: "Zeigt {itemCount} Artikeln",
15
+ showingItemsWithTotal: "Zeigt {itemCount} von {totalCount} Artikeln"
16
+ },
17
+ "fr-FR": {
18
+ showingItems: "Affichage de {itemCount} élément(s)",
19
+ showingItemsWithTotal: "Affichage de {itemCount} élément(s) sur {totalCount}"
20
+ },
21
+ "ja-JP": {
22
+ showingItems: "{itemCount}個のアイテムを表示しています",
23
+ showingItemsWithTotal: "{totalCount}件中{itemCount}件のアイテムを表示"
24
+ },
25
+ "pt-BR": {
26
+ showingItems: "Mostrando {itemCount} itens",
27
+ showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} itens"
28
+ },
29
+ "es-ES": {
30
+ showingItems: "Mostrando {itemCount} artículos",
31
+ showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} artículos"
32
+ }
33
+ }, N = 50, _ = [
34
+ { label: "10", value: 10 },
35
+ { label: "20", value: 20 },
36
+ { label: "50", value: 50 },
37
+ // DEFAULT_NUMBER_OF_RESULTS
38
+ { label: "75", value: 75 },
39
+ { label: "100", value: 100 }
40
+ ], $ = u({
41
+ name: "bento-pagination-context-results-per-page",
42
+ i18n: { messages: x },
43
+ components: {
44
+ BentoDropdown: P,
45
+ BentoTypography: m
46
+ },
47
+ props: {
48
+ /**
49
+ * The amount of items the pager is paging through.
50
+ */
51
+ itemsPerPage: {
52
+ type: Number,
53
+ default: N,
54
+ validator: (a) => _.some(({ value: t }) => t === a)
55
+ },
56
+ /**
57
+ * The total number of items the pager is paging through.
58
+ */
59
+ totalCount: { type: Number, default: null }
60
+ },
61
+ emits: ["select"],
62
+ setup(a, { emit: t }) {
63
+ const e = C("b-pagination-context-number-elements"), o = b(_), r = (g) => {
64
+ t("select", g);
65
+ }, l = s(() => a.totalCount ? "showingItemsWithTotal" : "showingItems");
66
+ return {
67
+ // Values
68
+ dropdownId: e,
69
+ dropdownOptions: o,
70
+ translationPathKey: l,
71
+ // Enums
72
+ BentoTypographyElement: h,
73
+ // Events
74
+ onSelectChange: r
75
+ };
76
+ }
77
+ });
78
+ var w = function() {
79
+ var t = this, e = t._self._c;
80
+ return t._self._setupProxy, e("div", { staticClass: "b-pagination-results-per-page" }, [e("bento-typography", { attrs: { el: t.BentoTypographyElement.DIV } }, [e("i18n", { staticClass: "b-pagination-results-per-page__dropdown-container", attrs: { path: t.translationPathKey, tag: "div", plural: t.totalCount }, scopedSlots: t._u([{ key: "itemCount", fn: function() {
81
+ return [e("bento-dropdown", { staticClass: "b-pagination-results-per-page__dropdown", attrs: { id: t.dropdownId, value: t.itemsPerPage, items: t.dropdownOptions, "aria-label": t.$t(t.translationPathKey, { itemCount: t.itemsPerPage, totalCount: t.totalCount }) }, on: { input: t.onSelectChange } })];
82
+ }, proxy: !0 }, t.totalCount ? { key: "totalCount", fn: function() {
83
+ return [t._v(t._s(t.totalCount))];
84
+ }, proxy: !0 } : null], null, !0) })], 1)], 1);
85
+ }, S = [], L = /* @__PURE__ */ i(
86
+ $,
87
+ w,
88
+ S,
89
+ !1,
90
+ null,
91
+ "5ef9cb16",
92
+ null,
93
+ null
94
+ );
95
+ const I = L.exports, B = {
96
+ "en-US": {
97
+ pageOfTotalPages: "Page {page} of {totalPages}",
98
+ pageOneOfOne: "Page 1 of 1",
99
+ pageNumber: "Page {page}"
100
+ },
101
+ "de-DE": {
102
+ pageOfTotalPages: "Seite {page} von {totalPages}",
103
+ pageOneOfOne: "Seite 1 von 1",
104
+ pageNumber: "Seite {page}"
105
+ },
106
+ "fr-FR": {
107
+ pageOfTotalPages: "Page {page} sur {totalPages}",
108
+ pageOneOfOne: "Page 1 sur 1",
109
+ pageNumber: "Page {page}"
110
+ },
111
+ "ja-JP": {
112
+ pageOfTotalPages: "ページ{page}/{totalPages}",
113
+ pageOneOfOne: "ページ1/1",
114
+ pageNumber: "ページ{page}"
115
+ },
116
+ "pt-BR": {
117
+ pageOfTotalPages: "Página {page} de {totalPages}",
118
+ pageOneOfOne: "Página 1 de 1",
119
+ pageNumber: "Página {page}"
120
+ },
121
+ "es-ES": {
122
+ pageOfTotalPages: "Página {page} de {totalPages}",
123
+ pageOneOfOne: "Página 1 de 1",
124
+ pageNumber: "Página {page}"
125
+ }
126
+ }, O = u({
127
+ i18n: { messages: B },
128
+ name: "bento-pagination-context",
129
+ components: {
130
+ BentoDropdown: P,
131
+ BentoTypography: m
132
+ },
133
+ props: {
134
+ /**
135
+ * The current page number of the pager.
136
+ */
137
+ page: {
138
+ type: Number,
139
+ default: 1,
140
+ validator: (a) => Number.isFinite(a) && a > 0
141
+ },
142
+ /**
143
+ * The total number of items the pager is paging through.
144
+ */
145
+ totalPages: { type: Number, default: null }
146
+ },
147
+ emits: ["page-selected"],
148
+ setup(a, { emit: t }) {
149
+ const e = C("bento-pagination-context-current-page"), o = (n) => t("page-selected", n), r = (n) => ({
150
+ label: n.toString(),
151
+ value: n
152
+ }), l = (n, p) => p + 1, g = s(
153
+ () => Array.from(new Array(a.totalPages), l).map(r)
154
+ );
155
+ return {
156
+ // Values
157
+ dropdownId: e,
158
+ listOfAvailablePages: g,
159
+ // Events
160
+ onPageSelectChange: o,
161
+ // Enums
162
+ BentoTypographyElement: h
163
+ };
164
+ }
165
+ });
166
+ var R = function() {
167
+ var t = this, e = t._self._c;
168
+ return t._self._setupProxy, e("div", { staticClass: "b-pagination-context" }, [t.totalPages > 1 ? e("bento-typography", { attrs: { el: t.BentoTypographyElement.DIV } }, [e("i18n", { attrs: { path: "pageOfTotalPages", tag: "div" }, scopedSlots: t._u([{ key: "page", fn: function() {
169
+ return [e("bento-dropdown", { staticClass: "b-pagination-context__dropdown", attrs: { id: t.dropdownId, value: t.page, items: t.listOfAvailablePages, "aria-label": t.$t("pageOfTotalPages", { page: t.page, totalPages: t.totalPages }) }, on: { input: t.onPageSelectChange } })];
170
+ }, proxy: !0 }, { key: "totalPages", fn: function() {
171
+ return [t._v(t._s(t.totalPages))];
172
+ }, proxy: !0 }], null, !1, 2436399790) })], 1) : t.totalPages === 1 ? e("bento-typography", { attrs: { el: t.BentoTypographyElement.SPAN } }, [t._v(" " + t._s(t.$t("pageOneOfOne")) + " ")]) : e("bento-typography", { attrs: { el: t.BentoTypographyElement.SPAN } }, [t._v(" " + t._s(t.$t("pageNumber", { page: t.page })) + " ")])], 1);
173
+ }, E = [], F = /* @__PURE__ */ i(
174
+ O,
175
+ R,
176
+ E,
177
+ !1,
178
+ null,
179
+ "16e3bc77",
180
+ null,
181
+ null
182
+ );
183
+ const A = F.exports;
184
+ let c = 0;
185
+ const k = {
186
+ beforeCreate() {
187
+ this.uuid = c.toString(), c += 1;
188
+ }
189
+ };
190
+ var M = function() {
191
+ var t = this, e = t._self._c;
192
+ return e("svg", t._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M4.25 11C4.25 11.4142 4.58579 11.75 5 11.75C5.41421 11.75 5.75 11.4142 5.75 11L5.75 4.99999C5.75 4.58577 5.41421 4.24999 5 4.24999C4.58579 4.24999 4.25 4.58577 4.25 4.99998L4.25 11Z", "clip-rule": "evenodd" } }), e("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M11.5303 5.53031C11.8232 5.23742 11.8232 4.76255 11.5303 4.46965C11.2374 4.17676 10.7626 4.17676 10.4697 4.46965L7.46967 7.46965C7.17678 7.76255 7.17678 8.23742 7.46967 8.53031L10.4697 11.5303C10.7626 11.8232 11.2374 11.8232 11.5303 11.5303C11.8232 11.2374 11.8232 10.7625 11.5303 10.4697L9.06066 7.99998L11.5303 5.53031Z", "clip-rule": "evenodd" } })]);
193
+ }, D = [], Z = /* @__PURE__ */ i(
194
+ k,
195
+ M,
196
+ D,
197
+ !1,
198
+ null,
199
+ "d0300c1f",
200
+ null,
201
+ null
202
+ );
203
+ const z = Z.exports;
204
+ let d = 0;
205
+ const W = {
206
+ beforeCreate() {
207
+ this.uuid = d.toString(), d += 1;
208
+ }
209
+ };
210
+ var U = function() {
211
+ var t = this, e = t._self._c;
212
+ return e("svg", t._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M4.46967 10.4697C4.17678 10.7626 4.17678 11.2374 4.46967 11.5303C4.76256 11.8232 5.23744 11.8232 5.53033 11.5303L8.53033 8.53032C8.82322 8.23743 8.82322 7.76256 8.53033 7.46966L5.53033 4.46966C5.23744 4.17677 4.76256 4.17677 4.46967 4.46966C4.17678 4.76256 4.17678 5.23743 4.46967 5.53032L6.93934 7.99999L4.46967 10.4697Z", "clip-rule": "evenodd" } }), e("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M11.75 4.99999C11.75 4.58578 11.4142 4.24999 11 4.24999C10.5858 4.24999 10.25 4.58578 10.25 4.99999V11C10.25 11.4142 10.5858 11.75 11 11.75C11.4142 11.75 11.75 11.4142 11.75 11L11.75 4.99999Z", "clip-rule": "evenodd" } })]);
213
+ }, V = [], j = /* @__PURE__ */ i(
214
+ W,
215
+ U,
216
+ V,
217
+ !1,
218
+ null,
219
+ "526f9959",
220
+ null,
221
+ null
222
+ );
223
+ const J = j.exports;
224
+ let v = 0;
225
+ const Y = {
226
+ beforeCreate() {
227
+ this.uuid = v.toString(), v += 1;
228
+ }
229
+ };
230
+ var K = function() {
231
+ var t = this, e = t._self._c;
232
+ return e("svg", t._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M10.0303 4.46967C10.3232 4.76256 10.3232 5.23744 10.0303 5.53033L7.56066 8L10.0303 10.4697C10.3232 10.7626 10.3232 11.2374 10.0303 11.5303C9.73744 11.8232 9.26256 11.8232 8.96967 11.5303L5.96967 8.53033C5.67678 8.23744 5.67678 7.76256 5.96967 7.46967L8.96967 4.46967C9.26256 4.17678 9.73744 4.17678 10.0303 4.46967Z", "clip-rule": "evenodd" } })]);
233
+ }, q = [], G = /* @__PURE__ */ i(
234
+ Y,
235
+ K,
236
+ q,
237
+ !1,
238
+ null,
239
+ "ad07f9f1",
240
+ null,
241
+ null
242
+ );
243
+ const H = G.exports;
244
+ let f = 0;
245
+ const Q = {
246
+ beforeCreate() {
247
+ this.uuid = f.toString(), f += 1;
248
+ }
249
+ };
250
+ var X = function() {
251
+ var t = this, e = t._self._c;
252
+ return e("svg", t._b({ attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", "fill-rule": "evenodd", d: "M5.96967 11.5303C5.67678 11.2374 5.67678 10.7626 5.96967 10.4697L8.43934 8L5.96967 5.53033C5.67678 5.23744 5.67678 4.76256 5.96967 4.46967C6.26256 4.17678 6.73744 4.17678 7.03033 4.46967L10.0303 7.46967C10.171 7.61032 10.25 7.80109 10.25 8C10.25 8.19891 10.171 8.38968 10.0303 8.53033L7.03033 11.5303C6.73744 11.8232 6.26256 11.8232 5.96967 11.5303Z", "clip-rule": "evenodd" } })]);
253
+ }, tt = [], et = /* @__PURE__ */ i(
254
+ Q,
255
+ X,
256
+ tt,
257
+ !1,
258
+ null,
259
+ "5d0b9449",
260
+ null,
261
+ null
262
+ );
263
+ const at = et.exports, nt = {
264
+ "en-US": {
265
+ navigateToTheFirstPage: "Navigate to the first page",
266
+ navigateToThePreviousPage: "Navigate to the previous page",
267
+ navigateToTheNextPage: "Navigate to the next page",
268
+ navigateToTheLastPage: "Navigate to the last page"
269
+ },
270
+ "de-DE": {
271
+ navigateToTheFirstPage: "Zur ersten Seite navigieren",
272
+ navigateToThePreviousPage: "Zur vorherigen Seite navigieren",
273
+ navigateToTheNextPage: "Zur nächsten Seite navigieren",
274
+ navigateToTheLastPage: "Zur letzten Seite navigieren"
275
+ },
276
+ "fr-FR": {
277
+ navigateToTheFirstPage: "Accéder à la première page",
278
+ navigateToThePreviousPage: "Accéder à la page précédente",
279
+ navigateToTheNextPage: "Accéder à la page suivante",
280
+ navigateToTheLastPage: "Accéder à la dernière page"
281
+ },
282
+ "ja-JP": {
283
+ navigateToTheFirstPage: "最初のページに移動",
284
+ navigateToThePreviousPage: "前のページに移動",
285
+ navigateToTheNextPage: "次のページに移動",
286
+ navigateToTheLastPage: "最後のページに移動"
287
+ },
288
+ "pt-BR": {
289
+ navigateToTheFirstPage: "Ir para a primeira página",
290
+ navigateToThePreviousPage: "Ir para a página anterior",
291
+ navigateToTheNextPage: "Ir para a próxima página",
292
+ navigateToTheLastPage: "Ir para a última página"
293
+ },
294
+ "es-ES": {
295
+ navigateToTheFirstPage: "Ir a la primera página",
296
+ navigateToThePreviousPage: "Ir a la página anterior",
297
+ navigateToTheNextPage: "Ir a la página siguiente",
298
+ navigateToTheLastPage: "Ir a la última página"
299
+ }
300
+ }, ot = u({
301
+ i18n: { messages: nt },
302
+ name: "adl-pagination-controls",
303
+ components: {
304
+ BentoButton: T,
305
+ SkipLeft: z,
306
+ SkipRight: J,
307
+ ChevronLeft: H,
308
+ ChevronRight: at
309
+ },
310
+ props: {
311
+ /**
312
+ * Use to determine if the pager has a "next page".
313
+ */
314
+ hasNext: { type: Boolean, default: null },
315
+ /**
316
+ * The current page number of the pager.
317
+ */
318
+ page: { type: Number, required: !0 },
319
+ /**
320
+ * The current page number of the pager.
321
+ */
322
+ totalPages: { type: Number, default: null }
323
+ },
324
+ emits: ["navigate"],
325
+ setup(a, { emit: t }) {
326
+ const e = s(() => a.page === 1), o = s(() => a.page === a.totalPages), r = s(() => !a.hasNext || o.value), l = s(() => {
327
+ const n = !a.hasNext, p = !a.totalPages;
328
+ return n || o.value || p;
329
+ });
330
+ return {
331
+ // Values
332
+ isNextButtonDisabled: r,
333
+ isCurrentPageFirst: e,
334
+ isCurrentPageLast: o,
335
+ isLastPageButtonDisabled: l,
336
+ // Events
337
+ navigate: (n) => {
338
+ t("navigate", n);
339
+ },
340
+ // Enums
341
+ BentoButtonVariant: y
342
+ };
343
+ }
344
+ });
345
+ var st = function() {
346
+ var t = this, e = t._self._c;
347
+ return t._self._setupProxy, e("div", { staticClass: "b-pagination-controls" }, [e("bento-button", { attrs: { disabled: t.isCurrentPageFirst, variant: t.BentoButtonVariant.TERTIARY, tertiary: "", condensed: "" }, on: { click: function(o) {
348
+ return t.navigate(1);
349
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
350
+ return [e("skip-left", { attrs: { "svg-title": t.$t("navigateToTheFirstPage") } })];
351
+ }, proxy: !0 }]) }), e("bento-button", { attrs: { disabled: t.isCurrentPageFirst, variant: t.BentoButtonVariant.TERTIARY, tertiary: "", condensed: "" }, on: { click: function(o) {
352
+ return t.navigate(t.page - 1);
353
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
354
+ return [e("chevron-left", { attrs: { "svg-title": t.$t("navigateToThePreviousPage") } })];
355
+ }, proxy: !0 }]) }), e("bento-button", { attrs: { disabled: t.isNextButtonDisabled, variant: t.BentoButtonVariant.TERTIARY, tertiary: "", condensed: "" }, on: { click: function(o) {
356
+ return t.navigate(t.page + 1);
357
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
358
+ return [e("chevron-right", { attrs: { "svg-title": t.$t("navigateToTheNextPage") } })];
359
+ }, proxy: !0 }]) }), e("bento-button", { attrs: { disabled: t.isLastPageButtonDisabled, variant: t.BentoButtonVariant.TERTIARY, tertiary: "", condensed: "" }, on: { click: function(o) {
360
+ return t.navigate(t.totalPages);
361
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
362
+ return [e("skip-right", { attrs: { "svg-title": t.$t("navigateToTheLastPage") } })];
363
+ }, proxy: !0 }]) })], 1);
364
+ }, it = [], rt = /* @__PURE__ */ i(
365
+ ot,
366
+ st,
367
+ it,
368
+ !1,
369
+ null,
370
+ "7b719e03",
371
+ null,
372
+ null
373
+ );
374
+ const lt = rt.exports, gt = {
375
+ "en-US": {
376
+ paginatedNavigation: "Paginated navigation",
377
+ showingItemsWithTotal: "Showing {itemCount} of {totalCount} item | Showing {itemCount} of {totalCount} items"
378
+ },
379
+ "de-DE": {
380
+ paginatedNavigation: "Paginierte Navigation",
381
+ showingItemsWithTotal: "Zeigt {itemCount} Artikel von {totalCount} | Zeigt {itemCount} von {totalCount} Artikeln"
382
+ },
383
+ "fr-FR": {
384
+ paginatedNavigation: "Navigation paginée",
385
+ showingItemsWithTotal: "Affichage de {itemCount} élément sur {totalCount} | Affichage de {itemCount} élément(s) sur {totalCount}"
386
+ },
387
+ "ja-JP": {
388
+ paginatedNavigation: "ページ分割ナビゲーション",
389
+ showingItemsWithTotal: "{totalCount}件中{itemCount}件のアイテムを表示"
390
+ },
391
+ "pt-BR": {
392
+ paginatedNavigation: "Navegação por página",
393
+ showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} item | Mostrando {itemCount} de {totalCount} itens"
394
+ },
395
+ "es-ES": {
396
+ paginatedNavigation: "Navegación por páginas",
397
+ showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} artículo | Mostrando {itemCount} de {totalCount} artículos"
398
+ }
399
+ }, ut = u({
400
+ i18n: { messages: gt },
401
+ name: "bento-pagination",
402
+ components: {
403
+ BentoPaginationContext: A,
404
+ BentoPaginationControls: lt,
405
+ BentoPaginationResultsPerPage: I
406
+ },
407
+ inheritAttrs: !1,
408
+ props: {
409
+ /**
410
+ * A brief description of the purpose of the navigation (for a11y).
411
+ * Omit the term "navigation", as the screen reader will read both the role and the contents of the label.
412
+ */
413
+ ariaLabel: { type: String, default: null },
414
+ /**
415
+ * Use to determine if the pager has a "next page".
416
+ */
417
+ hasNext: { type: Boolean, default: null },
418
+ /**
419
+ * Toggles the visibility of the "results per page" part of the pagination component.
420
+ */
421
+ hidePageSize: {
422
+ type: Boolean,
423
+ default: !1
424
+ },
425
+ /**
426
+ * The current page number of the pager.
427
+ */
428
+ page: {
429
+ type: Number,
430
+ default: 1,
431
+ validator: (a) => Number.isFinite(a) && a > 0
432
+ },
433
+ /**
434
+ * The size of the items the pager is paging through.
435
+ */
436
+ size: {
437
+ type: Number,
438
+ default: 20,
439
+ validator: (a) => [10, 20, 50, 75, 100].includes(a)
440
+ },
441
+ /**
442
+ * The total number of items the pager is paging through.
443
+ */
444
+ totalCount: { type: Number, default: null }
445
+ },
446
+ emits: ["navigate", "items-page", "update:page", "update:size"],
447
+ setup(a, { emit: t }) {
448
+ const e = s(
449
+ () => !a.totalCount || !a.size ? null : Math.ceil(a.totalCount / a.size)
450
+ ), o = (n) => {
451
+ t("navigate", n), t("update:page", n);
452
+ }, r = (n) => {
453
+ o(n);
454
+ }, l = (n) => {
455
+ t("items-page", n), t("update:size", n), o(1);
456
+ }, g = s(() => ({
457
+ "b-pagination__navigation--no-results-per-page": a.hidePageSize
458
+ }));
459
+ return {
460
+ // Values
461
+ totalPages: e,
462
+ navigationConditionalClasses: g,
463
+ // Events
464
+ navigate: o,
465
+ onItemsPerPageChange: l,
466
+ onPageSelected: r
467
+ };
468
+ }
469
+ });
470
+ var pt = function() {
471
+ var t = this, e = t._self._c;
472
+ return t._self._setupProxy, e("div", { staticClass: "b-pagination" }, [e("nav", { staticClass: "b-pagination__navigation", class: t.navigationConditionalClasses, attrs: { "aria-label": t.ariaLabel } }, [t.hidePageSize ? t._e() : e("bento-pagination-results-per-page", { staticClass: "b-pagination__results-per-page", attrs: { "items-per-page": t.size, "total-count": t.totalCount }, on: { select: t.onItemsPerPageChange } }), e("div", { staticClass: "b-pagination__page-navigator" }, [e("bento-pagination-context", { staticClass: "b-pagination__context", attrs: { "total-pages": t.totalPages, page: t.page, size: t.size, "total-count": t.totalCount }, on: { "page-selected": t.onPageSelected } }), e("div", { staticClass: "b-pagination__divider" }), e("bento-pagination-controls", { staticClass: "b-pagination__controls", attrs: { "has-next": t.hasNext, page: t.page, "total-pages": t.totalPages }, on: { navigate: t.navigate } })], 1)], 1)]);
473
+ }, _t = [], ct = /* @__PURE__ */ i(
474
+ ut,
475
+ pt,
476
+ _t,
477
+ !1,
478
+ null,
479
+ "bb2b5f11",
480
+ null,
481
+ null
482
+ );
483
+ const bt = ct.exports;
484
+ export {
485
+ bt as BentoPagination
486
+ };
487
+ //# sourceMappingURL=pagination.js.map