@adyen/bento-vue3 1.58.1 → 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/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.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.C3YC7Cvq.js → action-bar.DHFGXPzd.js} +3 -3
- package/dist/chunks/{action-bar.C3YC7Cvq.js.map → action-bar.DHFGXPzd.js.map} +1 -1
- package/dist/chunks/{base-modal.C9t8wOxU.js → base-modal.BXdrZf3U.js} +2 -2
- package/dist/chunks/{base-modal.C9t8wOxU.js.map → base-modal.BXdrZf3U.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DVvlTcnv.js → button-actions-with-menu.DfnPv97A.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.DVvlTcnv.js.map → button-actions-with-menu.DfnPv97A.js.map} +1 -1
- package/dist/chunks/{checkbox-group.tAmTjBdy.js → checkbox-group.Dsiyb1cX.js} +4 -4
- package/dist/chunks/{checkbox-group.tAmTjBdy.js.map → checkbox-group.Dsiyb1cX.js.map} +1 -1
- package/dist/chunks/{checkbox.H3fMdGno.js → checkbox.DeNqOQ8F.js} +17 -17
- package/dist/chunks/{checkbox.H3fMdGno.js.map → checkbox.DeNqOQ8F.js.map} +1 -1
- package/dist/chunks/chip.BVCzNGaI.js +71 -0
- package/dist/chunks/chip.BVCzNGaI.js.map +1 -0
- package/dist/chunks/{code-snippet.EAwTnNST.js → code-snippet.91V1hyL-.js} +4 -4
- package/dist/chunks/{code-snippet.EAwTnNST.js.map → code-snippet.91V1hyL-.js.map} +1 -1
- package/dist/chunks/{controls-group.CQZTslGW.js → controls-group.DzFmJYYp.js} +2 -2
- package/dist/chunks/{controls-group.CQZTslGW.js.map → controls-group.DzFmJYYp.js.map} +1 -1
- package/dist/chunks/{copy.Ce8Mdpir.js → copy.BNFlTYMb.js} +2 -2
- package/dist/chunks/{copy.Ce8Mdpir.js.map → copy.BNFlTYMb.js.map} +1 -1
- package/dist/chunks/{dashboard-section.D5fPiyCI.js → dashboard-section.BTJ8h5Kd.js} +2 -2
- package/dist/chunks/{dashboard-section.D5fPiyCI.js.map → dashboard-section.BTJ8h5Kd.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CMScTPOb.js → dashed-underline.BpSS0BTl.js} +3 -3
- package/dist/chunks/{dashed-underline.CMScTPOb.js.map → dashed-underline.BpSS0BTl.js.map} +1 -1
- package/dist/chunks/{data-grid-template.Qig0zkMz.js → data-grid-template.CnrbFvb3.js} +2 -2
- package/dist/chunks/{data-grid-template.Qig0zkMz.js.map → data-grid-template.CnrbFvb3.js.map} +1 -1
- package/dist/chunks/{data-grid._VkSTE4U.js → data-grid.PAFw8voO.js} +1415 -1380
- package/dist/chunks/data-grid.PAFw8voO.js.map +1 -0
- package/dist/chunks/{date-picker.BvP9lX7i.js → date-picker.CSn6F3aG.js} +3 -3
- package/dist/chunks/{date-picker.BvP9lX7i.js.map → date-picker.CSn6F3aG.js.map} +1 -1
- package/dist/chunks/{date-range-picker.42PkRLKi.js → date-range-picker.ByQ_yM6z.js} +6 -6
- package/dist/chunks/{date-range-picker.42PkRLKi.js.map → date-range-picker.ByQ_yM6z.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.9Uuos_mS.js → dropdown-tag.D_oUoZBc.js} +3 -3
- package/dist/chunks/{dropdown-tag.9Uuos_mS.js.map → dropdown-tag.D_oUoZBc.js.map} +1 -1
- package/dist/chunks/{dropdown.CnMnzXc2.js → dropdown.B8LbzSzW.js} +5 -5
- package/dist/chunks/{dropdown.CnMnzXc2.js.map → dropdown.B8LbzSzW.js.map} +1 -1
- package/dist/chunks/{error-message.KTNWtFyf.js → error-message.BzDQxHUy.js} +2 -2
- package/dist/chunks/{error-message.KTNWtFyf.js.map → error-message.BzDQxHUy.js.map} +1 -1
- package/dist/chunks/es6.BA9GH7QZ.js.map +1 -1
- package/dist/chunks/{file-uploader.DzGfFhY9.js → file-uploader.HMZfzgaO.js} +3 -3
- package/dist/chunks/{file-uploader.DzGfFhY9.js.map → file-uploader.HMZfzgaO.js.map} +1 -1
- package/dist/chunks/{filter-bar.B6MJc1pP.js → filter-bar.CKxLJDQE.js} +15 -15
- package/dist/chunks/{filter-bar.B6MJc1pP.js.map → filter-bar.CKxLJDQE.js.map} +1 -1
- package/dist/chunks/{focus-trap.DY5E-2JV.js → focus-trap.BdrEB4Ld.js} +2 -1
- package/dist/chunks/{focus-trap.DY5E-2JV.js.map → focus-trap.BdrEB4Ld.js.map} +1 -1
- package/dist/chunks/{header-with-views.B-d7Y1qK.js → header-with-views.BVcLQi-H.js} +9 -9
- package/dist/chunks/{header-with-views.B-d7Y1qK.js.map → header-with-views.BVcLQi-H.js.map} +1 -1
- package/dist/chunks/{header.Nh7Jph4R.js → header.CYPznLHg.js} +95 -76
- package/dist/chunks/{header.Nh7Jph4R.js.map → header.CYPznLHg.js.map} +1 -1
- package/dist/chunks/{info-icon-with-popover.CZGbqWFt.js → info-icon-with-popover.BUtJRYXy.js} +2 -2
- package/dist/chunks/{info-icon-with-popover.CZGbqWFt.js.map → info-icon-with-popover.BUtJRYXy.js.map} +1 -1
- package/dist/chunks/{info-icon.DOH8zIvI.js → info-icon.MO6y9Dyv.js} +2 -2
- package/dist/chunks/{info-icon.DOH8zIvI.js.map → info-icon.MO6y9Dyv.js.map} +1 -1
- package/dist/chunks/{input-field-password.B5uy0EiK.js → input-field-password.c6WXpF9U.js} +5 -5
- package/dist/chunks/{input-field-password.B5uy0EiK.js.map → input-field-password.c6WXpF9U.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Ck6XS73k.js → input-field-phone-number.DQxF-6wT.js} +3 -3
- package/dist/chunks/{input-field-phone-number.Ck6XS73k.js.map → input-field-phone-number.DQxF-6wT.js.map} +1 -1
- package/dist/chunks/{input-field.CUfSQLYO.js → input-field.BDEEGU2t.js} +3 -3
- package/dist/chunks/{input-field.CUfSQLYO.js.map → input-field.BDEEGU2t.js.map} +1 -1
- package/dist/chunks/{inspector.types.Df-LngxJ.js → inspector.types.BQnVv5HX.js} +2 -2
- package/dist/chunks/{inspector.types.Df-LngxJ.js.map → inspector.types.BQnVv5HX.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.v1qrgVav.js → listbox-option-tag.CTipR05e.js} +2 -2
- package/dist/chunks/{listbox-option-tag.v1qrgVav.js.map → listbox-option-tag.CTipR05e.js.map} +1 -1
- package/dist/chunks/{menu.BmSWTWp2.js → menu.HVsIOPzt.js} +256 -224
- package/dist/chunks/menu.HVsIOPzt.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.B73FGuMI.js → modal-fullscreen.CN1dCmU-.js} +2 -2
- package/dist/chunks/{modal-fullscreen.B73FGuMI.js.map → modal-fullscreen.CN1dCmU-.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.hMWefloS.js → modal.vue_vue_type_script_setup_true_lang._xN4vNxW.js} +2 -2
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.hMWefloS.js.map → modal.vue_vue_type_script_setup_true_lang._xN4vNxW.js.map} +1 -1
- package/dist/chunks/{pagination.BfA6pOGB.js → pagination.Cv-jL5MP.js} +2 -2
- package/dist/chunks/{pagination.BfA6pOGB.js.map → pagination.Cv-jL5MP.js.map} +1 -1
- package/dist/chunks/{popover.DiIZe9RM.js → popover.sXC1vaC4.js} +2 -2
- package/dist/chunks/{popover.DiIZe9RM.js.map → popover.sXC1vaC4.js.map} +1 -1
- package/dist/chunks/{popper-container.B_sb3SNK.js → popper-container.CWgM0skS.js} +2 -2
- package/dist/chunks/{popper-container.B_sb3SNK.js.map → popper-container.CWgM0skS.js.map} +1 -1
- package/dist/chunks/{radio-group.DG_SxGuf.js → radio-group.BzLVfoL0.js} +4 -4
- package/dist/chunks/{radio-group.DG_SxGuf.js.map → radio-group.BzLVfoL0.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.zXIxJKs8.js → rich-text-editor.C5RIGjDX.js} +4 -4
- package/dist/chunks/{rich-text-editor.zXIxJKs8.js.map → rich-text-editor.C5RIGjDX.js.map} +1 -1
- package/dist/chunks/{search-bar.BUG88A0q.js → search-bar.C8bAeztI.js} +3 -3
- package/dist/chunks/{search-bar.BUG88A0q.js.map → search-bar.C8bAeztI.js.map} +1 -1
- package/dist/chunks/{secondary-nav.igRQouwn.js → secondary-nav.BZF_9ztn.js} +2 -2
- package/dist/chunks/{secondary-nav.igRQouwn.js.map → secondary-nav.BZF_9ztn.js.map} +1 -1
- package/dist/chunks/{segmented-control.ClJS7gzl.js → segmented-control.u3a7Mssn.js} +2 -2
- package/dist/chunks/{segmented-control.ClJS7gzl.js.map → segmented-control.u3a7Mssn.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CdRPwD-M.js → selection-card-group.CSFQ-f8m.js} +11 -11
- package/dist/chunks/{selection-card-group.CdRPwD-M.js.map → selection-card-group.CSFQ-f8m.js.map} +1 -1
- package/dist/chunks/{sidepanel.C4z6LXMz.js → sidepanel.kwEMG5ee.js} +2 -2
- package/dist/chunks/{sidepanel.C4z6LXMz.js.map → sidepanel.kwEMG5ee.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BDps9Y9e.js → structured-list-item.DLJp-ApS.js} +4 -4
- package/dist/chunks/{structured-list-item.BDps9Y9e.js.map → structured-list-item.DLJp-ApS.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DMCKjGMN.js → summary-grid.types.DkyTeEAn.js} +5 -5
- package/dist/chunks/{summary-grid.types.DMCKjGMN.js.map → summary-grid.types.DkyTeEAn.js.map} +1 -1
- package/dist/chunks/{tag.uRkpY4u1.js → tag.Me7nYLMe.js} +2 -2
- package/dist/chunks/{tag.uRkpY4u1.js.map → tag.Me7nYLMe.js.map} +1 -1
- package/dist/chunks/{textarea.Dzy0cs2N.js → textarea.BbSzCJ-3.js} +2 -2
- package/dist/chunks/{textarea.Dzy0cs2N.js.map → textarea.BbSzCJ-3.js.map} +1 -1
- package/dist/chunks/{timeline-item.CuSRjcnT.js → timeline-item._h_dMFfm.js} +4 -4
- package/dist/chunks/{timeline-item.CuSRjcnT.js.map → timeline-item._h_dMFfm.js.map} +1 -1
- package/dist/chunks/{tooltip.CFgesodr.js → tooltip.CGMSPub2.js} +2 -2
- package/dist/chunks/{tooltip.CFgesodr.js.map → tooltip.CGMSPub2.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.vue_vue_type_script_setup_true_lang.s21s5Oso.js → tutorial.vue_vue_type_script_setup_true_lang.CysjLLSS.js} +4 -4
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.s21s5Oso.js.map → tutorial.vue_vue_type_script_setup_true_lang.CysjLLSS.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.CE98s5Ai.js → use-cached-selected-values.Dk0UxwFJ.js} +3 -3
- package/dist/chunks/{use-cached-selected-values.CE98s5Ai.js.map → use-cached-selected-values.Dk0UxwFJ.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 +1 -1
- package/dist/date-range-picker.js +1 -1
- 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 +43 -43
- 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 +8 -8
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/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 +1 -1
- package/package.json +3 -3
- package/dist/chunks/chip.DbhxDQiT.js +0 -74
- package/dist/chunks/chip.DbhxDQiT.js.map +0 -1
- package/dist/chunks/data-grid._VkSTE4U.js.map +0 -1
- package/dist/chunks/menu.BmSWTWp2.js.map +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { g as
|
|
3
|
-
import { a as Y, B as fe } from "./popover.
|
|
4
|
-
import { B as
|
|
1
|
+
import { defineComponent as N, computed as _, resolveComponent as C, createBlock as B, openBlock as v, normalizeClass as Q, createSlots as x, withCtx as I, createVNode as E, createCommentVNode as O, createTextVNode as G, toDisplayString as U, resolveDynamicComponent as ie, ref as d, inject as ee, createElementBlock as L, mergeProps as j, toHandlers as ae, renderSlot as K, onMounted as re, Transition as de, createElementVNode as R, withKeys as g, withModifiers as H, Fragment as te, renderList as ne, watch as ce, nextTick as q, normalizeStyle as oe, provide as me } from "vue";
|
|
2
|
+
import { g as X } from "./generate-uid.NJ8tVoha.js";
|
|
3
|
+
import { a as Y, B as fe } from "./popover.sXC1vaC4.js";
|
|
4
|
+
import { B as se, D as pe } from "./divider.qUOSAbU6.js";
|
|
5
5
|
import { u as ve } from "./use-click-outside.BnhTgpSt.js";
|
|
6
6
|
import { u as be } from "./use-has-slot.B7eQSabc.js";
|
|
7
|
-
import { u as
|
|
7
|
+
import { u as ye } from "./i18n.B6g5VX0q.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { _ as T } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
-
import { a as
|
|
11
|
-
import { a as
|
|
12
|
-
import { B as
|
|
13
|
-
import {
|
|
10
|
+
import { a as Ce, C as z } from "./chevron-left.BF63HtOH.js";
|
|
11
|
+
import { a as J, B as he } from "./base-button.DdNFlbgH.js";
|
|
12
|
+
import { B as Ie } from "./typography.DN5eC5ch.js";
|
|
13
|
+
import { t as ge } from "./truncate.BfIl_-71.js";
|
|
14
|
+
import { B as Me } from "./teleport.CfGWjxe2.js";
|
|
14
15
|
import { B as ke } from "./toggle-button.Dv1t15yj.js";
|
|
15
16
|
import "../assets/menu.css";
|
|
16
|
-
const Be = Symbol("menu inverse style injection key"),
|
|
17
|
+
const Be = Symbol("menu inverse style injection key"), _e = N({
|
|
17
18
|
name: "menu-item",
|
|
18
|
-
components: { BaseButton:
|
|
19
|
+
components: { BaseButton: he, BentoTypography: Ie, ChevronRightIcon: Ce },
|
|
19
20
|
props: {
|
|
20
21
|
/**
|
|
21
22
|
* menu-item text that gets displayed as the main label
|
|
@@ -83,60 +84,62 @@ const Be = Symbol("menu inverse style injection key"), Me = D({
|
|
|
83
84
|
default: !1
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
|
-
emits: [
|
|
87
|
+
emits: [J.CLICK],
|
|
87
88
|
setup(e, { emit: t }) {
|
|
89
|
+
const u = _(() => ({
|
|
90
|
+
"b-menu-item--critical": e.critical,
|
|
91
|
+
"b-menu-item--indent": e.indent
|
|
92
|
+
})), m = _(() => ge(e.secondaryText, 10));
|
|
88
93
|
return {
|
|
89
94
|
// Values
|
|
90
|
-
conditionalClasses:
|
|
91
|
-
|
|
92
|
-
"b-menu-item--indent": e.indent
|
|
93
|
-
})),
|
|
95
|
+
conditionalClasses: u,
|
|
96
|
+
computedSecondaryText: m,
|
|
94
97
|
// Methods
|
|
95
|
-
onClick: (
|
|
96
|
-
|
|
98
|
+
onClick: (i) => {
|
|
99
|
+
i.stopPropagation(), e.handler(), t(J.CLICK);
|
|
97
100
|
}
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
});
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
return
|
|
104
|
-
class:
|
|
104
|
+
function Se(e, t, p, u, m, c) {
|
|
105
|
+
const i = C("bento-typography"), l = C("chevron-right-icon"), a = C("base-button");
|
|
106
|
+
return v(), B(a, {
|
|
107
|
+
class: Q(["b-menu-item", e.conditionalClasses]),
|
|
105
108
|
role: "menuitem",
|
|
106
109
|
disabled: e.disabled,
|
|
107
110
|
tabindex: "-1",
|
|
108
111
|
onClick: e.onClick
|
|
109
112
|
}, x({
|
|
110
113
|
default: I(() => [
|
|
111
|
-
|
|
114
|
+
E(i, {
|
|
112
115
|
el: "span",
|
|
113
116
|
variant: "body",
|
|
114
117
|
stronger: e.isTitle,
|
|
115
118
|
class: "b-menu-item__primary-text"
|
|
116
119
|
}, {
|
|
117
120
|
default: I(() => [
|
|
118
|
-
G(
|
|
121
|
+
G(U(e.text), 1)
|
|
119
122
|
]),
|
|
120
123
|
_: 1
|
|
121
124
|
}, 8, ["stronger"]),
|
|
122
|
-
e.
|
|
125
|
+
e.computedSecondaryText ? (v(), B(i, {
|
|
123
126
|
key: 0,
|
|
124
127
|
el: "span",
|
|
125
128
|
variant: "body",
|
|
126
129
|
class: "b-menu-item__secondary-text"
|
|
127
130
|
}, {
|
|
128
131
|
default: I(() => [
|
|
129
|
-
G(
|
|
132
|
+
G(U(e.computedSecondaryText), 1)
|
|
130
133
|
]),
|
|
131
134
|
_: 1
|
|
132
|
-
})) :
|
|
135
|
+
})) : O("", !0)
|
|
133
136
|
]),
|
|
134
137
|
_: 2
|
|
135
138
|
}, [
|
|
136
139
|
e.icon ? {
|
|
137
140
|
name: "iconLeft",
|
|
138
141
|
fn: I(() => [
|
|
139
|
-
(
|
|
142
|
+
(v(), B(ie(e.icon), {
|
|
140
143
|
class: "b-menu-item__icon-left",
|
|
141
144
|
"aria-hidden": "true"
|
|
142
145
|
}))
|
|
@@ -146,47 +149,47 @@ function _e(e, t, p, s, d, b) {
|
|
|
146
149
|
e.chevron ? {
|
|
147
150
|
name: "iconRight",
|
|
148
151
|
fn: I(() => [
|
|
149
|
-
|
|
152
|
+
E(l, { "aria-hidden": "true" })
|
|
150
153
|
]),
|
|
151
154
|
key: "1"
|
|
152
155
|
} : void 0
|
|
153
156
|
]), 1032, ["class", "disabled", "onClick"]);
|
|
154
157
|
}
|
|
155
|
-
const ue = /* @__PURE__ */ T(
|
|
156
|
-
var
|
|
157
|
-
const $e = Symbol("menu registering injection key"),
|
|
158
|
+
const ue = /* @__PURE__ */ T(_e, [["render", Se], ["__scopeId", "data-v-4cecac65"]]);
|
|
159
|
+
var M = /* @__PURE__ */ ((e) => (e.BACK = "back", e.CLOSE = "close", e.OPEN = "open", e))(M || {});
|
|
160
|
+
const $e = Symbol("menu registering injection key"), Ee = {
|
|
158
161
|
name: "bento-menu-list-container"
|
|
159
|
-
}, Le = /* @__PURE__ */
|
|
160
|
-
...
|
|
162
|
+
}, Le = /* @__PURE__ */ N({
|
|
163
|
+
...Ee,
|
|
161
164
|
setup(e) {
|
|
162
|
-
const t =
|
|
165
|
+
const t = d(), p = d({}), u = ee(
|
|
163
166
|
$e,
|
|
164
167
|
!1
|
|
165
168
|
);
|
|
166
|
-
if (
|
|
167
|
-
const { registerMenuContainerElement:
|
|
168
|
-
|
|
169
|
-
mouseleave:
|
|
169
|
+
if (u) {
|
|
170
|
+
const { registerMenuContainerElement: m } = u;
|
|
171
|
+
m(t), p.value = {
|
|
172
|
+
mouseleave: u == null ? void 0 : u.menuMouseLeave
|
|
170
173
|
};
|
|
171
174
|
}
|
|
172
|
-
return (
|
|
175
|
+
return (m, c) => (v(), L("div", j({
|
|
173
176
|
ref_key: "menuListContainerRef",
|
|
174
177
|
ref: t,
|
|
175
178
|
class: "b-menu-list-container",
|
|
176
179
|
"data-testid": "menu-list-container"
|
|
177
|
-
},
|
|
178
|
-
|
|
180
|
+
}, ae(p.value, !0)), [
|
|
181
|
+
K(m.$slots, "default", {}, void 0, !0)
|
|
179
182
|
], 16));
|
|
180
183
|
}
|
|
181
|
-
}),
|
|
184
|
+
}), le = /* @__PURE__ */ T(Le, [["__scopeId", "data-v-02a3ca45"]]), V = {
|
|
182
185
|
"en-US": {
|
|
183
186
|
backButton: "Go back",
|
|
184
187
|
menuButton: "Open menu"
|
|
185
188
|
}
|
|
186
|
-
},
|
|
187
|
-
i18n: { messages:
|
|
189
|
+
}, we = N({
|
|
190
|
+
i18n: { messages: V },
|
|
188
191
|
name: "sub-menu-item-list",
|
|
189
|
-
components: { BentoDivider:
|
|
192
|
+
components: { BentoDivider: se, MenuItem: ue, MenuListContainer: le },
|
|
190
193
|
props: {
|
|
191
194
|
items: {
|
|
192
195
|
type: Array,
|
|
@@ -197,83 +200,83 @@ const $e = Symbol("menu registering injection key"), Se = {
|
|
|
197
200
|
required: !0
|
|
198
201
|
}
|
|
199
202
|
},
|
|
200
|
-
emits: [
|
|
203
|
+
emits: [M.CLOSE, M.BACK],
|
|
201
204
|
setup(e, { emit: t }) {
|
|
202
|
-
const p =
|
|
203
|
-
var
|
|
204
|
-
const
|
|
205
|
-
...
|
|
206
|
-
indent: !
|
|
205
|
+
const p = d(null), u = d(0), m = d(e.items.length), c = () => t(M.CLOSE), i = () => t(M.BACK), l = _(() => {
|
|
206
|
+
var f;
|
|
207
|
+
const s = (f = e.items) == null ? void 0 : f.map((b) => ({
|
|
208
|
+
...b,
|
|
209
|
+
indent: !b.icon,
|
|
207
210
|
isTitle: !1,
|
|
208
|
-
clickHandler:
|
|
211
|
+
clickHandler: c
|
|
209
212
|
}));
|
|
210
213
|
return [
|
|
211
214
|
{
|
|
212
215
|
text: e.title,
|
|
213
216
|
secondaryText: null,
|
|
214
217
|
critical: !1,
|
|
215
|
-
icon:
|
|
218
|
+
icon: z,
|
|
216
219
|
isTitle: !0,
|
|
217
220
|
disabled: !1,
|
|
218
221
|
indent: !1,
|
|
219
|
-
handler:
|
|
220
|
-
clickHandler:
|
|
222
|
+
handler: i,
|
|
223
|
+
clickHandler: i,
|
|
221
224
|
addDivider: !0
|
|
222
225
|
},
|
|
223
|
-
...
|
|
226
|
+
...s
|
|
224
227
|
];
|
|
225
|
-
}),
|
|
226
|
-
var
|
|
227
|
-
(
|
|
228
|
+
}), a = async () => {
|
|
229
|
+
var s, f, b, y, k;
|
|
230
|
+
(k = (y = (b = (f = (s = p.value) == null ? void 0 : s.children) == null ? void 0 : f[u.value]) == null ? void 0 : b.children) == null ? void 0 : y[0]) == null || k.focus();
|
|
228
231
|
};
|
|
229
|
-
|
|
230
|
-
setTimeout(() =>
|
|
232
|
+
re(async () => {
|
|
233
|
+
setTimeout(() => a(), 150);
|
|
231
234
|
});
|
|
232
235
|
const n = () => {
|
|
233
|
-
|
|
236
|
+
u.value > 0 ? (u.value -= 1, l.value[u.value].disabled && n()) : u.value = m.value, a();
|
|
234
237
|
}, o = () => {
|
|
235
|
-
|
|
238
|
+
u.value < m.value ? (u.value += 1, l.value[u.value].disabled && o()) : u.value = 0, a();
|
|
236
239
|
};
|
|
237
240
|
return {
|
|
238
241
|
// Enums
|
|
239
|
-
BentoMenuEvent:
|
|
242
|
+
BentoMenuEvent: M,
|
|
240
243
|
// Values
|
|
241
244
|
subMenuItemListRefLocal: p,
|
|
242
|
-
subMenuFocusedIndex:
|
|
243
|
-
ChevronLeftIcon:
|
|
245
|
+
subMenuFocusedIndex: u,
|
|
246
|
+
ChevronLeftIcon: z,
|
|
244
247
|
computedItems: l,
|
|
245
248
|
// Methods
|
|
246
|
-
closeMenu:
|
|
247
|
-
onBackButton:
|
|
249
|
+
closeMenu: c,
|
|
250
|
+
onBackButton: i,
|
|
248
251
|
focusPrevious: n,
|
|
249
252
|
focusNext: o
|
|
250
253
|
};
|
|
251
254
|
}
|
|
252
255
|
});
|
|
253
|
-
function
|
|
254
|
-
const
|
|
255
|
-
return
|
|
256
|
+
function Oe(e, t, p, u, m, c) {
|
|
257
|
+
const i = C("menu-item"), l = C("bento-divider"), a = C("menu-list-container");
|
|
258
|
+
return v(), B(de, {
|
|
256
259
|
name: "b-sub-menu-item-list__transition",
|
|
257
260
|
appear: ""
|
|
258
261
|
}, {
|
|
259
262
|
default: I(() => [
|
|
260
|
-
|
|
263
|
+
E(a, { class: "b-sub-menu-item-list" }, {
|
|
261
264
|
default: I(() => [
|
|
262
|
-
|
|
265
|
+
R("ul", {
|
|
263
266
|
ref: "subMenuItemListRefLocal",
|
|
264
267
|
role: "menu",
|
|
265
268
|
class: "b-sub-menu-item-list__list",
|
|
266
269
|
onKeydown: [
|
|
267
|
-
t[0] || (t[0] =
|
|
268
|
-
t[1] || (t[1] =
|
|
269
|
-
t[2] || (t[2] =
|
|
270
|
+
t[0] || (t[0] = g(H((...n) => e.focusNext && e.focusNext(...n), ["stop"]), ["down"])),
|
|
271
|
+
t[1] || (t[1] = g(H((...n) => e.focusPrevious && e.focusPrevious(...n), ["stop"]), ["up"])),
|
|
272
|
+
t[2] || (t[2] = g(H((...n) => e.onBackButton && e.onBackButton(...n), ["stop"]), ["esc"]))
|
|
270
273
|
]
|
|
271
274
|
}, [
|
|
272
|
-
(
|
|
275
|
+
(v(!0), L(te, null, ne(e.computedItems, (n, o) => (v(), L("li", {
|
|
273
276
|
key: `sub-menu-item-list-item-${o}`,
|
|
274
277
|
role: "none"
|
|
275
278
|
}, [
|
|
276
|
-
|
|
279
|
+
E(i, {
|
|
277
280
|
text: n.text,
|
|
278
281
|
handler: n.handler,
|
|
279
282
|
"secondary-text": n.secondaryText,
|
|
@@ -285,10 +288,10 @@ function Re(e, t, p, s, d, b) {
|
|
|
285
288
|
tabindex: o === e.subMenuFocusedIndex ? "0" : "-1",
|
|
286
289
|
onClick: n.clickHandler
|
|
287
290
|
}, null, 8, ["text", "handler", "secondary-text", "icon", "is-title", "disabled", "critical", "indent", "tabindex", "onClick"]),
|
|
288
|
-
n.addDivider ? (
|
|
291
|
+
n.addDivider ? (v(), B(l, {
|
|
289
292
|
key: 0,
|
|
290
293
|
class: "b-sub-menu-item-list__divider"
|
|
291
|
-
})) :
|
|
294
|
+
})) : O("", !0)
|
|
292
295
|
]))), 128))
|
|
293
296
|
], 544)
|
|
294
297
|
]),
|
|
@@ -298,9 +301,34 @@ function Re(e, t, p, s, d, b) {
|
|
|
298
301
|
_: 1
|
|
299
302
|
});
|
|
300
303
|
}
|
|
301
|
-
const
|
|
304
|
+
const Te = /* @__PURE__ */ T(we, [["render", Oe], ["__scopeId", "data-v-621db243"]]);
|
|
305
|
+
function Re(e, t, p) {
|
|
306
|
+
const c = d(0), i = d(0), l = (n) => {
|
|
307
|
+
if (!n || !n.parentElement)
|
|
308
|
+
return;
|
|
309
|
+
const o = n.parentElement, s = n.cloneNode(!0);
|
|
310
|
+
s.style.position = "absolute", s.style.visibility = "hidden", o.appendChild(s), s.style.width = "max-content";
|
|
311
|
+
const f = s.offsetWidth, b = Math.max(150, Math.min(f, 350));
|
|
312
|
+
c.value = b, s.style.width = `${b}px`;
|
|
313
|
+
const y = s.offsetHeight;
|
|
314
|
+
i.value = y, o.removeChild(s), i.value = y;
|
|
315
|
+
};
|
|
316
|
+
return ce([t, p], async ([n]) => {
|
|
317
|
+
var o, s;
|
|
318
|
+
if (n !== null) {
|
|
319
|
+
await q();
|
|
320
|
+
const f = (s = (o = e.value) == null ? void 0 : o[0]) == null ? void 0 : s.$el;
|
|
321
|
+
f && l(f);
|
|
322
|
+
} else
|
|
323
|
+
c.value = 0, i.value = 0;
|
|
324
|
+
}), { computedStyle: _(() => {
|
|
325
|
+
const n = { width: "max-content" };
|
|
326
|
+
return p.value && (i.value > 0 && (n.height = `${i.value}px`), c.value > 0 && (n.width = `${c.value}px`)), n;
|
|
327
|
+
}) };
|
|
328
|
+
}
|
|
329
|
+
const Ne = N({
|
|
302
330
|
name: "menu-item-list",
|
|
303
|
-
components: { BentoDivider:
|
|
331
|
+
components: { BentoDivider: se, MenuItem: ue, MenuListContainer: le, SubMenuItemList: Te },
|
|
304
332
|
props: {
|
|
305
333
|
/**
|
|
306
334
|
* The data to be displayed in the list
|
|
@@ -331,115 +359,112 @@ const Ee = /* @__PURE__ */ T(Oe, [["render", Re], ["__scopeId", "data-v-621db243
|
|
|
331
359
|
default: !0
|
|
332
360
|
}
|
|
333
361
|
},
|
|
334
|
-
emits: [
|
|
362
|
+
emits: [M.CLOSE, "menu-item-click"],
|
|
335
363
|
setup(e, { emit: t, expose: p }) {
|
|
336
|
-
const
|
|
337
|
-
let
|
|
338
|
-
return
|
|
339
|
-
...
|
|
340
|
-
indent:
|
|
364
|
+
const u = d(null), m = d(null), c = d(null), i = d(null), l = d(!1), a = d(null), n = d(e.focusLastElement ? e.data.length - 1 : 0), o = d(0), s = d(e.data.length - 1), f = _(() => e.data.some((r) => r.icon)), b = _(() => e.indentItems || f.value ? e.data.map((r) => {
|
|
365
|
+
let h = !1;
|
|
366
|
+
return r.icon || (h = !0), {
|
|
367
|
+
...r,
|
|
368
|
+
indent: h
|
|
341
369
|
};
|
|
342
|
-
}) : e.data),
|
|
343
|
-
var
|
|
344
|
-
await
|
|
345
|
-
},
|
|
346
|
-
if (
|
|
347
|
-
|
|
370
|
+
}) : e.data), y = async () => {
|
|
371
|
+
var r, h, $;
|
|
372
|
+
await q(), ($ = (h = (r = m.value) == null ? void 0 : r.children[n.value]) == null ? void 0 : h.children[0]) == null || $.focus();
|
|
373
|
+
}, k = () => t(M.CLOSE), S = (r, h) => {
|
|
374
|
+
if (r.items) {
|
|
375
|
+
a.value = h, l.value = !0;
|
|
348
376
|
return;
|
|
349
377
|
}
|
|
350
|
-
|
|
351
|
-
},
|
|
352
|
-
n.value > 0 ? (n.value -= 1,
|
|
353
|
-
},
|
|
354
|
-
n.value <
|
|
355
|
-
}, W = (
|
|
356
|
-
var
|
|
357
|
-
(
|
|
358
|
-
}, H = () => {
|
|
359
|
-
u.value && l.value && (u.value = null, l.value = !1);
|
|
378
|
+
a.value = h, l.value = !1, !r.skipClose && e.closeMenuOnItemSelect !== !1 && k(), t("menu-item-click");
|
|
379
|
+
}, w = () => {
|
|
380
|
+
n.value > 0 ? (n.value -= 1, b.value[n.value].disabled && w()) : n.value = s.value, y();
|
|
381
|
+
}, D = () => {
|
|
382
|
+
n.value < s.value ? (n.value += 1, b.value[n.value].disabled && D()) : n.value = 0, y();
|
|
383
|
+
}, W = (r, h) => {
|
|
384
|
+
var $;
|
|
385
|
+
($ = r == null ? void 0 : r.items) != null && $.length && (a.value = h, l.value = !0);
|
|
360
386
|
}, A = () => {
|
|
361
|
-
l.value =
|
|
387
|
+
a.value && l.value && (a.value = null, l.value = !1);
|
|
388
|
+
}, F = () => {
|
|
389
|
+
l.value = !1, a.value = null, y();
|
|
362
390
|
};
|
|
363
391
|
p({
|
|
364
|
-
focusItem:
|
|
392
|
+
focusItem: y
|
|
365
393
|
});
|
|
366
|
-
const
|
|
367
|
-
var a, f, L;
|
|
368
|
-
return (L = (f = (a = m.value) == null ? void 0 : a[0]) == null ? void 0 : f.$el) == null ? void 0 : L.offsetHeight;
|
|
369
|
-
}), _ = $(() => l.value ? `${K.value}px` : "");
|
|
394
|
+
const { computedStyle: P } = Re(i, a, l);
|
|
370
395
|
return {
|
|
371
396
|
// Values
|
|
372
|
-
menuItemListRef:
|
|
373
|
-
menuItemListWrapperRef:
|
|
374
|
-
subMenuItemListRef:
|
|
375
|
-
menuItemRef:
|
|
376
|
-
computedData:
|
|
377
|
-
|
|
397
|
+
menuItemListRef: m,
|
|
398
|
+
menuItemListWrapperRef: c,
|
|
399
|
+
subMenuItemListRef: i,
|
|
400
|
+
menuItemRef: u,
|
|
401
|
+
computedData: b,
|
|
402
|
+
computedStyle: P,
|
|
378
403
|
focusedIndex: n,
|
|
379
404
|
subMenuFocusedIndex: o,
|
|
380
405
|
showSubMenu: l,
|
|
381
|
-
visibleSubMenuIndex:
|
|
406
|
+
visibleSubMenuIndex: a,
|
|
382
407
|
// Methods
|
|
383
408
|
menuItemClick: S,
|
|
384
|
-
closeMenu:
|
|
385
|
-
focusPrevious:
|
|
386
|
-
focusNext:
|
|
409
|
+
closeMenu: k,
|
|
410
|
+
focusPrevious: w,
|
|
411
|
+
focusNext: D,
|
|
387
412
|
focusRight: W,
|
|
388
|
-
focusLeft:
|
|
389
|
-
onBackButton:
|
|
413
|
+
focusLeft: A,
|
|
414
|
+
onBackButton: F
|
|
390
415
|
};
|
|
391
416
|
}
|
|
392
|
-
}),
|
|
393
|
-
function
|
|
394
|
-
const
|
|
395
|
-
return
|
|
417
|
+
}), De = ["onKeydown"];
|
|
418
|
+
function Pe(e, t, p, u, m, c) {
|
|
419
|
+
const i = C("menu-item"), l = C("bento-divider"), a = C("sub-menu-item-list"), n = C("menu-list-container");
|
|
420
|
+
return v(), B(n, {
|
|
396
421
|
ref: "menuItemListWrapperRef",
|
|
397
|
-
style:
|
|
422
|
+
style: oe(e.computedStyle)
|
|
398
423
|
}, {
|
|
399
424
|
default: I(() => [
|
|
400
|
-
|
|
425
|
+
R("ul", {
|
|
401
426
|
ref: "menuItemListRef",
|
|
402
427
|
class: "b-menu-item-list",
|
|
403
428
|
role: "menu",
|
|
404
429
|
onKeydown: [
|
|
405
|
-
t[1] || (t[1] =
|
|
406
|
-
t[2] || (t[2] =
|
|
407
|
-
t[3] || (t[3] =
|
|
408
|
-
t[4] || (t[4] =
|
|
430
|
+
t[1] || (t[1] = g((...o) => e.focusNext && e.focusNext(...o), ["down"])),
|
|
431
|
+
t[2] || (t[2] = g((...o) => e.focusPrevious && e.focusPrevious(...o), ["up"])),
|
|
432
|
+
t[3] || (t[3] = g((...o) => e.closeMenu && e.closeMenu(...o), ["esc"])),
|
|
433
|
+
t[4] || (t[4] = g((...o) => e.closeMenu && e.closeMenu(...o), ["tab"]))
|
|
409
434
|
]
|
|
410
435
|
}, [
|
|
411
|
-
(
|
|
412
|
-
var
|
|
413
|
-
return
|
|
414
|
-
key: `menu-item-${
|
|
436
|
+
(v(!0), L(te, null, ne(e.computedData, (o, s) => {
|
|
437
|
+
var f, b, y, k;
|
|
438
|
+
return v(), L("li", {
|
|
439
|
+
key: `menu-item-${s}`,
|
|
415
440
|
ref_for: !0,
|
|
416
441
|
ref: "menuItemRef",
|
|
417
442
|
class: "b-menu-item-list__item",
|
|
418
443
|
role: "none",
|
|
419
444
|
onKeydown: [
|
|
420
|
-
|
|
421
|
-
t[0] || (t[0] =
|
|
445
|
+
g((S) => e.focusRight(o, s), ["right"]),
|
|
446
|
+
t[0] || (t[0] = g((S) => e.focusLeft(), ["left"]))
|
|
422
447
|
]
|
|
423
448
|
}, [
|
|
424
|
-
|
|
449
|
+
E(i, {
|
|
425
450
|
text: o.text,
|
|
426
|
-
handler: (
|
|
451
|
+
handler: (f = o.items) != null && f.length ? () => null : o.handler,
|
|
427
452
|
"secondary-text": o.secondaryText,
|
|
428
453
|
icon: o.icon,
|
|
429
|
-
chevron: !!((
|
|
454
|
+
chevron: !!((b = o.items) != null && b.length),
|
|
430
455
|
disabled: o.disabled,
|
|
431
456
|
critical: o.critical,
|
|
432
457
|
indent: o.indent,
|
|
433
|
-
tabindex:
|
|
434
|
-
"aria-haspopup": !!((
|
|
435
|
-
"aria-expanded": e.showSubMenu && e.visibleSubMenuIndex ===
|
|
436
|
-
onClick: (S) => e.menuItemClick(o,
|
|
458
|
+
tabindex: s === e.subMenuFocusedIndex ? "0" : "-1",
|
|
459
|
+
"aria-haspopup": !!((y = o.items) != null && y.length),
|
|
460
|
+
"aria-expanded": e.showSubMenu && e.visibleSubMenuIndex === s,
|
|
461
|
+
onClick: (S) => e.menuItemClick(o, s)
|
|
437
462
|
}, null, 8, ["text", "handler", "secondary-text", "icon", "chevron", "disabled", "critical", "indent", "tabindex", "aria-haspopup", "aria-expanded", "onClick"]),
|
|
438
|
-
o.addDivider ? (
|
|
463
|
+
o.addDivider ? (v(), B(l, {
|
|
439
464
|
key: 0,
|
|
440
465
|
class: "b-menu-item-list__divider"
|
|
441
|
-
})) :
|
|
442
|
-
(
|
|
466
|
+
})) : O("", !0),
|
|
467
|
+
(k = o.items) != null && k.length && e.showSubMenu && e.visibleSubMenuIndex === s ? (v(), B(a, {
|
|
443
468
|
key: 1,
|
|
444
469
|
ref_for: !0,
|
|
445
470
|
ref: "subMenuItemListRef",
|
|
@@ -447,48 +472,48 @@ function Ne(e, t, p, s, d, b) {
|
|
|
447
472
|
title: o.text,
|
|
448
473
|
onBack: e.onBackButton,
|
|
449
474
|
onClose: e.closeMenu
|
|
450
|
-
}, null, 8, ["items", "title", "onBack", "onClose"])) :
|
|
451
|
-
], 40,
|
|
475
|
+
}, null, 8, ["items", "title", "onBack", "onClose"])) : O("", !0)
|
|
476
|
+
], 40, De);
|
|
452
477
|
}), 128))
|
|
453
478
|
], 544)
|
|
454
479
|
]),
|
|
455
480
|
_: 1
|
|
456
481
|
}, 8, ["style"]);
|
|
457
482
|
}
|
|
458
|
-
const
|
|
459
|
-
let
|
|
460
|
-
const
|
|
483
|
+
const Ke = /* @__PURE__ */ T(Ne, [["render", Pe], ["__scopeId", "data-v-999aa4e9"]]);
|
|
484
|
+
let Z = 0;
|
|
485
|
+
const We = {
|
|
461
486
|
beforeCreate() {
|
|
462
|
-
this.uuid =
|
|
487
|
+
this.uuid = Z.toString(), Z += 1;
|
|
463
488
|
}
|
|
464
|
-
},
|
|
465
|
-
function Fe(e, t, p,
|
|
466
|
-
return
|
|
489
|
+
}, Ae = { key: 0 };
|
|
490
|
+
function Fe(e, t, p, u, m, c) {
|
|
491
|
+
return v(), L("svg", j({ role: "img" }, e.$attrs, {
|
|
467
492
|
class: "ui-assets-icons-16",
|
|
468
493
|
xmlns: "http://www.w3.org/2000/svg",
|
|
469
494
|
width: "16",
|
|
470
495
|
height: "16",
|
|
471
496
|
fill: "none"
|
|
472
497
|
}), [
|
|
473
|
-
e.$attrs["svg-title"] ? (
|
|
474
|
-
t[0] || (t[0] =
|
|
498
|
+
e.$attrs["svg-title"] ? (v(), L("title", Ae, U(e.$attrs["svg-title"]), 1)) : O("", !0),
|
|
499
|
+
t[0] || (t[0] = R("path", {
|
|
475
500
|
fill: "#00112C",
|
|
476
501
|
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"
|
|
477
502
|
}, null, -1)),
|
|
478
|
-
t[1] || (t[1] =
|
|
503
|
+
t[1] || (t[1] = R("path", {
|
|
479
504
|
fill: "#00112C",
|
|
480
505
|
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"
|
|
481
506
|
}, null, -1)),
|
|
482
|
-
t[2] || (t[2] =
|
|
507
|
+
t[2] || (t[2] = R("path", {
|
|
483
508
|
fill: "#00112C",
|
|
484
509
|
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"
|
|
485
510
|
}, null, -1))
|
|
486
511
|
], 16);
|
|
487
512
|
}
|
|
488
|
-
const
|
|
489
|
-
i18n: { messages:
|
|
513
|
+
const He = /* @__PURE__ */ T(We, [["render", Fe]]), Ue = N({
|
|
514
|
+
i18n: { messages: V },
|
|
490
515
|
name: "bento-menu",
|
|
491
|
-
components: { BentoToggleButton: ke, BentoPopover: fe, BentoTeleport:
|
|
516
|
+
components: { BentoToggleButton: ke, BentoPopover: fe, BentoTeleport: Me, MenuItemList: Ke, OptionsVerticalIcon: He },
|
|
492
517
|
props: {
|
|
493
518
|
/**
|
|
494
519
|
* Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.
|
|
@@ -514,6 +539,13 @@ const We = /* @__PURE__ */ T(Pe, [["render", Fe]]), He = D({
|
|
|
514
539
|
type: Array,
|
|
515
540
|
required: !0
|
|
516
541
|
},
|
|
542
|
+
/**
|
|
543
|
+
* Disables opening the menu when the down arrow key is pressed.
|
|
544
|
+
*/
|
|
545
|
+
disableArrowDownOpeningMenu: {
|
|
546
|
+
type: Boolean,
|
|
547
|
+
default: !1
|
|
548
|
+
},
|
|
517
549
|
/**
|
|
518
550
|
* The position of where the menu should open.
|
|
519
551
|
*/
|
|
@@ -565,86 +597,86 @@ const We = /* @__PURE__ */ T(Pe, [["render", Fe]]), He = D({
|
|
|
565
597
|
default: void 0
|
|
566
598
|
}
|
|
567
599
|
},
|
|
568
|
-
emits: [
|
|
569
|
-
setup(e, { emit: t, expose: p, slots:
|
|
570
|
-
var
|
|
571
|
-
const { t:
|
|
572
|
-
me(pe,
|
|
573
|
-
const
|
|
574
|
-
"b-menu--inverse":
|
|
575
|
-
})),
|
|
600
|
+
emits: [M.CLOSE, M.OPEN, "menu-item-click", "click-outside"],
|
|
601
|
+
setup(e, { emit: t, expose: p, slots: u }) {
|
|
602
|
+
var P;
|
|
603
|
+
const { t: m } = ye({ messages: V }), c = d(null), i = d(null), l = d(!1), a = d(!1), n = d(null), o = X("menu"), s = X("menu-popover"), f = ee(Be, d(!1));
|
|
604
|
+
me(pe, f);
|
|
605
|
+
const b = _(() => ({
|
|
606
|
+
"b-menu--inverse": f.value
|
|
607
|
+
})), y = _(() => e.menuWidth ? { width: `${e.menuWidth}px` } : null), k = _(() => {
|
|
576
608
|
if (e != null && e.button)
|
|
577
609
|
return {
|
|
578
610
|
variant: "secondary",
|
|
579
611
|
...e.button
|
|
580
612
|
};
|
|
581
613
|
}), S = () => {
|
|
582
|
-
l.value = !0, t(
|
|
583
|
-
},
|
|
584
|
-
var
|
|
585
|
-
l.value && (l.value = !1,
|
|
586
|
-
},
|
|
587
|
-
|
|
588
|
-
}, W = (
|
|
589
|
-
|
|
590
|
-
},
|
|
591
|
-
|
|
592
|
-
},
|
|
614
|
+
l.value = !0, t(M.OPEN);
|
|
615
|
+
}, w = async (r = e.revertFocusToButton) => {
|
|
616
|
+
var h, $;
|
|
617
|
+
l.value && (l.value = !1, r && (await q(), ($ = (h = c.value) == null ? void 0 : h.$el) == null || $.focus()), t(M.CLOSE));
|
|
618
|
+
}, D = (r) => {
|
|
619
|
+
r.stopPropagation(), l.value ? w() : S();
|
|
620
|
+
}, W = (r) => {
|
|
621
|
+
r.preventDefault(), a.value = !1, e.disableArrowDownOpeningMenu || S();
|
|
622
|
+
}, A = (r) => {
|
|
623
|
+
r.preventDefault(), a.value = !0, S();
|
|
624
|
+
}, F = () => {
|
|
593
625
|
t("menu-item-click");
|
|
594
626
|
};
|
|
595
627
|
return ve(
|
|
596
628
|
n,
|
|
597
629
|
() => {
|
|
598
|
-
|
|
630
|
+
w(), t("click-outside");
|
|
599
631
|
},
|
|
600
632
|
{
|
|
601
633
|
...e.closeOnClickOutsideOptions,
|
|
602
|
-
ignore: [
|
|
634
|
+
ignore: [c, ...((P = e.closeOnClickOutsideOptions) == null ? void 0 : P.ignore) ?? []]
|
|
603
635
|
}
|
|
604
636
|
), p({
|
|
605
637
|
/**
|
|
606
638
|
* Control to enable programmatic closing of the menu
|
|
607
639
|
*/
|
|
608
|
-
closeMenu:
|
|
640
|
+
closeMenu: w
|
|
609
641
|
}), {
|
|
610
642
|
// Refs
|
|
611
643
|
popoverRef: n,
|
|
612
|
-
menuButtonRef:
|
|
613
|
-
menuItemListRef:
|
|
644
|
+
menuButtonRef: c,
|
|
645
|
+
menuItemListRef: i,
|
|
614
646
|
// Values
|
|
615
647
|
menuId: o,
|
|
616
|
-
popoverId:
|
|
648
|
+
popoverId: s,
|
|
617
649
|
showMenu: l,
|
|
618
|
-
computedButtonPropsWithDefaults:
|
|
619
|
-
computedMenuWidth:
|
|
620
|
-
isLastElementFocused:
|
|
650
|
+
computedButtonPropsWithDefaults: k,
|
|
651
|
+
computedMenuWidth: y,
|
|
652
|
+
isLastElementFocused: a,
|
|
621
653
|
// Classes
|
|
622
|
-
computedClasses:
|
|
623
|
-
isInverseColorSet:
|
|
654
|
+
computedClasses: b,
|
|
655
|
+
isInverseColorSet: f,
|
|
624
656
|
// Methods
|
|
625
|
-
hasSlot: be(
|
|
657
|
+
hasSlot: be(u),
|
|
626
658
|
onKeyDown: W,
|
|
627
|
-
onKeyUp:
|
|
628
|
-
closeMenu:
|
|
629
|
-
menuItemClick:
|
|
630
|
-
toggleShowMenu:
|
|
659
|
+
onKeyUp: A,
|
|
660
|
+
closeMenu: w,
|
|
661
|
+
menuItemClick: F,
|
|
662
|
+
toggleShowMenu: D,
|
|
631
663
|
// Translations
|
|
632
|
-
t:
|
|
664
|
+
t: m
|
|
633
665
|
};
|
|
634
666
|
}
|
|
635
667
|
});
|
|
636
|
-
function
|
|
637
|
-
const
|
|
638
|
-
return
|
|
639
|
-
class:
|
|
668
|
+
function Ve(e, t, p, u, m, c) {
|
|
669
|
+
const i = C("options-vertical-icon"), l = C("bento-toggle-button"), a = C("menu-item-list"), n = C("bento-popover"), o = C("bento-teleport");
|
|
670
|
+
return v(), L("div", {
|
|
671
|
+
class: Q([e.computedClasses, "b-menu"]),
|
|
640
672
|
"data-testid": "menu",
|
|
641
673
|
onKeydown: [
|
|
642
|
-
t[0] || (t[0] =
|
|
643
|
-
t[1] || (t[1] =
|
|
644
|
-
t[2] || (t[2] =
|
|
674
|
+
t[0] || (t[0] = g((...s) => e.onKeyDown && e.onKeyDown(...s), ["down"])),
|
|
675
|
+
t[1] || (t[1] = g((...s) => e.onKeyUp && e.onKeyUp(...s), ["up"])),
|
|
676
|
+
t[2] || (t[2] = g((s) => e.closeMenu(), ["esc"]))
|
|
645
677
|
]
|
|
646
678
|
}, [
|
|
647
|
-
|
|
679
|
+
E(l, j({
|
|
648
680
|
ref: "menuButtonRef",
|
|
649
681
|
"aria-haspopup": "true"
|
|
650
682
|
}, e.computedButtonPropsWithDefaults, {
|
|
@@ -656,8 +688,8 @@ function Ae(e, t, p, s, d, b) {
|
|
|
656
688
|
!e.hasSlot("default") || e.hasSlot("iconLeft") ? {
|
|
657
689
|
name: "iconLeft",
|
|
658
690
|
fn: I(() => [
|
|
659
|
-
|
|
660
|
-
|
|
691
|
+
K(e.$slots, "iconLeft", {}, () => [
|
|
692
|
+
E(i, {
|
|
661
693
|
title: e.t("menuButton")
|
|
662
694
|
}, null, 8, ["title"])
|
|
663
695
|
], !0)
|
|
@@ -667,31 +699,31 @@ function Ae(e, t, p, s, d, b) {
|
|
|
667
699
|
e.hasSlot("default") ? {
|
|
668
700
|
name: "default",
|
|
669
701
|
fn: I(() => [
|
|
670
|
-
|
|
702
|
+
K(e.$slots, "default", {}, void 0, !0)
|
|
671
703
|
]),
|
|
672
704
|
key: "1"
|
|
673
705
|
} : void 0,
|
|
674
706
|
e.hasSlot("iconRight") ? {
|
|
675
707
|
name: "iconRight",
|
|
676
708
|
fn: I(() => [
|
|
677
|
-
|
|
709
|
+
K(e.$slots, "iconRight", {}, void 0, !0)
|
|
678
710
|
]),
|
|
679
711
|
key: "2"
|
|
680
712
|
} : void 0
|
|
681
713
|
]), 1040, ["aria-controls", "toggled", "inverse", "onClick"]),
|
|
682
|
-
e.menuButtonRef ? (
|
|
714
|
+
e.menuButtonRef ? (v(), B(o, {
|
|
683
715
|
key: 0,
|
|
684
716
|
disabled: !e.teleport
|
|
685
717
|
}, {
|
|
686
718
|
default: I(() => [
|
|
687
|
-
e.menuButtonRef ? (
|
|
719
|
+
e.menuButtonRef ? (v(), B(n, {
|
|
688
720
|
key: 0,
|
|
689
721
|
id: e.menuId,
|
|
690
722
|
ref: "popoverRef",
|
|
691
723
|
role: null,
|
|
692
724
|
open: e.showMenu,
|
|
693
725
|
class: "b-menu__popover",
|
|
694
|
-
style:
|
|
726
|
+
style: oe(e.computedMenuWidth),
|
|
695
727
|
"target-element": e.menuButtonRef,
|
|
696
728
|
position: e.menuPosition,
|
|
697
729
|
"fixed-positioning": e.menuFixedPositioning,
|
|
@@ -709,7 +741,7 @@ function Ae(e, t, p, s, d, b) {
|
|
|
709
741
|
"without-space": ""
|
|
710
742
|
}, {
|
|
711
743
|
default: I(() => [
|
|
712
|
-
|
|
744
|
+
E(a, {
|
|
713
745
|
ref: "menuItemListRef",
|
|
714
746
|
"close-menu-on-item-select": e.closeMenuOnItemSelect,
|
|
715
747
|
data: e.data,
|
|
@@ -719,18 +751,18 @@ function Ae(e, t, p, s, d, b) {
|
|
|
719
751
|
}, null, 8, ["close-menu-on-item-select", "data", "focus-last-element", "onClose", "onMenuItemClick"])
|
|
720
752
|
]),
|
|
721
753
|
_: 1
|
|
722
|
-
}, 8, ["id", "open", "style", "target-element", "position", "fixed-positioning", "teleport"])) :
|
|
754
|
+
}, 8, ["id", "open", "style", "target-element", "position", "fixed-positioning", "teleport"])) : O("", !0)
|
|
723
755
|
]),
|
|
724
756
|
_: 1
|
|
725
|
-
}, 8, ["disabled"])) :
|
|
757
|
+
}, 8, ["disabled"])) : O("", !0)
|
|
726
758
|
], 34);
|
|
727
759
|
}
|
|
728
|
-
const
|
|
760
|
+
const ut = /* @__PURE__ */ T(Ue, [["render", Ve], ["__scopeId", "data-v-e0770132"]]);
|
|
729
761
|
export {
|
|
730
|
-
|
|
762
|
+
ut as B,
|
|
731
763
|
$e as D,
|
|
732
764
|
Be as M,
|
|
733
|
-
|
|
734
|
-
|
|
765
|
+
He as O,
|
|
766
|
+
M as a
|
|
735
767
|
};
|
|
736
|
-
//# sourceMappingURL=menu.
|
|
768
|
+
//# sourceMappingURL=menu.HVsIOPzt.js.map
|