@adyen/bento-vue3 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.CD5FQjE9.js → action-bar.BOCrfaHz.js} +6 -6
- package/dist/chunks/{action-bar.CD5FQjE9.js.map → action-bar.BOCrfaHz.js.map} +1 -1
- package/dist/chunks/{alert.CFb4Sejw.js → alert.CjegN2iG.js} +2 -2
- package/dist/chunks/{alert.CFb4Sejw.js.map → alert.CjegN2iG.js.map} +1 -1
- package/dist/chunks/{base-modal.qhldLovE.js → base-modal.DhzWPnD5.js} +29 -30
- package/dist/chunks/base-modal.DhzWPnD5.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.CxB1fVvx.js → button-actions-with-menu.CkyIwzNi.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.CxB1fVvx.js.map → button-actions-with-menu.CkyIwzNi.js.map} +1 -1
- package/dist/chunks/{button-actions.ODJKaCW7.js → button-actions.DWGBFisz.js} +2 -2
- package/dist/chunks/{button-actions.ODJKaCW7.js.map → button-actions.DWGBFisz.js.map} +1 -1
- package/dist/chunks/{button.BHZgsGkp.js → button.CVZJTZv0.js} +2 -2
- package/dist/chunks/{button.BHZgsGkp.js.map → button.CVZJTZv0.js.map} +1 -1
- package/dist/chunks/{calendar.Dymq4e0Y.js → calendar.D61aBwg1.js} +87 -90
- package/dist/chunks/{calendar.Dymq4e0Y.js.map → calendar.D61aBwg1.js.map} +1 -1
- package/dist/chunks/{card.DQ6g6hqK.js → card.DguoAMcm.js} +2 -2
- package/dist/chunks/{card.DQ6g6hqK.js.map → card.DguoAMcm.js.map} +1 -1
- package/dist/chunks/{checkbox-group.CiYObaZV.js → checkbox-group.CZ-J707C.js} +4 -4
- package/dist/chunks/{checkbox-group.CiYObaZV.js.map → checkbox-group.CZ-J707C.js.map} +1 -1
- package/dist/chunks/checkbox-input.DVayucaL.js +168 -0
- package/dist/chunks/checkbox-input.DVayucaL.js.map +1 -0
- package/dist/chunks/{checkbox.CWfZNdfT.js → checkbox.CMuObeL7.js} +4 -4
- package/dist/chunks/{checkbox.CWfZNdfT.js.map → checkbox.CMuObeL7.js.map} +1 -1
- package/dist/chunks/{code-snippet.CG00Tb5k.js → code-snippet.WgKhySvn.js} +5 -5
- package/dist/chunks/{code-snippet.CG00Tb5k.js.map → code-snippet.WgKhySvn.js.map} +1 -1
- package/dist/chunks/{controls-group.DgrzEh4C.js → controls-group.DsGEDyTw.js} +2 -2
- package/dist/chunks/{controls-group.DgrzEh4C.js.map → controls-group.DsGEDyTw.js.map} +1 -1
- package/dist/chunks/{copy.CfFh4b_c.js → copy.QuF9bDfT.js} +3 -3
- package/dist/chunks/{copy.CfFh4b_c.js.map → copy.QuF9bDfT.js.map} +1 -1
- package/dist/chunks/{dashboard-section.tza4iYcv.js → dashboard-section.fZiEAres.js} +4 -4
- package/dist/chunks/{dashboard-section.tza4iYcv.js.map → dashboard-section.fZiEAres.js.map} +1 -1
- package/dist/chunks/{dashed-underline.B2cIJkg_.js → dashed-underline.BZ_oZeHs.js} +3 -3
- package/dist/chunks/{dashed-underline.B2cIJkg_.js.map → dashed-underline.BZ_oZeHs.js.map} +1 -1
- package/dist/chunks/{data-grid-template.PGPytWvk.js → data-grid-template.Cw-0-al0.js} +3 -3
- package/dist/chunks/{data-grid-template.PGPytWvk.js.map → data-grid-template.Cw-0-al0.js.map} +1 -1
- package/dist/chunks/{data-grid.DW_9jlLU.js → data-grid.BVcmZ1X_.js} +19 -19
- package/dist/chunks/{data-grid.DW_9jlLU.js.map → data-grid.BVcmZ1X_.js.map} +1 -1
- package/dist/chunks/{date-picker.8jgg3MJm.js → date-picker.CWGFy7Hb.js} +17 -17
- package/dist/chunks/{date-picker.8jgg3MJm.js.map → date-picker.CWGFy7Hb.js.map} +1 -1
- package/dist/chunks/{date-range-picker.BxmkXpEh.js → date-range-picker.RzinIKLS.js} +26 -26
- package/dist/chunks/{date-range-picker.BxmkXpEh.js.map → date-range-picker.RzinIKLS.js.map} +1 -1
- package/dist/chunks/dialog-page.C72BX6So.js +175 -0
- package/dist/chunks/dialog-page.C72BX6So.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Bv1togfI.js → dropdown-tag.DCat3Pd2.js} +3 -3
- package/dist/chunks/{dropdown-tag.Bv1togfI.js.map → dropdown-tag.DCat3Pd2.js.map} +1 -1
- package/dist/chunks/{dropdown.CDNzhFMK.js → dropdown.D4lL2ytb.js} +30 -30
- package/dist/chunks/{dropdown.CDNzhFMK.js.map → dropdown.D4lL2ytb.js.map} +1 -1
- package/dist/chunks/{empty-state.DiXLZmQJ.js → empty-state.BGWjUH6G.js} +2 -2
- package/dist/chunks/{empty-state.DiXLZmQJ.js.map → empty-state.BGWjUH6G.js.map} +1 -1
- package/dist/chunks/{error-message.CPw3y44N.js → error-message.CjdvgIAh.js} +3 -3
- package/dist/chunks/error-message.CjdvgIAh.js.map +1 -0
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.Dv4sh1IO.js → file-uploader.faOTOytJ.js} +6 -6
- package/dist/chunks/{file-uploader.Dv4sh1IO.js.map → file-uploader.faOTOytJ.js.map} +1 -1
- package/dist/chunks/{filter-bar.D1tyv0cU.js → filter-bar.BbLKMSsn.js} +18 -18
- package/dist/chunks/{filter-bar.D1tyv0cU.js.map → filter-bar.BbLKMSsn.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.DsTyshyt.js → fixed-scroller.BjxA_R63.js} +2 -2
- package/dist/chunks/{fixed-scroller.DsTyshyt.js.map → fixed-scroller.BjxA_R63.js.map} +1 -1
- package/dist/chunks/{focus-trap.D9cfQpl7.js → focus-trap.DY5E-2JV.js} +2 -2
- package/dist/chunks/{focus-trap.D9cfQpl7.js.map → focus-trap.DY5E-2JV.js.map} +1 -1
- package/dist/chunks/{footer-actions.C00o4tuW.js → footer-actions.CQARYj4Q.js} +3 -3
- package/dist/chunks/{footer-actions.C00o4tuW.js.map → footer-actions.CQARYj4Q.js.map} +1 -1
- package/dist/chunks/{form-layout-title.dcT8eXwc.js → form-layout-title.CsmjzAje.js} +2 -2
- package/dist/chunks/{form-layout-title.dcT8eXwc.js.map → form-layout-title.CsmjzAje.js.map} +1 -1
- package/dist/chunks/{header-with-views.DNAQIhC5.js → header-with-views.WANsHlGK.js} +13 -13
- package/dist/chunks/{header-with-views.DNAQIhC5.js.map → header-with-views.WANsHlGK.js.map} +1 -1
- package/dist/chunks/{header.hDkWwQuQ.js → header.DAuIurUM.js} +4 -4
- package/dist/chunks/{header.hDkWwQuQ.js.map → header.DAuIurUM.js.map} +1 -1
- package/dist/chunks/index.CVpo3mlK.js +528 -0
- package/dist/chunks/{index.BzJQl-2M.js.map → index.CVpo3mlK.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.COJrCw_o.js → info-icon-with-popover.J10ERGQ2.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.COJrCw_o.js.map → info-icon-with-popover.J10ERGQ2.js.map} +1 -1
- package/dist/chunks/{info-icon.7uhGVIn5.js → info-icon.71yYfuEc.js} +2 -2
- package/dist/chunks/{info-icon.7uhGVIn5.js.map → info-icon.71yYfuEc.js.map} +1 -1
- package/dist/chunks/{input-field-password.DqbZ7U6j.js → input-field-password.Bv_0ulNg.js} +7 -7
- package/dist/chunks/{input-field-password.DqbZ7U6j.js.map → input-field-password.Bv_0ulNg.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.gKckf5Oi.js → input-field-phone-number.DPNOepAt.js} +3 -3
- package/dist/chunks/{input-field-phone-number.gKckf5Oi.js.map → input-field-phone-number.DPNOepAt.js.map} +1 -1
- package/dist/chunks/{input-field.DM-gguGX.js → input-field.CtV60WoD.js} +3 -3
- package/dist/chunks/{input-field.DM-gguGX.js.map → input-field.CtV60WoD.js.map} +1 -1
- package/dist/chunks/inspector.types.Df-LngxJ.js +187 -0
- package/dist/chunks/inspector.types.Df-LngxJ.js.map +1 -0
- package/dist/chunks/{layout-row.BC3Z1mQx.js → layout-row.CRRLYA03.js} +2 -2
- package/dist/chunks/{layout-row.BC3Z1mQx.js.map → layout-row.CRRLYA03.js.map} +1 -1
- package/dist/chunks/link.CTH1xj0i.js +116 -0
- package/dist/chunks/link.CTH1xj0i.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.BJh2kEN1.js → listbox-option-tag.DsnH9Q9j.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BJh2kEN1.js.map → listbox-option-tag.DsnH9Q9j.js.map} +1 -1
- package/dist/chunks/{menu.B0q9q97N.js → menu.BOj630ue.js} +3 -3
- package/dist/chunks/{menu.B0q9q97N.js.map → menu.BOj630ue.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BgqNc9jE.js → modal-fullscreen.D1hncuS7.js} +5 -5
- package/dist/chunks/{modal-fullscreen.BgqNc9jE.js.map → modal-fullscreen.D1hncuS7.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dr847POU.js → modal.vue_vue_type_script_setup_true_lang.y7pMBxB0.js} +5 -5
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dr847POU.js.map → modal.vue_vue_type_script_setup_true_lang.y7pMBxB0.js.map} +1 -1
- package/dist/chunks/pagination.fwhC8tEq.js +445 -0
- package/dist/chunks/pagination.fwhC8tEq.js.map +1 -0
- package/dist/chunks/{popover.R5OM_tFu.js → popover.BzzdIK19.js} +4 -4
- package/dist/chunks/{popover.R5OM_tFu.js.map → popover.BzzdIK19.js.map} +1 -1
- package/dist/chunks/{popper-container.CDsbQiOS.js → popper-container.B_sb3SNK.js} +2 -2
- package/dist/chunks/{popper-container.CDsbQiOS.js.map → popper-container.B_sb3SNK.js.map} +1 -1
- package/dist/chunks/{promo-banner.DFt2dVxk.js → promo-banner.CoB1tBCC.js} +3 -3
- package/dist/chunks/{promo-banner.DFt2dVxk.js.map → promo-banner.CoB1tBCC.js.map} +1 -1
- package/dist/chunks/{radio-group.muZVaVEm.js → radio-group.seLW9WC9.js} +4 -4
- package/dist/chunks/{radio-group.muZVaVEm.js.map → radio-group.seLW9WC9.js.map} +1 -1
- package/dist/chunks/{search-bar.BOFC4r8H.js → search-bar.DgDUdcot.js} +3 -3
- package/dist/chunks/{search-bar.BOFC4r8H.js.map → search-bar.DgDUdcot.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DLHeCwuz.js → secondary-nav.C3TEPrCq.js} +3 -3
- package/dist/chunks/{secondary-nav.DLHeCwuz.js.map → secondary-nav.C3TEPrCq.js.map} +1 -1
- package/dist/chunks/{segmented-control.Dg_ktsiS.js → segmented-control.B2cS73wG.js} +2 -2
- package/dist/chunks/{segmented-control.Dg_ktsiS.js.map → segmented-control.B2cS73wG.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DGv7fjPp.js → selection-card-group.gd66OMqI.js} +5 -5
- package/dist/chunks/{selection-card-group.DGv7fjPp.js.map → selection-card-group.gd66OMqI.js.map} +1 -1
- package/dist/chunks/{sidepanel.BjR0Ab22.js → sidepanel.9wJbIvIS.js} +5 -5
- package/dist/chunks/{sidepanel.BjR0Ab22.js.map → sidepanel.9wJbIvIS.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BMsATRrU.js → structured-list-item.CzzWSj5s.js} +5 -5
- package/dist/chunks/{structured-list-item.BMsATRrU.js.map → structured-list-item.CzzWSj5s.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.lGX16F4w.js → summary-grid.types.IZdK-Mvh.js} +5 -5
- package/dist/chunks/{summary-grid.types.lGX16F4w.js.map → summary-grid.types.IZdK-Mvh.js.map} +1 -1
- package/dist/chunks/{tabs.BVuOvNxx.js → tabs.Bn4YIjoy.js} +2 -2
- package/dist/chunks/{tabs.BVuOvNxx.js.map → tabs.Bn4YIjoy.js.map} +1 -1
- package/dist/chunks/{tag.CmYkknFj.js → tag.iiCQSgG9.js} +2 -2
- package/dist/chunks/{tag.CmYkknFj.js.map → tag.iiCQSgG9.js.map} +1 -1
- package/dist/chunks/{textarea.CAc_VYFm.js → textarea.DY0kNx0r.js} +3 -3
- package/dist/chunks/{textarea.CAc_VYFm.js.map → textarea.DY0kNx0r.js.map} +1 -1
- package/dist/chunks/{timeline-item.BQ4qiBii.js → timeline-item.dleRa6Yu.js} +7 -7
- package/dist/chunks/{timeline-item.BQ4qiBii.js.map → timeline-item.dleRa6Yu.js.map} +1 -1
- package/dist/chunks/{toast.BOpWHAfu.js → toast.Ae5ZoWHb.js} +2 -2
- package/dist/chunks/{toast.BOpWHAfu.js.map → toast.Ae5ZoWHb.js.map} +1 -1
- package/dist/chunks/{toggle-button.E0VQtyEX.js → toggle-button.Dv1t15yj.js} +2 -2
- package/dist/chunks/{toggle-button.E0VQtyEX.js.map → toggle-button.Dv1t15yj.js.map} +1 -1
- package/dist/chunks/{tooltip.BkBDReK0.js → tooltip.Di6i0aTd.js} +35 -33
- package/dist/chunks/{tooltip.BkBDReK0.js.map → tooltip.Di6i0aTd.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js → tutorial.vue_vue_type_script_setup_true_lang.A0Wcwr8f.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js.map → tutorial.vue_vue_type_script_setup_true_lang.A0Wcwr8f.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BTVoaWFj.js → use-cached-selected-values.BgoZ5uGq.js} +4 -4
- package/dist/chunks/{use-cached-selected-values.BTVoaWFj.js.map → use-cached-selected-values.BgoZ5uGq.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 +6221 -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 +1 -1
- package/package.json +10 -5
- package/dist/chunks/base-modal.qhldLovE.js.map +0 -1
- package/dist/chunks/checkbox-input.CgbJsFXD.js +0 -157
- package/dist/chunks/checkbox-input.CgbJsFXD.js.map +0 -1
- package/dist/chunks/dialog-page.MLFdqTcL.js +0 -173
- package/dist/chunks/dialog-page.MLFdqTcL.js.map +0 -1
- package/dist/chunks/error-message.CPw3y44N.js.map +0 -1
- package/dist/chunks/index.BzJQl-2M.js +0 -386
- package/dist/chunks/inspector.types.D5QBC3-G.js +0 -188
- package/dist/chunks/inspector.types.D5QBC3-G.js.map +0 -1
- package/dist/chunks/link.D3Fq5tt_.js +0 -109
- package/dist/chunks/link.D3Fq5tt_.js.map +0 -1
- package/dist/chunks/pagination.Ca8itKj2.js +0 -470
- package/dist/chunks/pagination.Ca8itKj2.js.map +0 -1
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
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";
|
|
2
|
-
function x(e) {
|
|
3
|
-
return I() ? (R(e), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
function w(e) {
|
|
6
|
-
return typeof e == "function" ? e() : $(e);
|
|
7
|
-
}
|
|
8
|
-
const L = typeof window < "u" && typeof document < "u";
|
|
9
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
-
const C = (e) => e != null, P = Object.prototype.toString, B = (e) => P.call(e) === "[object Object]", W = () => {
|
|
11
|
-
};
|
|
12
|
-
function z(e, t) {
|
|
13
|
-
function n(...o) {
|
|
14
|
-
return new Promise((s, i) => {
|
|
15
|
-
Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(s).catch(i);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
const F = (e) => e();
|
|
21
|
-
function V(e, t = {}) {
|
|
22
|
-
let n, o, s = W;
|
|
23
|
-
const i = (c) => {
|
|
24
|
-
clearTimeout(c), s(), s = W;
|
|
25
|
-
};
|
|
26
|
-
return (c) => {
|
|
27
|
-
const d = w(e), a = w(t.maxWait);
|
|
28
|
-
return n && i(n), d <= 0 || a !== void 0 && a <= 0 ? (o && (i(o), o = null), Promise.resolve(c())) : new Promise((r, u) => {
|
|
29
|
-
s = t.rejectOnCancel ? u : r, a && !o && (o = setTimeout(() => {
|
|
30
|
-
n && i(n), o = null, r(c());
|
|
31
|
-
}, a)), n = setTimeout(() => {
|
|
32
|
-
o && i(o), o = null, r(c());
|
|
33
|
-
}, d);
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function H(e, t) {
|
|
38
|
-
var n;
|
|
39
|
-
if (typeof e == "number")
|
|
40
|
-
return e + t;
|
|
41
|
-
const o = ((n = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : n[0]) || "", s = e.slice(o.length), i = Number.parseFloat(o) + t;
|
|
42
|
-
return Number.isNaN(i) ? e : i + s;
|
|
43
|
-
}
|
|
44
|
-
function D(e) {
|
|
45
|
-
return N();
|
|
46
|
-
}
|
|
47
|
-
function G(e, t, n = {}) {
|
|
48
|
-
const {
|
|
49
|
-
eventFilter: o = F,
|
|
50
|
-
...s
|
|
51
|
-
} = n;
|
|
52
|
-
return O(
|
|
53
|
-
e,
|
|
54
|
-
z(
|
|
55
|
-
o,
|
|
56
|
-
t
|
|
57
|
-
),
|
|
58
|
-
s
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
function _(e, t = !0, n) {
|
|
62
|
-
D() ? T(e, n) : t ? e() : M(e);
|
|
63
|
-
}
|
|
64
|
-
function Z(e, t, n = {}) {
|
|
65
|
-
const {
|
|
66
|
-
debounce: o = 0,
|
|
67
|
-
maxWait: s = void 0,
|
|
68
|
-
...i
|
|
69
|
-
} = n;
|
|
70
|
-
return G(
|
|
71
|
-
e,
|
|
72
|
-
t,
|
|
73
|
-
{
|
|
74
|
-
...i,
|
|
75
|
-
eventFilter: V(o, { maxWait: s })
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
const m = L ? window : void 0;
|
|
80
|
-
function b(e) {
|
|
81
|
-
var t;
|
|
82
|
-
const n = w(e);
|
|
83
|
-
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
84
|
-
}
|
|
85
|
-
function g(...e) {
|
|
86
|
-
let t, n, o, s;
|
|
87
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, o, s] = e, t = m) : [t, n, o, s] = e, !t)
|
|
88
|
-
return W;
|
|
89
|
-
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
90
|
-
const i = [], l = () => {
|
|
91
|
-
i.forEach((r) => r()), i.length = 0;
|
|
92
|
-
}, c = (r, u, f, h) => (r.addEventListener(u, f, h), () => r.removeEventListener(u, f, h)), d = O(
|
|
93
|
-
() => [b(t), w(s)],
|
|
94
|
-
([r, u]) => {
|
|
95
|
-
if (l(), !r)
|
|
96
|
-
return;
|
|
97
|
-
const f = B(u) ? { ...u } : u;
|
|
98
|
-
i.push(
|
|
99
|
-
...n.flatMap((h) => o.map((y) => c(r, h, y, f)))
|
|
100
|
-
);
|
|
101
|
-
},
|
|
102
|
-
{ immediate: !0, flush: "post" }
|
|
103
|
-
), a = () => {
|
|
104
|
-
d(), l();
|
|
105
|
-
};
|
|
106
|
-
return x(a), a;
|
|
107
|
-
}
|
|
108
|
-
function U(e) {
|
|
109
|
-
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
110
|
-
}
|
|
111
|
-
function ee(...e) {
|
|
112
|
-
let t, n, o = {};
|
|
113
|
-
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]);
|
|
114
|
-
const {
|
|
115
|
-
target: s = m,
|
|
116
|
-
eventName: i = "keydown",
|
|
117
|
-
passive: l = !1,
|
|
118
|
-
dedupe: c = !1
|
|
119
|
-
} = o, d = U(t);
|
|
120
|
-
return g(s, i, (r) => {
|
|
121
|
-
r.repeat && w(c) || d(r) && n(r);
|
|
122
|
-
}, l);
|
|
123
|
-
}
|
|
124
|
-
function Y() {
|
|
125
|
-
const e = v(!1), t = N();
|
|
126
|
-
return t && T(() => {
|
|
127
|
-
e.value = !0;
|
|
128
|
-
}, t), e;
|
|
129
|
-
}
|
|
130
|
-
function A(e) {
|
|
131
|
-
const t = Y();
|
|
132
|
-
return p(() => (t.value, !!e()));
|
|
133
|
-
}
|
|
134
|
-
function q(e, t, n = {}) {
|
|
135
|
-
const { window: o = m, ...s } = n;
|
|
136
|
-
let i;
|
|
137
|
-
const l = A(() => o && "MutationObserver" in o), c = () => {
|
|
138
|
-
i && (i.disconnect(), i = void 0);
|
|
139
|
-
}, d = p(() => {
|
|
140
|
-
const f = w(e), h = (Array.isArray(f) ? f : [f]).map(b).filter(C);
|
|
141
|
-
return new Set(h);
|
|
142
|
-
}), a = O(
|
|
143
|
-
() => d.value,
|
|
144
|
-
(f) => {
|
|
145
|
-
c(), l.value && f.size && (i = new MutationObserver(t), f.forEach((h) => i.observe(h, s)));
|
|
146
|
-
},
|
|
147
|
-
{ immediate: !0, flush: "post" }
|
|
148
|
-
), r = () => i == null ? void 0 : i.takeRecords(), u = () => {
|
|
149
|
-
a(), c();
|
|
150
|
-
};
|
|
151
|
-
return x(u), {
|
|
152
|
-
isSupported: l,
|
|
153
|
-
stop: u,
|
|
154
|
-
takeRecords: r
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
function X(e = {}) {
|
|
158
|
-
var t;
|
|
159
|
-
const {
|
|
160
|
-
window: n = m,
|
|
161
|
-
deep: o = !0,
|
|
162
|
-
triggerOnRemoval: s = !1
|
|
163
|
-
} = e, i = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
|
|
164
|
-
var a;
|
|
165
|
-
let r = i == null ? void 0 : i.activeElement;
|
|
166
|
-
if (o)
|
|
167
|
-
for (; r != null && r.shadowRoot; )
|
|
168
|
-
r = (a = r == null ? void 0 : r.shadowRoot) == null ? void 0 : a.activeElement;
|
|
169
|
-
return r;
|
|
170
|
-
}, c = v(), d = () => {
|
|
171
|
-
c.value = l();
|
|
172
|
-
};
|
|
173
|
-
return n && (g(n, "blur", (a) => {
|
|
174
|
-
a.relatedTarget === null && d();
|
|
175
|
-
}, !0), g(n, "focus", d, !0)), s && q(i, (a) => {
|
|
176
|
-
a.filter((r) => r.removedNodes.length).map((r) => Array.from(r.removedNodes)).flat().forEach((r) => {
|
|
177
|
-
r === c.value && d();
|
|
178
|
-
});
|
|
179
|
-
}, {
|
|
180
|
-
childList: !0,
|
|
181
|
-
subtree: !0
|
|
182
|
-
}), d(), c;
|
|
183
|
-
}
|
|
184
|
-
function E(e, t = {}) {
|
|
185
|
-
const { window: n = m } = t, o = A(() => n && "matchMedia" in n && typeof n.matchMedia == "function");
|
|
186
|
-
let s;
|
|
187
|
-
const i = v(!1), l = (a) => {
|
|
188
|
-
i.value = a.matches;
|
|
189
|
-
}, c = () => {
|
|
190
|
-
s && ("removeEventListener" in s ? s.removeEventListener("change", l) : s.removeListener(l));
|
|
191
|
-
}, d = j(() => {
|
|
192
|
-
o.value && (c(), s = n.matchMedia(w(e)), "addEventListener" in s ? s.addEventListener("change", l) : s.addListener(l), i.value = s.matches);
|
|
193
|
-
});
|
|
194
|
-
return x(() => {
|
|
195
|
-
d(), c(), s = void 0;
|
|
196
|
-
}), i;
|
|
197
|
-
}
|
|
198
|
-
function te(e, t = {}) {
|
|
199
|
-
function n(r, u) {
|
|
200
|
-
let f = w(e[w(r)]);
|
|
201
|
-
return u != null && (f = H(f, u)), typeof f == "number" && (f = `${f}px`), f;
|
|
202
|
-
}
|
|
203
|
-
const { window: o = m, strategy: s = "min-width" } = t;
|
|
204
|
-
function i(r) {
|
|
205
|
-
return o ? o.matchMedia(r).matches : !1;
|
|
206
|
-
}
|
|
207
|
-
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, {
|
|
208
|
-
get: () => s === "min-width" ? l(u) : c(u),
|
|
209
|
-
enumerable: !0,
|
|
210
|
-
configurable: !0
|
|
211
|
-
}), r), {});
|
|
212
|
-
function a() {
|
|
213
|
-
const r = Object.keys(e).map((u) => [u, l(u)]);
|
|
214
|
-
return p(() => r.filter(([, u]) => u.value).map(([u]) => u));
|
|
215
|
-
}
|
|
216
|
-
return Object.assign(d, {
|
|
217
|
-
greaterOrEqual: l,
|
|
218
|
-
smallerOrEqual: c,
|
|
219
|
-
greater(r) {
|
|
220
|
-
return E(() => `(min-width: ${n(r, 0.1)})`, t);
|
|
221
|
-
},
|
|
222
|
-
smaller(r) {
|
|
223
|
-
return E(() => `(max-width: ${n(r, -0.1)})`, t);
|
|
224
|
-
},
|
|
225
|
-
between(r, u) {
|
|
226
|
-
return E(() => `(min-width: ${n(r)}) and (max-width: ${n(u, -0.1)})`, t);
|
|
227
|
-
},
|
|
228
|
-
isGreater(r) {
|
|
229
|
-
return i(`(min-width: ${n(r, 0.1)})`);
|
|
230
|
-
},
|
|
231
|
-
isGreaterOrEqual(r) {
|
|
232
|
-
return i(`(min-width: ${n(r)})`);
|
|
233
|
-
},
|
|
234
|
-
isSmaller(r) {
|
|
235
|
-
return i(`(max-width: ${n(r, -0.1)})`);
|
|
236
|
-
},
|
|
237
|
-
isSmallerOrEqual(r) {
|
|
238
|
-
return i(`(max-width: ${n(r)})`);
|
|
239
|
-
},
|
|
240
|
-
isInBetween(r, u) {
|
|
241
|
-
return i(`(min-width: ${n(r)}) and (max-width: ${n(u, -0.1)})`);
|
|
242
|
-
},
|
|
243
|
-
current: a,
|
|
244
|
-
active() {
|
|
245
|
-
const r = a();
|
|
246
|
-
return p(() => r.value.length === 0 ? "" : r.value.at(-1));
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
function k(e, t, n = {}) {
|
|
251
|
-
const { window: o = m, ...s } = n;
|
|
252
|
-
let i;
|
|
253
|
-
const l = A(() => o && "ResizeObserver" in o), c = () => {
|
|
254
|
-
i && (i.disconnect(), i = void 0);
|
|
255
|
-
}, d = p(() => {
|
|
256
|
-
const u = w(e);
|
|
257
|
-
return Array.isArray(u) ? u.map((f) => b(f)) : [b(u)];
|
|
258
|
-
}), a = O(
|
|
259
|
-
d,
|
|
260
|
-
(u) => {
|
|
261
|
-
if (c(), l.value && o) {
|
|
262
|
-
i = new ResizeObserver(t);
|
|
263
|
-
for (const f of u)
|
|
264
|
-
f && i.observe(f, s);
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
{ immediate: !0, flush: "post" }
|
|
268
|
-
), r = () => {
|
|
269
|
-
c(), a();
|
|
270
|
-
};
|
|
271
|
-
return x(r), {
|
|
272
|
-
isSupported: l,
|
|
273
|
-
stop: r
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
function ne(e, t = { width: 0, height: 0 }, n = {}) {
|
|
277
|
-
const { window: o = m, box: s = "content-box" } = n, i = p(() => {
|
|
278
|
-
var u, f;
|
|
279
|
-
return (f = (u = b(e)) == null ? void 0 : u.namespaceURI) == null ? void 0 : f.includes("svg");
|
|
280
|
-
}), l = v(t.width), c = v(t.height), { stop: d } = k(
|
|
281
|
-
e,
|
|
282
|
-
([u]) => {
|
|
283
|
-
const f = s === "border-box" ? u.borderBoxSize : s === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
|
|
284
|
-
if (o && i.value) {
|
|
285
|
-
const h = b(e);
|
|
286
|
-
if (h) {
|
|
287
|
-
const y = h.getBoundingClientRect();
|
|
288
|
-
l.value = y.width, c.value = y.height;
|
|
289
|
-
}
|
|
290
|
-
} else if (f) {
|
|
291
|
-
const h = Array.isArray(f) ? f : [f];
|
|
292
|
-
l.value = h.reduce((y, { inlineSize: S }) => y + S, 0), c.value = h.reduce((y, { blockSize: S }) => y + S, 0);
|
|
293
|
-
} else
|
|
294
|
-
l.value = u.contentRect.width, c.value = u.contentRect.height;
|
|
295
|
-
},
|
|
296
|
-
n
|
|
297
|
-
);
|
|
298
|
-
_(() => {
|
|
299
|
-
const u = b(e);
|
|
300
|
-
u && (l.value = "offsetWidth" in u ? u.offsetWidth : t.width, c.value = "offsetHeight" in u ? u.offsetHeight : t.height);
|
|
301
|
-
});
|
|
302
|
-
const a = O(
|
|
303
|
-
() => b(e),
|
|
304
|
-
(u) => {
|
|
305
|
-
l.value = u ? t.width : 0, c.value = u ? t.height : 0;
|
|
306
|
-
}
|
|
307
|
-
);
|
|
308
|
-
function r() {
|
|
309
|
-
d(), a();
|
|
310
|
-
}
|
|
311
|
-
return {
|
|
312
|
-
width: l,
|
|
313
|
-
height: c,
|
|
314
|
-
stop: r
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
const K = "focusin", Q = "focusout";
|
|
318
|
-
function re(e, t = {}) {
|
|
319
|
-
const { window: n = m } = t, o = p(() => b(e)), s = v(!1), i = p(() => s.value), l = X(t);
|
|
320
|
-
return !n || !l.value ? { focused: i } : (g(o, K, () => s.value = !0), g(o, Q, () => s.value = !1), { focused: i });
|
|
321
|
-
}
|
|
322
|
-
function oe(e = {}) {
|
|
323
|
-
const { window: t = m, behavior: n = "auto" } = e;
|
|
324
|
-
if (!t)
|
|
325
|
-
return {
|
|
326
|
-
x: v(0),
|
|
327
|
-
y: v(0)
|
|
328
|
-
};
|
|
329
|
-
const o = v(t.scrollX), s = v(t.scrollY), i = p({
|
|
330
|
-
get() {
|
|
331
|
-
return o.value;
|
|
332
|
-
},
|
|
333
|
-
set(c) {
|
|
334
|
-
scrollTo({ left: c, behavior: n });
|
|
335
|
-
}
|
|
336
|
-
}), l = p({
|
|
337
|
-
get() {
|
|
338
|
-
return s.value;
|
|
339
|
-
},
|
|
340
|
-
set(c) {
|
|
341
|
-
scrollTo({ top: c, behavior: n });
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
return g(
|
|
345
|
-
t,
|
|
346
|
-
"scroll",
|
|
347
|
-
() => {
|
|
348
|
-
o.value = t.scrollX, s.value = t.scrollY;
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
capture: !1,
|
|
352
|
-
passive: !0
|
|
353
|
-
}
|
|
354
|
-
), { x: i, y: l };
|
|
355
|
-
}
|
|
356
|
-
function ie(e = {}) {
|
|
357
|
-
const {
|
|
358
|
-
window: t = m,
|
|
359
|
-
initialWidth: n = Number.POSITIVE_INFINITY,
|
|
360
|
-
initialHeight: o = Number.POSITIVE_INFINITY,
|
|
361
|
-
listenOrientation: s = !0,
|
|
362
|
-
includeScrollbar: i = !0,
|
|
363
|
-
type: l = "inner"
|
|
364
|
-
} = e, c = v(n), d = v(o), a = () => {
|
|
365
|
-
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));
|
|
366
|
-
};
|
|
367
|
-
if (a(), _(a), g("resize", a, { passive: !0 }), s) {
|
|
368
|
-
const r = E("(orientation: portrait)");
|
|
369
|
-
O(r, () => a());
|
|
370
|
-
}
|
|
371
|
-
return { width: c, height: d };
|
|
372
|
-
}
|
|
373
|
-
export {
|
|
374
|
-
ne as a,
|
|
375
|
-
k as b,
|
|
376
|
-
oe as c,
|
|
377
|
-
re as d,
|
|
378
|
-
E as e,
|
|
379
|
-
te as f,
|
|
380
|
-
q as g,
|
|
381
|
-
X as h,
|
|
382
|
-
ee as o,
|
|
383
|
-
ie as u,
|
|
384
|
-
Z as w
|
|
385
|
-
};
|
|
386
|
-
//# sourceMappingURL=index.BzJQl-2M.js.map
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, ref as r, computed as h, watch as R, createElementBlock as y, openBlock as v, normalizeClass as V, createElementVNode as a, createVNode as s, renderSlot as S, Transition as A, withCtx as c, createCommentVNode as B, withKeys as W, unref as t, Fragment as U, createTextVNode as T, toDisplayString as C, createBlock as F, nextTick as j } from "vue";
|
|
2
|
-
import { d as q, B as J } from "./typography.DN5eC5ch.js";
|
|
3
|
-
import { B as E } from "./button.BHZgsGkp.js";
|
|
4
|
-
import { B as Y } from "./loading-indicator.DEepb9Wl.js";
|
|
5
|
-
import { B as G, s as H, g as Q, a as X, f as Z } from "./focus-trap.D9cfQpl7.js";
|
|
6
|
-
import { E as ee } from "./expand.DusW7F7p.js";
|
|
7
|
-
import { C as te } from "./cross.CbLEjiVy.js";
|
|
8
|
-
import { g as ne } from "./generate-uid.NJ8tVoha.js";
|
|
9
|
-
import { u as oe } from "./i18n.B6g5VX0q.js";
|
|
10
|
-
import { a as ae, b as se } from "./index.BzJQl-2M.js";
|
|
11
|
-
import { _ as ie } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
12
|
-
import "../assets/inspector.css";
|
|
13
|
-
const I = {
|
|
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
|
-
}, re = { class: "b-inspector__page" }, ce = ["aria-label"], le = { class: "b-inspector__container" }, pe = { class: "b-inspector__header" }, de = ["id"], ue = { class: "b-inspector__icons" }, ve = { class: "b-inspector__content" }, fe = { i18n: { messages: I } }, me = /* @__PURE__ */ P({
|
|
30
|
-
...fe,
|
|
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: {}
|
|
39
|
-
},
|
|
40
|
-
emits: ["update:is-open", "update:active-page", "expand"],
|
|
41
|
-
setup($, { emit: z }) {
|
|
42
|
-
const o = $, f = z, { t: l } = oe({ messages: I }), k = ne("returnToMainContentDescription"), m = r(null), p = r(null), L = r(null), i = r(null), _ = r(null), d = r(!1), { width: w } = ae(m), M = h(() => {
|
|
43
|
-
const e = o.size === "small" ? 575 : 750;
|
|
44
|
-
return w.value > 0 && w.value <= e;
|
|
45
|
-
}), D = h(() => ({
|
|
46
|
-
[`b-inspector--${o.size}`]: !0,
|
|
47
|
-
"b-inspector--is-compact": M.value
|
|
48
|
-
})), K = h(() => `${l("inspector")}, ${o.title}`), g = async () => {
|
|
49
|
-
o.isOpen ? (i.value = document.activeElement, await j(), H(p.value, i.value)) : u(i.value);
|
|
50
|
-
}, N = (e) => {
|
|
51
|
-
if (d.value)
|
|
52
|
-
return;
|
|
53
|
-
const n = e.shiftKey ? -1 : 1, b = Q(n, p.value);
|
|
54
|
-
X() === b && (e.preventDefault(), _.value = document.activeElement, u(i.value), f("update:active-page", void 0));
|
|
55
|
-
}, O = (e) => {
|
|
56
|
-
const n = e.shiftKey && e.ctrlKey && e.key === "S";
|
|
57
|
-
o.isOpen && !d.value && n && x();
|
|
58
|
-
}, x = () => {
|
|
59
|
-
Z(p.value) ? (_.value = document.activeElement, u(i.value), f("update:active-page", void 0)) : (i.value = document.activeElement, u(_.value));
|
|
60
|
-
}, u = (e) => {
|
|
61
|
-
e && (e == null || e.focus(), document.activeElement !== e && u(e.parentElement));
|
|
62
|
-
};
|
|
63
|
-
return R(
|
|
64
|
-
() => o.activePage,
|
|
65
|
-
() => {
|
|
66
|
-
o.activePage && g();
|
|
67
|
-
}
|
|
68
|
-
), se(p, (e) => {
|
|
69
|
-
const n = e[0];
|
|
70
|
-
d.value = m.value.clientWidth === n.contentRect.width;
|
|
71
|
-
}), o.activePage || q(
|
|
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
|
-
), (e, n) => (v(), y("div", {
|
|
77
|
-
ref_key: "wrapper",
|
|
78
|
-
ref: m,
|
|
79
|
-
class: V(["b-inspector", D.value]),
|
|
80
|
-
onKeydown: O
|
|
81
|
-
}, [
|
|
82
|
-
a("div", {
|
|
83
|
-
ref_key: "page",
|
|
84
|
-
ref: L,
|
|
85
|
-
class: "b-inspector__page-wrapper"
|
|
86
|
-
}, [
|
|
87
|
-
a("div", re, [
|
|
88
|
-
S(e.$slots, "page", {}, void 0, !0)
|
|
89
|
-
])
|
|
90
|
-
], 512),
|
|
91
|
-
s(A, {
|
|
92
|
-
name: "b-inspector__animation",
|
|
93
|
-
mode: "out-in",
|
|
94
|
-
onBeforeEnter: g,
|
|
95
|
-
onAfterLeave: g
|
|
96
|
-
}, {
|
|
97
|
-
default: c(() => [
|
|
98
|
-
e.isOpen ? (v(), y("aside", {
|
|
99
|
-
key: 0,
|
|
100
|
-
ref_key: "inspector",
|
|
101
|
-
ref: p,
|
|
102
|
-
class: "b-inspector__container-wrapper",
|
|
103
|
-
"aria-label": K.value,
|
|
104
|
-
onKeydown: W(N, ["tab"])
|
|
105
|
-
}, [
|
|
106
|
-
s(t(G), {
|
|
107
|
-
disabled: !d.value
|
|
108
|
-
}, {
|
|
109
|
-
default: c(() => [
|
|
110
|
-
a("div", le, [
|
|
111
|
-
a("div", pe, [
|
|
112
|
-
d.value ? B("", !0) : (v(), y(U, { key: 0 }, [
|
|
113
|
-
s(t(E), {
|
|
114
|
-
class: "b-inspector__return-content",
|
|
115
|
-
variant: "secondary",
|
|
116
|
-
condensed: "",
|
|
117
|
-
"aria-describedby": t(k),
|
|
118
|
-
onClick: x
|
|
119
|
-
}, {
|
|
120
|
-
default: c(() => [
|
|
121
|
-
T(C(t(l)("returnToMainContent")), 1)
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["aria-describedby"]),
|
|
125
|
-
a("span", {
|
|
126
|
-
id: t(k),
|
|
127
|
-
class: "b-inspector__return-content-description"
|
|
128
|
-
}, C(t(l)("returnToMainContentDescription")), 9, de)
|
|
129
|
-
], 64)),
|
|
130
|
-
s(t(J), {
|
|
131
|
-
el: "h2",
|
|
132
|
-
variant: "title",
|
|
133
|
-
class: "b-inspector__title"
|
|
134
|
-
}, {
|
|
135
|
-
default: c(() => [
|
|
136
|
-
T(C(e.title), 1)
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
}),
|
|
140
|
-
a("div", ue, [
|
|
141
|
-
e.expandable ? (v(), F(t(E), {
|
|
142
|
-
key: 0,
|
|
143
|
-
variant: "tertiary",
|
|
144
|
-
onClick: n[0] || (n[0] = (b) => f("expand"))
|
|
145
|
-
}, {
|
|
146
|
-
iconLeft: c(() => [
|
|
147
|
-
s(t(ee), {
|
|
148
|
-
"svg-title": t(l)("expand")
|
|
149
|
-
}, null, 8, ["svg-title"])
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
})) : B("", !0),
|
|
153
|
-
s(t(E), {
|
|
154
|
-
variant: "tertiary",
|
|
155
|
-
onClick: n[1] || (n[1] = (b) => f("update:is-open", !1))
|
|
156
|
-
}, {
|
|
157
|
-
iconLeft: c(() => [
|
|
158
|
-
s(t(te), {
|
|
159
|
-
"svg-title": t(l)("close")
|
|
160
|
-
}, null, 8, ["svg-title"])
|
|
161
|
-
]),
|
|
162
|
-
_: 1
|
|
163
|
-
})
|
|
164
|
-
])
|
|
165
|
-
]),
|
|
166
|
-
a("div", ve, [
|
|
167
|
-
e.loading ? (v(), F(t(Y), {
|
|
168
|
-
key: 0,
|
|
169
|
-
large: "",
|
|
170
|
-
class: "b-inspector__loading-indicator"
|
|
171
|
-
})) : S(e.$slots, "content", { key: 1 }, void 0, !0)
|
|
172
|
-
])
|
|
173
|
-
])
|
|
174
|
-
]),
|
|
175
|
-
_: 3
|
|
176
|
-
}, 8, ["disabled"])
|
|
177
|
-
], 40, ce)) : B("", !0)
|
|
178
|
-
]),
|
|
179
|
-
_: 3
|
|
180
|
-
})
|
|
181
|
-
], 34));
|
|
182
|
-
}
|
|
183
|
-
}), Se = /* @__PURE__ */ ie(me, [["__scopeId", "data-v-9d52565a"]]), Te = ["small", "large"];
|
|
184
|
-
export {
|
|
185
|
-
Te as B,
|
|
186
|
-
Se as i
|
|
187
|
-
};
|
|
188
|
-
//# sourceMappingURL=inspector.types.D5QBC3-G.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspector.types.D5QBC3-G.js","sources":["../../../vue2/src/components/inspector/inspector.vue","../../../vue2/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 = withDefaults(\n defineProps<{\n /**\n * ID of the current active inspector page\n */\n activePage?: string;\n\n /**\n * Shows the Expand icon in the inspector\n */\n expandable?: boolean;\n\n /**\n * Opens and closes the inspector\n */\n isOpen?: boolean;\n\n /**\n * Shows loading indicator for the content\n */\n loading?: boolean;\n\n /**\n * Determines the size of the inspector\n */\n size?: BentoInspectorSize;\n\n /**\n * The title of the component\n */\n title: string;\n }>(),\n {\n activePage: '',\n expandable: false,\n isOpen: false,\n loading: false,\n size: 'small',\n }\n );\n\n const emit = defineEmits<{\n /**\n * Emits update to keep isOpen prop in sync\n */\n (e: 'update:is-open', value: boolean): void;\n /**\n * Emits update to keep activePage prop in sync\n */\n (e: 'update:active-page', value: string): void;\n /**\n * Emits event when user click expand button\n */\n (e: 'expand'): void;\n }>();\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","props","__props","emit","__emit","t","useI18n","returnToMainContentDescriptionId","generateUid","wrapper","ref","inspector","page","pageLastFocusedElement","inspectorLastFocusedElement","isFullWidthInspector","wrapperWidth","useElementSize","isCompact","computed","threshold","conditionalClass","inspectorAriaLabel","setFocus$1","nextTick","setFocus","focusElement","handleTabNavigation","event","direction","focusableEl","getNextFocusableElement","getActiveElement","handleSectionFocus","sectionShortcut","moveFocusBetweenSections","focusInside","element","watch","useResizeObserver","entries","entry","deprecate","BentoInspectorSizeOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;yOAyQIA,KAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;;AA3LA,UAAAC,IAAAC,GAyCAC,IAAAC,GAeA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,UAAAN,EAAA,CAAA,GACAO,IAAAC,GAAA,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,GAAAR,CAAA,GAEAS,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAAnB,EAAA,SAAA,UAAA,MAAA;AACA,aAAAe,EAAA,QAAA,KAAAA,EAAA,SAAAI;AAAA,IAAuD,CAAA,GAG3DC,IAAAF,EAAA,OAAA;AAAA,MAAyC,CAAA,gBAAAlB,EAAA,IAAA,EAAA,GAAA;AAAA,MACL,2BAAAiB,EAAA;AAAA,IACO,EAAA,GAG3CI,IAAAH,EAAA,MAAA,GAAAd,EAAA,WAAA,CAAA,KAAAJ,EAAA,KAAA,EAAA,GAEAsB,IAAA,YAAA;AACI,MAAAtB,EAAA,UACIY,EAAA,QAAA,SAAA,eACA,MAAAW,EAAA,GACAC,EAAAd,EAAA,OAAAE,EAAA,KAAA,KAIAa,EAAAb,EAAA,KAAA;AAAA,IACJ,GAGJc,IAAA,CAAAC,MAAA;AACI,UAAAb,EAAA;AACI;AAEJ,YAAAc,IAAAD,EAAA,WAAA,KAAA,GACAE,IAAAC,EAAAF,GAAAlB,EAAA,KAAA;AAGA,MAAAqB,EAAA,MAAAF,MACIF,EAAA,eAAA,GACAd,EAAA,QAAA,SAAA,eACAY,EAAAb,EAAA,KAAA,GAEAV,EAAA,sBAAA,MAAA;AAAA,IACJ,GAGJ8B,IAAA,CAAAL,MAAA;AACI,YAAAM,IAAAN,EAAA,YAAAA,EAAA,WAAAA,EAAA,QAAA;AACA,MAAA3B,EAAA,UAAA,CAAAc,EAAA,SAAAmB,KACIC,EAAA;AAAA,IACJ,GAGJA,IAAA,MAAA;AACI,MAAAC,EAAAzB,EAAA,KAAA,KACIG,EAAA,QAAA,SAAA,eACAY,EAAAb,EAAA,KAAA,GAEAV,EAAA,sBAAA,MAAA,MAEAU,EAAA,QAAA,SAAA,eACAa,EAAAZ,EAAA,KAAA;AAAA,IACJ,GAGJY,IAAA,CAAAW,MAAA;AACI,MAAAA,MAGAA,KAAA,QAAAA,EAAA,SACA,SAAA,kBAAAA,KACIX,EAAAW,EAAA,aAAA;AAAA,IACJ;AAGJ,WAAAC;AAAA,MAAA,MAAArC,EAAA;AAAA,MACgB,MAAA;AAER,QAAAA,EAAA,cACIsB,EAAA;AAAA,MACJ;AAAA,IACJ,GAGJgB,GAAA5B,GAAA,CAAA6B,MAAA;AACI,YAAAC,IAAAD,EAAA,CAAA;AAEA,MAAAzB,EAAA,QAAAN,EAAA,MAAA,gBAAAgC,EAAA,YAAA;AAAA,IAA6E,CAAA,GAGjFxC,EAAA,cACIyC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEC3OCC,KAAA,CAAA,SAAA,OAAA;"}
|