@adyen/bento-vue2 1.65.0 → 1.67.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 +473 -253
- package/dist/action-bar.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-with-menu.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/date.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/footer-actions.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.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/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -0
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.BxX3I27_.js} +31 -31
- package/dist/chunks/action-bar.BxX3I27_.js.map +1 -0
- package/dist/chunks/{base-modal.3OptY7u_.js → base-modal.QGDM_kjG.js} +2 -2
- package/dist/chunks/{base-modal.3OptY7u_.js.map → base-modal.QGDM_kjG.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.itkbcqzk.js +83 -0
- package/dist/chunks/button-actions-with-menu.itkbcqzk.js.map +1 -0
- package/dist/chunks/{button-actions._OIvTdKt.js → button-actions.BKdI_ooV.js} +2 -2
- package/dist/chunks/button-actions.BKdI_ooV.js.map +1 -0
- package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
- package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
- package/dist/chunks/{card.CypgT0Ji.js → card.BktfAMv5.js} +2 -2
- package/dist/chunks/{card.CypgT0Ji.js.map → card.BktfAMv5.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
- package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
- package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
- package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
- package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.DDiQ9R3o.js} +4 -4
- package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.DDiQ9R3o.js.map} +1 -1
- package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
- package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
- package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
- package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.Beep1lY8.js} +3 -3
- package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.Beep1lY8.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CEaAmjDa.js → dashed-underline.BQwLgzz6.js} +2 -2
- package/dist/chunks/{dashed-underline.CEaAmjDa.js.map → dashed-underline.BQwLgzz6.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.nkx0pCMA.js} +16 -14
- package/dist/chunks/data-grid-template.nkx0pCMA.js.map +1 -0
- package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.CkwZVy3a.js} +190 -188
- package/dist/chunks/data-grid.CkwZVy3a.js.map +1 -0
- package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.BLBXaDHv.js} +8 -9
- package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.BLBXaDHv.js.map} +1 -1
- package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.am63DgMj.js} +409 -393
- package/dist/chunks/date-range-picker.am63DgMj.js.map +1 -0
- package/dist/chunks/date.BfyWX2PY.js +160 -0
- package/dist/chunks/date.BfyWX2PY.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.BNuuA4ES.js → dropdown-default-textbox.94q6opSD.js} +3 -3
- package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +1 -0
- package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYIkCBa6.js} +2 -2
- package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYIkCBa6.js.map} +1 -1
- package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.HA6ISg2h.js} +265 -270
- package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.HA6ISg2h.js.map} +1 -1
- package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
- package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
- package/dist/chunks/es6.n1ewaW31.js.map +1 -1
- package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
- package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
- package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.DbqsoAI1.js} +667 -652
- package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.DbqsoAI1.js.map} +1 -1
- package/dist/chunks/{footer-actions.DyuSTjC5.js → footer-actions.BUfQFz7J.js} +2 -2
- package/dist/chunks/{footer-actions.DyuSTjC5.js.map → footer-actions.BUfQFz7J.js.map} +1 -1
- package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
- package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
- package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.JllLR2nW.js} +341 -327
- package/dist/chunks/header-with-views.JllLR2nW.js.map +1 -0
- package/dist/chunks/{header.Cb644uAi.js → header.04Y0unpy.js} +27 -26
- package/dist/chunks/{header.Cb644uAi.js.map → header.04Y0unpy.js.map} +1 -1
- package/dist/chunks/index.BrH1t1iu.js +407 -0
- package/dist/chunks/index.BrH1t1iu.js.map +1 -0
- package/dist/chunks/{info-icon-with-popover.COq40yTq.js → info-icon-with-popover.B1DnkW4B.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.COq40yTq.js.map → info-icon-with-popover.B1DnkW4B.js.map} +1 -1
- package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
- package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
- package/dist/chunks/{input-field-password.Bloa-rqx.js → input-field-password.BtOdV0gF.js} +124 -123
- package/dist/chunks/input-field-password.BtOdV0gF.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Dq-LnGag.js} +3 -3
- package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Dq-LnGag.js.map} +1 -1
- package/dist/chunks/input-field.Bg77qHT2.js +157 -0
- package/dist/chunks/input-field.Bg77qHT2.js.map +1 -0
- package/dist/chunks/{menu.BCD4FW54.js → menu.EgYjFAku.js} +2 -2
- package/dist/chunks/{menu.BCD4FW54.js.map → menu.EgYjFAku.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.1OdCgyca.js → modal-fullscreen.BNTUOC7o.js} +2 -2
- package/dist/chunks/{modal-fullscreen.1OdCgyca.js.map → modal-fullscreen.BNTUOC7o.js.map} +1 -1
- package/dist/chunks/{modal.xY5aFhAO.js → modal.OvB4kEGR.js} +4 -4
- package/dist/chunks/{modal.xY5aFhAO.js.map → modal.OvB4kEGR.js.map} +1 -1
- package/dist/chunks/{pagination.Cl7SzoId.js → pagination.Dw153NzQ.js} +115 -115
- package/dist/chunks/pagination.Dw153NzQ.js.map +1 -0
- package/dist/chunks/{popover.B05xkQ4e.js → popover.BGHbPUOr.js} +2 -2
- package/dist/chunks/{popover.B05xkQ4e.js.map → popover.BGHbPUOr.js.map} +1 -1
- package/dist/chunks/promo-banner.Bbc2U3S3.js.map +1 -1
- package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
- package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.CRJRvfJn.js} +5 -7
- package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.CRJRvfJn.js.map} +1 -1
- package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.BTZSePJh.js} +3 -3
- package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.BTZSePJh.js.map} +1 -1
- package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.BBhSBNn7.js} +2 -2
- package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.BBhSBNn7.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
- package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
- package/dist/chunks/{sidepanel.CI8fu1Q3.js → sidepanel.Dt-BnFzN.js} +2 -2
- package/dist/chunks/{sidepanel.CI8fu1Q3.js.map → sidepanel.Dt-BnFzN.js.map} +1 -1
- package/dist/chunks/step.DMMofD4B.js +217 -0
- package/dist/chunks/step.DMMofD4B.js.map +1 -0
- package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
- package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
- package/dist/chunks/summary-grid.types.DsvtLg3D.js +337 -0
- package/dist/chunks/summary-grid.types.DsvtLg3D.js.map +1 -0
- package/dist/chunks/tab.BhWPBxcB.js +192 -0
- package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
- package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
- package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
- package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
- package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.Dz66luo5.js} +11 -12
- package/dist/chunks/timeline-item.Dz66luo5.js.map +1 -0
- package/dist/chunks/{tutorial.DJ_Cwp9i.js → tutorial.DAKO-fKz.js} +4 -4
- package/dist/chunks/{tutorial.DJ_Cwp9i.js.map → tutorial.DAKO-fKz.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.DQPABFfG.js} +538 -498
- package/dist/chunks/use-cached-selected-values.DQPABFfG.js.map +1 -0
- 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/date.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +45 -45
- 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/internal.js +8 -8
- 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/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/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/styles/bento-dark.css +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +1 -0
- package/dist/styles/styleguide.css +1 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +261 -81
- package/package.json +6 -6
- package/dist/assets/tabs.css +0 -1
- package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
- package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
- package/dist/chunks/button-actions._OIvTdKt.js.map +0 -1
- package/dist/chunks/calendar.DbTC35rM.js +0 -1167
- package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
- package/dist/chunks/copy.CXeLbvUP.js +0 -129
- package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
- package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
- package/dist/chunks/data-grid.D4oeTUhn.js.map +0 -1
- package/dist/chunks/date-range-picker.D9lyIoO-.js.map +0 -1
- package/dist/chunks/date.dYFFEunA.js +0 -987
- package/dist/chunks/date.dYFFEunA.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.BNuuA4ES.js.map +0 -1
- package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
- package/dist/chunks/header-with-views.Ds9mcwmp.js.map +0 -1
- package/dist/chunks/index.BDuTpjD8.js +0 -40
- package/dist/chunks/index.BDuTpjD8.js.map +0 -1
- package/dist/chunks/index.DD7TppDb.js +0 -10
- package/dist/chunks/index.DD7TppDb.js.map +0 -1
- package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
- package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
- package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
- package/dist/chunks/input-field.B_3nZFYz.js +0 -152
- package/dist/chunks/input-field.B_3nZFYz.js.map +0 -1
- package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
- package/dist/chunks/step.dNTg2rtW.js +0 -217
- package/dist/chunks/step.dNTg2rtW.js.map +0 -1
- package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
- package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
- package/dist/chunks/tabs.Dx6teJGW.js +0 -205
- package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
- package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
- package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as L } from "./dropdown.
|
|
1
|
+
import { defineComponent as d, computed as p, useSlots as S, useAttrs as B, ref as N, toRefs as I } from "vue";
|
|
2
|
+
import { B as f } from "./typography.J1v_SPG3.js";
|
|
3
|
+
import { B as L } from "./dropdown.HA6ISg2h.js";
|
|
4
4
|
import { g as x } from "./generate-uid.NJ8tVoha.js";
|
|
5
|
-
import { u as
|
|
6
|
-
import { n as
|
|
7
|
-
import { B as
|
|
5
|
+
import { u as m, g as $, a as w } from "./i18n.BQkEbtPM.js";
|
|
6
|
+
import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
|
+
import { B as O } from "./button.hF-nD1Og.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { u as
|
|
9
|
+
import { u as F } from "./aria-label.CaUURpnB.js";
|
|
10
10
|
import { u as R } from "./use-has-slot.C9lQZ6nz.js";
|
|
11
11
|
import "../assets/pagination.css";
|
|
12
|
-
const
|
|
12
|
+
const k = {
|
|
13
13
|
"de-DE": {
|
|
14
14
|
showingItems: "{itemCount} Artikeln",
|
|
15
15
|
showingItemsWithTotal: "{itemCount} von {totalCount} Artikeln"
|
|
@@ -34,45 +34,45 @@ const F = {
|
|
|
34
34
|
showingItems: "{itemCount} itens",
|
|
35
35
|
showingItemsWithTotal: "{itemCount} de {totalCount} itens"
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
i18n: { messages:
|
|
39
|
-
}, A = /* @__PURE__ */
|
|
40
|
-
...
|
|
37
|
+
}, z = {
|
|
38
|
+
i18n: { messages: k }
|
|
39
|
+
}, A = /* @__PURE__ */ d({
|
|
40
|
+
...z,
|
|
41
41
|
__name: "pagination-results-per-page",
|
|
42
42
|
props: {
|
|
43
43
|
itemsPerPage: { default: 50 },
|
|
44
44
|
totalCount: { default: null }
|
|
45
45
|
},
|
|
46
46
|
emits: ["select"],
|
|
47
|
-
setup(
|
|
48
|
-
const e =
|
|
49
|
-
{ label:
|
|
50
|
-
{ label:
|
|
51
|
-
{ label:
|
|
52
|
-
{ label:
|
|
53
|
-
{ label:
|
|
54
|
-
]
|
|
55
|
-
t("select",
|
|
56
|
-
},
|
|
57
|
-
return { __sfc: !0,
|
|
47
|
+
setup(s, { emit: t }) {
|
|
48
|
+
const e = s, { t: a, n } = m(), i = x("b-pagination-context-number-elements"), g = p(() => [
|
|
49
|
+
{ label: n(10), value: 10 },
|
|
50
|
+
{ label: n(20), value: 20 },
|
|
51
|
+
{ label: n(50), value: 50 },
|
|
52
|
+
{ label: n(75), value: 75 },
|
|
53
|
+
{ label: n(100), value: 100 }
|
|
54
|
+
]), u = w(), _ = (r) => {
|
|
55
|
+
t("select", r);
|
|
56
|
+
}, o = p(() => e.totalCount ? "showingItemsWithTotal" : "showingItems");
|
|
57
|
+
return { __sfc: !0, t: a, n, props: e, emit: t, dropdownId: i, predefinedDropdownOptions: g, i18nComponent: u, onSelectChange: _, translationPathKey: o, BentoTypography: f, BentoDropdown: L, getI18nProps: $ };
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
var
|
|
60
|
+
var D = function() {
|
|
61
61
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
62
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", plural: t.totalCount }, scopedSlots: t._u([{ key: "itemCount", fn: function() {
|
|
63
|
-
return [e(a.BentoDropdown, { staticClass: "b-pagination-results-per-page__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t(a.translationPathKey, { itemCount: t.itemsPerPage, totalCount: t.totalCount }), condensed: "", items: a.
|
|
63
|
+
return [e(a.BentoDropdown, { staticClass: "b-pagination-results-per-page__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t(a.translationPathKey, { itemCount: t.itemsPerPage, totalCount: t.totalCount }), condensed: "", items: a.predefinedDropdownOptions, value: t.itemsPerPage }, on: { input: a.onSelectChange } })];
|
|
64
64
|
}, proxy: !0 }, t.totalCount ? { key: "totalCount", fn: function() {
|
|
65
65
|
return [t._v(t._s(t.totalCount))];
|
|
66
66
|
}, proxy: !0 } : null], null, !0) }, "component", a.getI18nProps(a.translationPathKey), !1))], 1)], 1);
|
|
67
|
-
},
|
|
67
|
+
}, Z = [], M = /* @__PURE__ */ c(
|
|
68
68
|
A,
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
D,
|
|
70
|
+
Z,
|
|
71
71
|
!1,
|
|
72
72
|
null,
|
|
73
|
-
"
|
|
73
|
+
"c1dc56f5"
|
|
74
74
|
);
|
|
75
|
-
const
|
|
75
|
+
const W = M.exports, E = {
|
|
76
76
|
"de-DE": {
|
|
77
77
|
pageNumber: "Seite {page}",
|
|
78
78
|
pageOneOfOne: "Seite 1 von 1"
|
|
@@ -97,10 +97,10 @@ const Z = D.exports, M = {
|
|
|
97
97
|
pageNumber: "Página {page}",
|
|
98
98
|
pageOneOfOne: "Página 1 de 1"
|
|
99
99
|
}
|
|
100
|
-
},
|
|
101
|
-
i18n: { messages:
|
|
102
|
-
},
|
|
103
|
-
...
|
|
100
|
+
}, U = {
|
|
101
|
+
i18n: { messages: E }
|
|
102
|
+
}, j = /* @__PURE__ */ d({
|
|
103
|
+
...U,
|
|
104
104
|
__name: "pagination-context",
|
|
105
105
|
props: {
|
|
106
106
|
page: { default: 1 },
|
|
@@ -108,102 +108,102 @@ const Z = D.exports, M = {
|
|
|
108
108
|
virtualScroll: { type: Boolean, default: !1 }
|
|
109
109
|
},
|
|
110
110
|
emits: ["page-selected"],
|
|
111
|
-
setup(
|
|
112
|
-
const e =
|
|
113
|
-
label:
|
|
114
|
-
value:
|
|
115
|
-
}),
|
|
116
|
-
() => Array.from(new Array(e.totalPages),
|
|
111
|
+
setup(s, { emit: t }) {
|
|
112
|
+
const e = s, { t: a, n } = m(), i = x("bento-pagination-context-current-page"), g = (v) => t("page-selected", v), u = w(), _ = (v) => ({
|
|
113
|
+
label: n(v),
|
|
114
|
+
value: v
|
|
115
|
+
}), o = (v, h) => h + 1, r = p(
|
|
116
|
+
() => Array.from(new Array(e.totalPages), o).map(_)
|
|
117
117
|
);
|
|
118
|
-
return { __sfc: !0, props: e, emit: t, t: a, dropdownId:
|
|
118
|
+
return { __sfc: !0, props: e, emit: t, t: a, n, dropdownId: i, onPageSelectChange: g, i18nComponent: u, transformIntoOption: _, transformToPageNumber: o, listOfAvailablePages: r, BentoTypography: f, BentoDropdown: L, getI18nProps: $ };
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
var
|
|
121
|
+
var H = function() {
|
|
122
122
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
123
123
|
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() {
|
|
124
|
-
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 } })];
|
|
125
|
-
}, proxy: !0 }], null, !1,
|
|
126
|
-
},
|
|
127
|
-
U,
|
|
124
|
+
return [e(a.BentoDropdown, { staticClass: "b-pagination-context__dropdown", attrs: { id: a.dropdownId, "aria-label": a.t("pageNumber", { page: a.n(t.page) }), condensed: "", items: a.listOfAvailablePages, value: t.page, "virtual-scroll": t.virtualScroll }, on: { input: a.onPageSelectChange } })];
|
|
125
|
+
}, proxy: !0 }], null, !1, 638013292) }, "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: a.n(t.page) })) + " ")])], 1);
|
|
126
|
+
}, J = [], K = /* @__PURE__ */ c(
|
|
128
127
|
j,
|
|
129
128
|
H,
|
|
129
|
+
J,
|
|
130
130
|
!1,
|
|
131
131
|
null,
|
|
132
|
-
"
|
|
132
|
+
"946f945c"
|
|
133
133
|
);
|
|
134
|
-
const
|
|
135
|
-
let
|
|
136
|
-
const
|
|
134
|
+
const V = K.exports;
|
|
135
|
+
let P = 0;
|
|
136
|
+
const q = {
|
|
137
137
|
beforeCreate() {
|
|
138
|
-
this.uuid =
|
|
138
|
+
this.uuid = P.toString(), P += 1;
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
var G = function() {
|
|
142
142
|
var t = this, e = t._self._c;
|
|
143
143
|
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: "#001222", 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: "#001222", d: "M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z" } })]);
|
|
144
|
-
},
|
|
145
|
-
V,
|
|
146
|
-
G,
|
|
144
|
+
}, Q = [], X = /* @__PURE__ */ c(
|
|
147
145
|
q,
|
|
146
|
+
G,
|
|
147
|
+
Q,
|
|
148
148
|
!1,
|
|
149
149
|
null,
|
|
150
150
|
null
|
|
151
151
|
);
|
|
152
|
-
const
|
|
153
|
-
let
|
|
154
|
-
const
|
|
152
|
+
const Y = X.exports;
|
|
153
|
+
let C = 0;
|
|
154
|
+
const tt = {
|
|
155
155
|
beforeCreate() {
|
|
156
|
-
this.uuid =
|
|
156
|
+
this.uuid = C.toString(), C += 1;
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
var
|
|
159
|
+
var et = function() {
|
|
160
160
|
var t = this, e = t._self._c;
|
|
161
161
|
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: "#001222", 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: "#001222", d: "M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z" } })]);
|
|
162
|
-
},
|
|
163
|
-
Y,
|
|
162
|
+
}, at = [], nt = /* @__PURE__ */ c(
|
|
164
163
|
tt,
|
|
165
164
|
et,
|
|
165
|
+
at,
|
|
166
166
|
!1,
|
|
167
167
|
null,
|
|
168
168
|
null
|
|
169
169
|
);
|
|
170
|
-
const
|
|
171
|
-
let
|
|
172
|
-
const
|
|
170
|
+
const st = nt.exports;
|
|
171
|
+
let b = 0;
|
|
172
|
+
const ot = {
|
|
173
173
|
beforeCreate() {
|
|
174
|
-
this.uuid =
|
|
174
|
+
this.uuid = b.toString(), b += 1;
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
var
|
|
177
|
+
var it = function() {
|
|
178
178
|
var t = this, e = t._self._c;
|
|
179
179
|
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: "#001222", d: "M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z" } })]);
|
|
180
|
-
},
|
|
181
|
-
st,
|
|
180
|
+
}, rt = [], lt = /* @__PURE__ */ c(
|
|
182
181
|
ot,
|
|
183
182
|
it,
|
|
183
|
+
rt,
|
|
184
184
|
!1,
|
|
185
185
|
null,
|
|
186
186
|
null
|
|
187
187
|
);
|
|
188
|
-
const
|
|
189
|
-
let
|
|
190
|
-
const
|
|
188
|
+
const gt = lt.exports;
|
|
189
|
+
let T = 0;
|
|
190
|
+
const ut = {
|
|
191
191
|
beforeCreate() {
|
|
192
|
-
this.uuid =
|
|
192
|
+
this.uuid = T.toString(), T += 1;
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
|
-
var
|
|
195
|
+
var pt = function() {
|
|
196
196
|
var t = this, e = t._self._c;
|
|
197
197
|
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: "#001222", d: "M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z" } })]);
|
|
198
|
-
},
|
|
199
|
-
gt,
|
|
198
|
+
}, ct = [], _t = /* @__PURE__ */ c(
|
|
200
199
|
ut,
|
|
201
200
|
pt,
|
|
201
|
+
ct,
|
|
202
202
|
!1,
|
|
203
203
|
null,
|
|
204
204
|
null
|
|
205
205
|
);
|
|
206
|
-
const
|
|
206
|
+
const vt = _t.exports, dt = {
|
|
207
207
|
"de-DE": {
|
|
208
208
|
navigateToTheFirstPage: "Zur ersten Seite navigieren",
|
|
209
209
|
navigateToTheLastPage: "Zur letzten Seite navigieren",
|
|
@@ -240,10 +240,10 @@ const _t = ct.exports, vt = {
|
|
|
240
240
|
navigateToTheNextPage: "Ir para a próxima página",
|
|
241
241
|
navigateToThePreviousPage: "Ir para a página anterior"
|
|
242
242
|
}
|
|
243
|
-
},
|
|
244
|
-
i18n: { messages:
|
|
245
|
-
},
|
|
246
|
-
...
|
|
243
|
+
}, ft = {
|
|
244
|
+
i18n: { messages: dt }
|
|
245
|
+
}, mt = /* @__PURE__ */ d({
|
|
246
|
+
...ft,
|
|
247
247
|
__name: "pagination-controls",
|
|
248
248
|
props: {
|
|
249
249
|
hasNext: { type: Boolean, default: null },
|
|
@@ -251,45 +251,45 @@ const _t = ct.exports, vt = {
|
|
|
251
251
|
totalPages: { default: null }
|
|
252
252
|
},
|
|
253
253
|
emits: ["navigate"],
|
|
254
|
-
setup(
|
|
255
|
-
const e =
|
|
256
|
-
const
|
|
257
|
-
return
|
|
254
|
+
setup(s, { emit: t }) {
|
|
255
|
+
const e = s, { t: a } = m(), n = p(() => e.page === 1), i = p(() => e.page === e.totalPages), g = p(() => !e.hasNext || i.value), u = p(() => {
|
|
256
|
+
const o = !e.hasNext, r = !e.totalPages;
|
|
257
|
+
return o || i.value || r;
|
|
258
258
|
});
|
|
259
|
-
return { __sfc: !0, props: e, emit: t, t: a, isCurrentPageFirst:
|
|
260
|
-
t("navigate",
|
|
261
|
-
}, BentoButton:
|
|
259
|
+
return { __sfc: !0, props: e, emit: t, t: a, isCurrentPageFirst: n, isCurrentPageLast: i, isNextButtonDisabled: g, isLastPageButtonDisabled: u, navigate: (o) => {
|
|
260
|
+
t("navigate", o);
|
|
261
|
+
}, BentoButton: O, SkipLeft: Y, SkipRight: st, ChevronLeft: gt, ChevronRight: vt };
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
var
|
|
264
|
+
var ht = function() {
|
|
265
265
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
266
|
-
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(
|
|
266
|
+
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(n) {
|
|
267
267
|
return a.navigate(1);
|
|
268
268
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
269
269
|
return [e(a.SkipLeft, { attrs: { "svg-title": a.t("navigateToTheFirstPage") } })];
|
|
270
|
-
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
270
|
+
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(n) {
|
|
271
271
|
return a.navigate(t.page - 1);
|
|
272
272
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
273
273
|
return [e(a.ChevronLeft, { attrs: { "svg-title": a.t("navigateToThePreviousPage") } })];
|
|
274
|
-
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isNextButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
274
|
+
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isNextButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(n) {
|
|
275
275
|
return a.navigate(t.page + 1);
|
|
276
276
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
277
277
|
return [e(a.ChevronRight, { attrs: { "svg-title": a.t("navigateToTheNextPage") } })];
|
|
278
|
-
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isLastPageButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(
|
|
278
|
+
}, proxy: !0 }]) })], 1), e("li", { staticClass: "b-pagination-controls__item" }, [e(a.BentoButton, { attrs: { disabled: a.isLastPageButtonDisabled, variant: "tertiary", condensed: "" }, on: { click: function(n) {
|
|
279
279
|
return a.navigate(t.totalPages);
|
|
280
280
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
281
281
|
return [e(a.SkipRight, { attrs: { "svg-title": a.t("navigateToTheLastPage") } })];
|
|
282
282
|
}, proxy: !0 }]) })], 1)]);
|
|
283
|
-
},
|
|
284
|
-
ft,
|
|
283
|
+
}, Pt = [], Ct = /* @__PURE__ */ c(
|
|
285
284
|
mt,
|
|
286
285
|
ht,
|
|
286
|
+
Pt,
|
|
287
287
|
!1,
|
|
288
288
|
null,
|
|
289
289
|
"65f213a4"
|
|
290
290
|
);
|
|
291
|
-
const
|
|
292
|
-
...
|
|
291
|
+
const bt = Ct.exports, Tt = {}, Lt = /* @__PURE__ */ d({
|
|
292
|
+
...Tt,
|
|
293
293
|
__name: "pagination",
|
|
294
294
|
props: {
|
|
295
295
|
ariaLabel: { default: null },
|
|
@@ -301,38 +301,38 @@ const Ct = Pt.exports, bt = {}, Tt = /* @__PURE__ */ v({
|
|
|
301
301
|
virtualScroll: { type: Boolean, default: !1 }
|
|
302
302
|
},
|
|
303
303
|
emits: ["navigate", "items-page", "update:page", "update:size"],
|
|
304
|
-
setup(
|
|
305
|
-
const e =
|
|
306
|
-
ariaLabel:
|
|
304
|
+
setup(s, { emit: t }) {
|
|
305
|
+
const e = s, a = S(), n = R(a), i = B(), g = N(i["aria-label"]), { ariaLabel: u } = I(e), _ = F({
|
|
306
|
+
ariaLabel: g.value,
|
|
307
307
|
// TODO: take this line away when the aria-label props is removed
|
|
308
|
-
label:
|
|
309
|
-
}),
|
|
308
|
+
label: u
|
|
309
|
+
}), o = p(
|
|
310
310
|
() => !e.totalCount || !e.size ? null : Math.ceil(e.totalCount / e.size)
|
|
311
|
-
),
|
|
312
|
-
e.hidePageSize ? t("navigate",
|
|
311
|
+
), r = (l, y) => {
|
|
312
|
+
e.hidePageSize ? t("navigate", l) : t("navigate", l, y ?? (e == null ? void 0 : e.size)), t("update:page", l);
|
|
313
313
|
};
|
|
314
|
-
return { __sfc: !0, props: e, emit: t, slots: a, hasSlot:
|
|
315
|
-
|
|
316
|
-
}, onItemsPerPageChange: (
|
|
317
|
-
t("items-page",
|
|
314
|
+
return { __sfc: !0, props: e, emit: t, slots: a, hasSlot: n, attrs: i, ariaLabelAttribute: g, ariaLabel: u, computedAriaLabel: _, totalPages: o, navigate: r, onPageSelected: (l) => {
|
|
315
|
+
r(l);
|
|
316
|
+
}, onItemsPerPageChange: (l) => {
|
|
317
|
+
t("items-page", l), t("update:size", l), r(1, l);
|
|
318
318
|
}, navigationConditionalClasses: () => ({
|
|
319
|
-
"b-pagination__navigation--only-page-navigator": !
|
|
320
|
-
}), BentoTypography:
|
|
319
|
+
"b-pagination__navigation--only-page-navigator": !n("default") && e.hidePageSize
|
|
320
|
+
}), BentoTypography: f, BentoPaginationResultsPerPage: W, BentoPaginationContext: V, BentoPaginationControls: bt };
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
|
-
var
|
|
323
|
+
var xt = function() {
|
|
324
324
|
var t = this, e = t._self._c, a = t._self._setupProxy;
|
|
325
325
|
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)]);
|
|
326
|
-
},
|
|
327
|
-
Tt,
|
|
326
|
+
}, $t = [], wt = /* @__PURE__ */ c(
|
|
328
327
|
Lt,
|
|
329
328
|
xt,
|
|
329
|
+
$t,
|
|
330
330
|
!1,
|
|
331
331
|
null,
|
|
332
332
|
"b3d5cd4e"
|
|
333
333
|
);
|
|
334
|
-
const
|
|
334
|
+
const Dt = wt.exports;
|
|
335
335
|
export {
|
|
336
|
-
|
|
336
|
+
Dt as B
|
|
337
337
|
};
|
|
338
|
-
//# sourceMappingURL=pagination.
|
|
338
|
+
//# sourceMappingURL=pagination.Dw153NzQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.Dw153NzQ.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(translationPathKey)\"\n class=\"b-pagination-results-per-page__dropdown-container\"\n tag=\"div\"\n :plural=\"totalCount\"\n >\n <template #itemCount>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t(translationPathKey, { itemCount: itemsPerPage, totalCount })\"\n class=\"b-pagination-results-per-page__dropdown\"\n condensed\n :items=\"predefinedDropdownOptions\"\n :value=\"itemsPerPage\"\n @input=\"onSelectChange\"\n />\n </template>\n <template v-if=\"!!totalCount\" #totalCount>{{ totalCount }}</template>\n </component>\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 { 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 { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n itemsPerPage: { default: 50 },\n totalCount: { default: null }\n});\n\n const emit = defineEmits([\"select\"]);\n\n const dropdownId = generateUid('b-pagination-context-number-elements');\n const predefinedDropdownOptions = computed(() => [\n { label: n(10), value: 10 },\n { label: n(20), value: 20 },\n { label: n(50), value: 50 },\n { label: n(75), value: 75 },\n { label: n(100), value: 100 },\n ]);\n const i18nComponent = getI18nComponent();\n\n const onSelectChange = (selectedNumberOfResults: number) => {\n emit('select', selectedNumberOfResults);\n };\n\n const translationPathKey = computed(() => (props.totalCount ? 'showingItemsWithTotal' : 'showingItems'));\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(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(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, n } = 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: n(value),\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=\"#001222\" 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=\"#001222\" 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=\"#001222\" 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=\"#001222\" 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=\"#001222\" 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=\"#001222\" 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","t","useI18n","dropdownId","generateUid","predefinedDropdownOptions","computed","i18nComponent","getI18nComponent","onSelectChange","selectedNumberOfResults","emit","translationPathKey","props","__default__$2","messages$1","onPageSelectChange","selectedPage","transformIntoOption","value","transformToPageNumber","_","index","listOfAvailablePages","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","ref","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","navigate","itemsPerPage","pageNumber","elements"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;iBA7BA,EAAA,GAAAC,GAAA,EAAA,IAAAC,EAAA,GASAC,IAAAC,EAAA,sCAAA,GACAC,IAAAC,EAAA,MAAA;AAAA,MAAiD,EAAA,OAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACnB,EAAA,OAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,EAAA,EAAA,GAAA,OAAA,GAAA;AAAA,MACA,EAAA,OAAA,EAAA,GAAA,GAAA,OAAA,IAAA;AAAA,IACE,CAAA,GAEhCC,IAAAC,EAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,UAAAD,CAAA;AAAA,IAAsC,GAG1CE,IAAAN,EAAA,MAAAO,EAAA,aAAA,0BAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCCAC,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;iBAnBA,EAAA,GAAAd,GAAA,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,uCAAA,GACAY,IAAA,CAAAC,MAAAN,EAAA,iBAAAM,CAAA,GACAV,IAAAC,EAAA,GAGAU,IAAA,CAAAC,OAAA;AAAA,MAAwE,OAAA,EAAAA,CAAA;AAAA,MACtD,OAAAA;AAAA,IACd,IAEJC,IAAA,CAAAC,GAAAC,MAAAA,IAAA,GACAC,IAAAjB;AAAA,MAA6B,MAAA,MAAA,KAAA,IAAA,MAAAO,EAAA,UAAA,GAAAO,CAAA,EAAA,IAAAF,CAAA;AAAA,IAC6D;;;;;;;;;;;;;;;;;;AClD9F,IAAAM,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;;;;;;;;;;;;;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,GAAAhC,EAAA,IAAAC,EAAA,GAEAgC,IAAA5B,EAAA,MAAAO,EAAA,SAAA,CAAA,GACAsB,IAAA7B,EAAA,MAAAO,EAAA,SAAAA,EAAA,UAAA,GACAuB,IAAA9B,EAAA,MACI,CAAAO,EAAA,WACAsB,EAAA,KAA0C,GAE9CE,IAAA/B,EAAA,MAAA;AACI,YAAAgC,IAAA,CAAAzB,EAAA,SACA0B,IAAA,CAAA1B,EAAA;AAEA,aAAAyB,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,IAAAC,EAAAH,EAAA,YAAA,CAAA,GACA,EAAA,WAAAI,EAAA,IAAAC,EAAAtC,CAAA,GACAuC,IAAAC,EAAA;AAAA,MAAuC,WAAAL,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,IAEvB,CAAA,GAGXI,IAAAhD;AAAA,MAAmB,MAAA,CAAAO,EAAA,cAAA,CAAAA,EAAA,OAAA,OAAA,KAAA,KAAAA,EAAA,aAAAA,EAAA,IAAA;AAAA,IACkE,GAGrF0C,IAAA,CAAAf,GAAAgB,MAAA;AACI,MAAA3C,EAAA,eACIF,EAAA,YAAA6B,CAAA,IAEA7B,EAAA,YAAA6B,GAAAgB,MAAA3C,KAAA,gBAAAA,EAAA,KAAA,GAEJF,EAAA,eAAA6B,CAAA;AAAA,IAA2B;kLAG/B,CAAAiB,MAAA;AACI,MAAAF,EAAAE,CAAA;AAAA,IAAmB,yBAGvB,CAAAC,MAAA;AACI,MAAA/C,EAAA,cAAA+C,CAAA,GACA/C,EAAA,eAAA+C,CAAA,GAIAH,EAAA,GAAAG,CAAA;AAAA,IAAoB,iCAGxB,OAAA;AAAA,MAA4C,iDAAA,CAAAd,EAAA,SAAA,KAAA/B,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import { B as w } from "./button.hF-nD1Og.js";
|
|
|
6
6
|
import { C as x } from "./cross.CC_B-vG-.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.BKdI_ooV.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.BGHbPUOr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.B05xkQ4e.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.BGHbPUOr.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;;;;;;;;;;;;;;;;;;"}
|