@adyen/bento-vue2 1.58.0 → 1.59.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 +30 -0
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{action-bar.CErJh_wJ.js → action-bar.CHVePTM6.js} +3 -3
- package/dist/chunks/{action-bar.CErJh_wJ.js.map → action-bar.CHVePTM6.js.map} +1 -1
- package/dist/chunks/{base-modal.D4x_tmYO.js → base-modal.DxywEyGO.js} +2 -2
- package/dist/chunks/{base-modal.D4x_tmYO.js.map → base-modal.DxywEyGO.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BHmj0Xvn.js → button-actions-with-menu.Bh5D7sgB.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.BHmj0Xvn.js.map → button-actions-with-menu.Bh5D7sgB.js.map} +1 -1
- package/dist/chunks/{calendar.C7onA58P.js → calendar.C4vFYvsY.js} +3 -3
- package/dist/chunks/{calendar.C7onA58P.js.map → calendar.C4vFYvsY.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Bev3ogYa.js → checkbox-group.BfPZ_Eec.js} +4 -4
- package/dist/chunks/{checkbox-group.Bev3ogYa.js.map → checkbox-group.BfPZ_Eec.js.map} +1 -1
- package/dist/chunks/{checkbox.DCIphKqu.js → checkbox.CTeT6JEP.js} +3 -3
- package/dist/chunks/{checkbox.DCIphKqu.js.map → checkbox.CTeT6JEP.js.map} +1 -1
- package/dist/chunks/{chip.BeK9uqmW.js → chip.bZEhHfIk.js} +21 -24
- package/dist/chunks/chip.bZEhHfIk.js.map +1 -0
- package/dist/chunks/{code-snippet.BjtPvt9m.js → code-snippet.0x8O1dkV.js} +4 -4
- package/dist/chunks/{code-snippet.BjtPvt9m.js.map → code-snippet.0x8O1dkV.js.map} +1 -1
- package/dist/chunks/{controls-group.CtpaKQIg.js → controls-group.CvpddKxq.js} +2 -2
- package/dist/chunks/{controls-group.CtpaKQIg.js.map → controls-group.CvpddKxq.js.map} +1 -1
- package/dist/chunks/{copy.BggvtZCO.js → copy.TvI9Au3G.js} +3 -3
- package/dist/chunks/{copy.BggvtZCO.js.map → copy.TvI9Au3G.js.map} +1 -1
- package/dist/chunks/{dashboard-section.D9LPEZ88.js → dashboard-section.C5zXN82c.js} +2 -2
- package/dist/chunks/{dashboard-section.D9LPEZ88.js.map → dashboard-section.C5zXN82c.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DGRnOVkG.js → dashed-underline.pd87ohFZ.js} +3 -3
- package/dist/chunks/{dashed-underline.DGRnOVkG.js.map → dashed-underline.pd87ohFZ.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CwqfhYua.js → data-grid-template.l-aJapU0.js} +2 -2
- package/dist/chunks/{data-grid-template.CwqfhYua.js.map → data-grid-template.l-aJapU0.js.map} +1 -1
- package/dist/chunks/{data-grid.Dl3xh62_.js → data-grid.vFEU_kt8.js} +965 -940
- package/dist/chunks/data-grid.vFEU_kt8.js.map +1 -0
- package/dist/chunks/{date-picker.DgF85qSC.js → date-picker.DjbZAEcj.js} +15 -15
- package/dist/chunks/{date-picker.DgF85qSC.js.map → date-picker.DjbZAEcj.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CAQY6v7g.js → date-range-picker.C1ijTRdf.js} +388 -389
- package/dist/chunks/date-range-picker.C1ijTRdf.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Cn6lz_lG.js → dropdown-tag.CXY_WiRj.js} +3 -3
- package/dist/chunks/{dropdown-tag.Cn6lz_lG.js.map → dropdown-tag.CXY_WiRj.js.map} +1 -1
- package/dist/chunks/{dropdown.C01pOog2.js → dropdown.DYN8Okpo.js} +19 -19
- package/dist/chunks/{dropdown.C01pOog2.js.map → dropdown.DYN8Okpo.js.map} +1 -1
- package/dist/chunks/{error-message.dQtl9mYG.js → error-message.BM8Y6-u5.js} +2 -2
- package/dist/chunks/{error-message.dQtl9mYG.js.map → error-message.BM8Y6-u5.js.map} +1 -1
- package/dist/chunks/es6.BA9GH7QZ.js.map +1 -1
- package/dist/chunks/{file-uploader.D81zRKpY.js → file-uploader.pWrwnN-c.js} +3 -3
- package/dist/chunks/{file-uploader.D81zRKpY.js.map → file-uploader.pWrwnN-c.js.map} +1 -1
- package/dist/chunks/{filter-bar.CcsUi7Xg.js → filter-bar.BYHzhAr8.js} +856 -828
- package/dist/chunks/filter-bar.BYHzhAr8.js.map +1 -0
- package/dist/chunks/{focus-trap.DiqwA-bw.js → focus-trap.DKT1Fe6X.js} +2 -1
- package/dist/chunks/{focus-trap.DiqwA-bw.js.map → focus-trap.DKT1Fe6X.js.map} +1 -1
- package/dist/chunks/{header-with-views.BTd57MWZ.js → header-with-views.Cqd864mp.js} +9 -9
- package/dist/chunks/{header-with-views.BTd57MWZ.js.map → header-with-views.Cqd864mp.js.map} +1 -1
- package/dist/chunks/{header.Rr0lnNYz.js → header.Ds1iyTzn.js} +30 -26
- package/dist/chunks/{header.Rr0lnNYz.js.map → header.Ds1iyTzn.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.B9QgNl-S.js → info-icon-with-popover.yLETQrb9.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.B9QgNl-S.js.map → info-icon-with-popover.yLETQrb9.js.map} +1 -1
- package/dist/chunks/{info-icon.BL55W9hd.js → info-icon.G9FAlO4C.js} +3 -3
- package/dist/chunks/{info-icon.BL55W9hd.js.map → info-icon.G9FAlO4C.js.map} +1 -1
- package/dist/chunks/{input-field-password.DMcXkdVE.js → input-field-password.C1OF1nmo.js} +5 -5
- package/dist/chunks/{input-field-password.DMcXkdVE.js.map → input-field-password.C1OF1nmo.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Cfy_o9aE.js → input-field-phone-number.Dfa1fxvS.js} +3 -3
- package/dist/chunks/{input-field-phone-number.Cfy_o9aE.js.map → input-field-phone-number.Dfa1fxvS.js.map} +1 -1
- package/dist/chunks/{input-field.CP8Qui6G.js → input-field.C9-4Xo4h.js} +3 -3
- package/dist/chunks/{input-field.CP8Qui6G.js.map → input-field.C9-4Xo4h.js.map} +1 -1
- package/dist/chunks/{inspector.types.Dab4xYKV.js → inspector.types.NVDCPiVL.js} +2 -2
- package/dist/chunks/{inspector.types.Dab4xYKV.js.map → inspector.types.NVDCPiVL.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.DDmqT1rs.js → listbox-option-tag.BcLYsizL.js} +2 -2
- package/dist/chunks/{listbox-option-tag.DDmqT1rs.js.map → listbox-option-tag.BcLYsizL.js.map} +1 -1
- package/dist/chunks/{menu.Dkesc658.js → menu.DDXB-L8u.js} +226 -194
- package/dist/chunks/menu.DDXB-L8u.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.D1pHbGYd.js → modal-fullscreen.os2jZ30i.js} +2 -2
- package/dist/chunks/{modal-fullscreen.D1pHbGYd.js.map → modal-fullscreen.os2jZ30i.js.map} +1 -1
- package/dist/chunks/{modal.bgya0ObK.js → modal.D5OesJnF.js} +2 -2
- package/dist/chunks/{modal.bgya0ObK.js.map → modal.D5OesJnF.js.map} +1 -1
- package/dist/chunks/{pagination.CaHPf-Ye.js → pagination.BoWzbJVF.js} +2 -2
- package/dist/chunks/{pagination.CaHPf-Ye.js.map → pagination.BoWzbJVF.js.map} +1 -1
- package/dist/chunks/{popover.CuOrBXcF.js → popover.K53VtitI.js} +2 -2
- package/dist/chunks/{popover.CuOrBXcF.js.map → popover.K53VtitI.js.map} +1 -1
- package/dist/chunks/{popper-container.1kHSxyxu.js → popper-container.DUNt7nKd.js} +2 -2
- package/dist/chunks/{popper-container.1kHSxyxu.js.map → popper-container.DUNt7nKd.js.map} +1 -1
- package/dist/chunks/{radio-group.9jAj6AKb.js → radio-group.BE8gvwsL.js} +4 -4
- package/dist/chunks/{radio-group.9jAj6AKb.js.map → radio-group.BE8gvwsL.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.Ch-ETIRi.js → rich-text-editor.CP_xdt6R.js} +4 -4
- package/dist/chunks/{rich-text-editor.Ch-ETIRi.js.map → rich-text-editor.CP_xdt6R.js.map} +1 -1
- package/dist/chunks/{search-bar.Cs60bUZc.js → search-bar.I2f0f4fU.js} +3 -3
- package/dist/chunks/{search-bar.Cs60bUZc.js.map → search-bar.I2f0f4fU.js.map} +1 -1
- package/dist/chunks/{secondary-nav.i_Bb4wQF.js → secondary-nav.D1-GnlU-.js} +2 -2
- package/dist/chunks/{secondary-nav.i_Bb4wQF.js.map → secondary-nav.D1-GnlU-.js.map} +1 -1
- package/dist/chunks/{segmented-control.BffWAGrf.js → segmented-control.A2eatwIG.js} +2 -2
- package/dist/chunks/{segmented-control.BffWAGrf.js.map → segmented-control.A2eatwIG.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DTz7k_M7.js → selection-card-group.CFNCbcRU.js} +3 -3
- package/dist/chunks/{selection-card-group.DTz7k_M7.js.map → selection-card-group.CFNCbcRU.js.map} +1 -1
- package/dist/chunks/{sidepanel.DuTesKDW.js → sidepanel.CGGRp0oL.js} +2 -2
- package/dist/chunks/{sidepanel.DuTesKDW.js.map → sidepanel.CGGRp0oL.js.map} +1 -1
- package/dist/chunks/{structured-list-item.-vyqAp4Y.js → structured-list-item.C8K371Ss.js} +4 -4
- package/dist/chunks/{structured-list-item.-vyqAp4Y.js.map → structured-list-item.C8K371Ss.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.fm_VmUVA.js → summary-grid.types.DdghLR6f.js} +5 -5
- package/dist/chunks/{summary-grid.types.fm_VmUVA.js.map → summary-grid.types.DdghLR6f.js.map} +1 -1
- package/dist/chunks/{tag.DczYlfXd.js → tag.B2vxWwV1.js} +2 -2
- package/dist/chunks/{tag.DczYlfXd.js.map → tag.B2vxWwV1.js.map} +1 -1
- package/dist/chunks/{textarea.B7BgCn_l.js → textarea.DPa9t8Jw.js} +2 -2
- package/dist/chunks/{textarea.B7BgCn_l.js.map → textarea.DPa9t8Jw.js.map} +1 -1
- package/dist/chunks/{timeline-item.DdF6EN2w.js → timeline-item.D2534IA9.js} +4 -4
- package/dist/chunks/{timeline-item.DdF6EN2w.js.map → timeline-item.D2534IA9.js.map} +1 -1
- package/dist/chunks/{tooltip.Bm5S2goP.js → tooltip.B8nCejpo.js} +2 -2
- package/dist/chunks/{tooltip.Bm5S2goP.js.map → tooltip.B8nCejpo.js.map} +1 -1
- package/dist/chunks/truncate.BfIl_-71.js +8 -0
- package/dist/chunks/truncate.BfIl_-71.js.map +1 -0
- package/dist/chunks/{tutorial.DIYd-V8c.js → tutorial.X3GhtKlY.js} +4 -4
- package/dist/chunks/{tutorial.DIYd-V8c.js.map → tutorial.X3GhtKlY.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BrkzIuaE.js → use-cached-selected-values.C6VRhL5_.js} +3 -3
- package/dist/chunks/{use-cached-selected-values.BrkzIuaE.js.map → use-cached-selected-values.C6VRhL5_.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/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +44 -44
- 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 +9 -9
- 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/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +3 -0
- package/dist/styles/bento-light.css +3 -0
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +36 -1
- package/package.json +5 -5
- package/dist/chunks/chip.BeK9uqmW.js.map +0 -1
- package/dist/chunks/data-grid.Dl3xh62_.js.map +0 -1
- package/dist/chunks/date-range-picker.CAQY6v7g.js.map +0 -1
- package/dist/chunks/filter-bar.CcsUi7Xg.js.map +0 -1
- package/dist/chunks/menu.Dkesc658.js.map +0 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { defineComponent as M, computed as b, ref as
|
|
2
|
-
import { g as
|
|
3
|
-
import { a as
|
|
4
|
-
import { B as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
1
|
+
import { defineComponent as M, computed as b, ref as i, inject as P, onMounted as K, watch as j, nextTick as A, provide as q } from "vue";
|
|
2
|
+
import { g as L } from "./generate-uid.NJ8tVoha.js";
|
|
3
|
+
import { a as R, B as G } from "./popover.K53VtitI.js";
|
|
4
|
+
import { B as F, D as X } from "./divider.Cc4JFWG_.js";
|
|
5
|
+
import { u as Y } from "./use-click-outside.BnhTgpSt.js";
|
|
6
|
+
import { u as V } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
+
import { u as J } from "./i18n.BQkEbtPM.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { n as
|
|
9
|
+
import { n as I } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
10
10
|
import "./index.Cl4_42j5.js";
|
|
11
|
-
import { C as
|
|
12
|
-
import { a as D, B as
|
|
13
|
-
import { B as
|
|
14
|
-
import {
|
|
15
|
-
import { B as ee } from "./
|
|
11
|
+
import { C as Z, a as T } from "./chevron-left.DOMTgGel.js";
|
|
12
|
+
import { a as D, B as z } from "./base-button.-gx_u8Bd.js";
|
|
13
|
+
import { B as $ } from "./typography.J1v_SPG3.js";
|
|
14
|
+
import { t as Q } from "./truncate.BfIl_-71.js";
|
|
15
|
+
import { B as ee } from "./teleport.BV6zrDjA.js";
|
|
16
|
+
import { B as te } from "./toggle-button.ChDbeBZ8.js";
|
|
16
17
|
import "../assets/menu.css";
|
|
17
|
-
const
|
|
18
|
+
const ne = Symbol("menu inverse style injection key"), oe = M({
|
|
18
19
|
name: "menu-item",
|
|
19
|
-
components: { BaseButton:
|
|
20
|
+
components: { BaseButton: z, BentoTypography: $, ChevronRightIcon: Z },
|
|
20
21
|
props: {
|
|
21
22
|
/**
|
|
22
23
|
* menu-item text that gets displayed as the main label
|
|
@@ -85,16 +86,18 @@ const te = Symbol("menu inverse style injection key"), ne = M({
|
|
|
85
86
|
}
|
|
86
87
|
},
|
|
87
88
|
emits: [D.CLICK],
|
|
88
|
-
setup(
|
|
89
|
+
setup(o, { emit: e }) {
|
|
90
|
+
const t = b(() => ({
|
|
91
|
+
"b-menu-item--critical": o.critical,
|
|
92
|
+
"b-menu-item--indent": o.indent
|
|
93
|
+
})), l = b(() => Q(o.secondaryText, 10));
|
|
89
94
|
return {
|
|
90
95
|
// Values
|
|
91
|
-
conditionalClasses:
|
|
92
|
-
|
|
93
|
-
"b-menu-item--indent": s.indent
|
|
94
|
-
})),
|
|
96
|
+
conditionalClasses: t,
|
|
97
|
+
computedSecondaryText: l,
|
|
95
98
|
// Methods
|
|
96
|
-
onClick: (
|
|
97
|
-
|
|
99
|
+
onClick: (f) => {
|
|
100
|
+
f.stopPropagation(), o.handler(), e(D.CLICK);
|
|
98
101
|
}
|
|
99
102
|
};
|
|
100
103
|
}
|
|
@@ -104,58 +107,58 @@ var se = function() {
|
|
|
104
107
|
return e._self._setupProxy, n("base-button", { staticClass: "b-menu-item", class: e.conditionalClasses, attrs: { role: "menuitem", disabled: e.disabled, tabindex: "-1" }, on: { click: e.onClick }, scopedSlots: e._u([e.icon ? { key: "iconLeft", fn: function() {
|
|
105
108
|
return [n(e.icon, { tag: "component", staticClass: "b-menu-item__icon-left", attrs: { "aria-hidden": "true" } })];
|
|
106
109
|
}, proxy: !0 } : null, { key: "default", fn: function() {
|
|
107
|
-
return [n("bento-typography", { staticClass: "b-menu-item__primary-text", attrs: { el: "span", variant: "body", stronger: e.isTitle } }, [e._v(" " + e._s(e.text) + " ")]), e.
|
|
110
|
+
return [n("bento-typography", { staticClass: "b-menu-item__primary-text", attrs: { el: "span", variant: "body", stronger: e.isTitle } }, [e._v(" " + e._s(e.text) + " ")]), e.computedSecondaryText ? n("bento-typography", { staticClass: "b-menu-item__secondary-text", attrs: { el: "span", variant: "body" } }, [e._v(" " + e._s(e.computedSecondaryText) + " ")]) : e._e()];
|
|
108
111
|
}, proxy: !0 }, e.chevron ? { key: "iconRight", fn: function() {
|
|
109
112
|
return [n("chevron-right-icon", { attrs: { "aria-hidden": "true" } })];
|
|
110
113
|
}, proxy: !0 } : null], null, !0) });
|
|
111
|
-
},
|
|
112
|
-
ne,
|
|
113
|
-
se,
|
|
114
|
+
}, ue = [], le = /* @__PURE__ */ I(
|
|
114
115
|
oe,
|
|
116
|
+
se,
|
|
117
|
+
ue,
|
|
115
118
|
!1,
|
|
116
119
|
null,
|
|
117
|
-
"
|
|
120
|
+
"1e289ecc"
|
|
118
121
|
);
|
|
119
|
-
const
|
|
120
|
-
var
|
|
121
|
-
const
|
|
122
|
+
const W = le.exports;
|
|
123
|
+
var C = /* @__PURE__ */ ((o) => (o.BACK = "back", o.CLOSE = "close", o.OPEN = "open", o))(C || {});
|
|
124
|
+
const ae = Symbol("menu registering injection key"), ie = {
|
|
122
125
|
name: "bento-menu-list-container"
|
|
123
126
|
}, re = /* @__PURE__ */ M({
|
|
124
|
-
...
|
|
125
|
-
setup(
|
|
126
|
-
const e =
|
|
127
|
-
|
|
127
|
+
...ie,
|
|
128
|
+
setup(o) {
|
|
129
|
+
const e = i(), n = i({}), t = P(
|
|
130
|
+
ae,
|
|
128
131
|
!1
|
|
129
132
|
);
|
|
130
133
|
if (t) {
|
|
131
|
-
const { registerMenuContainerElement:
|
|
132
|
-
|
|
134
|
+
const { registerMenuContainerElement: l } = t;
|
|
135
|
+
l(e), n.value = {
|
|
133
136
|
mouseleave: t == null ? void 0 : t.menuMouseLeave
|
|
134
137
|
};
|
|
135
138
|
}
|
|
136
139
|
return { __sfc: !0, menuListContainerRef: e, menuListContainerEvents: n, registeringAndMousingOut: t };
|
|
137
140
|
}
|
|
138
141
|
});
|
|
139
|
-
var
|
|
142
|
+
var ce = function() {
|
|
140
143
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
141
144
|
return n("div", e._g({ ref: "menuListContainerRef", staticClass: "b-menu-list-container", attrs: { "data-testid": "menu-list-container" } }, t.menuListContainerEvents), [e._t("default")], 2);
|
|
142
|
-
},
|
|
145
|
+
}, fe = [], de = /* @__PURE__ */ I(
|
|
143
146
|
re,
|
|
144
|
-
ie,
|
|
145
147
|
ce,
|
|
148
|
+
fe,
|
|
146
149
|
!1,
|
|
147
150
|
null,
|
|
148
151
|
"f5d01392"
|
|
149
152
|
);
|
|
150
|
-
const U =
|
|
153
|
+
const U = de.exports, H = {
|
|
151
154
|
"en-US": {
|
|
152
155
|
backButton: "Go back",
|
|
153
156
|
menuButton: "Open menu"
|
|
154
157
|
}
|
|
155
|
-
},
|
|
156
|
-
i18n: { messages:
|
|
158
|
+
}, me = M({
|
|
159
|
+
i18n: { messages: H },
|
|
157
160
|
name: "sub-menu-item-list",
|
|
158
|
-
components: { BentoDivider:
|
|
161
|
+
components: { BentoDivider: F, MenuItem: W, MenuListContainer: U },
|
|
159
162
|
props: {
|
|
160
163
|
items: {
|
|
161
164
|
type: Array,
|
|
@@ -166,60 +169,60 @@ const U = fe.exports, W = {
|
|
|
166
169
|
required: !0
|
|
167
170
|
}
|
|
168
171
|
},
|
|
169
|
-
emits: [
|
|
170
|
-
setup(
|
|
171
|
-
const n =
|
|
172
|
-
var
|
|
173
|
-
const
|
|
174
|
-
...
|
|
175
|
-
indent: !
|
|
172
|
+
emits: [C.CLOSE, C.BACK],
|
|
173
|
+
setup(o, { emit: e }) {
|
|
174
|
+
const n = i(null), t = i(0), l = i(o.items.length), d = () => e(C.CLOSE), f = () => e(C.BACK), u = b(() => {
|
|
175
|
+
var m;
|
|
176
|
+
const r = (m = o.items) == null ? void 0 : m.map((p) => ({
|
|
177
|
+
...p,
|
|
178
|
+
indent: !p.icon,
|
|
176
179
|
isTitle: !1,
|
|
177
180
|
clickHandler: d
|
|
178
181
|
}));
|
|
179
182
|
return [
|
|
180
183
|
{
|
|
181
|
-
text:
|
|
184
|
+
text: o.title,
|
|
182
185
|
secondaryText: null,
|
|
183
186
|
critical: !1,
|
|
184
|
-
icon:
|
|
187
|
+
icon: T,
|
|
185
188
|
isTitle: !0,
|
|
186
189
|
disabled: !1,
|
|
187
190
|
indent: !1,
|
|
188
|
-
handler:
|
|
189
|
-
clickHandler:
|
|
191
|
+
handler: f,
|
|
192
|
+
clickHandler: f,
|
|
190
193
|
addDivider: !0
|
|
191
194
|
},
|
|
192
|
-
...
|
|
195
|
+
...r
|
|
193
196
|
];
|
|
194
|
-
}),
|
|
195
|
-
var
|
|
196
|
-
(
|
|
197
|
+
}), c = async () => {
|
|
198
|
+
var r, m, p, v, k;
|
|
199
|
+
(k = (v = (p = (m = (r = n.value) == null ? void 0 : r.children) == null ? void 0 : m[t.value]) == null ? void 0 : p.children) == null ? void 0 : v[0]) == null || k.focus();
|
|
197
200
|
};
|
|
198
|
-
|
|
199
|
-
setTimeout(() =>
|
|
201
|
+
K(async () => {
|
|
202
|
+
setTimeout(() => c(), 150);
|
|
200
203
|
});
|
|
201
|
-
const
|
|
202
|
-
t.value > 0 ? (t.value -= 1,
|
|
203
|
-
},
|
|
204
|
-
t.value <
|
|
204
|
+
const s = () => {
|
|
205
|
+
t.value > 0 ? (t.value -= 1, u.value[t.value].disabled && s()) : t.value = l.value, c();
|
|
206
|
+
}, y = () => {
|
|
207
|
+
t.value < l.value ? (t.value += 1, u.value[t.value].disabled && y()) : t.value = 0, c();
|
|
205
208
|
};
|
|
206
209
|
return {
|
|
207
210
|
// Enums
|
|
208
|
-
BentoMenuEvent:
|
|
211
|
+
BentoMenuEvent: C,
|
|
209
212
|
// Values
|
|
210
213
|
subMenuItemListRefLocal: n,
|
|
211
214
|
subMenuFocusedIndex: t,
|
|
212
|
-
ChevronLeftIcon:
|
|
213
|
-
computedItems:
|
|
215
|
+
ChevronLeftIcon: T,
|
|
216
|
+
computedItems: u,
|
|
214
217
|
// Methods
|
|
215
218
|
closeMenu: d,
|
|
216
|
-
onBackButton:
|
|
217
|
-
focusPrevious:
|
|
218
|
-
focusNext:
|
|
219
|
+
onBackButton: f,
|
|
220
|
+
focusPrevious: s,
|
|
221
|
+
focusNext: y
|
|
219
222
|
};
|
|
220
223
|
}
|
|
221
224
|
});
|
|
222
|
-
var
|
|
225
|
+
var pe = function() {
|
|
223
226
|
var e = this, n = e._self._c;
|
|
224
227
|
return e._self._setupProxy, n("transition", { attrs: { name: "b-sub-menu-item-list__transition", appear: "" } }, [n("menu-list-container", { staticClass: "b-sub-menu-item-list" }, [n("ul", { ref: "subMenuItemListRefLocal", staticClass: "b-sub-menu-item-list__list", attrs: { role: "menu" }, on: { keydown: [function(t) {
|
|
225
228
|
return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) ? null : (t.stopPropagation(), e.focusNext.apply(null, arguments));
|
|
@@ -227,20 +230,45 @@ var me = function() {
|
|
|
227
230
|
return !t.type.indexOf("key") && e._k(t.keyCode, "up", 38, t.key, ["Up", "ArrowUp"]) ? null : (t.stopPropagation(), e.focusPrevious.apply(null, arguments));
|
|
228
231
|
}, function(t) {
|
|
229
232
|
return !t.type.indexOf("key") && e._k(t.keyCode, "esc", 27, t.key, ["Esc", "Escape"]) ? null : (t.stopPropagation(), e.onBackButton.apply(null, arguments));
|
|
230
|
-
}] } }, e._l(e.computedItems, function(t,
|
|
231
|
-
return n("li", { key: `sub-menu-item-list-item-${
|
|
233
|
+
}] } }, e._l(e.computedItems, function(t, l) {
|
|
234
|
+
return n("li", { key: `sub-menu-item-list-item-${l}`, attrs: { role: "none" } }, [n("menu-item", { attrs: { text: t.text, handler: t.handler, "secondary-text": t.secondaryText, icon: t.icon, "is-title": t.isTitle, disabled: t.disabled, critical: t.critical, indent: t.indent, tabindex: l === e.subMenuFocusedIndex ? "0" : "-1" }, on: { click: t.clickHandler } }), t.addDivider ? n("bento-divider", { staticClass: "b-sub-menu-item-list__divider" }) : e._e()], 1);
|
|
232
235
|
}), 0)])], 1);
|
|
233
|
-
},
|
|
234
|
-
de,
|
|
236
|
+
}, _e = [], ye = /* @__PURE__ */ I(
|
|
235
237
|
me,
|
|
236
238
|
pe,
|
|
239
|
+
_e,
|
|
237
240
|
!1,
|
|
238
241
|
null,
|
|
239
242
|
"25195627"
|
|
240
243
|
);
|
|
241
|
-
const
|
|
244
|
+
const ve = ye.exports;
|
|
245
|
+
function Ce(o, e, n) {
|
|
246
|
+
const d = i(0), f = i(0), u = (s) => {
|
|
247
|
+
if (!s || !s.parentElement)
|
|
248
|
+
return;
|
|
249
|
+
const y = s.parentElement, r = s.cloneNode(!0);
|
|
250
|
+
r.style.position = "absolute", r.style.visibility = "hidden", y.appendChild(r), r.style.width = "max-content";
|
|
251
|
+
const m = r.offsetWidth, p = Math.max(150, Math.min(m, 350));
|
|
252
|
+
d.value = p, r.style.width = `${p}px`;
|
|
253
|
+
const v = r.offsetHeight;
|
|
254
|
+
f.value = v, y.removeChild(r), f.value = v;
|
|
255
|
+
};
|
|
256
|
+
return j([e, n], async ([s]) => {
|
|
257
|
+
var y, r;
|
|
258
|
+
if (s !== null) {
|
|
259
|
+
await A();
|
|
260
|
+
const m = (r = (y = o.value) == null ? void 0 : y[0]) == null ? void 0 : r.$el;
|
|
261
|
+
m && u(m);
|
|
262
|
+
} else
|
|
263
|
+
d.value = 0, f.value = 0;
|
|
264
|
+
}), { computedStyle: b(() => {
|
|
265
|
+
const s = { width: "max-content" };
|
|
266
|
+
return n.value && (f.value > 0 && (s.height = `${f.value}px`), d.value > 0 && (s.width = `${d.value}px`)), s;
|
|
267
|
+
}) };
|
|
268
|
+
}
|
|
269
|
+
const be = M({
|
|
242
270
|
name: "menu-item-list",
|
|
243
|
-
components: { BentoDivider:
|
|
271
|
+
components: { BentoDivider: F, MenuItem: W, MenuListContainer: U, SubMenuItemList: ve },
|
|
244
272
|
props: {
|
|
245
273
|
/**
|
|
246
274
|
* The data to be displayed in the list
|
|
@@ -271,68 +299,65 @@ const ye = _e.exports, ve = M({
|
|
|
271
299
|
default: !0
|
|
272
300
|
}
|
|
273
301
|
},
|
|
274
|
-
emits: [
|
|
275
|
-
setup(
|
|
276
|
-
const t =
|
|
277
|
-
let
|
|
278
|
-
return a.icon || (
|
|
302
|
+
emits: [C.CLOSE, "menu-item-click"],
|
|
303
|
+
setup(o, { emit: e, expose: n }) {
|
|
304
|
+
const t = i(null), l = i(null), d = i(null), f = i(null), u = i(!1), c = i(null), s = i(o.focusLastElement ? o.data.length - 1 : 0), y = i(0), r = i(o.data.length - 1), m = b(() => o.data.some((a) => a.icon)), p = b(() => o.indentItems || m.value ? o.data.map((a) => {
|
|
305
|
+
let _ = !1;
|
|
306
|
+
return a.icon || (_ = !0), {
|
|
279
307
|
...a,
|
|
280
|
-
indent:
|
|
308
|
+
indent: _
|
|
281
309
|
};
|
|
282
|
-
}) :
|
|
283
|
-
var a,
|
|
284
|
-
(
|
|
285
|
-
},
|
|
310
|
+
}) : o.data), v = async () => {
|
|
311
|
+
var a, _, h;
|
|
312
|
+
(h = (_ = (a = l.value) == null ? void 0 : a.children[s.value]) == null ? void 0 : _.children[0]) == null || h.focus();
|
|
313
|
+
}, k = () => e(C.CLOSE), x = (a, _) => {
|
|
286
314
|
if (a.items) {
|
|
287
|
-
|
|
315
|
+
c.value = _, u.value = !0;
|
|
288
316
|
return;
|
|
289
317
|
}
|
|
290
|
-
|
|
318
|
+
c.value = _, u.value = !1, !a.skipClose && o.closeMenuOnItemSelect !== !1 && k(), e("menu-item-click");
|
|
291
319
|
}, g = () => {
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
},
|
|
296
|
-
var
|
|
297
|
-
(
|
|
298
|
-
},
|
|
299
|
-
|
|
320
|
+
s.value > 0 ? (s.value -= 1, p.value[s.value].disabled && g()) : s.value = r.value, v();
|
|
321
|
+
}, B = () => {
|
|
322
|
+
s.value < r.value ? (s.value += 1, p.value[s.value].disabled && B()) : s.value = 0, v();
|
|
323
|
+
}, S = (a, _) => {
|
|
324
|
+
var h;
|
|
325
|
+
(h = a == null ? void 0 : a.items) != null && h.length && (c.value = _, u.value = !0);
|
|
326
|
+
}, E = () => {
|
|
327
|
+
c.value && u.value && (c.value = null, u.value = !1);
|
|
300
328
|
}, w = () => {
|
|
301
|
-
|
|
329
|
+
u.value = !1, c.value = null, v();
|
|
302
330
|
};
|
|
303
331
|
n({
|
|
304
332
|
focusItem: v
|
|
305
333
|
});
|
|
306
|
-
const
|
|
307
|
-
var a, c, k;
|
|
308
|
-
return (k = (c = (a = m.value) == null ? void 0 : a[0]) == null ? void 0 : c.$el) == null ? void 0 : k.offsetHeight;
|
|
309
|
-
}), C = b(() => l.value ? `${L.value}px` : "");
|
|
334
|
+
const { computedStyle: O } = Ce(f, c, u);
|
|
310
335
|
return {
|
|
311
336
|
// Values
|
|
312
|
-
menuItemListRef:
|
|
337
|
+
menuItemListRef: l,
|
|
313
338
|
menuItemListWrapperRef: d,
|
|
314
|
-
subMenuItemListRef:
|
|
339
|
+
subMenuItemListRef: f,
|
|
315
340
|
menuItemRef: t,
|
|
316
|
-
computedData:
|
|
317
|
-
|
|
318
|
-
focusedIndex:
|
|
319
|
-
subMenuFocusedIndex:
|
|
320
|
-
showSubMenu:
|
|
321
|
-
visibleSubMenuIndex:
|
|
341
|
+
computedData: p,
|
|
342
|
+
computedStyle: O,
|
|
343
|
+
focusedIndex: s,
|
|
344
|
+
subMenuFocusedIndex: y,
|
|
345
|
+
showSubMenu: u,
|
|
346
|
+
visibleSubMenuIndex: c,
|
|
322
347
|
// Methods
|
|
323
|
-
menuItemClick:
|
|
324
|
-
closeMenu:
|
|
348
|
+
menuItemClick: x,
|
|
349
|
+
closeMenu: k,
|
|
325
350
|
focusPrevious: g,
|
|
326
|
-
focusNext:
|
|
327
|
-
focusRight:
|
|
328
|
-
focusLeft:
|
|
351
|
+
focusNext: B,
|
|
352
|
+
focusRight: S,
|
|
353
|
+
focusLeft: E,
|
|
329
354
|
onBackButton: w
|
|
330
355
|
};
|
|
331
356
|
}
|
|
332
357
|
});
|
|
333
|
-
var
|
|
358
|
+
var he = function() {
|
|
334
359
|
var e = this, n = e._self._c;
|
|
335
|
-
return e._self._setupProxy, n("menu-list-container", { ref: "menuItemListWrapperRef", style:
|
|
360
|
+
return e._self._setupProxy, n("menu-list-container", { ref: "menuItemListWrapperRef", style: e.computedStyle }, [n("ul", { ref: "menuItemListRef", staticClass: "b-menu-item-list", attrs: { role: "menu" }, on: { keydown: [function(t) {
|
|
336
361
|
return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) ? null : e.focusNext.apply(null, arguments);
|
|
337
362
|
}, function(t) {
|
|
338
363
|
return !t.type.indexOf("key") && e._k(t.keyCode, "up", 38, t.key, ["Up", "ArrowUp"]) ? null : e.focusPrevious.apply(null, arguments);
|
|
@@ -340,46 +365,46 @@ var Ce = function() {
|
|
|
340
365
|
return !t.type.indexOf("key") && e._k(t.keyCode, "esc", 27, t.key, ["Esc", "Escape"]) ? null : e.closeMenu.apply(null, arguments);
|
|
341
366
|
}, function(t) {
|
|
342
367
|
return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.closeMenu.apply(null, arguments);
|
|
343
|
-
}] } }, e._l(e.computedData, function(t,
|
|
344
|
-
var d,
|
|
345
|
-
return n("li", { key: `menu-item-${
|
|
346
|
-
return !
|
|
347
|
-
}, function(
|
|
348
|
-
return !
|
|
349
|
-
}] } }, [n("menu-item", { attrs: { text: t.text, handler: (d = t.items) != null && d.length ? () => null : t.handler, "secondary-text": t.secondaryText, icon: t.icon, chevron: !!((
|
|
350
|
-
return e.menuItemClick(t,
|
|
351
|
-
} } }), t.addDivider ? n("bento-divider", { staticClass: "b-menu-item-list__divider" }) : e._e(), (
|
|
368
|
+
}] } }, e._l(e.computedData, function(t, l) {
|
|
369
|
+
var d, f, u, c;
|
|
370
|
+
return n("li", { key: `menu-item-${l}`, ref: "menuItemRef", refInFor: !0, staticClass: "b-menu-item-list__item", attrs: { role: "none" }, on: { keydown: [function(s) {
|
|
371
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "right", 39, s.key, ["Right", "ArrowRight"]) || "button" in s && s.button !== 2 ? null : e.focusRight(t, l);
|
|
372
|
+
}, function(s) {
|
|
373
|
+
return !s.type.indexOf("key") && e._k(s.keyCode, "left", 37, s.key, ["Left", "ArrowLeft"]) || "button" in s && s.button !== 0 ? null : e.focusLeft();
|
|
374
|
+
}] } }, [n("menu-item", { attrs: { text: t.text, handler: (d = t.items) != null && d.length ? () => null : t.handler, "secondary-text": t.secondaryText, icon: t.icon, chevron: !!((f = t.items) != null && f.length), disabled: t.disabled, critical: t.critical, indent: t.indent, tabindex: l === e.subMenuFocusedIndex ? "0" : "-1", "aria-haspopup": !!((u = t.items) != null && u.length), "aria-expanded": e.showSubMenu && e.visibleSubMenuIndex === l }, on: { click: function(s) {
|
|
375
|
+
return e.menuItemClick(t, l);
|
|
376
|
+
} } }), t.addDivider ? n("bento-divider", { staticClass: "b-menu-item-list__divider" }) : e._e(), (c = t.items) != null && c.length && e.showSubMenu && e.visibleSubMenuIndex === l ? n("sub-menu-item-list", { ref: "subMenuItemListRef", refInFor: !0, attrs: { items: t.items, title: t.text }, on: { back: e.onBackButton, close: e.closeMenu } }) : e._e()], 1);
|
|
352
377
|
}), 0)]);
|
|
353
|
-
},
|
|
354
|
-
ve,
|
|
355
|
-
Ce,
|
|
378
|
+
}, ke = [], ge = /* @__PURE__ */ I(
|
|
356
379
|
be,
|
|
380
|
+
he,
|
|
381
|
+
ke,
|
|
357
382
|
!1,
|
|
358
383
|
null,
|
|
359
|
-
"
|
|
384
|
+
"a94a192f"
|
|
360
385
|
);
|
|
361
|
-
const
|
|
362
|
-
let
|
|
363
|
-
const
|
|
386
|
+
const Ie = ge.exports;
|
|
387
|
+
let N = 0;
|
|
388
|
+
const xe = {
|
|
364
389
|
beforeCreate() {
|
|
365
|
-
this.uuid =
|
|
390
|
+
this.uuid = N.toString(), N += 1;
|
|
366
391
|
}
|
|
367
392
|
};
|
|
368
|
-
var
|
|
393
|
+
var Me = function() {
|
|
369
394
|
var e = this, n = e._self._c;
|
|
370
395
|
return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#00112C", d: "M8 4C8.29667 4 8.58668 3.91203 8.83335 3.74721C9.08003 3.58238 9.27229 3.34811 9.38582 3.07403C9.49935 2.79994 9.52906 2.49834 9.47118 2.20737C9.4133 1.91639 9.27044 1.64912 9.06066 1.43934C8.85088 1.22956 8.58361 1.0867 8.29264 1.02882C8.00167 0.970945 7.70006 1.00065 7.42598 1.11418C7.15189 1.22771 6.91762 1.41997 6.7528 1.66665C6.58797 1.91332 6.5 2.20333 6.5 2.5C6.5 2.89783 6.65803 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z" } }), n("path", { attrs: { fill: "#00112C", d: "M8 15C8.29667 15 8.58668 14.912 8.83335 14.7472C9.08003 14.5824 9.27229 14.3481 9.38582 14.074C9.49935 13.7999 9.52906 13.4983 9.47118 13.2074C9.4133 12.9164 9.27044 12.6491 9.06066 12.4393C8.85088 12.2296 8.58361 12.0867 8.29264 12.0288C8.00167 11.9709 7.70006 12.0007 7.42598 12.1142C7.15189 12.2277 6.91762 12.42 6.7528 12.6666C6.58797 12.9133 6.5 13.2033 6.5 13.5C6.5 13.8978 6.65803 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z" } }), n("path", { attrs: { fill: "#00112C", d: "M8.83335 9.24721C8.58668 9.41203 8.29667 9.5 8 9.5C7.60218 9.5 7.22064 9.34197 6.93934 9.06066C6.65803 8.77936 6.5 8.39783 6.5 8C6.5 7.70333 6.58797 7.41332 6.7528 7.16665C6.91762 6.91997 7.15189 6.72771 7.42598 6.61418C7.70006 6.50065 8.00167 6.47094 8.29264 6.52882C8.58361 6.5867 8.85088 6.72956 9.06066 6.93934C9.27044 7.14912 9.4133 7.41639 9.47118 7.70737C9.52906 7.99834 9.49935 8.29994 9.38582 8.57403C9.27229 8.84811 9.08003 9.08238 8.83335 9.24721Z" } })]);
|
|
371
|
-
},
|
|
372
|
-
ge,
|
|
373
|
-
Ie,
|
|
396
|
+
}, Be = [], Oe = /* @__PURE__ */ I(
|
|
374
397
|
xe,
|
|
398
|
+
Me,
|
|
399
|
+
Be,
|
|
375
400
|
!1,
|
|
376
401
|
null,
|
|
377
402
|
null
|
|
378
403
|
);
|
|
379
|
-
const
|
|
380
|
-
i18n: { messages:
|
|
404
|
+
const Se = Oe.exports, Ee = M({
|
|
405
|
+
i18n: { messages: H },
|
|
381
406
|
name: "bento-menu",
|
|
382
|
-
components: { BentoToggleButton:
|
|
407
|
+
components: { BentoToggleButton: te, BentoPopover: G, BentoTeleport: ee, MenuItemList: Ie, OptionsVerticalIcon: Se },
|
|
383
408
|
props: {
|
|
384
409
|
/**
|
|
385
410
|
* Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.
|
|
@@ -405,13 +430,20 @@ const Me = Be.exports, Oe = M({
|
|
|
405
430
|
type: Array,
|
|
406
431
|
required: !0
|
|
407
432
|
},
|
|
433
|
+
/**
|
|
434
|
+
* Disables opening the menu when the down arrow key is pressed.
|
|
435
|
+
*/
|
|
436
|
+
disableArrowDownOpeningMenu: {
|
|
437
|
+
type: Boolean,
|
|
438
|
+
default: !1
|
|
439
|
+
},
|
|
408
440
|
/**
|
|
409
441
|
* The position of where the menu should open.
|
|
410
442
|
*/
|
|
411
443
|
menuPosition: {
|
|
412
444
|
type: String,
|
|
413
|
-
default:
|
|
414
|
-
validator: (
|
|
445
|
+
default: R.BOTTOM_START,
|
|
446
|
+
validator: (o) => Object.values(R).includes(o)
|
|
415
447
|
},
|
|
416
448
|
/**
|
|
417
449
|
* Instructs the menu popover to be visible outside of the containing container.
|
|
@@ -456,41 +488,41 @@ const Me = Be.exports, Oe = M({
|
|
|
456
488
|
default: void 0
|
|
457
489
|
}
|
|
458
490
|
},
|
|
459
|
-
emits: [
|
|
460
|
-
setup(
|
|
461
|
-
var
|
|
462
|
-
const { t:
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
"b-menu--inverse":
|
|
466
|
-
})), v = b(() =>
|
|
467
|
-
if (
|
|
491
|
+
emits: [C.CLOSE, C.OPEN, "menu-item-click", "click-outside"],
|
|
492
|
+
setup(o, { emit: e, expose: n, slots: t }) {
|
|
493
|
+
var O;
|
|
494
|
+
const { t: l } = J(), d = i(null), f = i(null), u = i(!1), c = i(!1), s = i(null), y = L("menu"), r = L("menu-popover"), m = P(ne, i(!1));
|
|
495
|
+
q(X, m);
|
|
496
|
+
const p = b(() => ({
|
|
497
|
+
"b-menu--inverse": m.value
|
|
498
|
+
})), v = b(() => o.menuWidth ? { width: `${o.menuWidth}px` } : null), k = b(() => {
|
|
499
|
+
if (o != null && o.button)
|
|
468
500
|
return {
|
|
469
501
|
variant: "secondary",
|
|
470
|
-
...
|
|
502
|
+
...o.button
|
|
471
503
|
};
|
|
472
|
-
}),
|
|
473
|
-
|
|
474
|
-
}, g = async (
|
|
475
|
-
var
|
|
476
|
-
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
},
|
|
480
|
-
|
|
481
|
-
},
|
|
482
|
-
|
|
504
|
+
}), x = () => {
|
|
505
|
+
u.value = !0, e(C.OPEN);
|
|
506
|
+
}, g = async (a = o.revertFocusToButton) => {
|
|
507
|
+
var _, h;
|
|
508
|
+
u.value && (u.value = !1, a && (await A(), (h = (_ = d.value) == null ? void 0 : _.$el) == null || h.focus()), e(C.CLOSE));
|
|
509
|
+
}, B = (a) => {
|
|
510
|
+
a.stopPropagation(), u.value ? g() : x();
|
|
511
|
+
}, S = (a) => {
|
|
512
|
+
a.preventDefault(), c.value = !1, o.disableArrowDownOpeningMenu || x();
|
|
513
|
+
}, E = (a) => {
|
|
514
|
+
a.preventDefault(), c.value = !0, x();
|
|
483
515
|
}, w = () => {
|
|
484
516
|
e("menu-item-click");
|
|
485
517
|
};
|
|
486
|
-
return
|
|
487
|
-
|
|
518
|
+
return Y(
|
|
519
|
+
s,
|
|
488
520
|
() => {
|
|
489
521
|
g(), e("click-outside");
|
|
490
522
|
},
|
|
491
523
|
{
|
|
492
|
-
...
|
|
493
|
-
ignore: [d, ...((
|
|
524
|
+
...o.closeOnClickOutsideOptions,
|
|
525
|
+
ignore: [d, ...((O = o.closeOnClickOutsideOptions) == null ? void 0 : O.ignore) ?? []]
|
|
494
526
|
}
|
|
495
527
|
), n({
|
|
496
528
|
/**
|
|
@@ -499,32 +531,32 @@ const Me = Be.exports, Oe = M({
|
|
|
499
531
|
closeMenu: g
|
|
500
532
|
}), {
|
|
501
533
|
// Refs
|
|
502
|
-
popoverRef:
|
|
534
|
+
popoverRef: s,
|
|
503
535
|
menuButtonRef: d,
|
|
504
|
-
menuItemListRef:
|
|
536
|
+
menuItemListRef: f,
|
|
505
537
|
// Values
|
|
506
|
-
menuId:
|
|
507
|
-
popoverId:
|
|
508
|
-
showMenu:
|
|
509
|
-
computedButtonPropsWithDefaults:
|
|
538
|
+
menuId: y,
|
|
539
|
+
popoverId: r,
|
|
540
|
+
showMenu: u,
|
|
541
|
+
computedButtonPropsWithDefaults: k,
|
|
510
542
|
computedMenuWidth: v,
|
|
511
|
-
isLastElementFocused:
|
|
543
|
+
isLastElementFocused: c,
|
|
512
544
|
// Classes
|
|
513
|
-
computedClasses:
|
|
514
|
-
isInverseColorSet:
|
|
545
|
+
computedClasses: p,
|
|
546
|
+
isInverseColorSet: m,
|
|
515
547
|
// Methods
|
|
516
|
-
hasSlot:
|
|
517
|
-
onKeyDown:
|
|
518
|
-
onKeyUp:
|
|
548
|
+
hasSlot: V(t),
|
|
549
|
+
onKeyDown: S,
|
|
550
|
+
onKeyUp: E,
|
|
519
551
|
closeMenu: g,
|
|
520
552
|
menuItemClick: w,
|
|
521
|
-
toggleShowMenu:
|
|
553
|
+
toggleShowMenu: B,
|
|
522
554
|
// Translations
|
|
523
|
-
t:
|
|
555
|
+
t: l
|
|
524
556
|
};
|
|
525
557
|
}
|
|
526
558
|
});
|
|
527
|
-
var
|
|
559
|
+
var we = function() {
|
|
528
560
|
var e = this, n = e._self._c;
|
|
529
561
|
return e._self._setupProxy, n("div", { staticClass: "b-menu", class: e.computedClasses, attrs: { "data-testid": "menu" }, on: { keydown: [function(t) {
|
|
530
562
|
return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) ? null : e.onKeyDown.apply(null, arguments);
|
|
@@ -550,20 +582,20 @@ var Le = function() {
|
|
|
550
582
|
"left-start",
|
|
551
583
|
"left-end"
|
|
552
584
|
], teleport: e.teleport, "without-space": "" } }, [n("menu-item-list", { ref: "menuItemListRef", attrs: { "close-menu-on-item-select": e.closeMenuOnItemSelect, data: e.data, "focus-last-element": e.isLastElementFocused }, on: { close: e.closeMenu, "menu-item-click": e.menuItemClick } })], 1) : e._e()], 1) : e._e()], 1);
|
|
553
|
-
},
|
|
554
|
-
|
|
585
|
+
}, Le = [], Re = /* @__PURE__ */ I(
|
|
586
|
+
Ee,
|
|
587
|
+
we,
|
|
555
588
|
Le,
|
|
556
|
-
Re,
|
|
557
589
|
!1,
|
|
558
590
|
null,
|
|
559
|
-
"
|
|
591
|
+
"b976c2e8"
|
|
560
592
|
);
|
|
561
|
-
const
|
|
593
|
+
const Je = Re.exports;
|
|
562
594
|
export {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
595
|
+
Je as B,
|
|
596
|
+
ae as D,
|
|
597
|
+
ne as M,
|
|
598
|
+
Se as O,
|
|
599
|
+
C as a
|
|
568
600
|
};
|
|
569
|
-
//# sourceMappingURL=menu.
|
|
601
|
+
//# sourceMappingURL=menu.DDXB-L8u.js.map
|