@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,387 +0,0 @@
|
|
|
1
|
-
import "./index.Cl4_42j5.js";
|
|
2
|
-
import { onMounted as T, nextTick as M, watch as O, unref as $, getCurrentScope as I, onScopeDispose as R, getCurrentInstance as N, ref as v, computed as p, watchEffect as j } from "vue";
|
|
3
|
-
function x(e) {
|
|
4
|
-
return I() ? (R(e), !0) : !1;
|
|
5
|
-
}
|
|
6
|
-
function w(e) {
|
|
7
|
-
return typeof e == "function" ? e() : $(e);
|
|
8
|
-
}
|
|
9
|
-
const L = typeof window < "u" && typeof document < "u";
|
|
10
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
11
|
-
const C = (e) => e != null, P = Object.prototype.toString, B = (e) => P.call(e) === "[object Object]", W = () => {
|
|
12
|
-
};
|
|
13
|
-
function z(e, t) {
|
|
14
|
-
function n(...o) {
|
|
15
|
-
return new Promise((s, i) => {
|
|
16
|
-
Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(s).catch(i);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return n;
|
|
20
|
-
}
|
|
21
|
-
const F = (e) => e();
|
|
22
|
-
function V(e, t = {}) {
|
|
23
|
-
let n, o, s = W;
|
|
24
|
-
const i = (c) => {
|
|
25
|
-
clearTimeout(c), s(), s = W;
|
|
26
|
-
};
|
|
27
|
-
return (c) => {
|
|
28
|
-
const d = w(e), a = w(t.maxWait);
|
|
29
|
-
return n && i(n), d <= 0 || a !== void 0 && a <= 0 ? (o && (i(o), o = null), Promise.resolve(c())) : new Promise((r, u) => {
|
|
30
|
-
s = t.rejectOnCancel ? u : r, a && !o && (o = setTimeout(() => {
|
|
31
|
-
n && i(n), o = null, r(c());
|
|
32
|
-
}, a)), n = setTimeout(() => {
|
|
33
|
-
o && i(o), o = null, r(c());
|
|
34
|
-
}, d);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function H(e, t) {
|
|
39
|
-
var n;
|
|
40
|
-
if (typeof e == "number")
|
|
41
|
-
return e + t;
|
|
42
|
-
const o = ((n = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : n[0]) || "", s = e.slice(o.length), i = Number.parseFloat(o) + t;
|
|
43
|
-
return Number.isNaN(i) ? e : i + s;
|
|
44
|
-
}
|
|
45
|
-
function D(e) {
|
|
46
|
-
return N();
|
|
47
|
-
}
|
|
48
|
-
function G(e, t, n = {}) {
|
|
49
|
-
const {
|
|
50
|
-
eventFilter: o = F,
|
|
51
|
-
...s
|
|
52
|
-
} = n;
|
|
53
|
-
return O(
|
|
54
|
-
e,
|
|
55
|
-
z(
|
|
56
|
-
o,
|
|
57
|
-
t
|
|
58
|
-
),
|
|
59
|
-
s
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
function _(e, t = !0, n) {
|
|
63
|
-
D() ? T(e, n) : t ? e() : M(e);
|
|
64
|
-
}
|
|
65
|
-
function ee(e, t, n = {}) {
|
|
66
|
-
const {
|
|
67
|
-
debounce: o = 0,
|
|
68
|
-
maxWait: s = void 0,
|
|
69
|
-
...i
|
|
70
|
-
} = n;
|
|
71
|
-
return G(
|
|
72
|
-
e,
|
|
73
|
-
t,
|
|
74
|
-
{
|
|
75
|
-
...i,
|
|
76
|
-
eventFilter: V(o, { maxWait: s })
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
const m = L ? window : void 0;
|
|
81
|
-
function b(e) {
|
|
82
|
-
var t;
|
|
83
|
-
const n = w(e);
|
|
84
|
-
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
85
|
-
}
|
|
86
|
-
function g(...e) {
|
|
87
|
-
let t, n, o, s;
|
|
88
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, s] = e, t = m) : [t, n, o, s] = e, !t)
|
|
89
|
-
return W;
|
|
90
|
-
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
91
|
-
const i = [], l = () => {
|
|
92
|
-
i.forEach((r) => r()), i.length = 0;
|
|
93
|
-
}, c = (r, u, f, h) => (r.addEventListener(u, f, h), () => r.removeEventListener(u, f, h)), d = O(
|
|
94
|
-
() => [b(t), w(s)],
|
|
95
|
-
([r, u]) => {
|
|
96
|
-
if (l(), !r)
|
|
97
|
-
return;
|
|
98
|
-
const f = B(u) ? { ...u } : u;
|
|
99
|
-
i.push(
|
|
100
|
-
...n.flatMap((h) => o.map((y) => c(r, h, y, f)))
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
{ immediate: !0, flush: "post" }
|
|
104
|
-
), a = () => {
|
|
105
|
-
d(), l();
|
|
106
|
-
};
|
|
107
|
-
return x(a), a;
|
|
108
|
-
}
|
|
109
|
-
function U(e) {
|
|
110
|
-
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
111
|
-
}
|
|
112
|
-
function te(...e) {
|
|
113
|
-
let t, n, o = {};
|
|
114
|
-
e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
115
|
-
const {
|
|
116
|
-
target: s = m,
|
|
117
|
-
eventName: i = "keydown",
|
|
118
|
-
passive: l = !1,
|
|
119
|
-
dedupe: c = !1
|
|
120
|
-
} = o, d = U(t);
|
|
121
|
-
return g(s, i, (r) => {
|
|
122
|
-
r.repeat && w(c) || d(r) && n(r);
|
|
123
|
-
}, l);
|
|
124
|
-
}
|
|
125
|
-
function Y() {
|
|
126
|
-
const e = v(!1);
|
|
127
|
-
return N() && T(() => {
|
|
128
|
-
e.value = !0;
|
|
129
|
-
}, void 0), e;
|
|
130
|
-
}
|
|
131
|
-
function A(e) {
|
|
132
|
-
const t = Y();
|
|
133
|
-
return p(() => (t.value, !!e()));
|
|
134
|
-
}
|
|
135
|
-
function q(e, t, n = {}) {
|
|
136
|
-
const { window: o = m, ...s } = n;
|
|
137
|
-
let i;
|
|
138
|
-
const l = A(() => o && "MutationObserver" in o), c = () => {
|
|
139
|
-
i && (i.disconnect(), i = void 0);
|
|
140
|
-
}, d = p(() => {
|
|
141
|
-
const f = w(e), h = (Array.isArray(f) ? f : [f]).map(b).filter(C);
|
|
142
|
-
return new Set(h);
|
|
143
|
-
}), a = O(
|
|
144
|
-
() => d.value,
|
|
145
|
-
(f) => {
|
|
146
|
-
c(), l.value && f.size && (i = new MutationObserver(t), f.forEach((h) => i.observe(h, s)));
|
|
147
|
-
},
|
|
148
|
-
{ immediate: !0, flush: "post" }
|
|
149
|
-
), r = () => i == null ? void 0 : i.takeRecords(), u = () => {
|
|
150
|
-
a(), c();
|
|
151
|
-
};
|
|
152
|
-
return x(u), {
|
|
153
|
-
isSupported: l,
|
|
154
|
-
stop: u,
|
|
155
|
-
takeRecords: r
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function X(e = {}) {
|
|
159
|
-
var t;
|
|
160
|
-
const {
|
|
161
|
-
window: n = m,
|
|
162
|
-
deep: o = !0,
|
|
163
|
-
triggerOnRemoval: s = !1
|
|
164
|
-
} = e, i = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
|
|
165
|
-
var a;
|
|
166
|
-
let r = i == null ? void 0 : i.activeElement;
|
|
167
|
-
if (o)
|
|
168
|
-
for (; r != null && r.shadowRoot; )
|
|
169
|
-
r = (a = r == null ? void 0 : r.shadowRoot) == null ? void 0 : a.activeElement;
|
|
170
|
-
return r;
|
|
171
|
-
}, c = v(), d = () => {
|
|
172
|
-
c.value = l();
|
|
173
|
-
};
|
|
174
|
-
return n && (g(n, "blur", (a) => {
|
|
175
|
-
a.relatedTarget === null && d();
|
|
176
|
-
}, !0), g(n, "focus", d, !0)), s && q(i, (a) => {
|
|
177
|
-
a.filter((r) => r.removedNodes.length).map((r) => Array.from(r.removedNodes)).flat().forEach((r) => {
|
|
178
|
-
r === c.value && d();
|
|
179
|
-
});
|
|
180
|
-
}, {
|
|
181
|
-
childList: !0,
|
|
182
|
-
subtree: !0
|
|
183
|
-
}), d(), c;
|
|
184
|
-
}
|
|
185
|
-
function E(e, t = {}) {
|
|
186
|
-
const { window: n = m } = t, o = A(() => n && "matchMedia" in n && typeof n.matchMedia == "function");
|
|
187
|
-
let s;
|
|
188
|
-
const i = v(!1), l = (a) => {
|
|
189
|
-
i.value = a.matches;
|
|
190
|
-
}, c = () => {
|
|
191
|
-
s && ("removeEventListener" in s ? s.removeEventListener("change", l) : s.removeListener(l));
|
|
192
|
-
}, d = j(() => {
|
|
193
|
-
o.value && (c(), s = n.matchMedia(w(e)), "addEventListener" in s ? s.addEventListener("change", l) : s.addListener(l), i.value = s.matches);
|
|
194
|
-
});
|
|
195
|
-
return x(() => {
|
|
196
|
-
d(), c(), s = void 0;
|
|
197
|
-
}), i;
|
|
198
|
-
}
|
|
199
|
-
function ne(e, t = {}) {
|
|
200
|
-
function n(r, u) {
|
|
201
|
-
let f = w(e[w(r)]);
|
|
202
|
-
return u != null && (f = H(f, u)), typeof f == "number" && (f = `${f}px`), f;
|
|
203
|
-
}
|
|
204
|
-
const { window: o = m, strategy: s = "min-width" } = t;
|
|
205
|
-
function i(r) {
|
|
206
|
-
return o ? o.matchMedia(r).matches : !1;
|
|
207
|
-
}
|
|
208
|
-
const l = (r) => E(() => `(min-width: ${n(r)})`, t), c = (r) => E(() => `(max-width: ${n(r)})`, t), d = Object.keys(e).reduce((r, u) => (Object.defineProperty(r, u, {
|
|
209
|
-
get: () => s === "min-width" ? l(u) : c(u),
|
|
210
|
-
enumerable: !0,
|
|
211
|
-
configurable: !0
|
|
212
|
-
}), r), {});
|
|
213
|
-
function a() {
|
|
214
|
-
const r = Object.keys(e).map((u) => [u, l(u)]);
|
|
215
|
-
return p(() => r.filter(([, u]) => u.value).map(([u]) => u));
|
|
216
|
-
}
|
|
217
|
-
return Object.assign(d, {
|
|
218
|
-
greaterOrEqual: l,
|
|
219
|
-
smallerOrEqual: c,
|
|
220
|
-
greater(r) {
|
|
221
|
-
return E(() => `(min-width: ${n(r, 0.1)})`, t);
|
|
222
|
-
},
|
|
223
|
-
smaller(r) {
|
|
224
|
-
return E(() => `(max-width: ${n(r, -0.1)})`, t);
|
|
225
|
-
},
|
|
226
|
-
between(r, u) {
|
|
227
|
-
return E(() => `(min-width: ${n(r)}) and (max-width: ${n(u, -0.1)})`, t);
|
|
228
|
-
},
|
|
229
|
-
isGreater(r) {
|
|
230
|
-
return i(`(min-width: ${n(r, 0.1)})`);
|
|
231
|
-
},
|
|
232
|
-
isGreaterOrEqual(r) {
|
|
233
|
-
return i(`(min-width: ${n(r)})`);
|
|
234
|
-
},
|
|
235
|
-
isSmaller(r) {
|
|
236
|
-
return i(`(max-width: ${n(r, -0.1)})`);
|
|
237
|
-
},
|
|
238
|
-
isSmallerOrEqual(r) {
|
|
239
|
-
return i(`(max-width: ${n(r)})`);
|
|
240
|
-
},
|
|
241
|
-
isInBetween(r, u) {
|
|
242
|
-
return i(`(min-width: ${n(r)}) and (max-width: ${n(u, -0.1)})`);
|
|
243
|
-
},
|
|
244
|
-
current: a,
|
|
245
|
-
active() {
|
|
246
|
-
const r = a();
|
|
247
|
-
return p(() => r.value.length === 0 ? "" : r.value.at(-1));
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
function k(e, t, n = {}) {
|
|
252
|
-
const { window: o = m, ...s } = n;
|
|
253
|
-
let i;
|
|
254
|
-
const l = A(() => o && "ResizeObserver" in o), c = () => {
|
|
255
|
-
i && (i.disconnect(), i = void 0);
|
|
256
|
-
}, d = p(() => {
|
|
257
|
-
const u = w(e);
|
|
258
|
-
return Array.isArray(u) ? u.map((f) => b(f)) : [b(u)];
|
|
259
|
-
}), a = O(
|
|
260
|
-
d,
|
|
261
|
-
(u) => {
|
|
262
|
-
if (c(), l.value && o) {
|
|
263
|
-
i = new ResizeObserver(t);
|
|
264
|
-
for (const f of u)
|
|
265
|
-
f && i.observe(f, s);
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
{ immediate: !0, flush: "post" }
|
|
269
|
-
), r = () => {
|
|
270
|
-
c(), a();
|
|
271
|
-
};
|
|
272
|
-
return x(r), {
|
|
273
|
-
isSupported: l,
|
|
274
|
-
stop: r
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
function re(e, t = { width: 0, height: 0 }, n = {}) {
|
|
278
|
-
const { window: o = m, box: s = "content-box" } = n, i = p(() => {
|
|
279
|
-
var u, f;
|
|
280
|
-
return (f = (u = b(e)) == null ? void 0 : u.namespaceURI) == null ? void 0 : f.includes("svg");
|
|
281
|
-
}), l = v(t.width), c = v(t.height), { stop: d } = k(
|
|
282
|
-
e,
|
|
283
|
-
([u]) => {
|
|
284
|
-
const f = s === "border-box" ? u.borderBoxSize : s === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
|
|
285
|
-
if (o && i.value) {
|
|
286
|
-
const h = b(e);
|
|
287
|
-
if (h) {
|
|
288
|
-
const y = h.getBoundingClientRect();
|
|
289
|
-
l.value = y.width, c.value = y.height;
|
|
290
|
-
}
|
|
291
|
-
} else if (f) {
|
|
292
|
-
const h = Array.isArray(f) ? f : [f];
|
|
293
|
-
l.value = h.reduce((y, { inlineSize: S }) => y + S, 0), c.value = h.reduce((y, { blockSize: S }) => y + S, 0);
|
|
294
|
-
} else
|
|
295
|
-
l.value = u.contentRect.width, c.value = u.contentRect.height;
|
|
296
|
-
},
|
|
297
|
-
n
|
|
298
|
-
);
|
|
299
|
-
_(() => {
|
|
300
|
-
const u = b(e);
|
|
301
|
-
u && (l.value = "offsetWidth" in u ? u.offsetWidth : t.width, c.value = "offsetHeight" in u ? u.offsetHeight : t.height);
|
|
302
|
-
});
|
|
303
|
-
const a = O(
|
|
304
|
-
() => b(e),
|
|
305
|
-
(u) => {
|
|
306
|
-
l.value = u ? t.width : 0, c.value = u ? t.height : 0;
|
|
307
|
-
}
|
|
308
|
-
);
|
|
309
|
-
function r() {
|
|
310
|
-
d(), a();
|
|
311
|
-
}
|
|
312
|
-
return {
|
|
313
|
-
width: l,
|
|
314
|
-
height: c,
|
|
315
|
-
stop: r
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
const K = "focusin", Q = "focusout";
|
|
319
|
-
function oe(e, t = {}) {
|
|
320
|
-
const { window: n = m } = t, o = p(() => b(e)), s = v(!1), i = p(() => s.value), l = X(t);
|
|
321
|
-
return !n || !l.value ? { focused: i } : (g(o, K, () => s.value = !0), g(o, Q, () => s.value = !1), { focused: i });
|
|
322
|
-
}
|
|
323
|
-
function ie(e = {}) {
|
|
324
|
-
const { window: t = m, behavior: n = "auto" } = e;
|
|
325
|
-
if (!t)
|
|
326
|
-
return {
|
|
327
|
-
x: v(0),
|
|
328
|
-
y: v(0)
|
|
329
|
-
};
|
|
330
|
-
const o = v(t.scrollX), s = v(t.scrollY), i = p({
|
|
331
|
-
get() {
|
|
332
|
-
return o.value;
|
|
333
|
-
},
|
|
334
|
-
set(c) {
|
|
335
|
-
scrollTo({ left: c, behavior: n });
|
|
336
|
-
}
|
|
337
|
-
}), l = p({
|
|
338
|
-
get() {
|
|
339
|
-
return s.value;
|
|
340
|
-
},
|
|
341
|
-
set(c) {
|
|
342
|
-
scrollTo({ top: c, behavior: n });
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
return g(
|
|
346
|
-
t,
|
|
347
|
-
"scroll",
|
|
348
|
-
() => {
|
|
349
|
-
o.value = t.scrollX, s.value = t.scrollY;
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
capture: !1,
|
|
353
|
-
passive: !0
|
|
354
|
-
}
|
|
355
|
-
), { x: i, y: l };
|
|
356
|
-
}
|
|
357
|
-
function ue(e = {}) {
|
|
358
|
-
const {
|
|
359
|
-
window: t = m,
|
|
360
|
-
initialWidth: n = Number.POSITIVE_INFINITY,
|
|
361
|
-
initialHeight: o = Number.POSITIVE_INFINITY,
|
|
362
|
-
listenOrientation: s = !0,
|
|
363
|
-
includeScrollbar: i = !0,
|
|
364
|
-
type: l = "inner"
|
|
365
|
-
} = e, c = v(n), d = v(o), a = () => {
|
|
366
|
-
t && (l === "outer" ? (c.value = t.outerWidth, d.value = t.outerHeight) : i ? (c.value = t.innerWidth, d.value = t.innerHeight) : (c.value = t.document.documentElement.clientWidth, d.value = t.document.documentElement.clientHeight));
|
|
367
|
-
};
|
|
368
|
-
if (a(), _(a), g("resize", a, { passive: !0 }), s) {
|
|
369
|
-
const r = E("(orientation: portrait)");
|
|
370
|
-
O(r, () => a());
|
|
371
|
-
}
|
|
372
|
-
return { width: c, height: d };
|
|
373
|
-
}
|
|
374
|
-
export {
|
|
375
|
-
re as a,
|
|
376
|
-
k as b,
|
|
377
|
-
ie as c,
|
|
378
|
-
oe as d,
|
|
379
|
-
E as e,
|
|
380
|
-
ne as f,
|
|
381
|
-
q as g,
|
|
382
|
-
X as h,
|
|
383
|
-
te as o,
|
|
384
|
-
ue as u,
|
|
385
|
-
ee as w
|
|
386
|
-
};
|
|
387
|
-
//# sourceMappingURL=index.48Mn1OCp.js.map
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, ref as r, computed as v, watch as I, nextTick as T } from "vue";
|
|
2
|
-
import { d as w, B as k } from "./typography.J1v_SPG3.js";
|
|
3
|
-
import { B as S } from "./button.D7K0uXQm.js";
|
|
4
|
-
import { B as M } from "./loading-indicator.z8COalOc.js";
|
|
5
|
-
import { B as L, s as z, g as D, a as O, f as P } from "./focus-trap.DEHn1dxN.js";
|
|
6
|
-
import { E as R } from "./expand.C263WARj.js";
|
|
7
|
-
import { C as W } from "./cross.CJ5EEL2c.js";
|
|
8
|
-
import { g as $ } from "./generate-uid.NJ8tVoha.js";
|
|
9
|
-
import { u as A } from "./i18n.BQkEbtPM.js";
|
|
10
|
-
import { a as K, b as N } from "./index.48Mn1OCp.js";
|
|
11
|
-
import { n as U } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
|
-
import "../assets/inspector.css";
|
|
13
|
-
const j = {
|
|
14
|
-
"en-US": {
|
|
15
|
-
close: "Close",
|
|
16
|
-
expand: "Expand",
|
|
17
|
-
inspector: "Inspector",
|
|
18
|
-
returnToMainContent: "Return to main content (Ctrl+Shift+S)",
|
|
19
|
-
returnToMainContentDescription: "You can use Ctrl + Shift + S to navigate between the inspector and page sections."
|
|
20
|
-
},
|
|
21
|
-
"ja-JP": {
|
|
22
|
-
close: "閉じる",
|
|
23
|
-
expand: "展開"
|
|
24
|
-
},
|
|
25
|
-
"pt-BR": {
|
|
26
|
-
close: "Fechar",
|
|
27
|
-
expand: "Expandir"
|
|
28
|
-
}
|
|
29
|
-
}, q = { i18n: { messages: j } }, J = /* @__PURE__ */ E({
|
|
30
|
-
...q,
|
|
31
|
-
__name: "inspector",
|
|
32
|
-
props: {
|
|
33
|
-
activePage: { default: "" },
|
|
34
|
-
expandable: { type: Boolean, default: !1 },
|
|
35
|
-
isOpen: { type: Boolean, default: !1 },
|
|
36
|
-
loading: { type: Boolean, default: !1 },
|
|
37
|
-
size: { default: "small" },
|
|
38
|
-
title: null
|
|
39
|
-
},
|
|
40
|
-
emits: ["update:is-open", "update:active-page", "expand"],
|
|
41
|
-
setup(_, { emit: n }) {
|
|
42
|
-
const t = _, { t: e } = A(), s = $("returnToMainContentDescription"), d = r(null), c = r(null), C = r(null), o = r(null), p = r(null), u = r(!1), { width: f } = K(d), m = v(() => {
|
|
43
|
-
const a = t.size === "small" ? 575 : 750;
|
|
44
|
-
return f.value > 0 && f.value <= a;
|
|
45
|
-
}), y = v(() => ({
|
|
46
|
-
[`b-inspector--${t.size}`]: !0,
|
|
47
|
-
"b-inspector--is-compact": m.value
|
|
48
|
-
})), h = v(() => `${e("inspector")}, ${t.title}`), g = async () => {
|
|
49
|
-
t.isOpen ? (o.value = document.activeElement, await T(), z(c.value, o.value)) : i(o.value);
|
|
50
|
-
}, B = (a) => {
|
|
51
|
-
if (u.value)
|
|
52
|
-
return;
|
|
53
|
-
const l = a.shiftKey ? -1 : 1, F = D(l, c.value);
|
|
54
|
-
O() === F && (a.preventDefault(), p.value = document.activeElement, i(o.value), n("update:active-page", void 0));
|
|
55
|
-
}, x = (a) => {
|
|
56
|
-
const l = a.shiftKey && a.ctrlKey && a.key === "S";
|
|
57
|
-
t.isOpen && !u.value && l && b();
|
|
58
|
-
}, b = () => {
|
|
59
|
-
P(c.value) ? (p.value = document.activeElement, i(o.value), n("update:active-page", void 0)) : (o.value = document.activeElement, i(p.value));
|
|
60
|
-
}, i = (a) => {
|
|
61
|
-
a && (a == null || a.focus(), document.activeElement !== a && i(a.parentElement));
|
|
62
|
-
};
|
|
63
|
-
return I(
|
|
64
|
-
() => t.activePage,
|
|
65
|
-
() => {
|
|
66
|
-
t.activePage && g();
|
|
67
|
-
}
|
|
68
|
-
), N(c, (a) => {
|
|
69
|
-
const l = a[0];
|
|
70
|
-
u.value = d.value.clientWidth === l.contentRect.width;
|
|
71
|
-
}), t.activePage || w(
|
|
72
|
-
'BentoInspector "active-page" as optional',
|
|
73
|
-
`Make sure to set the "active-page" prop and keep it in sync with "update:active-page".
|
|
74
|
-
"active-page" prop will be required in the next version`,
|
|
75
|
-
"2.0.0"
|
|
76
|
-
), { __sfc: !0, props: t, emit: n, t: e, returnToMainContentDescriptionId: s, wrapper: d, inspector: c, page: C, pageLastFocusedElement: o, inspectorLastFocusedElement: p, isFullWidthInspector: u, wrapperWidth: f, isCompact: m, conditionalClass: y, inspectorAriaLabel: h, setFocus: g, handleTabNavigation: B, handleSectionFocus: x, moveFocusBetweenSections: b, focusElement: i, BentoTypography: k, BentoButton: S, BentoLoadingIndicator: M, BentoFocusTrap: L, ExpandIcon: R, CrossIcon: W };
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
var Y = function() {
|
|
80
|
-
var n = this, t = n._self._c, e = n._self._setupProxy;
|
|
81
|
-
return t("div", { ref: "wrapper", staticClass: "b-inspector", class: e.conditionalClass, on: { keydown: e.handleSectionFocus } }, [t("div", { ref: "page", staticClass: "b-inspector__page-wrapper" }, [t("div", { staticClass: "b-inspector__page" }, [n._t("page")], 2)]), t("Transition", { attrs: { name: "b-inspector__animation", mode: "out-in" }, on: { "before-enter": e.setFocus, "after-leave": e.setFocus } }, [n.isOpen ? t("aside", { ref: "inspector", staticClass: "b-inspector__container-wrapper", attrs: { "aria-label": e.inspectorAriaLabel }, on: { keydown: function(s) {
|
|
82
|
-
return !s.type.indexOf("key") && n._k(s.keyCode, "tab", 9, s.key, "Tab") ? null : e.handleTabNavigation.apply(null, arguments);
|
|
83
|
-
} } }, [t(e.BentoFocusTrap, { attrs: { disabled: !e.isFullWidthInspector } }, [t("div", { staticClass: "b-inspector__container" }, [t("div", { staticClass: "b-inspector__header" }, [e.isFullWidthInspector ? n._e() : [t(e.BentoButton, { staticClass: "b-inspector__return-content", attrs: { variant: "secondary", condensed: "", "aria-describedby": e.returnToMainContentDescriptionId }, on: { click: e.moveFocusBetweenSections } }, [n._v(" " + n._s(e.t("returnToMainContent")) + " ")]), t("span", { staticClass: "b-inspector__return-content-description", attrs: { id: e.returnToMainContentDescriptionId } }, [n._v(n._s(e.t("returnToMainContentDescription")))])], t(e.BentoTypography, { staticClass: "b-inspector__title", attrs: { el: "h2", variant: "title" } }, [n._v(" " + n._s(n.title) + " ")]), t("div", { staticClass: "b-inspector__icons" }, [n.expandable ? t(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(s) {
|
|
84
|
-
return e.emit("expand");
|
|
85
|
-
} }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
|
|
86
|
-
return [t(e.ExpandIcon, { attrs: { "svg-title": e.t("expand") } })];
|
|
87
|
-
}, proxy: !0 }], null, !1, 1210869445) }) : n._e(), t(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(s) {
|
|
88
|
-
return e.emit("update:is-open", !1);
|
|
89
|
-
} }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
|
|
90
|
-
return [t(e.CrossIcon, { attrs: { "svg-title": e.t("close") } })];
|
|
91
|
-
}, proxy: !0 }], null, !1, 858730413) })], 1)], 2), t("div", { staticClass: "b-inspector__content" }, [n.loading ? t(e.BentoLoadingIndicator, { staticClass: "b-inspector__loading-indicator", attrs: { large: "" } }) : n._t("content")], 2)])])], 1) : n._e()])], 1);
|
|
92
|
-
}, G = [], H = /* @__PURE__ */ U(
|
|
93
|
-
J,
|
|
94
|
-
Y,
|
|
95
|
-
G,
|
|
96
|
-
!1,
|
|
97
|
-
null,
|
|
98
|
-
"91016e89"
|
|
99
|
-
);
|
|
100
|
-
const rt = H.exports, ct = ["small", "large"];
|
|
101
|
-
export {
|
|
102
|
-
ct as B,
|
|
103
|
-
rt as i
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=inspector.types.Cloa1Rnz.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspector.types.Cloa1Rnz.js","sources":["../../src/components/inspector/inspector.vue","../../src/components/inspector/inspector.types.ts"],"sourcesContent":["<template>\n <div ref=\"wrapper\" class=\"b-inspector\" :class=\"conditionalClass\" @keydown=\"handleSectionFocus\">\n <div ref=\"page\" class=\"b-inspector__page-wrapper\">\n <div class=\"b-inspector__page\">\n <slot name=\"page\" />\n </div>\n </div>\n <Transition name=\"b-inspector__animation\" mode=\"out-in\" @before-enter=\"setFocus\" @after-leave=\"setFocus\">\n <aside\n v-if=\"isOpen\"\n ref=\"inspector\"\n class=\"b-inspector__container-wrapper\"\n :aria-label=\"inspectorAriaLabel\"\n @keydown.tab=\"handleTabNavigation\"\n >\n <bento-focus-trap :disabled=\"!isFullWidthInspector\">\n <div class=\"b-inspector__container\">\n <div class=\"b-inspector__header\">\n <template v-if=\"!isFullWidthInspector\">\n <bento-button\n class=\"b-inspector__return-content\"\n variant=\"secondary\"\n condensed\n :aria-describedby=\"returnToMainContentDescriptionId\"\n @click=\"moveFocusBetweenSections\"\n >\n {{ t('returnToMainContent') }}\n </bento-button>\n <span\n :id=\"returnToMainContentDescriptionId\"\n class=\"b-inspector__return-content-description\"\n >{{ t('returnToMainContentDescription') }}</span\n >\n </template>\n <bento-typography el=\"h2\" variant=\"title\" class=\"b-inspector__title\">\n {{ title }}\n </bento-typography>\n <div class=\"b-inspector__icons\">\n <bento-button v-if=\"expandable\" variant=\"tertiary\" @click=\"emit('expand')\">\n <template #iconLeft><expand-icon :svg-title=\"t('expand')\"></expand-icon></template>\n </bento-button>\n <bento-button variant=\"tertiary\" @click=\"emit('update:is-open', false)\">\n <template #iconLeft><cross-icon :svg-title=\"t('close')\"></cross-icon></template>\n </bento-button>\n </div>\n </div>\n <div class=\"b-inspector__content\">\n <bento-loading-indicator v-if=\"loading\" large class=\"b-inspector__loading-indicator\" />\n <slot v-else name=\"content\" />\n </div>\n </div>\n </bento-focus-trap>\n </aside>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n import { useElementSize, useResizeObserver } from '@vueuse/core';\n import moveFocusInside, { focusInside, getActiveElement } from 'focus-lock';\n\n import { BentoInspectorSize } from './inspector.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n activePage: { default: '' },\n expandable: { type: Boolean, default: false },\n isOpen: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n size: { default: 'small' },\n title: null\n});\n\n const emit = defineEmits([\"update:is-open\", \"update:active-page\", \"expand\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const returnToMainContentDescriptionId = generateUid('returnToMainContentDescription');\n const wrapper = ref<HTMLElement>(null);\n const inspector = ref<HTMLElement>(null);\n const page = ref<HTMLElement>(null);\n const pageLastFocusedElement = ref<HTMLElement>(null);\n const inspectorLastFocusedElement = ref<HTMLElement>(null);\n const isFullWidthInspector = ref(false);\n\n const { width: wrapperWidth } = useElementSize(wrapper);\n\n const isCompact = computed(() => {\n const threshold = props.size === 'small' ? 575 : 750;\n return wrapperWidth.value > 0 && wrapperWidth.value <= threshold;\n });\n\n const conditionalClass = computed(() => ({\n [`b-inspector--${props.size}`]: true,\n [`b-inspector--is-compact`]: isCompact.value,\n }));\n\n const inspectorAriaLabel = computed(() => `${t('inspector')}, ${props.title}`);\n\n const setFocus = async () => {\n if (props.isOpen) {\n pageLastFocusedElement.value = document.activeElement as HTMLElement;\n await nextTick();\n moveFocusInside(inspector.value, pageLastFocusedElement.value);\n } else {\n // This doesn't work with data grid cell actions, as the button gets destroyed once is not being hovered.\n // To be reviewed after LevelAccess revision\n focusElement(pageLastFocusedElement.value);\n }\n };\n\n const handleTabNavigation = event => {\n if (isFullWidthInspector.value) {\n return;\n }\n const direction = event.shiftKey ? -1 : 1;\n const focusableEl = getNextFocusableElement(direction, inspector.value);\n // If the nextfocusableEl is the same as the activeElement that means it's the last focusable element\n // inside the inspector, so the focus is moved back to the last focused element on the page\n if (getActiveElement() === focusableEl) {\n event.preventDefault();\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(pageLastFocusedElement.value);\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n }\n };\n\n const handleSectionFocus = event => {\n const sectionShortcut = event.shiftKey && event.ctrlKey && event.key === 'S';\n if (props.isOpen && !isFullWidthInspector.value && sectionShortcut) {\n moveFocusBetweenSections();\n }\n };\n\n const moveFocusBetweenSections = () => {\n if (focusInside(inspector.value)) {\n inspectorLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(pageLastFocusedElement.value);\n // Set active-page as undefined when focus is not on page\n emit('update:active-page', undefined);\n } else {\n pageLastFocusedElement.value = document.activeElement as HTMLElement;\n focusElement(inspectorLastFocusedElement.value);\n }\n };\n\n const focusElement = (element: HTMLElement) => {\n if (!element) {\n return;\n }\n element?.focus();\n if (document.activeElement !== element) {\n focusElement(element.parentElement);\n }\n };\n\n watch(\n () => props.activePage,\n () => {\n if (props.activePage) {\n setFocus();\n }\n }\n );\n\n useResizeObserver(inspector, entries => {\n const entry = entries[0];\n\n isFullWidthInspector.value = wrapper.value.clientWidth === entry.contentRect.width;\n });\n\n if (!props.activePage) {\n deprecate(\n 'BentoInspector \"active-page\" as optional',\n `Make sure to set the \"active-page\" prop and keep it in sync with \"update:active-page\".\n \"active-page\" prop will be required in the next version`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Inspector allows users to access additional information or details of an object/item. The inspector opens adjacent to the main content, pushing it aside to maintain visibility and accessibility to both the main content and inspector.\n *\n * @example\n * import { BentoInspector } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInspector },\n * template: `\n * <bento-inspector\n * title=\"Inspector\"\n * size=\"large\"\n * :is-open=\"isOpen\"\n * :active-page=\"activePage\"\n * expandable\n * @update:is-open=\"isOpen = $event\"\n * @update:active-page=\"activePage = $event\"\n * >\n * <template #page>Content of the page</template>\n * <template #content>Content of the inspector</template>\n * </bento-inspector>\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./inspector.scss\" />\n","export const BentoInspectorSizeOptions = ['small', 'large'] as const;\n\nexport type BentoInspectorSize = (typeof BentoInspectorSizeOptions)[number];\n"],"names":["__default__","messages","t","useI18n","returnToMainContentDescriptionId","generateUid","wrapper","ref","inspector","page","pageLastFocusedElement","inspectorLastFocusedElement","isFullWidthInspector","wrapperWidth","useElementSize","isCompact","computed","threshold","props","conditionalClass","inspectorAriaLabel","setFocus$1","nextTick","setFocus","focusElement","handleTabNavigation","event","direction","focusableEl","getNextFocusableElement","getActiveElement","emit","handleSectionFocus","sectionShortcut","moveFocusBetweenSections","focusInside","element","watch","useResizeObserver","entries","entry","deprecate","BentoInspectorSizeOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4NIA,IAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;;iBAnIA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,gCAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GACAG,IAAAH,EAAA,IAAA,GACAI,IAAAJ,EAAA,IAAA,GACAK,IAAAL,EAAA,EAAA,GAEA,EAAA,OAAAM,EAAA,IAAAC,EAAAR,CAAA,GAEAS,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAC,EAAA,SAAA,UAAA,MAAA;AACA,aAAAL,EAAA,QAAA,KAAAA,EAAA,SAAAI;AAAA,IAAuD,CAAA,GAG3DE,IAAAH,EAAA,OAAA;AAAA,MAAyC,CAAA,gBAAAE,EAAA,IAAA,EAAA,GAAA;AAAA,MACL,2BAAAH,EAAA;AAAA,IACO,EAAA,GAG3CK,IAAAJ,EAAA,MAAA,GAAAd,EAAA,WAAA,CAAA,KAAAgB,EAAA,KAAA,EAAA,GAEAG,IAAA,YAAA;AACI,MAAAH,EAAA,UACIR,EAAA,QAAA,SAAA,eACA,MAAAY,EAAA,GACAC,EAAAf,EAAA,OAAAE,EAAA,KAAA,KAIAc,EAAAd,EAAA,KAAA;AAAA,IACJ,GAGJe,IAAA,CAAAC,MAAA;AACI,UAAAd,EAAA;AACI;AAEJ,YAAAe,IAAAD,EAAA,WAAA,KAAA,GACAE,IAAAC,EAAAF,GAAAnB,EAAA,KAAA;AAGA,MAAAsB,EAAA,MAAAF,MACIF,EAAA,eAAA,GACAf,EAAA,QAAA,SAAA,eACAa,EAAAd,EAAA,KAAA,GAEAqB,EAAA,sBAAA,MAAA;AAAA,IACJ,GAGJC,IAAA,CAAAN,MAAA;AACI,YAAAO,IAAAP,EAAA,YAAAA,EAAA,WAAAA,EAAA,QAAA;AACA,MAAAR,EAAA,UAAA,CAAAN,EAAA,SAAAqB,KACIC,EAAA;AAAA,IACJ,GAGJA,IAAA,MAAA;AACI,MAAAC,EAAA3B,EAAA,KAAA,KACIG,EAAA,QAAA,SAAA,eACAa,EAAAd,EAAA,KAAA,GAEAqB,EAAA,sBAAA,MAAA,MAEArB,EAAA,QAAA,SAAA,eACAc,EAAAb,EAAA,KAAA;AAAA,IACJ,GAGJa,IAAA,CAAAY,MAAA;AACI,MAAAA,MAGAA,KAAA,QAAAA,EAAA,SACA,SAAA,kBAAAA,KACIZ,EAAAY,EAAA,aAAA;AAAA,IACJ;AAGJ,WAAAC;AAAA,MAAA,MAAAnB,EAAA;AAAA,MACgB,MAAA;AAER,QAAAA,EAAA,cACIG,EAAA;AAAA,MACJ;AAAA,IACJ,GAGJiB,EAAA9B,GAAA,CAAA+B,MAAA;AACI,YAAAC,IAAAD,EAAA,CAAA;AAEA,MAAA3B,EAAA,QAAAN,EAAA,MAAA,gBAAAkC,EAAA,YAAA;AAAA,IAA6E,CAAA,GAGjFtB,EAAA,cACIuB;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;;;;sBC9LCC,KAAA,CAAA,SAAA,OAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.BH3eB_7E.js","sources":["../../../core/src/components/link/link.types.ts","../../../ui-assets/icons-16/dist/vue/external-link.vue","../../src/components/link/link.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoLinkVariant {\n DEFAULT = 'default',\n QUIET = 'quiet',\n}\n\nexport interface LinkProps {\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography component.\n */\n disableTypography?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link and renders an external link icon.\n */\n external?: boolean;\n\n /**\n * Set to true if used inside a `BentoButton` component.\n */\n isButton?: boolean;\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n isNotRouting?: boolean;\n\n /**\n * Sets the target of the rendered link.\n */\n target?: string;\n\n /**\n * Set to true to truncate link. Doesn't work with disableTypography.\n */\n truncate?: boolean;\n\n /**\n * Link variant type affecting visual style.\n * @values default, quiet\n */\n variant?: BentoLinkVariant | `${BentoLinkVariant}`;\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M2.93933 11.9999L10.1893 4.74989H5.24999V3.24989H12.75V10.7499H11.25V5.81055L3.99999 13.0605L2.93933 11.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 <a\n v-if=\"external || isNotRouting\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n :aria-describedby=\"externalLinkId\"\n :href=\"$props.to.toString()\"\n :title=\"getAttributeTitle($attrs.title)\"\n :target=\"computedTarget\"\n @click=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n <span v-if=\"showExternalLinkIcon\" aria-hidden=\"true\" class=\"b-link__external-link-icon\">\n <external-link-icon />\n </span>\n <span v-if=\"external\" :id=\"externalLinkId\" class=\"b-link--visually-hidden\">{{ t('opensInNewTab') }}</span>\n </a>\n <router-link\n v-else\n v-bind=\"{ ...$attrs, ...$props }\"\n :class=\"conditionalClasses\"\n :target=\"target\"\n :to=\"props.to\"\n custom\n @click.native=\"onClick\"\n >\n <bento-typography v-if=\"!disableTypography\" class=\"b-link__text\" el=\"span\" variant=\"body\">\n <slot />\n </bento-typography>\n <slot v-else />\n </router-link>\n</template>\n\n<script setup lang=\"ts\">\n import { RouterLink } from 'vue-router';\n import { computed } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTypography } from '@/components/typography';\n import { BentoLinkVariant } from '@/core/components/link/link.types';\n import { useI18n } from '@/utils/ts/i18n';\n import type { RouterLinkSlotArgument } from 'vue-router/types/router.d.ts';\n import ExternalLinkIcon from '@adyen/ui-assets-icons-16/vue/external-link';\n import type { BentoLinkProps } from './link.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n to: null,\n replace: { type: Boolean },\n append: { type: Boolean },\n tag: null,\n activeClass: null,\n exact: { type: Boolean },\n exactPath: { type: Boolean },\n exactPathActiveClass: null,\n event: null,\n exactActiveClass: null,\n ariaCurrentValue: null,\n disableTypography: { type: Boolean },\n external: { type: Boolean },\n isButton: { type: Boolean },\n isNotRouting: { type: Boolean },\n target: { default: null },\n truncate: { type: Boolean },\n variant: { default: BentoLinkVariant.DEFAULT }\n});\n\n const externalLinkId = generateUid('external-link');\n\n const getAttributeTitle = (attributesTitle: unknown) => attributesTitle as string;\n\n const conditionalClasses = computed(() => ({\n 'b-link': !props.isButton,\n [`b-link--${BentoLinkVariant.QUIET}`]: props.variant === BentoLinkVariant.QUIET,\n [`b-link--truncate`]: props.truncate,\n }));\n\n const computedTarget = computed(() => (props.external ? (props.target ?? '_blank') : props.target));\n const showExternalLinkIcon = computed(() => !(props.isButton || props.isNotRouting));\n\n const emit = defineEmits([\"click\"]);\n\n const onClick = (e: MouseEvent, navigateCallback?: RouterLinkSlotArgument['navigate']) => {\n emit('click', e);\n if (navigateCallback) {\n navigateCallback();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Extends the `router-link` from the `vue-router` NPM package.\n *\n * @example\n * import { BentoLink } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoLink },\n * template: `\n * <bento-link to=\"/\">\n * link\n * </bento-link>\n * `\n * }\n */\n export default {\n name: 'bento-link',\n inheritAttrs: false,\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/link/link.scss\" />\n"],"names":["BentoLinkVariant","BentoLinkVariant2","uuid","_sfc_main$1","__default__","messages","t","useI18n","externalLinkId","generateUid","getAttributeTitle","attributesTitle","conditionalClasses","computed","props","computedTarget","showExternalLinkIcon","e","navigateCallback","emit"],"mappings":";;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACIZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;GCkGIE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAAA,EACQ,MAAA,EAAA,UAAAC,EAAA;AAElB;;;;;;;;;;;;;;;;;;;;;;;;iBAlEA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAuBAC,IAAAC,EAAA,eAAA,GAEAC,IAAA,CAAAC,MAAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,UAAA,CAAAC,EAAA;AAAA,MACtB,CAAA,WAAAd,EAAA,KAAA,EAAA,GAAAc,EAAA,YAAAd,EAAA;AAAA,MACyD,oBAAAc,EAAA;AAAA,IAC9C,EAAA,GAGhCC,IAAAF,EAAA,MAAAC,EAAA,WAAAA,EAAA,UAAA,WAAAA,EAAA,MAAA,GACAE,IAAAH,EAAA,MAAA,EAAAC,EAAA,YAAAA,EAAA,aAAA;sKAIA,CAAAG,GAAAC,MAAA;AACI,MAAAC,EAAA,SAAAF,CAAA,GACAC,KACIA,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.CX5fg6Ma.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=\"dropdownOptions\"\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, 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 const props = defineProps({\n itemsPerPage: { default: 50 },\n totalCount: { default: null }\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\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('pageOfTotalPages')\" tag=\"div\">\n <template #page>\n <bento-dropdown\n :id=\"dropdownId\"\n :aria-label=\"t('pageOfTotalPages', { page, totalPages })\"\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 <template #totalPages>{{ totalPages }}</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","onSelectChange","selectedNumberOfResults","emit","translationPathKey","computed","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","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","totalPages","navigate","itemsPerPage","pageNumber","elements"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;iBA9BAC,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,GAU/B,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,sCAAA,GACAC,IAAAC,EAAAN,CAAA,GACAO,IAAAC,EAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,UAAAD,CAAA;AAAA,IAAsC,GAG1CE,IAAAC,EAAA,MAAAC,EAAA,aAAA,0BAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCCAC,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;iBAnBA,EAAA,GAAAf,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,uCAAA,GACAa,IAAA,CAAAC,MAAAP,EAAA,iBAAAO,CAAA,GACAX,IAAAC,EAAA,GAGAW,IAAA,CAAAC,OAAA;AAAA,MAAwE,OAAAA,EAAA,SAAA;AAAA,MAC9C,OAAAA;AAAA,IACtB,IAEJC,IAAA,CAAAC,GAAAC,MAAAA,IAAA,GACAC,IAAAX;AAAA,MAA6B,MAAA,MAAA,KAAA,IAAA,MAAAC,EAAA,UAAA,GAAAO,CAAA,EAAA,IAAAF,CAAA;AAAA,IAC6D;;;;;;;;;;;;;;;;;;;;ACnD9F,IAAAM,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,GAAAjC,EAAA,IAAAC,EAAA,GAEAiC,IAAAtB,EAAA,MAAAC,EAAA,SAAA,CAAA,GACAsB,IAAAvB,EAAA,MAAAC,EAAA,SAAAA,EAAA,UAAA,GACAuB,IAAAxB,EAAA,MACI,CAAAC,EAAA,WACAsB,EAAA,KAA0C,GAE9CE,IAAAzB,EAAA,MAAA;AACI,YAAA0B,IAAA,CAAAzB,EAAA,SACA0B,IAAA,CAAA1B,EAAA;AAEA,aAAAyB,KAAAH,EAAA,SAAAI;AAAA,IAAmD,CAAA;8JAGvD,CAAAC,MAAA;AACI,MAAA9B,EAAA,YAAA8B,CAAA;AAAA,IAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBCiD5BC,KAAA,CAAA;;;;;;;;;;;;;;iBAtEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAA3C,EAAAyC,EAAA,YAAA,CAAA,GACA,EAAA,WAAAG,EAAA,IAAAC,EAAArC,CAAA,GACAsC,IAAAC,EAAA;AAAA,MAAuC,WAAAJ,EAAA;AAAA;AAAA,MACL,OAAAC;AAAA,IAEvB,CAAA,GAGXI,IAAAzC;AAAA,MAAmB,MAAA,CAAAC,EAAA,cAAA,CAAAA,EAAA,OAAA,OAAA,KAAA,KAAAA,EAAA,aAAAA,EAAA,IAAA;AAAA,IACkE,GAGrFyC,IAAA,CAAAd,GAAAe,MAAA;AACI,MAAA1C,EAAA,eACIH,EAAA,YAAA8B,CAAA,IAEA9B,EAAA,YAAA8B,GAAAe,MAAA1C,KAAA,gBAAAA,EAAA,KAAA,GAEJH,EAAA,eAAA8B,CAAA;AAAA,IAA2B;kLAG/B,CAAAgB,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,CAAAb,EAAA,SAAA,KAAA/B,EAAA;AAAA,IACsC;;;;;;;;;;;;;;;"}
|