@adyen/bento-vue2 1.56.2 → 1.57.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/index.d.ts +20 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.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/card.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/link.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -0
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js +7 -0
- package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +1 -0
- package/dist/chunks/{action-bar.c68S34TI.js → action-bar.nUvnRVwP.js} +6 -6
- package/dist/chunks/{action-bar.c68S34TI.js.map → action-bar.nUvnRVwP.js.map} +1 -1
- package/dist/chunks/{alert.D8qqrobi.js → alert.Du9NfW-V.js} +2 -2
- package/dist/chunks/{alert.D8qqrobi.js.map → alert.Du9NfW-V.js.map} +1 -1
- package/dist/chunks/{base-modal.B9JnRNty.js → base-modal.DdznUtgC.js} +20 -20
- package/dist/chunks/base-modal.DdznUtgC.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.DhPRdnSt.js → button-actions-with-menu.CDLJMdJh.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.DhPRdnSt.js.map → button-actions-with-menu.CDLJMdJh.js.map} +1 -1
- package/dist/chunks/{button-actions.ZBlB7bp4.js → button-actions.DUn_iPDm.js} +2 -2
- package/dist/chunks/{button-actions.ZBlB7bp4.js.map → button-actions.DUn_iPDm.js.map} +1 -1
- package/dist/chunks/{button.D7K0uXQm.js → button.BuD-IsW5.js} +2 -2
- package/dist/chunks/{button.D7K0uXQm.js.map → button.BuD-IsW5.js.map} +1 -1
- package/dist/chunks/{calendar.CiLR27-B.js → calendar.C0iatn5N.js} +39 -42
- package/dist/chunks/{calendar.CiLR27-B.js.map → calendar.C0iatn5N.js.map} +1 -1
- package/dist/chunks/{card.CZkqwnNe.js → card.BYUqSnBy.js} +2 -2
- package/dist/chunks/{card.CZkqwnNe.js.map → card.BYUqSnBy.js.map} +1 -1
- package/dist/chunks/{checkbox-group.COqNevz5.js → checkbox-group.HhNN-r-o.js} +4 -4
- package/dist/chunks/{checkbox-group.COqNevz5.js.map → checkbox-group.HhNN-r-o.js.map} +1 -1
- package/dist/chunks/{checkbox-input.CMhyJDdo.js → checkbox-input.Dr1GS2BZ.js} +53 -45
- package/dist/chunks/checkbox-input.Dr1GS2BZ.js.map +1 -0
- package/dist/chunks/{checkbox.LFeWM5p4.js → checkbox.CkaV8-b-.js} +4 -4
- package/dist/chunks/{checkbox.LFeWM5p4.js.map → checkbox.CkaV8-b-.js.map} +1 -1
- package/dist/chunks/{code-snippet.p15Tfobh.js → code-snippet.B1_T5Y4d.js} +5 -5
- package/dist/chunks/{code-snippet.p15Tfobh.js.map → code-snippet.B1_T5Y4d.js.map} +1 -1
- package/dist/chunks/{controls-group.B-JUz-ir.js → controls-group.CG5RvOSi.js} +2 -2
- package/dist/chunks/{controls-group.B-JUz-ir.js.map → controls-group.CG5RvOSi.js.map} +1 -1
- package/dist/chunks/{copy.JmRKnqLo.js → copy.MTsLLiC0.js} +4 -4
- package/dist/chunks/{copy.JmRKnqLo.js.map → copy.MTsLLiC0.js.map} +1 -1
- package/dist/chunks/{dashboard-section.DJ39VLp3.js → dashboard-section.DYk4LVm8.js} +4 -4
- package/dist/chunks/{dashboard-section.DJ39VLp3.js.map → dashboard-section.DYk4LVm8.js.map} +1 -1
- package/dist/chunks/{dashed-underline.D29Z776j.js → dashed-underline.lDp966e8.js} +3 -3
- package/dist/chunks/{dashed-underline.D29Z776j.js.map → dashed-underline.lDp966e8.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BrgmYdx9.js → data-grid-template.Dcnw2_Du.js} +3 -3
- package/dist/chunks/{data-grid-template.BrgmYdx9.js.map → data-grid-template.Dcnw2_Du.js.map} +1 -1
- package/dist/chunks/{data-grid.CX58NCuD.js → data-grid.BNgBYl3r.js} +20 -20
- package/dist/chunks/{data-grid.CX58NCuD.js.map → data-grid.BNgBYl3r.js.map} +1 -1
- package/dist/chunks/{date-picker.2shSM0mi.js → date-picker.S8ABQaHP.js} +15 -15
- package/dist/chunks/{date-picker.2shSM0mi.js.map → date-picker.S8ABQaHP.js.map} +1 -1
- package/dist/chunks/{date-range-picker.hAWOq77C.js → date-range-picker.CQNhNKK-.js} +24 -24
- package/dist/chunks/{date-range-picker.hAWOq77C.js.map → date-range-picker.CQNhNKK-.js.map} +1 -1
- package/dist/chunks/dialog-page.uGh0kYDL.js +131 -0
- package/dist/chunks/dialog-page.uGh0kYDL.js.map +1 -0
- package/dist/chunks/{dropdown-tag.D_LJJSDW.js → dropdown-tag.BiJvxp5n.js} +3 -3
- package/dist/chunks/{dropdown-tag.D_LJJSDW.js.map → dropdown-tag.BiJvxp5n.js.map} +1 -1
- package/dist/chunks/{dropdown.DfnKDRBQ.js → dropdown.Qc6K5BzU.js} +19 -19
- package/dist/chunks/{dropdown.DfnKDRBQ.js.map → dropdown.Qc6K5BzU.js.map} +1 -1
- package/dist/chunks/{empty-state.Z97lmDoK.js → empty-state.IvvHHQ35.js} +2 -2
- package/dist/chunks/{empty-state.Z97lmDoK.js.map → empty-state.IvvHHQ35.js.map} +1 -1
- package/dist/chunks/{error-message.7bsic_sK.js → error-message.JskAm-Td.js} +8 -8
- package/dist/chunks/error-message.JskAm-Td.js.map +1 -0
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.DtiNK2cF.js → file-uploader.DhOTdtfm.js} +6 -6
- package/dist/chunks/{file-uploader.DtiNK2cF.js.map → file-uploader.DhOTdtfm.js.map} +1 -1
- package/dist/chunks/{filter-bar.C3MsA2SC.js → filter-bar.BFAsFxQo.js} +19 -19
- package/dist/chunks/{filter-bar.C3MsA2SC.js.map → filter-bar.BFAsFxQo.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.BJh4fxeV.js → fixed-scroller.D0a6q8_i.js} +2 -2
- package/dist/chunks/{fixed-scroller.BJh4fxeV.js.map → fixed-scroller.D0a6q8_i.js.map} +1 -1
- package/dist/chunks/{focus-trap.DEHn1dxN.js → focus-trap.DiqwA-bw.js} +2 -2
- package/dist/chunks/{focus-trap.DEHn1dxN.js.map → focus-trap.DiqwA-bw.js.map} +1 -1
- package/dist/chunks/{footer-actions.Blk5X8z1.js → footer-actions.CWOEDPKJ.js} +3 -3
- package/dist/chunks/{footer-actions.Blk5X8z1.js.map → footer-actions.CWOEDPKJ.js.map} +1 -1
- package/dist/chunks/{form-layout-title.CbdwXVqj.js → form-layout-title.DBCY18f8.js} +2 -2
- package/dist/chunks/{form-layout-title.CbdwXVqj.js.map → form-layout-title.DBCY18f8.js.map} +1 -1
- package/dist/chunks/{header-with-views.DCmkDn7u.js → header-with-views.CO2aEwi4.js} +13 -13
- package/dist/chunks/{header-with-views.DCmkDn7u.js.map → header-with-views.CO2aEwi4.js.map} +1 -1
- package/dist/chunks/{header.DbB-XuIe.js → header.byOrhnHk.js} +4 -4
- package/dist/chunks/{header.DbB-XuIe.js.map → header.byOrhnHk.js.map} +1 -1
- package/dist/chunks/index.oJzeCMPe.js +529 -0
- package/dist/chunks/{index.48Mn1OCp.js.map → index.oJzeCMPe.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.CzP2P-pl.js → info-icon-with-popover.Cfng_pMj.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.CzP2P-pl.js.map → info-icon-with-popover.Cfng_pMj.js.map} +1 -1
- package/dist/chunks/{info-icon.Dn0FHy-U.js → info-icon.DgCYoVE3.js} +3 -3
- package/dist/chunks/{info-icon.Dn0FHy-U.js.map → info-icon.DgCYoVE3.js.map} +1 -1
- package/dist/chunks/{input-field-password.DwRXYgcD.js → input-field-password.D6PVCLoF.js} +7 -7
- package/dist/chunks/{input-field-password.DwRXYgcD.js.map → input-field-password.D6PVCLoF.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DGNoMZfu.js → input-field-phone-number.Bg9XyY_1.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DGNoMZfu.js.map → input-field-phone-number.Bg9XyY_1.js.map} +1 -1
- package/dist/chunks/{input-field.BdJBLLFI.js → input-field.DgUkNPXo.js} +3 -3
- package/dist/chunks/{input-field.BdJBLLFI.js.map → input-field.DgUkNPXo.js.map} +1 -1
- package/dist/chunks/inspector.types.Dab4xYKV.js +104 -0
- package/dist/chunks/inspector.types.Dab4xYKV.js.map +1 -0
- package/dist/chunks/{layout-row.DWRoI0dm.js → layout-row.c0ugsIw6.js} +2 -2
- package/dist/chunks/{layout-row.DWRoI0dm.js.map → layout-row.c0ugsIw6.js.map} +1 -1
- package/dist/chunks/{link.BH3eB_7E.js → link.D0P79Toh.js} +35 -28
- package/dist/chunks/link.D0P79Toh.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.BSQ8bM-O.js → listbox-option-tag.CBGk4m-_.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BSQ8bM-O.js.map → listbox-option-tag.CBGk4m-_.js.map} +1 -1
- package/dist/chunks/{menu.BKcBx2qB.js → menu.DZEDTBYV.js} +3 -3
- package/dist/chunks/{menu.BKcBx2qB.js.map → menu.DZEDTBYV.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BwVQfDn1.js → modal-fullscreen.DRQ4V5tT.js} +5 -5
- package/dist/chunks/{modal-fullscreen.BwVQfDn1.js.map → modal-fullscreen.DRQ4V5tT.js.map} +1 -1
- package/dist/chunks/{modal.BL-FWXsY.js → modal.DDF63uBR.js} +5 -5
- package/dist/chunks/{modal.BL-FWXsY.js.map → modal.DDF63uBR.js.map} +1 -1
- package/dist/chunks/{pagination.CX5fg6Ma.js → pagination.1PxOrSA9.js} +87 -104
- package/dist/chunks/pagination.1PxOrSA9.js.map +1 -0
- package/dist/chunks/{popover.Bb9JeZVy.js → popover.DXo3nXew.js} +4 -4
- package/dist/chunks/{popover.Bb9JeZVy.js.map → popover.DXo3nXew.js.map} +1 -1
- package/dist/chunks/{popper-container.DieshXa8.js → popper-container.1kHSxyxu.js} +2 -2
- package/dist/chunks/{popper-container.DieshXa8.js.map → popper-container.1kHSxyxu.js.map} +1 -1
- package/dist/chunks/{promo-banner.D5QXTiEH.js → promo-banner.BpLrkuMc.js} +3 -3
- package/dist/chunks/{promo-banner.D5QXTiEH.js.map → promo-banner.BpLrkuMc.js.map} +1 -1
- package/dist/chunks/{radio-group.BuKC_n23.js → radio-group.DtCgLBuL.js} +4 -4
- package/dist/chunks/{radio-group.BuKC_n23.js.map → radio-group.DtCgLBuL.js.map} +1 -1
- package/dist/chunks/{search-bar.C-_Ba3wd.js → search-bar.-Lpxv9sU.js} +3 -3
- package/dist/chunks/{search-bar.C-_Ba3wd.js.map → search-bar.-Lpxv9sU.js.map} +1 -1
- package/dist/chunks/{secondary-nav.uhESbxKZ.js → secondary-nav.DvTPsW8x.js} +3 -3
- package/dist/chunks/{secondary-nav.uhESbxKZ.js.map → secondary-nav.DvTPsW8x.js.map} +1 -1
- package/dist/chunks/{segmented-control.CCgCeLDQ.js → segmented-control.BQlmGv2x.js} +2 -2
- package/dist/chunks/{segmented-control.CCgCeLDQ.js.map → segmented-control.BQlmGv2x.js.map} +1 -1
- package/dist/chunks/{selection-card-group.Dj9wWfmY.js → selection-card-group.BniN7KWU.js} +5 -5
- package/dist/chunks/{selection-card-group.Dj9wWfmY.js.map → selection-card-group.BniN7KWU.js.map} +1 -1
- package/dist/chunks/{sidepanel.DMXzlqbw.js → sidepanel.DfQaLZEA.js} +5 -5
- package/dist/chunks/{sidepanel.DMXzlqbw.js.map → sidepanel.DfQaLZEA.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DZ1_vy5W.js → structured-list-item.xaedKywV.js} +5 -5
- package/dist/chunks/{structured-list-item.DZ1_vy5W.js.map → structured-list-item.xaedKywV.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.D-OotxnX.js → summary-grid.types.CNEeGgWh.js} +5 -5
- package/dist/chunks/{summary-grid.types.D-OotxnX.js.map → summary-grid.types.CNEeGgWh.js.map} +1 -1
- package/dist/chunks/{tabs.BfL4CUD1.js → tabs.DX_Gq12z.js} +2 -2
- package/dist/chunks/{tabs.BfL4CUD1.js.map → tabs.DX_Gq12z.js.map} +1 -1
- package/dist/chunks/{tag.C7ATWnRW.js → tag.C7kJJ5Ki.js} +2 -2
- package/dist/chunks/{tag.C7ATWnRW.js.map → tag.C7kJJ5Ki.js.map} +1 -1
- package/dist/chunks/{textarea.BkUzMu8d.js → textarea.CdA36VsY.js} +3 -3
- package/dist/chunks/{textarea.BkUzMu8d.js.map → textarea.CdA36VsY.js.map} +1 -1
- package/dist/chunks/{timeline-item.DcutETie.js → timeline-item.D87PFH_o.js} +7 -7
- package/dist/chunks/{timeline-item.DcutETie.js.map → timeline-item.D87PFH_o.js.map} +1 -1
- package/dist/chunks/{toast.BV0qP2AF.js → toast.B2u2W_TQ.js} +2 -2
- package/dist/chunks/{toast.BV0qP2AF.js.map → toast.B2u2W_TQ.js.map} +1 -1
- package/dist/chunks/{toggle-button.TDry-9iu.js → toggle-button.ChDbeBZ8.js} +2 -2
- package/dist/chunks/{toggle-button.TDry-9iu.js.map → toggle-button.ChDbeBZ8.js.map} +1 -1
- package/dist/chunks/{tooltip.CfER_5In.js → tooltip.8KbMqaXP.js} +5 -3
- package/dist/chunks/{tooltip.CfER_5In.js.map → tooltip.8KbMqaXP.js.map} +1 -1
- package/dist/chunks/{tutorial.AOMH-Jq3.js → tutorial.D74hJVBb.js} +5 -5
- package/dist/chunks/{tutorial.AOMH-Jq3.js.map → tutorial.D74hJVBb.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.KPoAaRPS.js → use-cached-selected-values.CSVs_E5A.js} +4 -4
- package/dist/chunks/{use-cached-selected-values.KPoAaRPS.js.map → use-cached-selected-values.CSVs_E5A.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- 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/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.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 +55 -55
- 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/inspector.js +1 -1
- package/dist/internal.js +12 -12
- package/dist/layout.js +1 -1
- package/dist/link.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/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +6203 -0
- package/dist/rich-text-editor.js.map +1 -0
- 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/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +22 -1
- package/dist/styles/bento-light.css +22 -1
- package/dist/styles/bento.css +22 -1
- package/dist/styles/legacy.css +22 -1
- package/dist/styles/styleguide.css +22 -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 +254 -11
- package/package.json +16 -5
- package/dist/chunks/base-modal.B9JnRNty.js.map +0 -1
- package/dist/chunks/checkbox-input.CMhyJDdo.js.map +0 -1
- package/dist/chunks/dialog-page.BveDXzz1.js +0 -130
- package/dist/chunks/dialog-page.BveDXzz1.js.map +0 -1
- package/dist/chunks/error-message.7bsic_sK.js.map +0 -1
- package/dist/chunks/index.48Mn1OCp.js +0 -387
- package/dist/chunks/inspector.types.Cloa1Rnz.js +0 -105
- package/dist/chunks/inspector.types.Cloa1Rnz.js.map +0 -1
- package/dist/chunks/link.BH3eB_7E.js.map +0 -1
- package/dist/chunks/pagination.CX5fg6Ma.js.map +0 -1
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
import { defineComponent as v, ref as
|
|
1
|
+
import { defineComponent as v, ref as T, computed as _, useSlots as w, useAttrs as y, toRefs as N } from "vue";
|
|
2
2
|
import { B as d } from "./typography.J1v_SPG3.js";
|
|
3
|
-
import { B as L } from "./dropdown.
|
|
4
|
-
import { g as
|
|
5
|
-
import { u as f, g as
|
|
6
|
-
import { n as
|
|
7
|
-
import { B as
|
|
3
|
+
import { B as L } from "./dropdown.Qc6K5BzU.js";
|
|
4
|
+
import { g as $ } from "./generate-uid.NJ8tVoha.js";
|
|
5
|
+
import { u as f, g as x, a as S } from "./i18n.BQkEbtPM.js";
|
|
6
|
+
import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
|
+
import { B as I } from "./button.BuD-IsW5.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { u as O } from "./aria-label.CaUURpnB.js";
|
|
10
10
|
import { u as R } from "./use-has-slot.C9lQZ6nz.js";
|
|
11
11
|
import "../assets/pagination.css";
|
|
12
12
|
const F = {
|
|
13
13
|
"de-DE": {
|
|
14
|
-
showingItems: "
|
|
15
|
-
showingItemsWithTotal: "Zeigt {itemCount} von {totalCount} Artikeln"
|
|
14
|
+
showingItems: "{itemCount} Artikeln"
|
|
16
15
|
},
|
|
17
16
|
"en-US": {
|
|
18
|
-
showingItems: "
|
|
19
|
-
showingItemsWithTotal: "Showing {itemCount} of {totalCount} items"
|
|
17
|
+
showingItems: "{itemCount} items"
|
|
20
18
|
},
|
|
21
19
|
"es-ES": {
|
|
22
|
-
showingItems: "
|
|
23
|
-
showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} artículos"
|
|
20
|
+
showingItems: "{itemCount} artículos"
|
|
24
21
|
},
|
|
25
22
|
"fr-FR": {
|
|
26
|
-
showingItems: "
|
|
27
|
-
showingItemsWithTotal: "Affichage de {itemCount} élément(s) sur {totalCount}"
|
|
23
|
+
showingItems: "{itemCount} élément(s)"
|
|
28
24
|
},
|
|
29
25
|
"ja-JP": {
|
|
30
|
-
showingItems: "{itemCount}個のアイテムを表示しています"
|
|
31
|
-
showingItemsWithTotal: "{totalCount}件中{itemCount}件のアイテムを表示"
|
|
26
|
+
showingItems: "{itemCount}個のアイテムを表示しています"
|
|
32
27
|
},
|
|
33
28
|
"pt-BR": {
|
|
34
|
-
showingItems: "
|
|
35
|
-
showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} itens"
|
|
29
|
+
showingItems: "{itemCount} itens"
|
|
36
30
|
}
|
|
37
31
|
}, k = {
|
|
38
32
|
i18n: { messages: F }
|
|
@@ -40,73 +34,64 @@ const F = {
|
|
|
40
34
|
...k,
|
|
41
35
|
__name: "pagination-results-per-page",
|
|
42
36
|
props: {
|
|
43
|
-
itemsPerPage: { default: 50 }
|
|
44
|
-
totalCount: { default: null }
|
|
37
|
+
itemsPerPage: { default: 50 }
|
|
45
38
|
},
|
|
46
39
|
emits: ["select"],
|
|
47
40
|
setup(n, { emit: t }) {
|
|
48
|
-
const e =
|
|
41
|
+
const e = [
|
|
49
42
|
{ label: "10", value: 10 },
|
|
50
43
|
{ label: "20", value: 20 },
|
|
51
44
|
{ label: "50", value: 50 },
|
|
52
45
|
{ label: "75", value: 75 },
|
|
53
46
|
{ label: "100", value: 100 }
|
|
54
|
-
], { t:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
], { t: a } = f(), s = $("b-pagination-context-number-elements"), i = T(e), l = S();
|
|
48
|
+
return { __sfc: !0, PREDEFINED_RESULTS_PER_PAGE_VALUES: e, emit: t, t: a, dropdownId: s, dropdownOptions: i, i18nComponent: l, onSelectChange: (u) => {
|
|
49
|
+
t("select", u);
|
|
50
|
+
}, BentoTypography: d, BentoDropdown: L, getI18nProps: x };
|
|
58
51
|
}
|
|
59
52
|
});
|
|
60
53
|
var z = function() {
|
|
61
54
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
62
|
-
return e("div", { staticClass: "b-pagination-results-per-page" }, [e(a.BentoTypography, { attrs: { el: "div" } }, [e(a.i18nComponent, t._b({ tag: "component", staticClass: "b-pagination-results-per-page__dropdown-container", attrs: { tag: "div"
|
|
63
|
-
return [e(a.BentoDropdown, { staticClass: "b-pagination-results-per-page__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t(
|
|
64
|
-
}, proxy: !0 },
|
|
65
|
-
|
|
66
|
-
}, proxy: !0 } : null], null, !0) }, "component", a.getI18nProps(a.translationPathKey), !1))], 1)], 1);
|
|
67
|
-
}, E = [], D = /* @__PURE__ */ u(
|
|
55
|
+
return e("div", { staticClass: "b-pagination-results-per-page" }, [e(a.BentoTypography, { attrs: { el: "div" } }, [e(a.i18nComponent, t._b({ tag: "component", staticClass: "b-pagination-results-per-page__dropdown-container", attrs: { tag: "div" }, scopedSlots: t._u([{ key: "itemCount", fn: function() {
|
|
56
|
+
return [e(a.BentoDropdown, { staticClass: "b-pagination-results-per-page__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t("showingItems", { itemCount: t.itemsPerPage }), condensed: "", items: a.dropdownOptions, value: t.itemsPerPage }, on: { input: a.onSelectChange } })];
|
|
57
|
+
}, proxy: !0 }]) }, "component", a.getI18nProps("showingItems"), !1))], 1)], 1);
|
|
58
|
+
}, E = [], D = /* @__PURE__ */ c(
|
|
68
59
|
A,
|
|
69
60
|
z,
|
|
70
61
|
E,
|
|
71
62
|
!1,
|
|
72
63
|
null,
|
|
73
|
-
"
|
|
64
|
+
"1d5e06b4"
|
|
74
65
|
);
|
|
75
66
|
const Z = D.exports, M = {
|
|
76
67
|
"de-DE": {
|
|
77
68
|
pageNumber: "Seite {page}",
|
|
78
|
-
pageOfTotalPages: "Seite {page} von {totalPages}",
|
|
79
69
|
pageOneOfOne: "Seite 1 von 1"
|
|
80
70
|
},
|
|
81
71
|
"en-US": {
|
|
82
72
|
pageNumber: "Page {page}",
|
|
83
|
-
pageOfTotalPages: "Page {page} of {totalPages}",
|
|
84
73
|
pageOneOfOne: "Page 1 of 1"
|
|
85
74
|
},
|
|
86
75
|
"es-ES": {
|
|
87
76
|
pageNumber: "Página {page}",
|
|
88
|
-
pageOfTotalPages: "Página {page} de {totalPages}",
|
|
89
77
|
pageOneOfOne: "Página 1 de 1"
|
|
90
78
|
},
|
|
91
79
|
"fr-FR": {
|
|
92
80
|
pageNumber: "Page {page}",
|
|
93
|
-
pageOfTotalPages: "Page {page} sur {totalPages}",
|
|
94
81
|
pageOneOfOne: "Page 1 sur 1"
|
|
95
82
|
},
|
|
96
83
|
"ja-JP": {
|
|
97
84
|
pageNumber: "ページ{page}",
|
|
98
|
-
pageOfTotalPages: "ページ{page}/{totalPages}",
|
|
99
85
|
pageOneOfOne: "ページ1/1"
|
|
100
86
|
},
|
|
101
87
|
"pt-BR": {
|
|
102
88
|
pageNumber: "Página {page}",
|
|
103
|
-
pageOfTotalPages: "Página {page} de {totalPages}",
|
|
104
89
|
pageOneOfOne: "Página 1 de 1"
|
|
105
90
|
}
|
|
106
|
-
},
|
|
91
|
+
}, U = {
|
|
107
92
|
i18n: { messages: M }
|
|
108
|
-
},
|
|
109
|
-
...
|
|
93
|
+
}, j = /* @__PURE__ */ v({
|
|
94
|
+
...U,
|
|
110
95
|
__name: "pagination-context",
|
|
111
96
|
props: {
|
|
112
97
|
page: { default: 1 },
|
|
@@ -115,59 +100,57 @@ const Z = D.exports, M = {
|
|
|
115
100
|
},
|
|
116
101
|
emits: ["page-selected"],
|
|
117
102
|
setup(n, { emit: t }) {
|
|
118
|
-
const e = n, { t: a } = f(),
|
|
119
|
-
label:
|
|
120
|
-
value:
|
|
121
|
-
}),
|
|
122
|
-
() => Array.from(new Array(e.totalPages),
|
|
103
|
+
const e = n, { t: a } = f(), s = $("bento-pagination-context-current-page"), i = (o) => t("page-selected", o), l = S(), g = (o) => ({
|
|
104
|
+
label: o.toString(),
|
|
105
|
+
value: o
|
|
106
|
+
}), u = (o, m) => m + 1, p = _(
|
|
107
|
+
() => Array.from(new Array(e.totalPages), u).map(g)
|
|
123
108
|
);
|
|
124
|
-
return { __sfc: !0, props: e, emit: t, t: a, dropdownId:
|
|
109
|
+
return { __sfc: !0, props: e, emit: t, t: a, dropdownId: s, onPageSelectChange: i, i18nComponent: l, transformIntoOption: g, transformToPageNumber: u, listOfAvailablePages: p, BentoTypography: d, BentoDropdown: L, getI18nProps: x };
|
|
125
110
|
}
|
|
126
111
|
});
|
|
127
|
-
var
|
|
112
|
+
var H = function() {
|
|
128
113
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
129
114
|
return e("div", { staticClass: "b-pagination-context" }, [t.totalPages > 1 ? e(a.BentoTypography, { attrs: { el: "div" } }, [e(a.i18nComponent, t._b({ tag: "component", attrs: { tag: "div" }, scopedSlots: t._u([{ key: "page", fn: function() {
|
|
130
|
-
return [e(a.BentoDropdown, { staticClass: "b-pagination-context__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t("
|
|
131
|
-
}, proxy: !0 }, {
|
|
132
|
-
|
|
133
|
-
}, proxy: !0 }], null, !1, 3215767573) }, "component", a.getI18nProps("pageOfTotalPages"), !1))], 1) : t.totalPages === 1 ? e(a.BentoTypography, { attrs: { el: "span" } }, [t._v(" " + t._s(a.t("pageOneOfOne")) + " ")]) : e(a.BentoTypography, { attrs: { el: "span" } }, [t._v(" " + t._s(a.t("pageNumber", { page: t.page })) + " ")])], 1);
|
|
134
|
-
}, H = [], J = /* @__PURE__ */ u(
|
|
135
|
-
U,
|
|
115
|
+
return [e(a.BentoDropdown, { staticClass: "b-pagination-context__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t("pageNumber", { page: t.page }), condensed: "", items: a.listOfAvailablePages, value: t.page, "virtual-scroll": t.virtualScroll }, on: { input: a.onPageSelectChange } })];
|
|
116
|
+
}, proxy: !0 }], null, !1, 379172170) }, "component", a.getI18nProps("pageNumber"), !1))], 1) : t.totalPages === 1 ? e(a.BentoTypography, { attrs: { el: "span" } }, [t._v(" " + t._s(a.t("pageOneOfOne")) + " ")]) : e(a.BentoTypography, { attrs: { el: "span" } }, [t._v(" " + t._s(a.t("pageNumber", { page: t.page })) + " ")])], 1);
|
|
117
|
+
}, J = [], V = /* @__PURE__ */ c(
|
|
136
118
|
j,
|
|
137
119
|
H,
|
|
120
|
+
J,
|
|
138
121
|
!1,
|
|
139
122
|
null,
|
|
140
|
-
"
|
|
123
|
+
"18345698"
|
|
141
124
|
);
|
|
142
|
-
const
|
|
143
|
-
let
|
|
144
|
-
const
|
|
125
|
+
const G = V.exports;
|
|
126
|
+
let h = 0;
|
|
127
|
+
const q = {
|
|
145
128
|
beforeCreate() {
|
|
146
|
-
this.uuid =
|
|
129
|
+
this.uuid = h.toString(), h += 1;
|
|
147
130
|
}
|
|
148
131
|
};
|
|
149
|
-
var
|
|
132
|
+
var K = function() {
|
|
150
133
|
var t = this, e = t._self._c;
|
|
151
134
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", 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", d: "M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z" } }), e("path", { attrs: { fill: "#00112C", d: "M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z" } })]);
|
|
152
|
-
},
|
|
153
|
-
V,
|
|
154
|
-
G,
|
|
135
|
+
}, Q = [], W = /* @__PURE__ */ c(
|
|
155
136
|
q,
|
|
137
|
+
K,
|
|
138
|
+
Q,
|
|
156
139
|
!1,
|
|
157
140
|
null,
|
|
158
141
|
null
|
|
159
142
|
);
|
|
160
|
-
const X =
|
|
161
|
-
let
|
|
143
|
+
const X = W.exports;
|
|
144
|
+
let P = 0;
|
|
162
145
|
const Y = {
|
|
163
146
|
beforeCreate() {
|
|
164
|
-
this.uuid =
|
|
147
|
+
this.uuid = P.toString(), P += 1;
|
|
165
148
|
}
|
|
166
149
|
};
|
|
167
150
|
var tt = function() {
|
|
168
151
|
var t = this, e = t._self._c;
|
|
169
152
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", 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", d: "M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z" } }), e("path", { attrs: { fill: "#00112C", d: "M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z" } })]);
|
|
170
|
-
}, et = [], at = /* @__PURE__ */
|
|
153
|
+
}, et = [], at = /* @__PURE__ */ c(
|
|
171
154
|
Y,
|
|
172
155
|
tt,
|
|
173
156
|
et,
|
|
@@ -185,7 +168,7 @@ const st = {
|
|
|
185
168
|
var ot = function() {
|
|
186
169
|
var t = this, e = t._self._c;
|
|
187
170
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", 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", d: "M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z" } })]);
|
|
188
|
-
}, it = [], rt = /* @__PURE__ */
|
|
171
|
+
}, it = [], rt = /* @__PURE__ */ c(
|
|
189
172
|
st,
|
|
190
173
|
ot,
|
|
191
174
|
it,
|
|
@@ -194,24 +177,24 @@ var ot = function() {
|
|
|
194
177
|
null
|
|
195
178
|
);
|
|
196
179
|
const lt = rt.exports;
|
|
197
|
-
let
|
|
180
|
+
let b = 0;
|
|
198
181
|
const gt = {
|
|
199
182
|
beforeCreate() {
|
|
200
|
-
this.uuid =
|
|
183
|
+
this.uuid = b.toString(), b += 1;
|
|
201
184
|
}
|
|
202
185
|
};
|
|
203
186
|
var pt = function() {
|
|
204
187
|
var t = this, e = t._self._c;
|
|
205
188
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", 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", d: "M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z" } })]);
|
|
206
|
-
},
|
|
189
|
+
}, ct = [], ut = /* @__PURE__ */ c(
|
|
207
190
|
gt,
|
|
208
191
|
pt,
|
|
209
|
-
|
|
192
|
+
ct,
|
|
210
193
|
!1,
|
|
211
194
|
null,
|
|
212
195
|
null
|
|
213
196
|
);
|
|
214
|
-
const _t =
|
|
197
|
+
const _t = ut.exports, vt = {
|
|
215
198
|
"de-DE": {
|
|
216
199
|
navigateToTheFirstPage: "Zur ersten Seite navigieren",
|
|
217
200
|
navigateToTheLastPage: "Zur letzten Seite navigieren",
|
|
@@ -260,44 +243,44 @@ const _t = ct.exports, vt = {
|
|
|
260
243
|
},
|
|
261
244
|
emits: ["navigate"],
|
|
262
245
|
setup(n, { emit: t }) {
|
|
263
|
-
const e = n, { t: a } = f(),
|
|
264
|
-
const
|
|
265
|
-
return
|
|
246
|
+
const e = n, { t: a } = f(), s = _(() => e.page === 1), i = _(() => e.page === e.totalPages), l = _(() => !e.hasNext || i.value), g = _(() => {
|
|
247
|
+
const p = !e.hasNext, o = !e.totalPages;
|
|
248
|
+
return p || i.value || o;
|
|
266
249
|
});
|
|
267
|
-
return { __sfc: !0, props: e, emit: t, t: a, isCurrentPageFirst:
|
|
268
|
-
t("navigate",
|
|
269
|
-
}, BentoButton:
|
|
250
|
+
return { __sfc: !0, props: e, emit: t, t: a, isCurrentPageFirst: s, isCurrentPageLast: i, isNextButtonDisabled: l, isLastPageButtonDisabled: g, navigate: (p) => {
|
|
251
|
+
t("navigate", p);
|
|
252
|
+
}, BentoButton: I, SkipLeft: X, SkipRight: nt, ChevronLeft: lt, ChevronRight: _t };
|
|
270
253
|
}
|
|
271
254
|
});
|
|
272
255
|
var mt = function() {
|
|
273
256
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
274
|
-
return e("ul", { staticClass: "b-pagination-controls" }, [e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
257
|
+
return e("ul", { staticClass: "b-pagination-controls" }, [e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(s) {
|
|
275
258
|
return a.navigate(1);
|
|
276
259
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
277
260
|
return [e(a.SkipLeft, { attrs: { "svg-title": a.t("navigateToTheFirstPage") } })];
|
|
278
|
-
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
261
|
+
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(s) {
|
|
279
262
|
return a.navigate(t.page - 1);
|
|
280
263
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
281
264
|
return [e(a.ChevronLeft, { attrs: { "svg-title": a.t("navigateToThePreviousPage") } })];
|
|
282
|
-
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isNextButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
265
|
+
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isNextButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(s) {
|
|
283
266
|
return a.navigate(t.page + 1);
|
|
284
267
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
285
268
|
return [e(a.ChevronRight, { attrs: { "svg-title": a.t("navigateToTheNextPage") } })];
|
|
286
|
-
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isLastPageButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
269
|
+
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isLastPageButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(s) {
|
|
287
270
|
return a.navigate(t.totalPages);
|
|
288
271
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
289
272
|
return [e(a.SkipRight, { attrs: { "svg-title": a.t("navigateToTheLastPage") } })];
|
|
290
273
|
}, proxy: !0 }]) })], 1)]);
|
|
291
|
-
},
|
|
274
|
+
}, ht = [], Pt = /* @__PURE__ */ c(
|
|
292
275
|
ft,
|
|
293
276
|
mt,
|
|
294
|
-
|
|
277
|
+
ht,
|
|
295
278
|
!1,
|
|
296
279
|
null,
|
|
297
280
|
"65f213a4"
|
|
298
281
|
);
|
|
299
|
-
const Ct =
|
|
300
|
-
...
|
|
282
|
+
const Ct = Pt.exports, bt = {}, Tt = /* @__PURE__ */ v({
|
|
283
|
+
...bt,
|
|
301
284
|
__name: "pagination",
|
|
302
285
|
props: {
|
|
303
286
|
ariaLabel: { default: null },
|
|
@@ -310,37 +293,37 @@ const Ct = ht.exports, Tt = {}, bt = /* @__PURE__ */ v({
|
|
|
310
293
|
},
|
|
311
294
|
emits: ["navigate", "items-page", "update:page", "update:size"],
|
|
312
295
|
setup(n, { emit: t }) {
|
|
313
|
-
const e = n, a =
|
|
314
|
-
ariaLabel:
|
|
296
|
+
const e = n, a = w(), s = R(a), i = y(), l = T(i["aria-label"]), { ariaLabel: g } = N(e), u = O({
|
|
297
|
+
ariaLabel: l.value,
|
|
315
298
|
// TODO: take this line away when the aria-label props is removed
|
|
316
|
-
label:
|
|
317
|
-
}),
|
|
299
|
+
label: g
|
|
300
|
+
}), p = _(
|
|
318
301
|
() => !e.totalCount || !e.size ? null : Math.ceil(e.totalCount / e.size)
|
|
319
|
-
),
|
|
320
|
-
e.hidePageSize ? t("navigate",
|
|
302
|
+
), o = (r, B) => {
|
|
303
|
+
e.hidePageSize ? t("navigate", r) : t("navigate", r, B ?? (e == null ? void 0 : e.size)), t("update:page", r);
|
|
321
304
|
};
|
|
322
|
-
return { __sfc: !0, props: e, emit: t, slots: a, hasSlot:
|
|
323
|
-
|
|
324
|
-
}, onItemsPerPageChange: (
|
|
325
|
-
t("items-page",
|
|
305
|
+
return { __sfc: !0, props: e, emit: t, slots: a, hasSlot: s, attrs: i, ariaLabelAttribute: l, ariaLabel: g, computedAriaLabel: u, totalPages: p, navigate: o, onPageSelected: (r) => {
|
|
306
|
+
o(r);
|
|
307
|
+
}, onItemsPerPageChange: (r) => {
|
|
308
|
+
t("items-page", r), t("update:size", r), o(1, r);
|
|
326
309
|
}, navigationConditionalClasses: () => ({
|
|
327
|
-
"b-pagination__navigation--only-page-navigator": !
|
|
328
|
-
}), BentoTypography: d, BentoPaginationResultsPerPage: Z, BentoPaginationContext:
|
|
310
|
+
"b-pagination__navigation--only-page-navigator": !s("default") && e.hidePageSize
|
|
311
|
+
}), BentoTypography: d, BentoPaginationResultsPerPage: Z, BentoPaginationContext: G, BentoPaginationControls: Ct };
|
|
329
312
|
}
|
|
330
313
|
});
|
|
331
314
|
var Lt = function() {
|
|
332
315
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
333
316
|
return e("div", { staticClass: "b-pagination" }, [e("nav", { staticClass: "b-pagination__navigation", class: a.navigationConditionalClasses(), attrs: { "aria-label": a.computedAriaLabel } }, [t.hidePageSize ? a.hasSlot("default") ? e(a.BentoTypography, [t._t("default")], 2) : t._e() : e(a.BentoPaginationResultsPerPage, { staticClass: "b-pagination__results-per-page", attrs: { "items-per-page": t.size, "total-count": t.totalCount }, on: { select: a.onItemsPerPageChange } }), e("div", { staticClass: "b-pagination__page-navigator" }, [e(a.BentoPaginationContext, { staticClass: "b-pagination__context", attrs: { "total-pages": a.totalPages, page: t.page, "total-count": t.totalCount, "virtual-scroll": t.virtualScroll }, on: { "page-selected": a.onPageSelected } }), e("div", { staticClass: "b-pagination__divider" }), e(a.BentoPaginationControls, { staticClass: "b-pagination__controls", attrs: { "has-next": t.hasNext, page: t.page, "total-pages": a.totalPages }, on: { navigate: a.navigate } })], 1)], 1)]);
|
|
334
|
-
},
|
|
335
|
-
|
|
317
|
+
}, $t = [], xt = /* @__PURE__ */ c(
|
|
318
|
+
Tt,
|
|
336
319
|
Lt,
|
|
337
|
-
|
|
320
|
+
$t,
|
|
338
321
|
!1,
|
|
339
322
|
null,
|
|
340
323
|
"b3d5cd4e"
|
|
341
324
|
);
|
|
342
|
-
const Et =
|
|
325
|
+
const Et = xt.exports;
|
|
343
326
|
export {
|
|
344
327
|
Et as B
|
|
345
328
|
};
|
|
346
|
-
//# sourceMappingURL=pagination.
|
|
329
|
+
//# sourceMappingURL=pagination.1PxOrSA9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.1PxOrSA9.js","sources":["../../src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue","../../src/components/pagination/components/pagination-context/pagination-context.vue","../../../ui-assets/icons-16/dist/vue/skip-left.vue","../../../ui-assets/icons-16/dist/vue/skip-right.vue","../../../ui-assets/icons-16/dist/vue/chevron-left-small.vue","../../../ui-assets/icons-16/dist/vue/chevron-right-small.vue","../../src/components/pagination/components/pagination-controls/pagination-controls.vue","../../src/components/pagination/pagination.vue"],"sourcesContent":["<template>\n <div class=\"b-pagination-results-per-page\">\n <bento-typography el=\"div\">\n <component\n :is=\"i18nComponent\"\n v-bind=\"getI18nProps('showingItems')\"\n class=\"b-pagination-results-per-page__dropdown-container\"\n tag=\"div\"\n >\n <template #itemCount>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('showingItems', { itemCount: itemsPerPage })\"\n class=\"b-pagination-results-per-page__dropdown\"\n condensed\n :items=\"dropdownOptions\"\n :value=\"itemsPerPage\"\n @input=\"onSelectChange\"\n />\n </template>\n </component>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { generateUid } from '@/core/utils/ts';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const PREDEFINED_RESULTS_PER_PAGE_VALUES = [\n { label: '10', value: 10 },\n { label: '20', value: 20 },\n { label: '50', value: 50 },\n { label: '75', value: 75 },\n { label: '100', value: 100 },\n ];\n\n defineProps({\n itemsPerPage: { default: 50 }\n});\n\n const emit = defineEmits([\"select\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('b-pagination-context-number-elements');\n const dropdownOptions = ref(PREDEFINED_RESULTS_PER_PAGE_VALUES);\n const i18nComponent = getI18nComponent();\n\n const onSelectChange = (selectedNumberOfResults: number) => {\n emit('select', selectedNumberOfResults);\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-results-per-page.scss\" />\n","<template>\n <div class=\"b-pagination-context\">\n <bento-typography v-if=\"totalPages > 1\" el=\"div\">\n <component :is=\"i18nComponent\" v-bind=\"getI18nProps('pageNumber')\" tag=\"div\">\n <template #page>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('pageNumber', { page })\"\n class=\"b-pagination-context__dropdown\"\n condensed\n :items=\"listOfAvailablePages\"\n :value=\"page\"\n :virtual-scroll=\"virtualScroll\"\n @input=\"onPageSelectChange\"\n />\n </template>\n </component>\n </bento-typography>\n <bento-typography v-else-if=\"totalPages === 1\" el=\"span\">\n {{ t('pageOneOfOne') }}\n </bento-typography>\n <bento-typography v-else el=\"span\">\n {{ t('pageNumber', { page }) }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoListboxOptionItem } from '@/types';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n import { getI18nComponent, getI18nProps, useI18n } from '@/utils/ts/i18n';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n page: { default: 1 },\n totalPages: { default: null },\n virtualScroll: { type: Boolean, default: false }\n});\n const emit = defineEmits([\"page-selected\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const dropdownId = generateUid('bento-pagination-context-current-page');\n const onPageSelectChange = (selectedPage: string | number) => emit('page-selected', selectedPage);\n const i18nComponent = getI18nComponent();\n\n // Generate a list of pages from 1 to \"totalPages\"\n const transformIntoOption = (value: number): BentoListboxOptionItem => ({\n label: value.toString(),\n value,\n });\n const transformToPageNumber = (_, index) => index + 1;\n const listOfAvailablePages = computed(() =>\n Array.from(new Array(props.totalPages), transformToPageNumber).map(transformIntoOption)\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-context.scss\" />\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><path fill=\"#00112C\" d=\"M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z\"/><path fill=\"#00112C\" d=\"M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z\"/></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","\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><path fill=\"#00112C\" d=\"M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z\"/><path fill=\"#00112C\" d=\"M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z\"/></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","\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><path fill=\"#00112C\" d=\"M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z\"/></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","\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><path fill=\"#00112C\" d=\"M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z\"/></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 <ul class=\"b-pagination-controls\">\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the first page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(1)\">\n <template #iconLeft>\n <skip-left :svg-title=\"t('navigateToTheFirstPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the previous page -->\n <bento-button :disabled=\"isCurrentPageFirst\" variant=\"tertiary\" condensed @click=\"navigate(page - 1)\">\n <template #iconLeft>\n <chevron-left :svg-title=\"t('navigateToThePreviousPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the next page -->\n <bento-button :disabled=\"isNextButtonDisabled\" variant=\"tertiary\" condensed @click=\"navigate(page + 1)\">\n <template #iconLeft>\n <chevron-right :svg-title=\"t('navigateToTheNextPage')\" />\n </template>\n </bento-button>\n </li>\n <li class=\"b-pagination-controls__item\">\n <!-- Navigate to the last page -->\n <bento-button\n :disabled=\"isLastPageButtonDisabled\"\n variant=\"tertiary\"\n condensed\n @click=\"navigate(totalPages)\"\n >\n <template #iconLeft>\n <skip-right :svg-title=\"t('navigateToTheLastPage')\" />\n </template>\n </bento-button>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import SkipLeft from '@adyen/ui-assets-icons-16/vue/skip-left';\n import SkipRight from '@adyen/ui-assets-icons-16/vue/skip-right';\n import ChevronLeft from '@adyen/ui-assets-icons-16/vue/chevron-left-small';\n import ChevronRight from '@adyen/ui-assets-icons-16/vue/chevron-right-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n hasNext: { type: Boolean, default: null },\n page: null,\n totalPages: { default: null }\n});\n\n const emit = defineEmits([\"navigate\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isCurrentPageFirst = computed(() => props.page === 1);\n const isCurrentPageLast = computed(() => props.page === props.totalPages);\n const isNextButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n return hasNoNextPage || isCurrentPageLast.value;\n });\n const isLastPageButtonDisabled = computed(() => {\n const hasNoNextPage = !props.hasNext;\n const hasNoTotalPagesNumber = !props.totalPages;\n\n return hasNoNextPage || isCurrentPageLast.value || hasNoTotalPagesNumber;\n });\n\n const navigate = (pageArg: number) => {\n emit('navigate', pageArg);\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination-controls.scss\" />\n","<template>\n <div class=\"b-pagination\">\n <nav :aria-label=\"computedAriaLabel\" class=\"b-pagination__navigation\" :class=\"navigationConditionalClasses()\">\n <bento-pagination-results-per-page\n v-if=\"!hidePageSize\"\n class=\"b-pagination__results-per-page\"\n :items-per-page=\"size\"\n :total-count=\"totalCount\"\n @select=\"onItemsPerPageChange\"\n />\n <bento-typography v-else-if=\"hasSlot('default')\"><slot /></bento-typography>\n\n <div class=\"b-pagination__page-navigator\">\n <bento-pagination-context\n class=\"b-pagination__context\"\n :total-pages=\"totalPages\"\n :page=\"page\"\n :total-count=\"totalCount\"\n :virtual-scroll=\"virtualScroll\"\n @page-selected=\"onPageSelected\"\n />\n\n <div class=\"b-pagination__divider\"></div>\n\n <bento-pagination-controls\n class=\"b-pagination__controls\"\n :has-next=\"hasNext\"\n :page=\"page\"\n :total-pages=\"totalPages\"\n @navigate=\"navigate\"\n />\n </div>\n </nav>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRefs, useAttrs, useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import BentoPaginationResultsPerPage from './components/pagination-results-per-page/pagination-results-per-page.vue';\n import BentoPaginationContext from './components/pagination-context/pagination-context.vue';\n import BentoPaginationControls from './components/pagination-controls/pagination-controls.vue';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n import type { BentoPaginationProps } from './pagination.types';\n\n const props = defineProps({\n ariaLabel: { default: null },\n hasNext: { type: Boolean, default: null },\n hidePageSize: { type: Boolean, default: false },\n page: { default: 1 },\n size: { default: 20 },\n totalCount: { default: null },\n virtualScroll: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"navigate\", \"items-page\", \"update:page\", \"update:size\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const attrs = useAttrs();\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n });\n\n const totalPages = computed(() =>\n !props.totalCount || !props.size ? null : Math.ceil(props.totalCount / props.size)\n );\n\n const navigate = (pageArg: number, itemsPerPage?: number) => {\n if (props.hidePageSize) {\n emit('navigate', pageArg);\n } else {\n emit('navigate', pageArg, itemsPerPage ?? props?.size);\n }\n emit('update:page', pageArg);\n };\n\n const onPageSelected = (pageNumber: number) => {\n navigate(pageNumber);\n };\n\n const onItemsPerPageChange = (elements: number) => {\n emit('items-page', elements);\n emit('update:size', elements);\n\n // Always go to first page when the\n // number of items page changes\n navigate(1, elements);\n };\n\n const navigationConditionalClasses = () => ({\n 'b-pagination__navigation--only-page-navigator': !hasSlot('default') && props.hidePageSize,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Paginiation component to help users page through data sets.\n *\n * There are two ways of doing navigation in this component:\n * 1. (Basic) You tell the component if there is a next page (hasNext)\n * 2. (Enhanced) You tell the component:\n * - How many total items exist (totalCount)\n * - The max number of items that you show/fetch per page (size)\n * - In this case you should not set the hasNext props\n *\n * If you have the data available and opt to use the Enhanced way you get extra controls:\n * - Page dropdown selector\n * - Last page button\n * - \"Showing 10 of 200 items\" text\n *\n * @usage\n * import { BentoPagination } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoPagination },\n * template: `\n * <bento-pagination :has-next=\"isNextPage\" />\n * `,\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./pagination.scss\" />\n"],"names":["__default__$3","messages$2","PREDEFINED_RESULTS_PER_PAGE_VALUES","t","useI18n","dropdownId","generateUid","dropdownOptions","ref","i18nComponent","getI18nComponent","selectedNumberOfResults","emit","__default__$2","messages$1","onPageSelectChange","selectedPage","transformIntoOption","value","transformToPageNumber","_","index","listOfAvailablePages","computed","props","uuid$3","_sfc_main$5","uuid$2","_sfc_main$4","uuid$1","_sfc_main$3","uuid","_sfc_main$2","__default__$1","messages","isCurrentPageFirst","isCurrentPageLast","isNextButtonDisabled","isLastPageButtonDisabled","hasNoNextPage","hasNoTotalPagesNumber","pageArg","__default__","slots","useSlots","hasSlot","useHasSlot","attrs","useAttrs","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","navigate","itemsPerPage","pageNumber","elements"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;AA3BA,UAAAC,IAAA;AAAA,MAA2C,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACd,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,MAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,OAAA,OAAA,IAAA;AAAA,IACE,GAS/B,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,sCAAA,GACAC,IAAAC,EAAAN,CAAA,GACAO,IAAAC,EAAA;mJAEA,CAAAC,MAAA;AACI,MAAAC,EAAA,UAAAD,CAAA;AAAA,IAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCM1CE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;iBAnBA,EAAA,GAAAX,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,uCAAA,GACAS,IAAA,CAAAC,MAAAJ,EAAA,iBAAAI,CAAA,GACAP,IAAAC,EAAA,GAGAO,IAAA,CAAAC,OAAA;AAAA,MAAwE,OAAAA,EAAA,SAAA;AAAA,MAC9C,OAAAA;AAAA,IACtB,IAEJC,IAAA,CAAAC,GAAAC,MAAAA,IAAA,GACAC,IAAAC;AAAA,MAA6B,MAAA,MAAA,KAAA,IAAA,MAAAC,EAAA,UAAA,GAAAL,CAAA,EAAA,IAAAF,CAAA;AAAA,IAC6D;;;;;;;;;;;;;;;;;;AClD9F,IAAAQ,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACPA,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACPA,IAAAE,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACPA,IAAAE,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCsEIE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;iBAvBA,EAAA,GAAA/B,EAAA,IAAAC,EAAA,GAEA+B,IAAAZ,EAAA,MAAAC,EAAA,SAAA,CAAA,GACAY,IAAAb,EAAA,MAAAC,EAAA,SAAAA,EAAA,UAAA,GACAa,IAAAd,EAAA,MACI,CAAAC,EAAA,WACAY,EAAA,KAA0C,GAE9CE,IAAAf,EAAA,MAAA;AACI,YAAAgB,IAAA,CAAAf,EAAA,SACAgB,IAAA,CAAAhB,EAAA;AAEA,aAAAe,KAAAH,EAAA,SAAAI;AAAA,IAAmD,CAAA;8JAGvD,CAAAC,MAAA;AACI,MAAA7B,EAAA,YAAA6B,CAAA;AAAA,IAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBCiD5BC,KAAA,CAAA;;;;;;;;;;;;;;iBAtEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAzC,EAAAuC,EAAA,YAAA,CAAA,GACA,EAAA,WAAAG,EAAA,IAAAC,EAAA3B,CAAA,GACA4B,IAAAC,EAAA;AAAA,MAAuC,WAAAJ,EAAA;AAAA;AAAA,MACL,OAAAC;AAAA,IAEvB,CAAA,GAGXI,IAAA/B;AAAA,MAAmB,MAAA,CAAAC,EAAA,cAAA,CAAAA,EAAA,OAAA,OAAA,KAAA,KAAAA,EAAA,aAAAA,EAAA,IAAA;AAAA,IACkE,GAGrF+B,IAAA,CAAAd,GAAAe,MAAA;AACI,MAAAhC,EAAA,eACIZ,EAAA,YAAA6B,CAAA,IAEA7B,EAAA,YAAA6B,GAAAe,MAAAhC,KAAA,gBAAAA,EAAA,KAAA,GAEJZ,EAAA,eAAA6B,CAAA;AAAA,IAA2B;kLAG/B,CAAAgB,MAAA;AACI,MAAAF,EAAAE,CAAA;AAAA,IAAmB,yBAGvB,CAAAC,MAAA;AACI,MAAA9C,EAAA,cAAA8C,CAAA,GACA9C,EAAA,eAAA8C,CAAA,GAIAH,EAAA,GAAAG,CAAA;AAAA,IAAoB,iCAGxB,OAAA;AAAA,MAA4C,iDAAA,CAAAb,EAAA,SAAA,KAAArB,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as l, computed as i, useSlots as I, useAttrs as E, inject as r, ref as A, toRefs as L } from "vue";
|
|
2
|
-
import { d as F, P as m, c as R } from "./popper-container.
|
|
2
|
+
import { d as F, P as m, c as R } from "./popper-container.1kHSxyxu.js";
|
|
3
3
|
import { B as k, a as v } from "./typography.J1v_SPG3.js";
|
|
4
4
|
import { n as p } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
|
-
import { B as w } from "./button.
|
|
5
|
+
import { B as w } from "./button.BuD-IsW5.js";
|
|
6
6
|
import { C as x } from "./cross.CJ5EEL2c.js";
|
|
7
7
|
import { u as N } from "./use-has-slot.C9lQZ6nz.js";
|
|
8
8
|
import { u as $ } from "./aria-label.CaUURpnB.js";
|
|
9
|
-
import { c as b, B as V } from "./button-actions.
|
|
9
|
+
import { c as b, B as V } from "./button-actions.DUn_iPDm.js";
|
|
10
10
|
import "../assets/popover.css";
|
|
11
11
|
const D = l({
|
|
12
12
|
components: { BentoTypography: k },
|
|
@@ -292,4 +292,4 @@ export {
|
|
|
292
292
|
y as a,
|
|
293
293
|
Q as b
|
|
294
294
|
};
|
|
295
|
-
//# sourceMappingURL=popover.
|
|
295
|
+
//# sourceMappingURL=popover.DXo3nXew.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.Bb9JeZVy.js","sources":["../../src/components/popover/components/popover-title/popover-title.vue","../../src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../../src/components/popover/popover.types.ts","../../src/components/popover/popover.keys.ts","../../src/components/filter-bar/components/input-filter/input-filter.keys.ts","../../src/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys.ts","../../src/components/popover/popover.vue"],"sourcesContent":["<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" el=\"span\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" variant=\"tertiary\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","import { PopperContainerPosition } from '../popper-container';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","export const POPOVER_OFFSET_INJECTION_KEY = Symbol('popover offset injection key');\n","/**\n * @deprecated from version 2.0.0. Use BentoFilterItemType.INPUT_DROPDOWN and INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY instead.\n */\nexport const INPUT_FILTER_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","export const INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","<template>\n <Transition name=\"b-popover__animation\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n :aria-role=\"computedAttributes.role\"\n :aria-label=\"computedAriaLabel\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :fixed-positioning=\"fixedPositioning\"\n :offset=\"[0, offset]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n class=\"b-popover\"\n @placement=\"$emit('placement', $event)\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, ref, toRefs, useAttrs, useSlots } from 'vue';\n\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n\n import { BentoPopoverPositions } from './popover.types';\n import { Placement } from '@floating-ui/vue';\n\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n import { POPOVER_OFFSET_INJECTION_KEY } from './popover.keys';\n import { INPUT_FILTER_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-filter/input-filter.keys';\n import { INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys';\n\n const DEFAULT_OFFSET = 2;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * 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',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition: {\n type: Array as PropType<Placement[]>,\n default: () => ['bottom-start', 'right-start', 'top-start', 'left-start'],\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows content to appear outside of the popover. Used when there are nested popovers.\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits([\"dismiss\", \"placement\"]);\n\n const slots = useSlots();\n const attrs = useAttrs();\n\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n role: attrs?.['role'] === null ? undefined : PopperContainerAriaRole.POPOVER,\n }));\n\n const offset = inject<number>(POPOVER_OFFSET_INJECTION_KEY, DEFAULT_OFFSET);\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, title } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: title,\n });\n\n const isOverflowVisible =\n inject(INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY, false) ||\n inject(INPUT_FILTER_POPOVER_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n 'b-popover--overflow-visible': props.overflowVisible || isOverflowVisible,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","_sfc_main$1","BentoButton","CrossIcon","BentoPopoverPositions","PopperContainerPosition","POPOVER_OFFSET_INJECTION_KEY","INPUT_FILTER_POPOVER_INJECTION_KEY","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","__default__","DEFAULT_OFFSET","slots","useSlots","attrs","useAttrs","computedAttributes","_a","PopperContainerAriaRole","offset","inject","ariaLabelAttribute","ref","ariaLabel","title","toRefs","computedAriaLabel","useAriaLabel","isOverflowVisible","conditionalClasses","contentConditionalClasses","dismissPopover","emit","hasSlot","useHasSlot"],"mappings":";;;;;;;;;;AAUA,MAAAA,IAAAC,EAAA;AAAA,EAAA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,cAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA,EAKA;AAAA,EACA,MAAAC,GAAA;AAGA,UAAAC,IAAAC,EAAA,MAAA,CAAAF,EAAA,YAAA,GAGAG,IAAAD;AAAA,MAAA,MAAAF,EAAA,eAAAI,EAAA,WAAAA,EAAA;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,aAAAH;AAAA,MAEA,cAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;qBCzBAE,IAAAP,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,aAAAQ,GAAA,WAAAC,EAAA;AAAA,EACA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAP,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,kBAFAE,EAAA,OAAA,EAAA,sCAAAF,EAAA,QAAA,EAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;qBCzBaQ,IAAA,EAAA,GAAAC,EAAA,GCLAC,IAAA,OAAA,8BAAA,GCGAC,IAAA,OAAA,mCAAA,GCHAC,IAAA,OAAA,mCAAA,GCoTTC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArPAC,IAAA,GA4LAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GAEAC,IAAAjB,EAAA,MAAA;;AAAA;AAAA,QAA2C,KAAAkB,IAAAH,EAAA,OAAA,gBAAAG,EAAA;AAAA,QAChB,OAAAH,KAAA,gBAAAA,EAAA,UAAA,OAAA,SAAAI,EAAA;AAAA,MAC8C;AAAA,KAAA,GAGzEC,IAAAC,EAAAb,GAAAI,CAAA,GAEAU,IAAAC,EAAAR,EAAA,YAAA,CAAA,GACA,EAAA,WAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAA5B,CAAA,GACA6B,IAAAC,EAAA;AAAA,MAAuC,WAAAN,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,MAEvB,iBAAAC;AAAA,IACU,CAAA,GAGrBI,IAAAR,EAAAX,GAAA,EAAA,KAAAW,EAAAZ,GAAA,EAAA,GAIAqB,IAAA9B,EAAA,OAAA;AAAA,MAA2C,oBAAAF,EAAA,SAAA,CAAAA,EAAA;AAAA,MACG,2BAAA,CAAA,CAAAA,EAAA;AAAA,MACP,oBAAAA,EAAA,SAAA,CAAAA,EAAA;AAAA,MACO,0BAAAA,EAAA;AAAA,MACV,4BAAAA,EAAA;AAAA,MACE,+BAAAA,EAAA,mBAAA+B;AAAA,IACsB,EAAA,GAG5DE,IAAA/B,EAAA,OAAA;AAAA,MAAkD,kCAAA,CAAA,CAAAF,EAAA;AAAA,IACJ,EAAA,GAG9CkC,IAAA,MAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAAtB,CAAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"popover.DXo3nXew.js","sources":["../../src/components/popover/components/popover-title/popover-title.vue","../../src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../../src/components/popover/popover.types.ts","../../src/components/popover/popover.keys.ts","../../src/components/filter-bar/components/input-filter/input-filter.keys.ts","../../src/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys.ts","../../src/components/popover/popover.vue"],"sourcesContent":["<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" el=\"span\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" variant=\"tertiary\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","import { PopperContainerPosition } from '../popper-container';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","export const POPOVER_OFFSET_INJECTION_KEY = Symbol('popover offset injection key');\n","/**\n * @deprecated from version 2.0.0. Use BentoFilterItemType.INPUT_DROPDOWN and INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY instead.\n */\nexport const INPUT_FILTER_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","export const INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY = Symbol('input field popover injection key');\n","<template>\n <Transition name=\"b-popover__animation\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n :aria-role=\"computedAttributes.role\"\n :aria-label=\"computedAriaLabel\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :fixed-positioning=\"fixedPositioning\"\n :offset=\"[0, offset]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n class=\"b-popover\"\n @placement=\"$emit('placement', $event)\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, ref, toRefs, useAttrs, useSlots } from 'vue';\n\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n\n import { BentoPopoverPositions } from './popover.types';\n import { Placement } from '@floating-ui/vue';\n\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n import { POPOVER_OFFSET_INJECTION_KEY } from './popover.keys';\n import { INPUT_FILTER_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-filter/input-filter.keys';\n import { INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys';\n\n const DEFAULT_OFFSET = 2;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * 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',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition: {\n type: Array as PropType<Placement[]>,\n default: () => ['bottom-start', 'right-start', 'top-start', 'left-start'],\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows content to appear outside of the popover. Used when there are nested popovers.\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits([\"dismiss\", \"placement\"]);\n\n const slots = useSlots();\n const attrs = useAttrs();\n\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n role: attrs?.['role'] === null ? undefined : PopperContainerAriaRole.POPOVER,\n }));\n\n const offset = inject<number>(POPOVER_OFFSET_INJECTION_KEY, DEFAULT_OFFSET);\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, title } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: title,\n });\n\n const isOverflowVisible =\n inject(INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY, false) ||\n inject(INPUT_FILTER_POPOVER_INJECTION_KEY, false);\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n 'b-popover--overflow-visible': props.overflowVisible || isOverflowVisible,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","_sfc_main$1","BentoButton","CrossIcon","BentoPopoverPositions","PopperContainerPosition","POPOVER_OFFSET_INJECTION_KEY","INPUT_FILTER_POPOVER_INJECTION_KEY","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","__default__","DEFAULT_OFFSET","slots","useSlots","attrs","useAttrs","computedAttributes","_a","PopperContainerAriaRole","offset","inject","ariaLabelAttribute","ref","ariaLabel","title","toRefs","computedAriaLabel","useAriaLabel","isOverflowVisible","conditionalClasses","contentConditionalClasses","dismissPopover","emit","hasSlot","useHasSlot"],"mappings":";;;;;;;;;;AAUA,MAAAA,IAAAC,EAAA;AAAA,EAAA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,cAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA,EAKA;AAAA,EACA,MAAAC,GAAA;AAGA,UAAAC,IAAAC,EAAA,MAAA,CAAAF,EAAA,YAAA,GAGAG,IAAAD;AAAA,MAAA,MAAAF,EAAA,eAAAI,EAAA,WAAAA,EAAA;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,aAAAH;AAAA,MAEA,cAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;qBCzBAE,IAAAP,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,aAAAQ,GAAA,WAAAC,EAAA;AAAA,EACA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAP,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,kBAFAE,EAAA,OAAA,EAAA,sCAAAF,EAAA,QAAA,EAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;qBCzBaQ,IAAA,EAAA,GAAAC,EAAA,GCLAC,IAAA,OAAA,8BAAA,GCGAC,IAAA,OAAA,mCAAA,GCHAC,IAAA,OAAA,mCAAA,GCoTTC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArPAC,IAAA,GA4LAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GAEAC,IAAAjB,EAAA,MAAA;;AAAA;AAAA,QAA2C,KAAAkB,IAAAH,EAAA,OAAA,gBAAAG,EAAA;AAAA,QAChB,OAAAH,KAAA,gBAAAA,EAAA,UAAA,OAAA,SAAAI,EAAA;AAAA,MAC8C;AAAA,KAAA,GAGzEC,IAAAC,EAAAb,GAAAI,CAAA,GAEAU,IAAAC,EAAAR,EAAA,YAAA,CAAA,GACA,EAAA,WAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAA5B,CAAA,GACA6B,IAAAC,EAAA;AAAA,MAAuC,WAAAN,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,MAEvB,iBAAAC;AAAA,IACU,CAAA,GAGrBI,IAAAR,EAAAX,GAAA,EAAA,KAAAW,EAAAZ,GAAA,EAAA,GAIAqB,IAAA9B,EAAA,OAAA;AAAA,MAA2C,oBAAAF,EAAA,SAAA,CAAAA,EAAA;AAAA,MACG,2BAAA,CAAA,CAAAA,EAAA;AAAA,MACP,oBAAAA,EAAA,SAAA,CAAAA,EAAA;AAAA,MACO,0BAAAA,EAAA;AAAA,MACV,4BAAAA,EAAA;AAAA,MACE,+BAAAA,EAAA,mBAAA+B;AAAA,IACsB,EAAA,GAG5DE,IAAA/B,EAAA,OAAA;AAAA,MAAkD,kCAAA,CAAA,CAAAF,EAAA;AAAA,IACJ,EAAA,GAG9CkC,IAAA,MAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAAtB,CAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as R, unref as tt, ref as z, shallowRef as Zt, watch as it, getCurrentScope as te, onScopeDispose as ee, shallowReadonly as Z, defineComponent as ne, toRefs as oe } from "vue";
|
|
2
2
|
import "./index.Cl4_42j5.js";
|
|
3
|
-
import { B as ie } from "./focus-trap.
|
|
3
|
+
import { B as ie } from "./focus-trap.DiqwA-bw.js";
|
|
4
4
|
import { n as re } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
5
5
|
import "../assets/popper-container.css";
|
|
6
6
|
const Ht = ["top", "right", "bottom", "left"], _t = ["start", "end"], Et = /* @__PURE__ */ Ht.reduce((t, e) => t.concat(e, e + "-" + _t[0], e + "-" + _t[1]), []), nt = Math.min, G = Math.max, at = Math.round, ct = Math.floor, M = (t) => ({
|
|
@@ -1390,4 +1390,4 @@ export {
|
|
|
1390
1390
|
sn as h,
|
|
1391
1391
|
He as o
|
|
1392
1392
|
};
|
|
1393
|
-
//# sourceMappingURL=popper-container.
|
|
1393
|
+
//# sourceMappingURL=popper-container.1kHSxyxu.js.map
|