@adyen/bento-vue3 1.89.2 → 1.90.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.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/index.d.ts +403 -298
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/input-time.css +1 -0
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/accordion-item.CZIxxSsH.js +141 -0
- package/dist/chunks/{accordion-item.BX1KrLMl.js.map → accordion-item.CZIxxSsH.js.map} +1 -1
- package/dist/chunks/action-bar.Pe_hvtja.js +336 -0
- package/dist/chunks/{action-bar.DLMaIUWW.js.map → action-bar.Pe_hvtja.js.map} +1 -1
- package/dist/chunks/ai-tag.BSlc78DU.js +137 -0
- package/dist/chunks/{ai-tag.DK63ExDc.js.map → ai-tag.BSlc78DU.js.map} +1 -1
- package/dist/chunks/{alert.C_8-VNi_.js → alert.CFWN2E0b.js} +86 -79
- package/dist/chunks/{alert.C_8-VNi_.js.map → alert.CFWN2E0b.js.map} +1 -1
- package/dist/chunks/anchor-scroller.DSfXK6vK.js +214 -0
- package/dist/chunks/{anchor-scroller.NhjLDBZI.js.map → anchor-scroller.DSfXK6vK.js.map} +1 -1
- package/dist/chunks/{base-modal.C2-JyHC_.js → base-modal.BjjDrx0z.js} +132 -125
- package/dist/chunks/{base-modal.C2-JyHC_.js.map → base-modal.BjjDrx0z.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js → button-actions-with-menu.DvkS16ur.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js.map → button-actions-with-menu.DvkS16ur.js.map} +1 -1
- package/dist/chunks/{button-actions.cMQWyZne.js → button-actions.Bh_PZ_fV.js} +202 -188
- package/dist/chunks/{button-actions.cMQWyZne.js.map → button-actions.Bh_PZ_fV.js.map} +1 -1
- package/dist/chunks/{calendar.DcCqkSNJ.js → calendar.CH-1Vgeb.js} +343 -329
- package/dist/chunks/{calendar.DcCqkSNJ.js.map → calendar.CH-1Vgeb.js.map} +1 -1
- package/dist/chunks/card.BzCGCCzH.js +223 -0
- package/dist/chunks/{card.CoxQ_L0w.js.map → card.BzCGCCzH.js.map} +1 -1
- package/dist/chunks/{checkbox-group.96n9Cc3W.js → checkbox-group.D_fN6Glu.js} +4 -4
- package/dist/chunks/{checkbox-group.96n9Cc3W.js.map → checkbox-group.D_fN6Glu.js.map} +1 -1
- package/dist/chunks/{checkbox.C6ATh8f5.js → checkbox.BlAhQl9N.js} +78 -71
- package/dist/chunks/{checkbox.C6ATh8f5.js.map → checkbox.BlAhQl9N.js.map} +1 -1
- package/dist/chunks/chip.DFldnqfz.js +72 -0
- package/dist/chunks/{chip.CdgpQyXN.js.map → chip.DFldnqfz.js.map} +1 -1
- package/dist/chunks/{code-snippet.DgAuuZF5.js → code-snippet.BePxxR3q.js} +113 -106
- package/dist/chunks/{code-snippet.DgAuuZF5.js.map → code-snippet.BePxxR3q.js.map} +1 -1
- package/dist/chunks/{controls-group.C7hOE1F4.js → controls-group.Cxk-0fCy.js} +2 -2
- package/dist/chunks/{controls-group.C7hOE1F4.js.map → controls-group.Cxk-0fCy.js.map} +1 -1
- package/dist/chunks/copy.CL893i9-.js +114 -0
- package/dist/chunks/{copy.C2kQ1PbI.js.map → copy.CL893i9-.js.map} +1 -1
- package/dist/chunks/{country.CaGc08Ps.js → country.15m_ATbO.js} +3 -3
- package/dist/chunks/{country.CaGc08Ps.js.map → country.15m_ATbO.js.map} +1 -1
- package/dist/chunks/country.types.6a7xxZIR.js +26 -0
- package/dist/chunks/{country.types.DjpMGz7a.js.map → country.types.6a7xxZIR.js.map} +1 -1
- package/dist/chunks/{dashboard-section.UafHRkMa.js → dashboard-section.CiNDItU2.js} +3 -3
- package/dist/chunks/{dashboard-section.UafHRkMa.js.map → dashboard-section.CiNDItU2.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CcDV2Aks.js → dashed-underline.CwdpUz76.js} +3 -3
- package/dist/chunks/{dashed-underline.CcDV2Aks.js.map → dashed-underline.CwdpUz76.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CnC4TQvk.js → data-grid-template.nXn1dLCw.js} +4 -4
- package/dist/chunks/{data-grid-template.CnC4TQvk.js.map → data-grid-template.nXn1dLCw.js.map} +1 -1
- package/dist/chunks/data-grid.CXWaoqzi.js +4242 -0
- package/dist/chunks/data-grid.CXWaoqzi.js.map +1 -0
- package/dist/chunks/date-picker.DPjCROIP.js +238 -0
- package/dist/chunks/{date-picker.dlzZ_-5f.js.map → date-picker.DPjCROIP.js.map} +1 -1
- package/dist/chunks/date-range-picker.fyrfFd04.js +998 -0
- package/dist/chunks/date-range-picker.fyrfFd04.js.map +1 -0
- package/dist/chunks/dialog-page.Bh-7RAwX.js +163 -0
- package/dist/chunks/{dialog-page.COfKqjT-.js.map → dialog-page.Bh-7RAwX.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.bq9AlGzJ.js → dropdown-default-textbox.aYsTZDZ7.js} +69 -62
- package/dist/chunks/{dropdown-default-textbox.bq9AlGzJ.js.map → dropdown-default-textbox.aYsTZDZ7.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js → dropdown-tag.B7OA_Yv9.js} +5 -5
- package/dist/chunks/{dropdown-tag.Ysrac5GN.js.map → dropdown-tag.B7OA_Yv9.js.map} +1 -1
- package/dist/chunks/{dropdown.MhmX1P9o.js → dropdown.Do-mZiI6.js} +285 -271
- package/dist/chunks/{dropdown.MhmX1P9o.js.map → dropdown.Do-mZiI6.js.map} +1 -1
- package/dist/chunks/error-message.849uzpkq.js +157 -0
- package/dist/chunks/{error-message.DCgo8q20.js.map → error-message.849uzpkq.js.map} +1 -1
- package/dist/chunks/{file-uploader.Bfd1uUMe.js → file-uploader.BUvDU_cn.js} +604 -583
- package/dist/chunks/{file-uploader.Bfd1uUMe.js.map → file-uploader.BUvDU_cn.js.map} +1 -1
- package/dist/chunks/{filter-bar.CkAjLQol.js → filter-bar.fowl40RS.js} +998 -928
- package/dist/chunks/{filter-bar.CkAjLQol.js.map → filter-bar.fowl40RS.js.map} +1 -1
- package/dist/chunks/fixed-scroller.yVsaQzy5.js +157 -0
- package/dist/chunks/{fixed-scroller.DtkaGyMD.js.map → fixed-scroller.yVsaQzy5.js.map} +1 -1
- package/dist/chunks/{footer-actions.BcYSsoUg.js → footer-actions.uoNbOGAQ.js} +2 -2
- package/dist/chunks/{footer-actions.BcYSsoUg.js.map → footer-actions.uoNbOGAQ.js.map} +1 -1
- package/dist/chunks/form-layout-title.Cr3wdpK_.js +239 -0
- package/dist/chunks/{form-layout-title.DW5Kg1rh.js.map → form-layout-title.Cr3wdpK_.js.map} +1 -1
- package/dist/chunks/{header-meta.Bym9AlQm.js → header-meta.CmH6SnjE.js} +98 -84
- package/dist/chunks/{header-meta.Bym9AlQm.js.map → header-meta.CmH6SnjE.js.map} +1 -1
- package/dist/chunks/{header-with-views.Djba6iol.js → header-with-views.B2pPBcTf.js} +1091 -1070
- package/dist/chunks/{header-with-views.Djba6iol.js.map → header-with-views.B2pPBcTf.js.map} +1 -1
- package/dist/chunks/{header.o-7SyHtU.js → header.BVM8Usdi.js} +3 -3
- package/dist/chunks/{header.o-7SyHtU.js.map → header.BVM8Usdi.js.map} +1 -1
- package/dist/chunks/{info-icon.BUala_wq.js → info-icon.B3MDsjMu.js} +2 -2
- package/dist/chunks/{info-icon.BUala_wq.js.map → info-icon.B3MDsjMu.js.map} +1 -1
- package/dist/chunks/input-field-password.CHb2Ros_.js +353 -0
- package/dist/chunks/{input-field-password.DZytmp_p.js.map → input-field-password.CHb2Ros_.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js → input-field-phone-number.DM2rmZkQ.js} +12 -5
- package/dist/chunks/{input-field-phone-number.CxblrmaU.js.map → input-field-phone-number.DM2rmZkQ.js.map} +1 -1
- package/dist/chunks/{input-field.CfU0ZKtL.js → input-field.DnYjM6yy.js} +118 -111
- package/dist/chunks/{input-field.CfU0ZKtL.js.map → input-field.DnYjM6yy.js.map} +1 -1
- package/dist/chunks/input-time.DeJ8lDio.js +103 -0
- package/dist/chunks/input-time.DeJ8lDio.js.map +1 -0
- package/dist/chunks/{inspector.B9k4tJWe.js → inspector.DMhKNW1K.js} +70 -63
- package/dist/chunks/{inspector.B9k4tJWe.js.map → inspector.DMhKNW1K.js.map} +1 -1
- package/dist/chunks/{list-item.DO5uULke.js → list-item.BHvXpqaS.js} +2 -2
- package/dist/chunks/{list-item.DO5uULke.js.map → list-item.BHvXpqaS.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js → listbox-option-tag.CVxaZqbc.js} +2 -2
- package/dist/chunks/{listbox-option-tag.Cvplth7d.js.map → listbox-option-tag.CVxaZqbc.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js → modal-fullscreen.9CSTqFQc.js} +54 -47
- package/dist/chunks/{modal-fullscreen.CuKVyTWb.js.map → modal-fullscreen.9CSTqFQc.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js → modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js} +48 -41
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map → modal.vue_vue_type_script_setup_true_lang.BAxTkaQM.js.map} +1 -1
- package/dist/chunks/pagination.DL-h8OLF.js +413 -0
- package/dist/chunks/{pagination.dpVc6Yt0.js.map → pagination.DL-h8OLF.js.map} +1 -1
- package/dist/chunks/{promo-banner.BzveHNOI.js → promo-banner.-H4r_cwj.js} +39 -32
- package/dist/chunks/{promo-banner.BzveHNOI.js.map → promo-banner.-H4r_cwj.js.map} +1 -1
- package/dist/chunks/{radio-group.Cuiq4mxy.js → radio-group.DzhQgXv9.js} +4 -4
- package/dist/chunks/{radio-group.Cuiq4mxy.js.map → radio-group.DzhQgXv9.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js → rich-text-editor.Ij2t4pyI.js} +418 -411
- package/dist/chunks/{rich-text-editor.DLMiT4f5.js.map → rich-text-editor.Ij2t4pyI.js.map} +1 -1
- package/dist/chunks/search-bar.DfNwnjes.js +114 -0
- package/dist/chunks/{search-bar.CsFyP0_I.js.map → search-bar.DfNwnjes.js.map} +1 -1
- package/dist/chunks/secondary-nav.CvipTDRh.js +285 -0
- package/dist/chunks/secondary-nav.CvipTDRh.js.map +1 -0
- package/dist/chunks/{segmented-control.KeQ5kuR1.js → segmented-control.CQWOO1-J.js} +2 -2
- package/dist/chunks/{segmented-control.KeQ5kuR1.js.map → segmented-control.CQWOO1-J.js.map} +1 -1
- package/dist/chunks/{selection-card-group.XM11Kk-4.js → selection-card-group.CcOWQAUC.js} +11 -11
- package/dist/chunks/{selection-card-group.XM11Kk-4.js.map → selection-card-group.CcOWQAUC.js.map} +1 -1
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js → sidepanel.BObSv8UU.js} +56 -49
- package/dist/chunks/{sidepanel.b2QZ1Jsx.js.map → sidepanel.BObSv8UU.js.map} +1 -1
- package/dist/chunks/step.AsX2jAeL.js +268 -0
- package/dist/chunks/{step.BlwoLfdw.js.map → step.AsX2jAeL.js.map} +1 -1
- package/dist/chunks/structured-list-item.CgJR_ufh.js +112 -0
- package/dist/chunks/{structured-list-item.e-8kRleh.js.map → structured-list-item.CgJR_ufh.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CcvOC03H.js → summary-grid.types.DKPhtHw3.js} +5 -5
- package/dist/chunks/{summary-grid.types.CcvOC03H.js.map → summary-grid.types.DKPhtHw3.js.map} +1 -1
- package/dist/chunks/{tab.mR5uUSdp.js → tab.9nyNZiGw.js} +2 -2
- package/dist/chunks/{tab.mR5uUSdp.js.map → tab.9nyNZiGw.js.map} +1 -1
- package/dist/chunks/{tag.DujMVFh-.js → tag.YN2r-Pp3.js} +2 -2
- package/dist/chunks/{tag.DujMVFh-.js.map → tag.YN2r-Pp3.js.map} +1 -1
- package/dist/chunks/textarea.C-sBemuo.js +256 -0
- package/dist/chunks/{textarea.CHV6Z8nt.js.map → textarea.C-sBemuo.js.map} +1 -1
- package/dist/chunks/timeline-item.CHk8wXeT.js +433 -0
- package/dist/chunks/{timeline-item.CaGcRZbt.js.map → timeline-item.CHk8wXeT.js.map} +1 -1
- package/dist/chunks/{toast.C2oehk9P.js → toast.De4MTkiH.js} +64 -57
- package/dist/chunks/{toast.C2oehk9P.js.map → toast.De4MTkiH.js.map} +1 -1
- package/dist/chunks/{tooltip.CbADa_4p.js → tooltip.DHfG2aRt.js} +40 -38
- package/dist/chunks/tooltip.DHfG2aRt.js.map +1 -0
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js → tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js} +120 -113
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map → tutorial.vue_vue_type_script_setup_true_lang.CUDeriBU.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js → use-cached-selected-values.DIbfa5F1.js} +381 -360
- package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js.map → use-cached-selected-values.DIbfa5F1.js.map} +1 -1
- package/dist/chunks/{use-country-items.D_3LBe2I.js → use-country-items.Dp7X1r2e.js} +3 -3
- package/dist/chunks/{use-country-items.D_3LBe2I.js.map → use-country-items.Dp7X1r2e.js.map} +1 -1
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js → use-country-phon-code.BzcawGpE.js} +107 -104
- package/dist/chunks/{use-country-phon-code.DoqTGkNr.js.map → use-country-phon-code.BzcawGpE.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js → use-date-input-formatter.BiIraXZZ.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js.map → use-date-input-formatter.BiIraXZZ.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable-handle.js +51 -44
- package/dist/draggable-handle.js.map +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +205 -203
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +5 -0
- package/dist/input-time.js.map +1 -0
- package/dist/inspector.js +1 -1
- package/dist/internal.js +12 -12
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/chunks/accordion-item.BX1KrLMl.js +0 -134
- package/dist/chunks/action-bar.DLMaIUWW.js +0 -329
- package/dist/chunks/ai-tag.DK63ExDc.js +0 -130
- package/dist/chunks/anchor-scroller.NhjLDBZI.js +0 -207
- package/dist/chunks/card.CoxQ_L0w.js +0 -216
- package/dist/chunks/chip.CdgpQyXN.js +0 -65
- package/dist/chunks/copy.C2kQ1PbI.js +0 -107
- package/dist/chunks/country.types.DjpMGz7a.js +0 -19
- package/dist/chunks/data-grid.BSIXLRm7.js +0 -4014
- package/dist/chunks/data-grid.BSIXLRm7.js.map +0 -1
- package/dist/chunks/date-picker.dlzZ_-5f.js +0 -231
- package/dist/chunks/date-range-picker.DC6CK0As.js +0 -995
- package/dist/chunks/date-range-picker.DC6CK0As.js.map +0 -1
- package/dist/chunks/dialog-page.COfKqjT-.js +0 -156
- package/dist/chunks/error-message.DCgo8q20.js +0 -143
- package/dist/chunks/fixed-scroller.DtkaGyMD.js +0 -150
- package/dist/chunks/form-layout-title.DW5Kg1rh.js +0 -230
- package/dist/chunks/input-field-password.DZytmp_p.js +0 -346
- package/dist/chunks/pagination.dpVc6Yt0.js +0 -401
- package/dist/chunks/search-bar.CsFyP0_I.js +0 -107
- package/dist/chunks/secondary-nav.CLBdq98c.js +0 -138
- package/dist/chunks/secondary-nav.CLBdq98c.js.map +0 -1
- package/dist/chunks/step.BlwoLfdw.js +0 -259
- package/dist/chunks/structured-list-item.e-8kRleh.js +0 -105
- package/dist/chunks/textarea.CHV6Z8nt.js +0 -247
- package/dist/chunks/timeline-item.CaGcRZbt.js +0 -419
- package/dist/chunks/tooltip.CbADa_4p.js.map +0 -1
|
@@ -1,114 +1,121 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
import { c as
|
|
3
|
-
import { B as
|
|
4
|
-
import { C as
|
|
5
|
-
import { W as
|
|
1
|
+
import { openBlock as t, createElementBlock as g, mergeProps as w, toDisplayString as V, createCommentVNode as l, createElementVNode as s, defineComponent as N, useSlots as R, computed as r, onMounted as F, normalizeClass as A, createBlock as I, resolveDynamicComponent as D, unref as o, withCtx as p, renderSlot as m, createVNode as P } from "vue";
|
|
2
|
+
import { c as _, a as W, B as y } from "./typography.B3J6_tYk.js";
|
|
3
|
+
import { B as M } from "./button.DWF7FSIw.js";
|
|
4
|
+
import { C as U } from "./cross-small.Bjq2Gqvh.js";
|
|
5
|
+
import { W as z } from "./warning-filled.BzyK_mMj.js";
|
|
6
6
|
import { C as q } from "./cross-circle-fill.BWCKKn0E.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as Z } from "./checkmark-circle-fill.DugX5fbG.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { _ as
|
|
10
|
-
import { u as
|
|
9
|
+
import { _ as S } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
+
import { u as j } from "./use-has-slot.CyMiImRQ.js";
|
|
11
11
|
import { u as J } from "./index.B875RXHM.js";
|
|
12
12
|
import "../assets/alert.css";
|
|
13
|
-
var
|
|
14
|
-
let
|
|
15
|
-
const
|
|
13
|
+
var h = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.TIP = "tip", e))(h || {}), c = /* @__PURE__ */ ((e) => (e.WARNING = "warning", e.CRITICAL = "critical", e.HIGHLIGHT = "highlight", e.SUCCESS = "success", e))(c || {}), H = /* @__PURE__ */ ((e) => (e.CLOSE_ALERT = "close-alert", e))(H || {});
|
|
14
|
+
let b = 0;
|
|
15
|
+
const K = {
|
|
16
16
|
beforeCreate() {
|
|
17
|
-
this.uuid =
|
|
17
|
+
this.uuid = b.toString(), b += 1;
|
|
18
18
|
}
|
|
19
|
-
},
|
|
20
|
-
function
|
|
21
|
-
return
|
|
19
|
+
}, O = { key: 0 }, X = ["clip-path"], Y = ["id"];
|
|
20
|
+
function Q(e, i, u, d, v, n) {
|
|
21
|
+
return t(), g("svg", w({ role: "img" }, e.$attrs, {
|
|
22
22
|
class: "ui-assets-icons-16",
|
|
23
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24
24
|
width: "16",
|
|
25
25
|
height: "16",
|
|
26
26
|
fill: "none"
|
|
27
27
|
}), [
|
|
28
|
-
|
|
28
|
+
e.$attrs["svg-title"] ? (t(), g("title", O, V(e.$attrs["svg-title"]), 1)) : l("", !0),
|
|
29
29
|
s("g", {
|
|
30
|
-
"clip-path": "url(#uia-ui-assets/icons-16-info_filled__a" +
|
|
31
|
-
},
|
|
30
|
+
"clip-path": "url(#uia-ui-assets/icons-16-info_filled__a" + e.uuid + ")"
|
|
31
|
+
}, i[0] || (i[0] = [
|
|
32
32
|
s("path", {
|
|
33
33
|
fill: "#001222",
|
|
34
34
|
"fill-rule": "evenodd",
|
|
35
35
|
d: "M5.03418 0.839544C6.45015 0.253058 8.00853 0.0992122 9.51172 0.398138C11.015 0.697159 12.3966 1.43547 13.4805 2.51923C14.5642 3.60301 15.3025 4.98476 15.6016 6.48798C15.9005 7.99113 15.7466 9.54958 15.1602 10.9655C14.5736 12.3816 13.5801 13.5925 12.3057 14.444C11.1109 15.2423 9.71924 15.6917 8.28711 15.7448L8 15.7497C5.94458 15.7497 3.97294 14.9336 2.51953 13.4802C1.06623 12.0268 0.250005 10.055 0.25 7.9997C0.250066 6.4671 0.70424 4.96838 1.55566 3.69404C2.40724 2.41967 3.61814 1.42609 5.03418 0.839544ZM6.25 6.2497V7.7497H7.25V10.2497H6.25V11.7497H9.75V10.2497H8.75V6.2497H6.25ZM7.75 3.4997C7.58674 3.4997 7.42763 3.54211 7.28418 3.61786C7.25386 3.63389 7.22303 3.64949 7.19434 3.66865L7.07812 3.75947C7.04744 3.78732 7.01817 3.817 6.99121 3.84833C6.97917 3.86236 6.96827 3.8776 6.95703 3.89228C6.93942 3.91522 6.9228 3.93915 6.90723 3.96357C6.90005 3.97485 6.89248 3.98618 6.88574 3.99775C6.86351 4.03594 6.84324 4.07574 6.82617 4.11689L6.78027 4.25751C6.77017 4.29795 6.7628 4.33927 6.75781 4.38056C6.75552 4.39961 6.75411 4.41902 6.75293 4.43818C6.75166 4.45856 6.75196 4.47926 6.75195 4.4997C6.75195 4.52207 6.75144 4.54472 6.75293 4.56708C6.75579 4.60979 6.76114 4.65273 6.76953 4.69501L6.80859 4.83661C6.82299 4.87685 6.84098 4.91584 6.86035 4.9538C6.86847 4.96971 6.87775 4.98522 6.88672 5.00068C6.89748 5.01922 6.90895 5.03753 6.9209 5.05536C6.93323 5.07376 6.94544 5.09248 6.95898 5.11005C6.98495 5.14371 7.01269 5.17643 7.04297 5.20673L7.1543 5.30341C7.19021 5.33003 7.2285 5.35325 7.26758 5.3747C7.27775 5.38031 7.28847 5.38508 7.29883 5.39033C7.32903 5.40554 7.35995 5.41924 7.3916 5.43134C7.40264 5.43559 7.41361 5.44018 7.4248 5.44404C7.46721 5.45855 7.51041 5.47134 7.55469 5.48017C7.59672 5.48853 7.63919 5.49291 7.68164 5.49579C7.70021 5.49707 7.71872 5.49751 7.7373 5.49775C7.76179 5.49804 7.78614 5.49729 7.81055 5.49579C7.82982 5.49462 7.84899 5.4932 7.86816 5.49091C7.90982 5.48592 7.95139 5.47962 7.99219 5.46943L8.13281 5.42353C8.1739 5.40649 8.21283 5.38517 8.25098 5.36298C8.2626 5.35623 8.27383 5.3487 8.28516 5.3415C8.30964 5.32589 8.33345 5.30934 8.35645 5.29169C8.37116 5.28043 8.38633 5.26958 8.40039 5.25751C8.43176 5.23053 8.46235 5.20229 8.49023 5.17158L8.58105 5.05536C8.69084 4.89096 8.75 4.6974 8.75 4.4997C8.74992 4.2346 8.64449 3.98013 8.45703 3.79267C8.26951 3.60523 8.01514 3.4997 7.75 3.4997Z",
|
|
36
36
|
"clip-rule": "evenodd"
|
|
37
37
|
}, null, -1)
|
|
38
|
-
]), 8,
|
|
38
|
+
]), 8, X),
|
|
39
39
|
s("defs", null, [
|
|
40
40
|
s("clipPath", {
|
|
41
|
-
id: "uia-ui-assets/icons-16-info_filled__a" +
|
|
42
|
-
},
|
|
41
|
+
id: "uia-ui-assets/icons-16-info_filled__a" + e.uuid
|
|
42
|
+
}, i[1] || (i[1] = [
|
|
43
43
|
s("rect", {
|
|
44
44
|
width: "16",
|
|
45
45
|
height: "16",
|
|
46
46
|
fill: "#fff"
|
|
47
47
|
}, null, -1)
|
|
48
|
-
]), 8,
|
|
48
|
+
]), 8, Y)
|
|
49
49
|
])
|
|
50
50
|
], 16);
|
|
51
51
|
}
|
|
52
|
-
const x = /* @__PURE__ */
|
|
52
|
+
const x = /* @__PURE__ */ S(K, [["render", Q]]), L = {
|
|
53
|
+
"de-DE": { close: "Schließen", criticalIcon: "Kritisches Symbol", highlightIcon: "Symbol hervorheben", successIcon: "Erfolgssymbol", warningIcon: "Warnungssymbol" },
|
|
54
|
+
"en-GB": { close: "Close", criticalIcon: "Critical icon", highlightIcon: "Highlight icon", successIcon: "Success icon", warningIcon: "Warning icon" },
|
|
53
55
|
"en-US": { close: "Close", criticalIcon: "Critical icon", highlightIcon: "Highlight icon", successIcon: "Success icon", warningIcon: "Warning icon" },
|
|
56
|
+
"es-ES": { close: "Cerrar", criticalIcon: "Icono de error crítico", highlightIcon: "Icono de resaltado", successIcon: "Icono de éxito", warningIcon: "Icono de advertencia" },
|
|
57
|
+
"es-MX": { close: "Cerrar", criticalIcon: "Icono crítico", highlightIcon: "Icono de resaltado", successIcon: "Icono de éxito", warningIcon: "Icono de advertencia" },
|
|
58
|
+
"fr-FR": { close: "Fermer", criticalIcon: "Icône critique", highlightIcon: "Icône de surbrillance", successIcon: "Icône de réussite", warningIcon: "Icône d'avertissement" },
|
|
59
|
+
"it-IT": { close: "Chiudi", criticalIcon: "Icona critica", highlightIcon: "Icona di evidenziazione", successIcon: "Icona del successo", warningIcon: "Icona di avviso" },
|
|
54
60
|
"ja-JP": { close: "閉じる", criticalIcon: "重大アイコン", highlightIcon: "ハイライトアイコン", successIcon: "成功アイコン", warningIcon: "警告アイコン" },
|
|
55
|
-
"pt-BR": { close: "Fechar", criticalIcon: "Ícone crítico", highlightIcon: "Ícone de destaque", successIcon: "Ícone de sucesso", warningIcon: "Ícone de aviso" }
|
|
56
|
-
|
|
61
|
+
"pt-BR": { close: "Fechar", criticalIcon: "Ícone crítico", highlightIcon: "Ícone de destaque", successIcon: "Ícone de sucesso", warningIcon: "Ícone de aviso" },
|
|
62
|
+
"zh-CN": { close: "关闭", criticalIcon: "关键图标", highlightIcon: "高亮图标", successIcon: "成功图标", warningIcon: "警告图标" }
|
|
63
|
+
}, ee = ["role"], oe = { class: "b-alert__icon" }, te = { class: "b-alert__content" }, se = {
|
|
57
64
|
key: 2,
|
|
58
65
|
class: "b-alert__actions",
|
|
59
66
|
"data-testid": "alert-actions"
|
|
60
|
-
},
|
|
61
|
-
i18n: { messages:
|
|
67
|
+
}, ne = {
|
|
68
|
+
i18n: { messages: L },
|
|
62
69
|
name: "bento-alert"
|
|
63
|
-
},
|
|
64
|
-
...
|
|
70
|
+
}, ce = /* @__PURE__ */ N({
|
|
71
|
+
...ne,
|
|
65
72
|
props: {
|
|
66
73
|
closeButton: { type: Boolean, default: !1 },
|
|
67
|
-
type: { default:
|
|
68
|
-
variant: { default:
|
|
74
|
+
type: { default: c.HIGHLIGHT },
|
|
75
|
+
variant: { default: h.DEFAULT }
|
|
69
76
|
},
|
|
70
77
|
emits: ["close-alert"],
|
|
71
|
-
setup(
|
|
72
|
-
const u = R(), d =
|
|
73
|
-
[`b-alert--${
|
|
74
|
-
[`b-alert--${
|
|
75
|
-
})),
|
|
76
|
-
switch (
|
|
77
|
-
case
|
|
78
|
+
setup(e, { emit: i }) {
|
|
79
|
+
const u = R(), d = j(u), v = i, n = e, { t: f } = J({ messages: L }), a = r(() => n.variant === h.TIP), T = r(() => ({
|
|
80
|
+
[`b-alert--${n.type}`]: n.type,
|
|
81
|
+
[`b-alert--${h.TIP}`]: a.value
|
|
82
|
+
})), $ = r(() => f(`${n.type}Icon`)), B = r(() => {
|
|
83
|
+
switch (n.type) {
|
|
84
|
+
case c.CRITICAL:
|
|
78
85
|
return q;
|
|
79
|
-
case
|
|
80
|
-
return j;
|
|
81
|
-
case n.WARNING:
|
|
86
|
+
case c.SUCCESS:
|
|
82
87
|
return Z;
|
|
83
|
-
case
|
|
88
|
+
case c.WARNING:
|
|
89
|
+
return z;
|
|
90
|
+
case c.HIGHLIGHT:
|
|
84
91
|
default:
|
|
85
92
|
return x;
|
|
86
93
|
}
|
|
87
|
-
}),
|
|
88
|
-
el:
|
|
89
|
-
variant:
|
|
94
|
+
}), E = r(() => ({
|
|
95
|
+
el: W.DIV,
|
|
96
|
+
variant: a.value ? _.CAPTION : _.BODY,
|
|
90
97
|
wide: !0
|
|
91
|
-
})),
|
|
92
|
-
v(
|
|
98
|
+
})), k = r(() => n.type === c.HIGHLIGHT ? "status" : "alert"), G = () => {
|
|
99
|
+
v(H.CLOSE_ALERT);
|
|
93
100
|
};
|
|
94
|
-
return
|
|
101
|
+
return F(() => {
|
|
95
102
|
if (!u.default && !u.description)
|
|
96
103
|
throw new Error("Alert Component requires a title or a description");
|
|
97
|
-
}), (C,
|
|
104
|
+
}), (C, ie) => (t(), g("div", {
|
|
98
105
|
class: "b-alert",
|
|
99
|
-
role:
|
|
106
|
+
role: k.value
|
|
100
107
|
}, [
|
|
101
108
|
s("div", {
|
|
102
|
-
class:
|
|
109
|
+
class: A(["b-alert__inner-container", T.value])
|
|
103
110
|
}, [
|
|
104
|
-
s("div",
|
|
105
|
-
(
|
|
111
|
+
s("div", oe, [
|
|
112
|
+
(t(), I(D(B.value), {
|
|
106
113
|
"aria-hidden": "true",
|
|
107
|
-
"svg-title":
|
|
114
|
+
"svg-title": $.value
|
|
108
115
|
}, null, 8, ["svg-title"]))
|
|
109
116
|
]),
|
|
110
|
-
s("div",
|
|
111
|
-
|
|
117
|
+
s("div", te, [
|
|
118
|
+
o(d)("default") && !a.value ? (t(), I(o(y), {
|
|
112
119
|
key: 0,
|
|
113
120
|
class: "b-alert__title",
|
|
114
121
|
el: "div",
|
|
@@ -116,46 +123,46 @@ const x = /* @__PURE__ */ b(O, [["render", X]]), T = {
|
|
|
116
123
|
strongest: "",
|
|
117
124
|
wide: ""
|
|
118
125
|
}, {
|
|
119
|
-
default:
|
|
120
|
-
|
|
126
|
+
default: p(() => [
|
|
127
|
+
m(C.$slots, "default", {}, void 0, !0)
|
|
121
128
|
]),
|
|
122
129
|
_: 3
|
|
123
|
-
})) :
|
|
124
|
-
|
|
130
|
+
})) : l("", !0),
|
|
131
|
+
o(d)("description") ? (t(), I(o(y), w({
|
|
125
132
|
key: 1,
|
|
126
133
|
class: "b-alert__description"
|
|
127
|
-
},
|
|
128
|
-
default:
|
|
129
|
-
|
|
134
|
+
}, E.value, { "data-testid": "alert-description" }), {
|
|
135
|
+
default: p(() => [
|
|
136
|
+
m(C.$slots, "description", {}, void 0, !0)
|
|
130
137
|
]),
|
|
131
138
|
_: 3
|
|
132
|
-
}, 16)) :
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
])) :
|
|
139
|
+
}, 16)) : l("", !0),
|
|
140
|
+
o(d)("actions") && !a.value ? (t(), g("div", se, [
|
|
141
|
+
m(C.$slots, "actions", {}, void 0, !0)
|
|
142
|
+
])) : l("", !0)
|
|
136
143
|
]),
|
|
137
|
-
C.closeButton && !
|
|
144
|
+
C.closeButton && !a.value ? (t(), I(o(M), {
|
|
138
145
|
key: 0,
|
|
139
146
|
class: "b-alert__close-button",
|
|
140
147
|
variant: "tertiary",
|
|
141
148
|
type: "button",
|
|
142
149
|
onClick: G
|
|
143
150
|
}, {
|
|
144
|
-
default:
|
|
145
|
-
|
|
146
|
-
"svg-title":
|
|
151
|
+
default: p(() => [
|
|
152
|
+
P(o(U), {
|
|
153
|
+
"svg-title": o(f)("close")
|
|
147
154
|
}, null, 8, ["svg-title"])
|
|
148
155
|
]),
|
|
149
156
|
_: 1
|
|
150
|
-
})) :
|
|
157
|
+
})) : l("", !0)
|
|
151
158
|
], 2)
|
|
152
|
-
], 8,
|
|
159
|
+
], 8, ee));
|
|
153
160
|
}
|
|
154
|
-
}),
|
|
161
|
+
}), ve = /* @__PURE__ */ S(ce, [["__scopeId", "data-v-5c5a81b8"]]);
|
|
155
162
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
163
|
+
ve as B,
|
|
164
|
+
H as a,
|
|
165
|
+
c as b,
|
|
166
|
+
h as c
|
|
160
167
|
};
|
|
161
|
-
//# sourceMappingURL=alert.
|
|
168
|
+
//# sourceMappingURL=alert.CFWN2E0b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.C_8-VNi_.js","sources":["../../../vue2/src/components/alert/alert.types.ts","../../../ui-assets/icons-16/dist/vue/info-filled.vue","../../../vue2/src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#001222\" fill-rule=\"evenodd\" d=\"M5.03418 0.839544C6.45015 0.253058 8.00853 0.0992122 9.51172 0.398138C11.015 0.697159 12.3966 1.43547 13.4805 2.51923C14.5642 3.60301 15.3025 4.98476 15.6016 6.48798C15.9005 7.99113 15.7466 9.54958 15.1602 10.9655C14.5736 12.3816 13.5801 13.5925 12.3057 14.444C11.1109 15.2423 9.71924 15.6917 8.28711 15.7448L8 15.7497C5.94458 15.7497 3.97294 14.9336 2.51953 13.4802C1.06623 12.0268 0.250005 10.055 0.25 7.9997C0.250066 6.4671 0.70424 4.96838 1.55566 3.69404C2.40724 2.41967 3.61814 1.42609 5.03418 0.839544ZM6.25 6.2497V7.7497H7.25V10.2497H6.25V11.7497H9.75V10.2497H8.75V6.2497H6.25ZM7.75 3.4997C7.58674 3.4997 7.42763 3.54211 7.28418 3.61786C7.25386 3.63389 7.22303 3.64949 7.19434 3.66865L7.07812 3.75947C7.04744 3.78732 7.01817 3.817 6.99121 3.84833C6.97917 3.86236 6.96827 3.8776 6.95703 3.89228C6.93942 3.91522 6.9228 3.93915 6.90723 3.96357C6.90005 3.97485 6.89248 3.98618 6.88574 3.99775C6.86351 4.03594 6.84324 4.07574 6.82617 4.11689L6.78027 4.25751C6.77017 4.29795 6.7628 4.33927 6.75781 4.38056C6.75552 4.39961 6.75411 4.41902 6.75293 4.43818C6.75166 4.45856 6.75196 4.47926 6.75195 4.4997C6.75195 4.52207 6.75144 4.54472 6.75293 4.56708C6.75579 4.60979 6.76114 4.65273 6.76953 4.69501L6.80859 4.83661C6.82299 4.87685 6.84098 4.91584 6.86035 4.9538C6.86847 4.96971 6.87775 4.98522 6.88672 5.00068C6.89748 5.01922 6.90895 5.03753 6.9209 5.05536C6.93323 5.07376 6.94544 5.09248 6.95898 5.11005C6.98495 5.14371 7.01269 5.17643 7.04297 5.20673L7.1543 5.30341C7.19021 5.33003 7.2285 5.35325 7.26758 5.3747C7.27775 5.38031 7.28847 5.38508 7.29883 5.39033C7.32903 5.40554 7.35995 5.41924 7.3916 5.43134C7.40264 5.43559 7.41361 5.44018 7.4248 5.44404C7.46721 5.45855 7.51041 5.47134 7.55469 5.48017C7.59672 5.48853 7.63919 5.49291 7.68164 5.49579C7.70021 5.49707 7.71872 5.49751 7.7373 5.49775C7.76179 5.49804 7.78614 5.49729 7.81055 5.49579C7.82982 5.49462 7.84899 5.4932 7.86816 5.49091C7.90982 5.48592 7.95139 5.47962 7.99219 5.46943L8.13281 5.42353C8.1739 5.40649 8.21283 5.38517 8.25098 5.36298C8.2626 5.35623 8.27383 5.3487 8.28516 5.3415C8.30964 5.32589 8.33345 5.30934 8.35645 5.29169C8.37116 5.28043 8.38633 5.26958 8.40039 5.25751C8.43176 5.23053 8.46235 5.20229 8.49023 5.17158L8.58105 5.05536C8.69084 4.89096 8.75 4.6974 8.75 4.4997C8.74992 4.2346 8.64449 3.98013 8.45703 3.79267C8.26951 3.60523 8.01514 3.4997 7.75 3.4997Z\" clip-rule=\"evenodd\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits event when the alert is closed. `closeButton` must be `true`\n */\n (e: 'close-alert');\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Adds a close button on the right side of the alert\n */\n closeButton?: boolean;\n\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values HIGHLIGHT, SUCCESS, CRITICAL, WARNING\n */\n type?: BentoAlertTypeOption | `${BentoAlertTypeOption}`;\n\n /**\n * Variant for the alert\n * @values DEFAULT, TIP\n */\n variant?: BentoAlertVariant | `${BentoAlertVariant}`;\n }>(),\n {\n closeButton: false,\n type: BentoAlertTypeOption.HIGHLIGHT,\n variant: BentoAlertVariant.DEFAULT,\n }\n );\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","messages","slots","useSlots","hasSlot","useHasSlot","emit","__emit","props","__props","t","useI18n","isTipVariant","computed","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkCircleFillIcon","WarningFilledIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","onMounted"],"mappings":";;;;;;;;;;;;AAGO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAULE,IAAA,kBAAAC,OACHA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;ACdR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;mBAZZC,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;gFAFzHC,EAAA,IAAA,EAAA;AAAA;MAE4M,aAAA,+CAAAD,EAAA,OAAA;AAAA;;QAA4E,MAAA;AAAA,QAAe,aAAA;AAAA,QAAoB,GAAA;AAAA,QAAwyE,aAAA;AAAA;IAFnmF,IAAA,GAAAL,CAAA;AAAA;;QAE6oF,IAAA,0CAAAK,EAAA;AAAA;;UAA0D,OAAA;AAAA,UAAW,QAAA;AAAA,UAAY,MAAA;AAAA;MAF9tF,IAAA,GAAAJ,CAAA;AAAA;;;;;;;;;;;GCqKIM,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;AApGA,UAAAC,IAAAC,EAAA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.vue","../../../vue2/src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#001222\" fill-rule=\"evenodd\" d=\"M5.03418 0.839544C6.45015 0.253058 8.00853 0.0992122 9.51172 0.398138C11.015 0.697159 12.3966 1.43547 13.4805 2.51923C14.5642 3.60301 15.3025 4.98476 15.6016 6.48798C15.9005 7.99113 15.7466 9.54958 15.1602 10.9655C14.5736 12.3816 13.5801 13.5925 12.3057 14.444C11.1109 15.2423 9.71924 15.6917 8.28711 15.7448L8 15.7497C5.94458 15.7497 3.97294 14.9336 2.51953 13.4802C1.06623 12.0268 0.250005 10.055 0.25 7.9997C0.250066 6.4671 0.70424 4.96838 1.55566 3.69404C2.40724 2.41967 3.61814 1.42609 5.03418 0.839544ZM6.25 6.2497V7.7497H7.25V10.2497H6.25V11.7497H9.75V10.2497H8.75V6.2497H6.25ZM7.75 3.4997C7.58674 3.4997 7.42763 3.54211 7.28418 3.61786C7.25386 3.63389 7.22303 3.64949 7.19434 3.66865L7.07812 3.75947C7.04744 3.78732 7.01817 3.817 6.99121 3.84833C6.97917 3.86236 6.96827 3.8776 6.95703 3.89228C6.93942 3.91522 6.9228 3.93915 6.90723 3.96357C6.90005 3.97485 6.89248 3.98618 6.88574 3.99775C6.86351 4.03594 6.84324 4.07574 6.82617 4.11689L6.78027 4.25751C6.77017 4.29795 6.7628 4.33927 6.75781 4.38056C6.75552 4.39961 6.75411 4.41902 6.75293 4.43818C6.75166 4.45856 6.75196 4.47926 6.75195 4.4997C6.75195 4.52207 6.75144 4.54472 6.75293 4.56708C6.75579 4.60979 6.76114 4.65273 6.76953 4.69501L6.80859 4.83661C6.82299 4.87685 6.84098 4.91584 6.86035 4.9538C6.86847 4.96971 6.87775 4.98522 6.88672 5.00068C6.89748 5.01922 6.90895 5.03753 6.9209 5.05536C6.93323 5.07376 6.94544 5.09248 6.95898 5.11005C6.98495 5.14371 7.01269 5.17643 7.04297 5.20673L7.1543 5.30341C7.19021 5.33003 7.2285 5.35325 7.26758 5.3747C7.27775 5.38031 7.28847 5.38508 7.29883 5.39033C7.32903 5.40554 7.35995 5.41924 7.3916 5.43134C7.40264 5.43559 7.41361 5.44018 7.4248 5.44404C7.46721 5.45855 7.51041 5.47134 7.55469 5.48017C7.59672 5.48853 7.63919 5.49291 7.68164 5.49579C7.70021 5.49707 7.71872 5.49751 7.7373 5.49775C7.76179 5.49804 7.78614 5.49729 7.81055 5.49579C7.82982 5.49462 7.84899 5.4932 7.86816 5.49091C7.90982 5.48592 7.95139 5.47962 7.99219 5.46943L8.13281 5.42353C8.1739 5.40649 8.21283 5.38517 8.25098 5.36298C8.2626 5.35623 8.27383 5.3487 8.28516 5.3415C8.30964 5.32589 8.33345 5.30934 8.35645 5.29169C8.37116 5.28043 8.38633 5.26958 8.40039 5.25751C8.43176 5.23053 8.46235 5.20229 8.49023 5.17158L8.58105 5.05536C8.69084 4.89096 8.75 4.6974 8.75 4.4997C8.74992 4.2346 8.64449 3.98013 8.45703 3.79267C8.26951 3.60523 8.01514 3.4997 7.75 3.4997Z\" clip-rule=\"evenodd\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits event when the alert is closed. `closeButton` must be `true`\n */\n (e: 'close-alert');\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Adds a close button on the right side of the alert\n */\n closeButton?: boolean;\n\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values HIGHLIGHT, SUCCESS, CRITICAL, WARNING\n */\n type?: BentoAlertTypeOption | `${BentoAlertTypeOption}`;\n\n /**\n * Variant for the alert\n * @values DEFAULT, TIP\n */\n variant?: BentoAlertVariant | `${BentoAlertVariant}`;\n }>(),\n {\n closeButton: false,\n type: BentoAlertTypeOption.HIGHLIGHT,\n variant: BentoAlertVariant.DEFAULT,\n }\n );\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","messages","slots","useSlots","hasSlot","useHasSlot","emit","__emit","props","__props","t","useI18n","isTipVariant","computed","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkCircleFillIcon","WarningFilledIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","onMounted"],"mappings":";;;;;;;;;;;;AAGO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQLE,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAULE,IAAA,kBAAAC,OACHA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;ACdR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;mBAZZC,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,E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,EAAA,OAAA;AAAA,MAA8C,IAAAS,EAAA;AAAA,MACf,SAAAV,EAAA,QAAAW,EAAA,UAAAA,EAAA;AAAA,MAC2D,MAAA;AAAA,IAChF,EAAA,GAGVC,IAAAX,EAAA,MAAAL,EAAA,SAAApB,EAAA,YAAA,WAAA,OAAA,GAEAqC,IAAA,MAAA;AACI,MAAAnB,EAAAhB,EAAA,WAAA;AAAA,IAAgC;AAGpC,WAAAoC,EAAA,MAAA;AACI,UAAA,CAAAxB,EAAA,WAAA,CAAAA,EAAA;AACI,cAAA,IAAA,MAAA,mDAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { defineComponent as R, ref as S, computed as h, watch as y, openBlock as g, createElementBlock as x, Fragment as $, renderList as K, createVNode as I, withKeys as C, withModifiers as j, normalizeClass as V, withCtx as w, createTextVNode as D, toDisplayString as E, watchEffect as L, toRef as z, createElementVNode as B, unref as b, renderSlot as H, createCommentVNode as J } from "vue";
|
|
2
|
+
import { f as O, d as W, u as P, g as U, t as A, h as G, r as X } from "./index.DDwcHPb6.js";
|
|
3
|
+
import { p as M, B as Y } from "./typography.B3J6_tYk.js";
|
|
4
|
+
import { u as q } from "./index.B875RXHM.js";
|
|
5
|
+
import { g as Q } from "./generate-uid.DBWe4g6T.js";
|
|
6
|
+
import { u as T } from "./utils.DWmc2mUI.js";
|
|
7
|
+
import { F as Z } from "./fixed-scroller.yVsaQzy5.js";
|
|
8
|
+
import { B as ee } from "./button.DWF7FSIw.js";
|
|
9
|
+
import { _ as N } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
+
import "../assets/anchor-scroller.css";
|
|
11
|
+
const te = /* @__PURE__ */ R({
|
|
12
|
+
__name: "anchor-scroller-list",
|
|
13
|
+
props: {
|
|
14
|
+
activeIndex: { default: void 0 },
|
|
15
|
+
items: {},
|
|
16
|
+
scrollOffset: { default: void 0 }
|
|
17
|
+
},
|
|
18
|
+
setup(v) {
|
|
19
|
+
const l = v, c = S([]), i = h(
|
|
20
|
+
() => l.items.map((e, a) => ({ disabled: e.disabled, originalIndex: a })).filter(({ disabled: e }) => !e).map(({ originalIndex: e }) => e)
|
|
21
|
+
), {
|
|
22
|
+
state: u,
|
|
23
|
+
next: f,
|
|
24
|
+
prev: d
|
|
25
|
+
} = O(i, {
|
|
26
|
+
initialValue: l.activeIndex ?? i.value[0]
|
|
27
|
+
});
|
|
28
|
+
y(u, async (e) => {
|
|
29
|
+
const a = c.value[e], o = T(a);
|
|
30
|
+
o && typeof o.focus == "function" && o.focus();
|
|
31
|
+
});
|
|
32
|
+
const s = (e, a) => {
|
|
33
|
+
if (a)
|
|
34
|
+
return;
|
|
35
|
+
const o = T(e);
|
|
36
|
+
if (!o) {
|
|
37
|
+
M("[bento-anchor-scroller] element ref not found");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (!o.style.scrollMarginTop && l.scrollOffset) {
|
|
41
|
+
const r = window.getComputedStyle(o).scrollMarginTop;
|
|
42
|
+
(r === "0px" || r === "") && (o.style.scrollMarginTop = `${l.scrollOffset}px`);
|
|
43
|
+
}
|
|
44
|
+
o.hasAttribute("tabindex") || o.setAttribute("tabindex", "-1"), o.scrollIntoView({
|
|
45
|
+
behavior: "smooth",
|
|
46
|
+
block: "start",
|
|
47
|
+
inline: "nearest"
|
|
48
|
+
}), o.focus({ preventScroll: !0 });
|
|
49
|
+
}, _ = (e) => {
|
|
50
|
+
switch (e.key) {
|
|
51
|
+
case "ArrowRight":
|
|
52
|
+
e.preventDefault(), f();
|
|
53
|
+
break;
|
|
54
|
+
case "ArrowLeft":
|
|
55
|
+
e.preventDefault(), d();
|
|
56
|
+
break;
|
|
57
|
+
case "Home":
|
|
58
|
+
e.preventDefault(), u.value = 0;
|
|
59
|
+
break;
|
|
60
|
+
case "End":
|
|
61
|
+
e.preventDefault(), u.value = i.value.length - 1;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return (e, a) => (g(), x("ul", {
|
|
66
|
+
class: "b-anchor-scroller-list",
|
|
67
|
+
onKeydown: _
|
|
68
|
+
}, [
|
|
69
|
+
(g(!0), x($, null, K(e.items, ({ title: o, disabled: r, elementRef: m }, n) => (g(), x("li", {
|
|
70
|
+
key: n,
|
|
71
|
+
class: "b-anchor-scroller-list__item"
|
|
72
|
+
}, [
|
|
73
|
+
I(ee, {
|
|
74
|
+
ref_for: !0,
|
|
75
|
+
ref_key: "listItemRefs",
|
|
76
|
+
ref: c,
|
|
77
|
+
"aria-current": e.activeIndex === n ? "location" : null,
|
|
78
|
+
class: V(["b-anchor-scroller-list__item-button", {
|
|
79
|
+
"b-anchor-scroller-list__item-button--active": e.activeIndex === n,
|
|
80
|
+
"b-anchor-scroller-list__item-button--disabled": r
|
|
81
|
+
}]),
|
|
82
|
+
"aria-disabled": r,
|
|
83
|
+
tabindex: e.activeIndex === n ? null : "-1",
|
|
84
|
+
variant: "tertiary-with-background",
|
|
85
|
+
onClick: (p) => s(m, r),
|
|
86
|
+
onKeydown: [
|
|
87
|
+
C(j((p) => s(m, r), ["prevent"]), ["space", "native"]),
|
|
88
|
+
C(j((p) => s(m, r), ["prevent"]), ["enter", "native"])
|
|
89
|
+
]
|
|
90
|
+
}, {
|
|
91
|
+
default: w(() => [
|
|
92
|
+
D(E(o), 1)
|
|
93
|
+
]),
|
|
94
|
+
_: 2
|
|
95
|
+
}, 1032, ["aria-current", "class", "aria-disabled", "tabindex", "onClick", "onKeydown"])
|
|
96
|
+
]))), 128))
|
|
97
|
+
], 32));
|
|
98
|
+
}
|
|
99
|
+
}), oe = /* @__PURE__ */ N(te, [["__scopeId", "data-v-03d99bd8"]]), F = {
|
|
100
|
+
"de-DE": { jumpTo: "Springe zu" },
|
|
101
|
+
"en-GB": { jumpTo: "Jump to" },
|
|
102
|
+
"en-US": { jumpTo: "Jump to" },
|
|
103
|
+
"es-ES": { jumpTo: "Saltar a" },
|
|
104
|
+
"es-MX": { jumpTo: "Saltar a" },
|
|
105
|
+
"fr-FR": { jumpTo: "Passer à" },
|
|
106
|
+
"it-IT": { jumpTo: "Vai a" },
|
|
107
|
+
"ja-JP": { jumpTo: "移動先" },
|
|
108
|
+
"pt-BR": { jumpTo: "Ir para" },
|
|
109
|
+
"zh-CN": { jumpTo: "跳转到" }
|
|
110
|
+
}, ne = (v, l) => {
|
|
111
|
+
const c = S(l.default?.value ?? -1), { y: i } = W(), { height: u } = P(), f = () => {
|
|
112
|
+
const d = A(v), s = u.value, _ = s / 2;
|
|
113
|
+
let e = -1, a = 0;
|
|
114
|
+
for (let o = 0; o < d.length; o++) {
|
|
115
|
+
const m = d[o];
|
|
116
|
+
if (!m)
|
|
117
|
+
continue;
|
|
118
|
+
const n = m.getBoundingClientRect();
|
|
119
|
+
if (n.top > _)
|
|
120
|
+
continue;
|
|
121
|
+
const p = Math.min(n.bottom, s) - Math.max(n.top, 0);
|
|
122
|
+
if (p <= 0)
|
|
123
|
+
continue;
|
|
124
|
+
const t = p / n.height;
|
|
125
|
+
t > a && (a = t, e = o);
|
|
126
|
+
}
|
|
127
|
+
e !== -1 && c.value !== e && (c.value = e);
|
|
128
|
+
};
|
|
129
|
+
return U([i, u], f, { throttle: 100, trailing: !0 }), L(() => {
|
|
130
|
+
A(v).length && f();
|
|
131
|
+
}), {
|
|
132
|
+
activeIndex: c
|
|
133
|
+
};
|
|
134
|
+
}, ae = {
|
|
135
|
+
key: 0,
|
|
136
|
+
class: "b-anchor-scroller"
|
|
137
|
+
}, re = ["aria-labelledby"], ie = { class: "b-anchor-scroller__navigation-panel" }, se = {
|
|
138
|
+
i18n: { messages: F },
|
|
139
|
+
name: "bento-anchor-scroller"
|
|
140
|
+
}, le = /* @__PURE__ */ R({
|
|
141
|
+
...se,
|
|
142
|
+
props: {
|
|
143
|
+
activeIndex: { default: void 0 },
|
|
144
|
+
items: {}
|
|
145
|
+
},
|
|
146
|
+
emits: ["update:active-index"],
|
|
147
|
+
setup(v, { emit: l }) {
|
|
148
|
+
const { t: c } = q({ messages: F }), i = v, u = l, f = S(null), d = h(() => i.items.map((t) => ({ ...t }))), s = h(
|
|
149
|
+
() => i.items.map((t, k) => ({
|
|
150
|
+
element: T(t.elementRef),
|
|
151
|
+
originalIndex: k,
|
|
152
|
+
disabled: t.disabled
|
|
153
|
+
})).filter(
|
|
154
|
+
(t) => !t.disabled && !!t.element
|
|
155
|
+
)
|
|
156
|
+
), { top: _, bottom: e } = G(f), a = h(() => s.value.map((t) => t.element)), o = h(() => ({
|
|
157
|
+
"b-anchor-scroller__navigation--pinned": _.value <= 1
|
|
158
|
+
})), { activeIndex: r } = ne(a, {
|
|
159
|
+
default: z(i, "activeIndex")
|
|
160
|
+
}), m = X(r, 200), n = h(() => {
|
|
161
|
+
const t = s.value[m.value];
|
|
162
|
+
return t ? t.originalIndex : 0;
|
|
163
|
+
});
|
|
164
|
+
y(n, (t) => {
|
|
165
|
+
Number.isFinite(t) && u("update:active-index", t);
|
|
166
|
+
}), y(
|
|
167
|
+
() => i.activeIndex,
|
|
168
|
+
(t) => {
|
|
169
|
+
Number.isFinite(t) && d.value[t].disabled && M("[bento-anchor-scroller] activeIndex should not be a disabled item");
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
const p = Q("bento-anchor-scroller-label");
|
|
173
|
+
return (t, k) => d.value.length ? (g(), x("div", ae, [
|
|
174
|
+
B("nav", {
|
|
175
|
+
ref_key: "navigationRef",
|
|
176
|
+
ref: f,
|
|
177
|
+
class: V(["b-anchor-scroller__navigation", o.value]),
|
|
178
|
+
"aria-labelledby": b(p)
|
|
179
|
+
}, [
|
|
180
|
+
I(b(Z), {
|
|
181
|
+
condensed: "",
|
|
182
|
+
centered: ""
|
|
183
|
+
}, {
|
|
184
|
+
default: w(() => [
|
|
185
|
+
B("div", ie, [
|
|
186
|
+
I(Y, {
|
|
187
|
+
id: b(p),
|
|
188
|
+
el: "span",
|
|
189
|
+
class: "b-anchor-scroller__navigation-panel-label",
|
|
190
|
+
stronger: ""
|
|
191
|
+
}, {
|
|
192
|
+
default: w(() => [
|
|
193
|
+
D(E(b(c)("jumpTo")), 1)
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["id"]),
|
|
197
|
+
I(b(oe), {
|
|
198
|
+
items: d.value,
|
|
199
|
+
"active-index": n.value,
|
|
200
|
+
"scroll-offset": b(e)
|
|
201
|
+
}, null, 8, ["items", "active-index", "scroll-offset"])
|
|
202
|
+
])
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
})
|
|
206
|
+
], 10, re),
|
|
207
|
+
H(t.$slots, "default", {}, void 0, !0)
|
|
208
|
+
])) : J("", !0);
|
|
209
|
+
}
|
|
210
|
+
}), _e = /* @__PURE__ */ N(le, [["__scopeId", "data-v-9e21fa07"]]);
|
|
211
|
+
export {
|
|
212
|
+
_e as a
|
|
213
|
+
};
|
|
214
|
+
//# sourceMappingURL=anchor-scroller.DSfXK6vK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-scroller.NhjLDBZI.js","sources":["../../../vue2/src/components/anchor-scroller/components/anchor-scroller-list/anchor-scroller-list.vue","../../../vue2/src/components/anchor-scroller/composables/use-scroll-spy/use-scroll-spy.ts","../../../vue2/src/components/anchor-scroller/anchor-scroller.vue"],"sourcesContent":["<template>\n <ul class=\"b-anchor-scroller-list\" @keydown=\"onKeydownNavigation\">\n <li v-for=\"({ title, disabled, elementRef }, index) in items\" :key=\"index\" class=\"b-anchor-scroller-list__item\">\n <bento-button\n ref=\"listItemRefs\"\n :aria-current=\"activeIndex === index ? 'location' : null\"\n class=\"b-anchor-scroller-list__item-button\"\n :class=\"{\n 'b-anchor-scroller-list__item-button--active': activeIndex === index,\n 'b-anchor-scroller-list__item-button--disabled': disabled,\n }\"\n :aria-disabled=\"disabled\"\n :tabindex=\"activeIndex === index ? null : '-1'\"\n variant=\"tertiary-with-background\"\n @click=\"scrollToSection(elementRef, disabled)\"\n @keydown.space.native.prevent=\"scrollToSection(elementRef, disabled)\"\n @keydown.enter.native.prevent=\"scrollToSection(elementRef, disabled)\"\n >\n {{ title }}\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import BentoButton from '@/components/button/button.vue';\n import { unrefElement } from '@/directives/click-outside/utils';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { type BentoAnchorScrollerItem } from '../../anchor-scroller.types';\n import { type AnchorScrollerListProps } from './anchor-scroller-list.types';\n import { computed, ref, watch } from 'vue';\n import { useCycleList } from '@vueuse/core';\n\n const props = withDefaults(defineProps<AnchorScrollerListProps>(), {\n activeIndex: undefined,\n scrollOffset: undefined,\n });\n\n const listItemRefs = ref([]);\n const listIndices = computed(() =>\n props.items\n .map((item, index) => ({ disabled: item.disabled, originalIndex: index }))\n .filter(({ disabled }) => !disabled)\n .map(({ originalIndex }) => originalIndex)\n );\n\n const {\n state: focusedIndex,\n next,\n prev,\n } = useCycleList(listIndices, {\n initialValue: props.activeIndex ?? listIndices.value[0],\n });\n\n watch(focusedIndex, async newIndex => {\n const targetComponent = listItemRefs.value[newIndex];\n const el = unrefElement(targetComponent); // Handles Component or DOM node\n\n if (el && typeof el.focus === 'function') {\n el.focus();\n }\n });\n\n const scrollToSection = (elementRef: BentoAnchorScrollerItem['elementRef'], disabled?: boolean) => {\n if (disabled) {\n return;\n }\n\n const el = unrefElement(elementRef);\n\n if (!el) {\n printDevelopmentWarning(`[bento-anchor-scroller] element ref not found`);\n return;\n }\n\n if (!el.style.scrollMarginTop && props.scrollOffset) {\n const currentScrollMargin = window.getComputedStyle(el).scrollMarginTop;\n\n if (currentScrollMargin === '0px' || currentScrollMargin === '') {\n el.style.scrollMarginTop = `${props.scrollOffset}px`;\n }\n }\n\n if (!el.hasAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1');\n }\n\n el.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n\n el.focus({ preventScroll: true });\n };\n\n const onKeydownNavigation = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowRight':\n e.preventDefault();\n next();\n break;\n case 'ArrowLeft':\n e.preventDefault();\n prev();\n break;\n case 'Home':\n e.preventDefault();\n focusedIndex.value = 0;\n break;\n case 'End':\n e.preventDefault();\n focusedIndex.value = listIndices.value.length - 1;\n break;\n }\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller-list.scss\" />\n","import { type Ref, ref, watchEffect } from 'vue';\nimport { type MaybeRef, toValue, useWindowScroll, useWindowSize, watchThrottled } from '@vueuse/core';\n\n/**\n * Options for the useScrollSpy composable.\n */\nexport interface useScrollSpyOptions {\n /**\n * The default active index to use when no item is active or initially.\n */\n default?: Ref<number>;\n}\n\n/**\n * Composable to spy on scroll position and determine the active item based on visibility.\n *\n * @param items - The list of elements to spy on.\n * @param options - Configuration options for the scroll spy.\n * @returns An object containing the active index.\n */\nexport const useScrollSpy = (items: MaybeRef<Array<Element>>, options: useScrollSpyOptions) => {\n const activeIndex = ref(options.default?.value ?? -1);\n\n const { y: scrollY } = useWindowScroll();\n const { height: windowHeight } = useWindowSize();\n\n // Logic to find the \"winner\" when there are multiple items on the same page\n const calculateActiveIndex = () => {\n const list = toValue(items);\n const viewportHeight = windowHeight.value;\n const midpoint = viewportHeight / 2;\n\n let winnerIndex = -1;\n let maxVisibleRatio = 0;\n\n for (let i = 0; i < list.length; i++) {\n const item = list[i];\n const el = item;\n\n if (!el) {\n continue;\n }\n\n const rect = el.getBoundingClientRect();\n\n // Constraint 1: Must pass midpoint\n if (rect.top > midpoint) {\n continue;\n }\n\n // Constraint 2: Must be visible\n const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);\n if (visibleHeight <= 0) {\n continue;\n }\n\n // Constraint 3: Highest visible % wins\n const ratio = visibleHeight / rect.height;\n\n if (ratio > maxVisibleRatio) {\n maxVisibleRatio = ratio;\n winnerIndex = i;\n }\n }\n\n // Only update if changed to avoid unnecessary patch triggers\n if (winnerIndex !== -1 && activeIndex.value !== winnerIndex) {\n activeIndex.value = winnerIndex;\n }\n };\n\n watchThrottled([scrollY, windowHeight], calculateActiveIndex, { throttle: 100, trailing: true });\n\n watchEffect(() => {\n if (toValue(items).length) {\n calculateActiveIndex();\n }\n });\n\n return {\n activeIndex,\n };\n};\n","<template>\n <div v-if=\"computedItems.length\" class=\"b-anchor-scroller\">\n <nav\n ref=\"navigationRef\"\n class=\"b-anchor-scroller__navigation\"\n :class=\"navigationConditionalClasses\"\n :aria-labelledby=\"navLabelId\"\n >\n <fixed-scroller condensed centered>\n <div class=\"b-anchor-scroller__navigation-panel\">\n <bento-typography\n :id=\"navLabelId\"\n el=\"span\"\n class=\"b-anchor-scroller__navigation-panel-label\"\n stronger\n >\n {{ t('jumpTo') }}\n </bento-typography>\n\n <anchor-scroller-list\n :items=\"computedItems\"\n :active-index=\"currentActiveIndex\"\n :scroll-offset=\"bottom\"\n />\n </div>\n </fixed-scroller>\n </nav>\n\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { refDebounced, useElementBounding } from '@vueuse/core';\n import BentoTypography from '@/components/typography/typography.vue';\n import { FixedScroller } from '@/internal';\n import { type BentoAnchorScrollerItem, type BentoAnchorScrollerProps } from './anchor-scroller.types';\n import { AnchorScrollerList } from './components/anchor-scroller-list';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { unrefElement } from '@/directives/click-outside/utils';\n import messages from './messages.json';\n import { useScrollSpy } from './composables';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoAnchorScrollerProps>(), {\n activeIndex: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when the active index is changed\n */\n (e: 'update:active-index', value: number): void;\n }>();\n\n const navigationRef = ref(null);\n\n const computedItems = computed<Array<BentoAnchorScrollerItem>>(() => props.items.map(item => ({ ...item })));\n\n // Skip and cache only items that are enabled\n const enabledItems = computed(() =>\n props.items\n .map((item, originalIndex) => ({\n element: unrefElement(item.elementRef),\n originalIndex,\n disabled: item.disabled,\n }))\n .filter(\n (item): item is { element: Element; originalIndex: number; disabled: boolean } =>\n !item.disabled && !!item.element\n )\n );\n\n const { top, bottom } = useElementBounding(navigationRef);\n\n // Extract strictly the elements for the ScrollSpy to watch\n const scrollToTargets = computed(() => enabledItems.value.map(c => c.element));\n\n const navigationConditionalClasses = computed(() => ({\n 'b-anchor-scroller__navigation--pinned': top.value <= 1,\n }));\n\n const { activeIndex: relativeActiveIndex } = useScrollSpy(scrollToTargets, {\n default: toRef(props, 'activeIndex'),\n });\n\n const debouncedActiveIndex = refDebounced(relativeActiveIndex, 200);\n\n const currentActiveIndex = computed(() => {\n const candidate = enabledItems.value[debouncedActiveIndex.value];\n\n return candidate ? candidate.originalIndex : 0;\n });\n\n watch(currentActiveIndex, val => {\n if (Number.isFinite(val)) {\n emit('update:active-index', val);\n }\n });\n\n watch(\n () => props.activeIndex,\n val => {\n if (Number.isFinite(val) && computedItems.value[val].disabled) {\n printDevelopmentWarning(`[bento-anchor-scroller] activeIndex should not be a disabled item`);\n }\n }\n );\n\n const navLabelId = generateUid('bento-anchor-scroller-label');\n</script>\n\n<script lang=\"ts\">\n /**\n * A navigation component that tracks page scroll and allows jumping to sections.\n *\n * @example\n * import { BentoAnchorScroller } from '@adyen/bento-vue2';\n * import { ref } from 'vue';\n *\n * export default {\n * components: { BentoAnchorScroller },\n * template: `\n * <bento-anchor-scroller :items=\"items\">\n * <section ref=\"section1\">Section 1</section>\n * <section ref=\"section2\">Section 2</section>\n * </bento-anchor-scroller>\n * `,\n * setup() {\n * const section1 = ref(null);\n * const section2 = ref(null);\n * const items = ref([\n * { title: 'Section 1', elementRef: section1 },\n * { title: 'Section 2', elementRef: section2 },\n * ]);\n * return {\n * items,\n * section1,\n * section2,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-anchor-scroller',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller.scss\" />\n"],"names":["props","__props","listItemRefs","ref","listIndices","computed","item","index","disabled","originalIndex","focusedIndex","next","prev","useCycleList","watch","newIndex","targetComponent","el","unrefElement","scrollToSection","elementRef","printDevelopmentWarning","currentScrollMargin","onKeydownNavigation","useScrollSpy","items","options","activeIndex","scrollY","useWindowScroll","windowHeight","useWindowSize","calculateActiveIndex","list","toValue","viewportHeight","midpoint","winnerIndex","maxVisibleRatio","i","rect","visibleHeight","ratio","watchThrottled","watchEffect","__default__","messages","t","useI18n","emit","__emit","navigationRef","computedItems","enabledItems","top","bottom","useElementBounding","scrollToTargets","c","navigationConditionalClasses","relativeActiveIndex","toRef","debouncedActiveIndex","refDebounced","currentActiveIndex","candidate","val","navLabelId","generateUid"],"mappings":";;;;;;;;;;;;;;;;;;AAiCI,UAAAA,IAAAC,GAKAC,IAAAC,EAAA,CAAA,CAAA,GACAC,IAAAC;AAAA,MAAoB,MAAAL,EAAA,MAAA,IAAA,CAAAM,GAAAC,OAAA,EAAA,UAAAD,EAAA,UAAA,eAAAC,EAAA,EAAA,EAAA,OAAA,CAAA,EAAA,UAAAC,EAAA,MAAA,CAAAA,CAAA,EAAA,IAAA,CAAA,EAAA,eAAAC,EAAA,MAAAA,CAAA;AAAA,IAI6B,GAGjD;AAAA,MAAM,OAAAC;AAAA,MACK,MAAAC;AAAA,MACP,MAAAC;AAAA,IACA,IAAAC,EAAAT,GAAA;AAAA,MAC0B,cAAAJ,EAAA,eAAAI,EAAA,MAAA,CAAA;AAAA,IAC4B,CAAA;AAG1D,IAAAU,EAAAJ,GAAA,OAAAK,MAAA;AACI,YAAAC,IAAAd,EAAA,MAAAa,CAAA,GACAE,IAAAC,EAAAF,CAA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,QAElB,CAAAA,MAAA,CAAAA,EAAA,YAAA,CAAA,CAAAA,EAAA;AAAA,MAEgC;AAAA,IACjC,GAGR,EAAA,KAAAgD,GAAA,QAAAC,EAAA,IAAAC,EAAAL,CAAA,GAGAM,IAAApD,EAAA,MAAAgD,EAAA,MAAA,IAAA,CAAAK,MAAAA,EAAA,OAAA,CAAA,GAEAC,IAAAtD,EAAA,OAAA;AAAA,MAAqD,yCAAAiD,EAAA,SAAA;AAAA,IACK,EAAA,GAG1D,EAAA,aAAAM,EAAA,IAAApC,GAAAiC,GAAA;AAAA,MAA2E,SAAAI,EAAA7D,GAAA,aAAA;AAAA,IACpC,CAAA,GAGvC8D,IAAAC,EAAAH,GAAA,GAAA,GAEAI,IAAA3D,EAAA,MAAA;AACI,YAAA4D,IAAAZ,EAAA,MAAAS,EAAA,KAAA;AAEA,aAAAG,IAAAA,EAAA,gBAAA;AAAA,IAA6C,CAAA;AAGjD,IAAAnD,EAAAkD,GAAA,CAAAE,MAAA;AACI,MAAA,OAAA,SAAAA,CAAA,KACIjB,EAAA,uBAAAiB,CAAA;AAAA,IACJ,CAAA,GAGJpD;AAAA,MAAA,MAAAd,EAAA;AAAA,MACgB,CAAAkE,MAAA;AAER,QAAA,OAAA,SAAAA,CAAA,KAAAd,EAAA,MAAAc,CAAA,EAAA,YACI7C,EAAA,mEAAA;AAAA,MACJ;AAAA,IACJ;AAGJ,UAAA8C,IAAAC,EAAA,6BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"anchor-scroller.DSfXK6vK.js","sources":["../../../vue2/src/components/anchor-scroller/components/anchor-scroller-list/anchor-scroller-list.vue","../../../vue2/src/components/anchor-scroller/composables/use-scroll-spy/use-scroll-spy.ts","../../../vue2/src/components/anchor-scroller/anchor-scroller.vue"],"sourcesContent":["<template>\n <ul class=\"b-anchor-scroller-list\" @keydown=\"onKeydownNavigation\">\n <li v-for=\"({ title, disabled, elementRef }, index) in items\" :key=\"index\" class=\"b-anchor-scroller-list__item\">\n <bento-button\n ref=\"listItemRefs\"\n :aria-current=\"activeIndex === index ? 'location' : null\"\n class=\"b-anchor-scroller-list__item-button\"\n :class=\"{\n 'b-anchor-scroller-list__item-button--active': activeIndex === index,\n 'b-anchor-scroller-list__item-button--disabled': disabled,\n }\"\n :aria-disabled=\"disabled\"\n :tabindex=\"activeIndex === index ? null : '-1'\"\n variant=\"tertiary-with-background\"\n @click=\"scrollToSection(elementRef, disabled)\"\n @keydown.space.native.prevent=\"scrollToSection(elementRef, disabled)\"\n @keydown.enter.native.prevent=\"scrollToSection(elementRef, disabled)\"\n >\n {{ title }}\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import BentoButton from '@/components/button/button.vue';\n import { unrefElement } from '@/directives/click-outside/utils';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { type BentoAnchorScrollerItem } from '../../anchor-scroller.types';\n import { type AnchorScrollerListProps } from './anchor-scroller-list.types';\n import { computed, ref, watch } from 'vue';\n import { useCycleList } from '@vueuse/core';\n\n const props = withDefaults(defineProps<AnchorScrollerListProps>(), {\n activeIndex: undefined,\n scrollOffset: undefined,\n });\n\n const listItemRefs = ref([]);\n const listIndices = computed(() =>\n props.items\n .map((item, index) => ({ disabled: item.disabled, originalIndex: index }))\n .filter(({ disabled }) => !disabled)\n .map(({ originalIndex }) => originalIndex)\n );\n\n const {\n state: focusedIndex,\n next,\n prev,\n } = useCycleList(listIndices, {\n initialValue: props.activeIndex ?? listIndices.value[0],\n });\n\n watch(focusedIndex, async newIndex => {\n const targetComponent = listItemRefs.value[newIndex];\n const el = unrefElement(targetComponent); // Handles Component or DOM node\n\n if (el && typeof el.focus === 'function') {\n el.focus();\n }\n });\n\n const scrollToSection = (elementRef: BentoAnchorScrollerItem['elementRef'], disabled?: boolean) => {\n if (disabled) {\n return;\n }\n\n const el = unrefElement(elementRef);\n\n if (!el) {\n printDevelopmentWarning(`[bento-anchor-scroller] element ref not found`);\n return;\n }\n\n if (!el.style.scrollMarginTop && props.scrollOffset) {\n const currentScrollMargin = window.getComputedStyle(el).scrollMarginTop;\n\n if (currentScrollMargin === '0px' || currentScrollMargin === '') {\n el.style.scrollMarginTop = `${props.scrollOffset}px`;\n }\n }\n\n if (!el.hasAttribute('tabindex')) {\n el.setAttribute('tabindex', '-1');\n }\n\n el.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'nearest',\n });\n\n el.focus({ preventScroll: true });\n };\n\n const onKeydownNavigation = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowRight':\n e.preventDefault();\n next();\n break;\n case 'ArrowLeft':\n e.preventDefault();\n prev();\n break;\n case 'Home':\n e.preventDefault();\n focusedIndex.value = 0;\n break;\n case 'End':\n e.preventDefault();\n focusedIndex.value = listIndices.value.length - 1;\n break;\n }\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller-list.scss\" />\n","import { type Ref, ref, watchEffect } from 'vue';\nimport { type MaybeRef, toValue, useWindowScroll, useWindowSize, watchThrottled } from '@vueuse/core';\n\n/**\n * Options for the useScrollSpy composable.\n */\nexport interface useScrollSpyOptions {\n /**\n * The default active index to use when no item is active or initially.\n */\n default?: Ref<number>;\n}\n\n/**\n * Composable to spy on scroll position and determine the active item based on visibility.\n *\n * @param items - The list of elements to spy on.\n * @param options - Configuration options for the scroll spy.\n * @returns An object containing the active index.\n */\nexport const useScrollSpy = (items: MaybeRef<Array<Element>>, options: useScrollSpyOptions) => {\n const activeIndex = ref(options.default?.value ?? -1);\n\n const { y: scrollY } = useWindowScroll();\n const { height: windowHeight } = useWindowSize();\n\n // Logic to find the \"winner\" when there are multiple items on the same page\n const calculateActiveIndex = () => {\n const list = toValue(items);\n const viewportHeight = windowHeight.value;\n const midpoint = viewportHeight / 2;\n\n let winnerIndex = -1;\n let maxVisibleRatio = 0;\n\n for (let i = 0; i < list.length; i++) {\n const item = list[i];\n const el = item;\n\n if (!el) {\n continue;\n }\n\n const rect = el.getBoundingClientRect();\n\n // Constraint 1: Must pass midpoint\n if (rect.top > midpoint) {\n continue;\n }\n\n // Constraint 2: Must be visible\n const visibleHeight = Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0);\n if (visibleHeight <= 0) {\n continue;\n }\n\n // Constraint 3: Highest visible % wins\n const ratio = visibleHeight / rect.height;\n\n if (ratio > maxVisibleRatio) {\n maxVisibleRatio = ratio;\n winnerIndex = i;\n }\n }\n\n // Only update if changed to avoid unnecessary patch triggers\n if (winnerIndex !== -1 && activeIndex.value !== winnerIndex) {\n activeIndex.value = winnerIndex;\n }\n };\n\n watchThrottled([scrollY, windowHeight], calculateActiveIndex, { throttle: 100, trailing: true });\n\n watchEffect(() => {\n if (toValue(items).length) {\n calculateActiveIndex();\n }\n });\n\n return {\n activeIndex,\n };\n};\n","<template>\n <div v-if=\"computedItems.length\" class=\"b-anchor-scroller\">\n <nav\n ref=\"navigationRef\"\n class=\"b-anchor-scroller__navigation\"\n :class=\"navigationConditionalClasses\"\n :aria-labelledby=\"navLabelId\"\n >\n <fixed-scroller condensed centered>\n <div class=\"b-anchor-scroller__navigation-panel\">\n <bento-typography\n :id=\"navLabelId\"\n el=\"span\"\n class=\"b-anchor-scroller__navigation-panel-label\"\n stronger\n >\n {{ t('jumpTo') }}\n </bento-typography>\n\n <anchor-scroller-list\n :items=\"computedItems\"\n :active-index=\"currentActiveIndex\"\n :scroll-offset=\"bottom\"\n />\n </div>\n </fixed-scroller>\n </nav>\n\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { refDebounced, useElementBounding } from '@vueuse/core';\n import BentoTypography from '@/components/typography/typography.vue';\n import { FixedScroller } from '@/internal';\n import { type BentoAnchorScrollerItem, type BentoAnchorScrollerProps } from './anchor-scroller.types';\n import { AnchorScrollerList } from './components/anchor-scroller-list';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import { unrefElement } from '@/directives/click-outside/utils';\n import messages from './messages.json';\n import { useScrollSpy } from './composables';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = withDefaults(defineProps<BentoAnchorScrollerProps>(), {\n activeIndex: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when the active index is changed\n */\n (e: 'update:active-index', value: number): void;\n }>();\n\n const navigationRef = ref(null);\n\n const computedItems = computed<Array<BentoAnchorScrollerItem>>(() => props.items.map(item => ({ ...item })));\n\n // Skip and cache only items that are enabled\n const enabledItems = computed(() =>\n props.items\n .map((item, originalIndex) => ({\n element: unrefElement(item.elementRef),\n originalIndex,\n disabled: item.disabled,\n }))\n .filter(\n (item): item is { element: Element; originalIndex: number; disabled: boolean } =>\n !item.disabled && !!item.element\n )\n );\n\n const { top, bottom } = useElementBounding(navigationRef);\n\n // Extract strictly the elements for the ScrollSpy to watch\n const scrollToTargets = computed(() => enabledItems.value.map(c => c.element));\n\n const navigationConditionalClasses = computed(() => ({\n 'b-anchor-scroller__navigation--pinned': top.value <= 1,\n }));\n\n const { activeIndex: relativeActiveIndex } = useScrollSpy(scrollToTargets, {\n default: toRef(props, 'activeIndex'),\n });\n\n const debouncedActiveIndex = refDebounced(relativeActiveIndex, 200);\n\n const currentActiveIndex = computed(() => {\n const candidate = enabledItems.value[debouncedActiveIndex.value];\n\n return candidate ? candidate.originalIndex : 0;\n });\n\n watch(currentActiveIndex, val => {\n if (Number.isFinite(val)) {\n emit('update:active-index', val);\n }\n });\n\n watch(\n () => props.activeIndex,\n val => {\n if (Number.isFinite(val) && computedItems.value[val].disabled) {\n printDevelopmentWarning(`[bento-anchor-scroller] activeIndex should not be a disabled item`);\n }\n }\n );\n\n const navLabelId = generateUid('bento-anchor-scroller-label');\n</script>\n\n<script lang=\"ts\">\n /**\n * A navigation component that tracks page scroll and allows jumping to sections.\n *\n * @example\n * import { BentoAnchorScroller } from '@adyen/bento-vue2';\n * import { ref } from 'vue';\n *\n * export default {\n * components: { BentoAnchorScroller },\n * template: `\n * <bento-anchor-scroller :items=\"items\">\n * <section ref=\"section1\">Section 1</section>\n * <section ref=\"section2\">Section 2</section>\n * </bento-anchor-scroller>\n * `,\n * setup() {\n * const section1 = ref(null);\n * const section2 = ref(null);\n * const items = ref([\n * { title: 'Section 1', elementRef: section1 },\n * { title: 'Section 2', elementRef: section2 },\n * ]);\n * return {\n * items,\n * section1,\n * section2,\n * }\n * }\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-anchor-scroller',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./anchor-scroller.scss\" />\n"],"names":["props","__props","listItemRefs","ref","listIndices","computed","item","index","disabled","originalIndex","focusedIndex","next","prev","useCycleList","watch","newIndex","targetComponent","el","unrefElement","scrollToSection","elementRef","printDevelopmentWarning","currentScrollMargin","onKeydownNavigation","useScrollSpy","items","options","activeIndex","scrollY","useWindowScroll","windowHeight","useWindowSize","calculateActiveIndex","list","toValue","viewportHeight","midpoint","winnerIndex","maxVisibleRatio","i","rect","visibleHeight","ratio","watchThrottled","watchEffect","__default__","messages","t","useI18n","emit","__emit","navigationRef","computedItems","enabledItems","top","bottom","useElementBounding","scrollToTargets","c","navigationConditionalClasses","relativeActiveIndex","toRef","debouncedActiveIndex","refDebounced","currentActiveIndex","candidate","val","navLabelId","generateUid"],"mappings":";;;;;;;;;;;;;;;;;;AAiCI,UAAAA,IAAAC,GAKAC,IAAAC,EAAA,CAAA,CAAA,GACAC,IAAAC;AAAA,MAAoB,MAAAL,EAAA,MAAA,IAAA,CAAAM,GAAAC,OAAA,EAAA,UAAAD,EAAA,UAAA,eAAAC,EAAA,EAAA,EAAA,OAAA,CAAA,EAAA,UAAAC,EAAA,MAAA,CAAAA,CAAA,EAAA,IAAA,CAAA,EAAA,eAAAC,EAAA,MAAAA,CAAA;AAAA,IAI6B,GAGjD;AAAA,MAA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