@adyen/bento-vue3 1.16.0 → 1.17.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/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-lazy-loading/use-lazy-loading.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/payment-method/composables/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/payment-method/composables/use-payment-icon/use-payment-icon.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +3 -6
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +19 -24
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.211f3d1b.js → base-button.f412f30f.js} +2 -2
- package/dist/chunks/{base-button.211f3d1b.js.map → base-button.f412f30f.js.map} +1 -1
- package/dist/chunks/{base-modal.5bd79918.js → base-modal.dd6881d6.js} +5 -5
- package/dist/chunks/{base-modal.5bd79918.js.map → base-modal.dd6881d6.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.cfcfbb17.js → button-actions-with-menu.6139d2c5.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.cfcfbb17.js.map → button-actions-with-menu.6139d2c5.js.map} +1 -1
- package/dist/chunks/{button.b09b3d53.js → button.5e03cdd9.js} +3 -3
- package/dist/chunks/{button.b09b3d53.js.map → button.5e03cdd9.js.map} +1 -1
- package/dist/chunks/{calendar.f00c4de3.js → calendar.d26921a5.js} +4 -4
- package/dist/chunks/{calendar.f00c4de3.js.map → calendar.d26921a5.js.map} +1 -1
- package/dist/chunks/{checkbox.918eb1fe.js → checkbox.c9e6746b.js} +3 -3
- package/dist/chunks/{checkbox.918eb1fe.js.map → checkbox.c9e6746b.js.map} +1 -1
- package/dist/chunks/{controls-group.cbe5edb3.js → controls-group.bc3debdd.js} +3 -3
- package/dist/chunks/{controls-group.cbe5edb3.js.map → controls-group.bc3debdd.js.map} +1 -1
- package/dist/chunks/{copy.9e439e01.js → copy.1223d257.js} +4 -4
- package/dist/chunks/{copy.9e439e01.js.map → copy.1223d257.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.66d3bc87.js → dropdown-default-textbox.2a3c044f.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.66d3bc87.js.map → dropdown-default-textbox.2a3c044f.js.map} +1 -1
- package/dist/chunks/{dropdown.70940b5d.js → dropdown.2c6bb85c.js} +7 -7
- package/dist/chunks/{dropdown.70940b5d.js.map → dropdown.2c6bb85c.js.map} +1 -1
- package/dist/chunks/{error-message.9fb80f82.js → error-message.3cf040a1.js} +2 -2
- package/dist/chunks/{error-message.9fb80f82.js.map → error-message.3cf040a1.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.db3bc496.js → fixed-scroller.1d3d4983.js} +2 -2
- package/dist/chunks/{fixed-scroller.db3bc496.js.map → fixed-scroller.1d3d4983.js.map} +1 -1
- package/dist/chunks/{footer-actions.795f3e03.js → footer-actions.92e13b90.js} +3 -3
- package/dist/chunks/{footer-actions.795f3e03.js.map → footer-actions.92e13b90.js.map} +1 -1
- package/dist/chunks/{index.5499552c.js → index.2c9f87d3.js} +3 -3
- package/dist/chunks/{index.5499552c.js.map → index.2c9f87d3.js.map} +1 -1
- package/dist/chunks/{index.91d917cd.js → index.32f5c644.js} +5 -5
- package/dist/chunks/{index.91d917cd.js.map → index.32f5c644.js.map} +1 -1
- package/dist/chunks/{index.a7884b37.js → index.4a6cfd5e.js} +746 -741
- package/dist/chunks/index.4a6cfd5e.js.map +1 -0
- package/dist/chunks/{index.f3292722.js → index.826ef20b.js} +6 -6
- package/dist/chunks/{index.f3292722.js.map → index.826ef20b.js.map} +1 -1
- package/dist/chunks/{index.5e2bc547.js → index.888c3d45.js} +2 -2
- package/dist/chunks/{index.5e2bc547.js.map → index.888c3d45.js.map} +1 -1
- package/dist/chunks/{index.0ed71d90.js → index.b1912d13.js} +3 -3
- package/dist/chunks/{index.0ed71d90.js.map → index.b1912d13.js.map} +1 -1
- package/dist/chunks/{index.526a5595.js → index.b253d8a2.js} +2 -2
- package/dist/chunks/{index.526a5595.js.map → index.b253d8a2.js.map} +1 -1
- package/dist/chunks/{index.c388fc64.js → index.e57740ab.js} +2 -2
- package/dist/chunks/{index.c388fc64.js.map → index.e57740ab.js.map} +1 -1
- package/dist/chunks/{index.1b911fe1.js → index.e97ff2db.js} +132 -125
- package/dist/chunks/index.e97ff2db.js.map +1 -0
- package/dist/chunks/{index.fff78e34.js → index.eb6f799e.js} +165 -165
- package/dist/chunks/index.eb6f799e.js.map +1 -0
- package/dist/chunks/{index.93c7dcb9.js → index.ed76cbb3.js} +2 -2
- package/dist/chunks/{index.93c7dcb9.js.map → index.ed76cbb3.js.map} +1 -1
- package/dist/chunks/{index.7159313f.js → index.f41143c6.js} +3 -3
- package/dist/chunks/{index.7159313f.js.map → index.f41143c6.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.109460f7.js → listbox-option-tag.20d2206f.js} +3 -3
- package/dist/chunks/{listbox-option-tag.109460f7.js.map → listbox-option-tag.20d2206f.js.map} +1 -1
- package/dist/chunks/{listbox.0d3b5112.js → listbox.60318e0a.js} +5 -5
- package/dist/chunks/{listbox.0d3b5112.js.map → listbox.60318e0a.js.map} +1 -1
- package/dist/chunks/{loading-button.016031ec.js → loading-button.bec0fd63.js} +2 -2
- package/dist/chunks/{loading-button.016031ec.js.map → loading-button.bec0fd63.js.map} +1 -1
- package/dist/chunks/{tooltip.7b2758bf.js → tooltip.c2233d64.js} +3 -3
- package/dist/chunks/{tooltip.7b2758bf.js.map → tooltip.c2233d64.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +8 -8
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +6 -6
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +18 -18
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +147 -148
- package/dist/header.js.map +1 -1
- package/dist/index.js +304 -2943
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +5 -5
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +50 -48
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +156 -171
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +1 -1
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +6 -6
- package/dist/toast.js +3 -3
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +5 -5
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/payment-method/composables/usePaymentIcon.d.ts +0 -3
- package/dist/chunks/index.1b911fe1.js.map +0 -1
- package/dist/chunks/index.a7884b37.js.map +0 -1
- package/dist/chunks/index.fff78e34.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as O, computed as
|
|
2
|
-
import { g as
|
|
1
|
+
import { defineComponent as O, computed as M, resolveComponent as v, openBlock as c, createBlock as I, normalizeClass as U, createSlots as j, withCtx as C, createVNode as S, createTextVNode as F, toDisplayString as K, createCommentVNode as E, resolveDynamicComponent as se, createElementBlock as L, renderSlot as N, ref as p, onMounted as ie, Transition as le, createElementVNode as T, withKeys as h, withModifiers as D, Fragment as Z, renderList as z, normalizeStyle as J, mergeProps as Y, inject as ue, provide as ae, resolveDirective as re, withDirectives as de } from "vue";
|
|
2
|
+
import { g as W } from "./unique-id.a2a2b458.js";
|
|
3
3
|
import { B as ce } from "./directive.0408e565.js";
|
|
4
|
-
import { a as me } from "./button.
|
|
5
|
-
import { a as
|
|
6
|
-
import { B as
|
|
4
|
+
import { a as me } from "./button.5e03cdd9.js";
|
|
5
|
+
import { a as fe, B as V } from "./index.32f5c644.js";
|
|
6
|
+
import { B as G, D as pe } from "./index.888c3d45.js";
|
|
7
7
|
import { u as ve } from "./use-has-slot.4d98bf29.js";
|
|
8
8
|
import { _ as R } from "./_plugin-vue_export-helper.dad06003.js";
|
|
9
9
|
import { B as _e } from "./teleport.127fa429.js";
|
|
10
10
|
import { a as be, C as H } from "./chevron-left.4ee92950.js";
|
|
11
|
-
import { B as ye, a as
|
|
12
|
-
import { B as Ce } from "./index.
|
|
13
|
-
import "../assets/
|
|
11
|
+
import { B as ye, a as A } from "./base-button.f412f30f.js";
|
|
12
|
+
import { B as Ce } from "./index.ed76cbb3.js";
|
|
13
|
+
import "../assets/index22.css";
|
|
14
14
|
const he = O({
|
|
15
15
|
name: "menu-item",
|
|
16
16
|
components: { BaseButton: ye, BentoTypography: Ce, ChevronRightIcon: be },
|
|
@@ -81,30 +81,30 @@ const he = O({
|
|
|
81
81
|
default: !1
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
emits: [
|
|
84
|
+
emits: [A.CLICK],
|
|
85
85
|
setup(e, { emit: t }) {
|
|
86
86
|
return {
|
|
87
87
|
// Values
|
|
88
|
-
conditionalClasses:
|
|
88
|
+
conditionalClasses: M(() => ({
|
|
89
89
|
"b-menu-item--critical": e.critical,
|
|
90
90
|
"b-menu-item--indent": e.indent
|
|
91
91
|
})),
|
|
92
92
|
// Methods
|
|
93
|
-
onClick: (
|
|
94
|
-
|
|
93
|
+
onClick: (r) => {
|
|
94
|
+
r.stopPropagation(), e.handler(), t(A.CLICK);
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
function ge(e, t, _, i,
|
|
99
|
+
function ge(e, t, _, i, r, a) {
|
|
100
100
|
const l = v("bento-typography"), s = v("chevron-right-icon"), m = v("base-button");
|
|
101
|
-
return c(),
|
|
102
|
-
class:
|
|
101
|
+
return c(), I(m, {
|
|
102
|
+
class: U(["b-menu-item", e.conditionalClasses]),
|
|
103
103
|
role: "menuitem",
|
|
104
104
|
disabled: e.disabled,
|
|
105
105
|
tabindex: "-1",
|
|
106
106
|
onClick: e.onClick
|
|
107
|
-
},
|
|
107
|
+
}, j({
|
|
108
108
|
default: C(() => [
|
|
109
109
|
S(l, {
|
|
110
110
|
el: "span",
|
|
@@ -113,18 +113,18 @@ function ge(e, t, _, i, d, a) {
|
|
|
113
113
|
class: "b-menu-item__primary-text"
|
|
114
114
|
}, {
|
|
115
115
|
default: C(() => [
|
|
116
|
-
|
|
116
|
+
F(K(e.text), 1)
|
|
117
117
|
]),
|
|
118
118
|
_: 1
|
|
119
119
|
}, 8, ["stronger"]),
|
|
120
|
-
e.secondaryText ? (c(),
|
|
120
|
+
e.secondaryText ? (c(), I(l, {
|
|
121
121
|
key: 0,
|
|
122
122
|
el: "span",
|
|
123
123
|
variant: "body",
|
|
124
124
|
class: "b-menu-item__secondary-text"
|
|
125
125
|
}, {
|
|
126
126
|
default: C(() => [
|
|
127
|
-
|
|
127
|
+
F(K(e.secondaryText), 1)
|
|
128
128
|
]),
|
|
129
129
|
_: 1
|
|
130
130
|
})) : E("", !0)
|
|
@@ -134,7 +134,7 @@ function ge(e, t, _, i, d, a) {
|
|
|
134
134
|
e.icon ? {
|
|
135
135
|
name: "iconLeft",
|
|
136
136
|
fn: C(() => [
|
|
137
|
-
(c(),
|
|
137
|
+
(c(), I(se(e.icon), {
|
|
138
138
|
class: "b-menu-item__icon-left",
|
|
139
139
|
"aria-hidden": "true"
|
|
140
140
|
}))
|
|
@@ -150,26 +150,26 @@ function ge(e, t, _, i, d, a) {
|
|
|
150
150
|
} : void 0
|
|
151
151
|
]), 1032, ["class", "disabled", "onClick"]);
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const Q = /* @__PURE__ */ R(he, [["render", ge], ["__scopeId", "data-v-9e8afd9c"]]);
|
|
154
154
|
var g = /* @__PURE__ */ ((e) => (e.BACK = "back", e.CLOSE = "close", e.OPEN = "open", e))(g || {});
|
|
155
|
-
const
|
|
155
|
+
const Be = O({
|
|
156
156
|
name: "bento-menu-list-container"
|
|
157
157
|
});
|
|
158
|
-
const
|
|
159
|
-
function $e(e, t, _, i,
|
|
160
|
-
return c(), L("div",
|
|
158
|
+
const Ie = { class: "b-menu-list-container" };
|
|
159
|
+
function $e(e, t, _, i, r, a) {
|
|
160
|
+
return c(), L("div", Ie, [
|
|
161
161
|
N(e.$slots, "default", {}, void 0, !0)
|
|
162
162
|
]);
|
|
163
163
|
}
|
|
164
|
-
const
|
|
164
|
+
const X = /* @__PURE__ */ R(Be, [["render", $e], ["__scopeId", "data-v-ea0113ba"]]), x = {
|
|
165
165
|
"en-US": {
|
|
166
166
|
menuButton: "Open menu",
|
|
167
167
|
backButton: "Go back"
|
|
168
168
|
}
|
|
169
169
|
}, Me = O({
|
|
170
|
-
i18n: { messages:
|
|
170
|
+
i18n: { messages: x },
|
|
171
171
|
name: "sub-menu-item-list",
|
|
172
|
-
components: { BentoDivider:
|
|
172
|
+
components: { BentoDivider: G, MenuItem: Q, MenuListContainer: X },
|
|
173
173
|
props: {
|
|
174
174
|
items: {
|
|
175
175
|
type: Array,
|
|
@@ -182,9 +182,9 @@ const Q = /* @__PURE__ */ R(Ie, [["render", $e], ["__scopeId", "data-v-ea0113ba"
|
|
|
182
182
|
},
|
|
183
183
|
emits: [g.CLOSE, g.BACK],
|
|
184
184
|
setup(e, { emit: t }) {
|
|
185
|
-
const _ =
|
|
186
|
-
var
|
|
187
|
-
const
|
|
185
|
+
const _ = p(null), i = p(0), r = p(e.items.length), a = () => t(g.CLOSE), l = () => t(g.BACK), s = M(() => {
|
|
186
|
+
var u;
|
|
187
|
+
const d = (u = e.items) == null ? void 0 : u.map((b) => ({
|
|
188
188
|
...b,
|
|
189
189
|
indent: !b.icon,
|
|
190
190
|
isTitle: !1,
|
|
@@ -203,19 +203,19 @@ const Q = /* @__PURE__ */ R(Ie, [["render", $e], ["__scopeId", "data-v-ea0113ba"
|
|
|
203
203
|
clickHandler: l,
|
|
204
204
|
addDivider: !0
|
|
205
205
|
},
|
|
206
|
-
...
|
|
206
|
+
...d
|
|
207
207
|
];
|
|
208
208
|
}), m = async () => {
|
|
209
|
-
var
|
|
210
|
-
(
|
|
209
|
+
var d, u, b, $, B;
|
|
210
|
+
(B = ($ = (b = (u = (d = _.value) == null ? void 0 : d.children) == null ? void 0 : u[i.value]) == null ? void 0 : b.children) == null ? void 0 : $[0]) == null || B.focus();
|
|
211
211
|
};
|
|
212
212
|
ie(async () => {
|
|
213
213
|
setTimeout(() => m(), 150);
|
|
214
214
|
});
|
|
215
215
|
const o = () => {
|
|
216
|
-
i.value > 0 ? (i.value -= 1, s.value[i.value].disabled && o()) : i.value =
|
|
216
|
+
i.value > 0 ? (i.value -= 1, s.value[i.value].disabled && o()) : i.value = r.value, m();
|
|
217
217
|
}, n = () => {
|
|
218
|
-
i.value <
|
|
218
|
+
i.value < r.value ? (i.value += 1, s.value[i.value].disabled && n()) : i.value = 0, m();
|
|
219
219
|
};
|
|
220
220
|
return {
|
|
221
221
|
// Enums
|
|
@@ -233,9 +233,9 @@ const Q = /* @__PURE__ */ R(Ie, [["render", $e], ["__scopeId", "data-v-ea0113ba"
|
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
|
-
function ke(e, t, _, i,
|
|
236
|
+
function ke(e, t, _, i, r, a) {
|
|
237
237
|
const l = v("menu-item"), s = v("bento-divider"), m = v("menu-list-container");
|
|
238
|
-
return c(),
|
|
238
|
+
return c(), I(le, {
|
|
239
239
|
name: "b-sub-menu-item-list__transition",
|
|
240
240
|
appear: ""
|
|
241
241
|
}, {
|
|
@@ -247,12 +247,12 @@ function ke(e, t, _, i, d, a) {
|
|
|
247
247
|
role: "menu",
|
|
248
248
|
class: "b-sub-menu-item-list__list",
|
|
249
249
|
onKeydown: [
|
|
250
|
-
t[0] || (t[0] = h(
|
|
251
|
-
t[1] || (t[1] = h(
|
|
252
|
-
t[2] || (t[2] = h(
|
|
250
|
+
t[0] || (t[0] = h(D((...o) => e.focusNext && e.focusNext(...o), ["stop"]), ["down"])),
|
|
251
|
+
t[1] || (t[1] = h(D((...o) => e.focusPrevious && e.focusPrevious(...o), ["stop"]), ["up"])),
|
|
252
|
+
t[2] || (t[2] = h(D((...o) => e.onBackButton && e.onBackButton(...o), ["stop"]), ["esc"]))
|
|
253
253
|
]
|
|
254
254
|
}, [
|
|
255
|
-
(c(!0), L(
|
|
255
|
+
(c(!0), L(Z, null, z(e.computedItems, (o, n) => (c(), L("li", {
|
|
256
256
|
key: `sub-menu-item-list-item-${n}`,
|
|
257
257
|
role: "none"
|
|
258
258
|
}, [
|
|
@@ -268,7 +268,7 @@ function ke(e, t, _, i, d, a) {
|
|
|
268
268
|
tabindex: n === e.subMenuFocusedIndex ? "0" : "-1",
|
|
269
269
|
onClick: o.clickHandler
|
|
270
270
|
}, null, 8, ["text", "handler", "secondary-text", "icon", "is-title", "disabled", "critical", "indent", "tabindex", "onClick"]),
|
|
271
|
-
o.addDivider ? (c(),
|
|
271
|
+
o.addDivider ? (c(), I(s, {
|
|
272
272
|
key: 0,
|
|
273
273
|
class: "b-sub-menu-item-list__divider"
|
|
274
274
|
})) : E("", !0)
|
|
@@ -283,7 +283,7 @@ function ke(e, t, _, i, d, a) {
|
|
|
283
283
|
}
|
|
284
284
|
const Se = /* @__PURE__ */ R(Me, [["render", ke], ["__scopeId", "data-v-621db243"]]), Le = O({
|
|
285
285
|
name: "menu-item-list",
|
|
286
|
-
components: { BentoDivider:
|
|
286
|
+
components: { BentoDivider: G, MenuItem: Q, MenuListContainer: X, SubMenuItemList: Se },
|
|
287
287
|
props: {
|
|
288
288
|
/**
|
|
289
289
|
* The data to be displayed in the list
|
|
@@ -309,39 +309,39 @@ const Se = /* @__PURE__ */ R(Me, [["render", ke], ["__scopeId", "data-v-621db243
|
|
|
309
309
|
},
|
|
310
310
|
emits: [g.CLOSE],
|
|
311
311
|
setup(e, { emit: t }) {
|
|
312
|
-
const _ =
|
|
312
|
+
const _ = p(null), i = p(null), r = p(null), a = p(!1), l = p(null), s = p(e.focusLastElement ? e.data.length - 1 : 0), m = p(0), o = p(e.data.length - 1), n = M(() => e.data.some((f) => f.icon)), d = M(() => e.indentItems || n.value ? e.data.map((f) => {
|
|
313
313
|
let y = !1;
|
|
314
|
-
return
|
|
315
|
-
...
|
|
314
|
+
return f.icon || (y = !0), {
|
|
315
|
+
...f,
|
|
316
316
|
// eslint-disable-next-line no-param-reassign
|
|
317
317
|
indent: y
|
|
318
318
|
};
|
|
319
|
-
}) : e.data),
|
|
320
|
-
var
|
|
321
|
-
return (
|
|
322
|
-
}, b = () => t(g.CLOSE), $ = async (
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
s.value > 0 ? (s.value -= 1,
|
|
319
|
+
}) : e.data), u = () => {
|
|
320
|
+
var f, y, k;
|
|
321
|
+
return (k = (y = (f = _.value) == null ? void 0 : f.children[s.value]) == null ? void 0 : y.children[0]) == null ? void 0 : k.focus();
|
|
322
|
+
}, b = () => t(g.CLOSE), $ = async (f, y) => {
|
|
323
|
+
f.items ? (l.value = y, a.value = !0) : (l.value = y, a.value = !1, b());
|
|
324
|
+
}, B = () => {
|
|
325
|
+
s.value > 0 ? (s.value -= 1, d.value[s.value].disabled && B()) : s.value = o.value, u();
|
|
326
326
|
}, w = () => {
|
|
327
|
-
s.value < o.value ? (s.value += 1,
|
|
328
|
-
},
|
|
329
|
-
var
|
|
330
|
-
(
|
|
327
|
+
s.value < o.value ? (s.value += 1, d.value[s.value].disabled && w()) : s.value = 0, u();
|
|
328
|
+
}, P = (f, y) => {
|
|
329
|
+
var k;
|
|
330
|
+
(k = f == null ? void 0 : f.items) != null && k.length && (l.value = y, a.value = !0);
|
|
331
331
|
}, ee = () => {
|
|
332
332
|
l.value && a.value && (l.value = null, a.value = !1);
|
|
333
333
|
}, te = () => {
|
|
334
|
-
a.value = !1, l.value = null,
|
|
335
|
-
}, ne =
|
|
336
|
-
var
|
|
337
|
-
return (
|
|
338
|
-
}), oe =
|
|
334
|
+
a.value = !1, l.value = null, u();
|
|
335
|
+
}, ne = M(() => {
|
|
336
|
+
var f, y, k;
|
|
337
|
+
return (k = (y = (f = r.value) == null ? void 0 : f[0]) == null ? void 0 : y.$el) == null ? void 0 : k.offsetHeight;
|
|
338
|
+
}), oe = M(() => a.value ? `${ne.value}px` : "");
|
|
339
339
|
return {
|
|
340
340
|
// Values
|
|
341
341
|
menuItemListRef: _,
|
|
342
342
|
menuItemListWrapperRef: i,
|
|
343
|
-
subMenuItemListRef:
|
|
344
|
-
computedData:
|
|
343
|
+
subMenuItemListRef: r,
|
|
344
|
+
computedData: d,
|
|
345
345
|
computedHeight: oe,
|
|
346
346
|
focusedIndex: s,
|
|
347
347
|
subMenuFocusedIndex: m,
|
|
@@ -350,20 +350,20 @@ const Se = /* @__PURE__ */ R(Me, [["render", ke], ["__scopeId", "data-v-621db243
|
|
|
350
350
|
// Methods
|
|
351
351
|
toggleMenu: $,
|
|
352
352
|
closeMenu: b,
|
|
353
|
-
focusPrevious:
|
|
353
|
+
focusPrevious: B,
|
|
354
354
|
focusNext: w,
|
|
355
|
-
focusRight:
|
|
355
|
+
focusRight: P,
|
|
356
356
|
focusLeft: ee,
|
|
357
357
|
onBackButton: te
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
361
|
const we = ["onKeydown"];
|
|
362
|
-
function Ee(e, t, _, i,
|
|
362
|
+
function Ee(e, t, _, i, r, a) {
|
|
363
363
|
const l = v("menu-item"), s = v("bento-divider"), m = v("sub-menu-item-list"), o = v("menu-list-container");
|
|
364
|
-
return c(),
|
|
364
|
+
return c(), I(o, {
|
|
365
365
|
ref: "menuItemListWrapperRef",
|
|
366
|
-
style:
|
|
366
|
+
style: J({ height: e.computedHeight })
|
|
367
367
|
}, {
|
|
368
368
|
default: C(() => [
|
|
369
369
|
T("ul", {
|
|
@@ -377,36 +377,36 @@ function Ee(e, t, _, i, d, a) {
|
|
|
377
377
|
t[4] || (t[4] = h((...n) => e.closeMenu && e.closeMenu(...n), ["tab"]))
|
|
378
378
|
]
|
|
379
379
|
}, [
|
|
380
|
-
(c(!0), L(
|
|
381
|
-
var
|
|
380
|
+
(c(!0), L(Z, null, z(e.computedData, (n, d) => {
|
|
381
|
+
var u, b, $, B;
|
|
382
382
|
return c(), L("li", {
|
|
383
|
-
key: `menu-item-${
|
|
383
|
+
key: `menu-item-${d}`,
|
|
384
384
|
class: "b-menu-item-list__item",
|
|
385
385
|
role: "none",
|
|
386
386
|
onKeydown: [
|
|
387
|
-
h((w) => e.focusRight(n,
|
|
387
|
+
h((w) => e.focusRight(n, d), ["right"]),
|
|
388
388
|
t[0] || (t[0] = h((w) => e.focusLeft(), ["left"]))
|
|
389
389
|
]
|
|
390
390
|
}, [
|
|
391
391
|
S(l, {
|
|
392
392
|
text: n.text,
|
|
393
|
-
handler: (
|
|
393
|
+
handler: (u = n.items) != null && u.length ? () => null : n.handler,
|
|
394
394
|
"secondary-text": n.secondaryText,
|
|
395
395
|
icon: n.icon,
|
|
396
396
|
chevron: !!((b = n.items) != null && b.length),
|
|
397
397
|
disabled: n.disabled,
|
|
398
398
|
critical: n.critical,
|
|
399
399
|
indent: n.indent,
|
|
400
|
-
tabindex:
|
|
400
|
+
tabindex: d === e.subMenuFocusedIndex ? "0" : "-1",
|
|
401
401
|
"aria-haspopup": !!(($ = n.items) != null && $.length),
|
|
402
|
-
"aria-expanded": e.showSubMenu && e.visibleSubMenuIndex ===
|
|
403
|
-
onClick: (w) => e.toggleMenu(n,
|
|
402
|
+
"aria-expanded": e.showSubMenu && e.visibleSubMenuIndex === d,
|
|
403
|
+
onClick: (w) => e.toggleMenu(n, d)
|
|
404
404
|
}, null, 8, ["text", "handler", "secondary-text", "icon", "chevron", "disabled", "critical", "indent", "tabindex", "aria-haspopup", "aria-expanded", "onClick"]),
|
|
405
|
-
n.addDivider ? (c(),
|
|
405
|
+
n.addDivider ? (c(), I(s, {
|
|
406
406
|
key: 0,
|
|
407
407
|
class: "b-menu-item-list__divider"
|
|
408
408
|
})) : E("", !0),
|
|
409
|
-
(
|
|
409
|
+
(B = n.items) != null && B.length && e.showSubMenu && e.visibleSubMenuIndex === d ? (c(), I(m, {
|
|
410
410
|
key: 1,
|
|
411
411
|
ref_for: !0,
|
|
412
412
|
ref: "subMenuItemListRef",
|
|
@@ -423,39 +423,39 @@ function Ee(e, t, _, i, d, a) {
|
|
|
423
423
|
}, 8, ["style"]);
|
|
424
424
|
}
|
|
425
425
|
const Re = /* @__PURE__ */ R(Le, [["render", Ee], ["__scopeId", "data-v-f1d94ee8"]]), Oe = Symbol("menu inverse style injection key");
|
|
426
|
-
let
|
|
426
|
+
let q = 0;
|
|
427
427
|
const Te = {
|
|
428
428
|
beforeCreate() {
|
|
429
|
-
this.uuid =
|
|
429
|
+
this.uuid = q.toString(), q += 1;
|
|
430
430
|
}
|
|
431
|
-
}, Ne = { key: 0 },
|
|
431
|
+
}, Ne = { key: 0 }, Pe = /* @__PURE__ */ T("path", {
|
|
432
432
|
fill: "#00112C",
|
|
433
433
|
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"
|
|
434
|
-
}, null, -1),
|
|
434
|
+
}, null, -1), De = /* @__PURE__ */ T("path", {
|
|
435
435
|
fill: "#00112C",
|
|
436
436
|
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"
|
|
437
|
-
}, null, -1),
|
|
437
|
+
}, null, -1), Ke = /* @__PURE__ */ T("path", {
|
|
438
438
|
fill: "#00112C",
|
|
439
439
|
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"
|
|
440
440
|
}, null, -1);
|
|
441
|
-
function Fe(e, t, _, i,
|
|
442
|
-
return c(), L("svg",
|
|
441
|
+
function Fe(e, t, _, i, r, a) {
|
|
442
|
+
return c(), L("svg", Y({ role: "img" }, e.$attrs, {
|
|
443
443
|
class: "ui-assets-icons-16",
|
|
444
444
|
xmlns: "http://www.w3.org/2000/svg",
|
|
445
445
|
width: "16",
|
|
446
446
|
height: "16",
|
|
447
447
|
fill: "none"
|
|
448
448
|
}), [
|
|
449
|
-
e.$attrs["svg-title"] ? (c(), L("title", Ne,
|
|
450
|
-
Ke,
|
|
449
|
+
e.$attrs["svg-title"] ? (c(), L("title", Ne, K(e.$attrs["svg-title"]), 1)) : E("", !0),
|
|
451
450
|
Pe,
|
|
452
|
-
De
|
|
451
|
+
De,
|
|
452
|
+
Ke
|
|
453
453
|
], 16);
|
|
454
454
|
}
|
|
455
|
-
const
|
|
456
|
-
i18n: { messages:
|
|
455
|
+
const We = /* @__PURE__ */ R(Te, [["render", Fe]]), Ve = O({
|
|
456
|
+
i18n: { messages: x },
|
|
457
457
|
name: "bento-menu",
|
|
458
|
-
components: { BentoButton: me, BentoPopover:
|
|
458
|
+
components: { BentoButton: me, BentoPopover: fe, BentoTeleport: _e, MenuItemList: Re, OptionsVerticalIcon: We },
|
|
459
459
|
directives: { BentoClickOutsideDirective: ce },
|
|
460
460
|
props: {
|
|
461
461
|
/**
|
|
@@ -508,19 +508,25 @@ const Ve = /* @__PURE__ */ R(Te, [["render", Fe]]), He = O({
|
|
|
508
508
|
},
|
|
509
509
|
emits: [g.CLOSE, g.OPEN],
|
|
510
510
|
setup(e, { emit: t, slots: _ }) {
|
|
511
|
-
const i =
|
|
512
|
-
|
|
513
|
-
const o =
|
|
511
|
+
const i = p(null), r = p(!1), a = p(!1), l = W("menu"), s = W("menu-popover"), m = ue(Oe, p(!1));
|
|
512
|
+
ae(pe, m);
|
|
513
|
+
const o = M(() => ({
|
|
514
514
|
"b-menu--inverse": m.value
|
|
515
|
-
})), n =
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
},
|
|
515
|
+
})), n = M(() => e.menuWidth ? { width: `${e.menuWidth}px` } : null), d = M(() => {
|
|
516
|
+
if (e != null && e.button)
|
|
517
|
+
return {
|
|
518
|
+
variant: "secondary",
|
|
519
|
+
...e.button
|
|
520
|
+
};
|
|
521
|
+
}), u = () => {
|
|
522
|
+
r.value = !0, t(g.OPEN);
|
|
523
|
+
}, b = () => {
|
|
524
|
+
r.value && (r.value = !1, i.value.$el.focus(), t(g.CLOSE));
|
|
525
|
+
}, $ = (P) => {
|
|
526
|
+
P.stopPropagation(), r.value ? b() : u();
|
|
527
|
+
}, B = () => {
|
|
522
528
|
a.value = !1, u();
|
|
523
|
-
},
|
|
529
|
+
}, w = () => {
|
|
524
530
|
a.value = !0, u();
|
|
525
531
|
};
|
|
526
532
|
return {
|
|
@@ -528,7 +534,8 @@ const Ve = /* @__PURE__ */ R(Te, [["render", Fe]]), He = O({
|
|
|
528
534
|
menuButtonRef: i,
|
|
529
535
|
menuId: l,
|
|
530
536
|
popoverId: s,
|
|
531
|
-
showMenu:
|
|
537
|
+
showMenu: r,
|
|
538
|
+
computedButtonPropsWithDefaults: d,
|
|
532
539
|
computedMenuWidth: n,
|
|
533
540
|
isLastElementFocused: a,
|
|
534
541
|
// Classes
|
|
@@ -536,32 +543,32 @@ const Ve = /* @__PURE__ */ R(Te, [["render", Fe]]), He = O({
|
|
|
536
543
|
isInverseColorSet: m,
|
|
537
544
|
// Methods
|
|
538
545
|
hasSlot: ve(_),
|
|
539
|
-
onKeyDown:
|
|
540
|
-
onKeyUp:
|
|
541
|
-
closeMenu:
|
|
542
|
-
toggleShowMenu:
|
|
546
|
+
onKeyDown: B,
|
|
547
|
+
onKeyUp: w,
|
|
548
|
+
closeMenu: b,
|
|
549
|
+
toggleShowMenu: $
|
|
543
550
|
};
|
|
544
551
|
}
|
|
545
552
|
});
|
|
546
|
-
function
|
|
547
|
-
const l = v("options-vertical-icon"), s = v("bento-button"), m = v("menu-item-list"), o = v("bento-popover"), n = v("bento-teleport"),
|
|
553
|
+
function He(e, t, _, i, r, a) {
|
|
554
|
+
const l = v("options-vertical-icon"), s = v("bento-button"), m = v("menu-item-list"), o = v("bento-popover"), n = v("bento-teleport"), d = re("bento-click-outside-directive");
|
|
548
555
|
return de((c(), L("div", {
|
|
549
|
-
class:
|
|
556
|
+
class: U([e.computedClasses, "b-menu"]),
|
|
550
557
|
onKeydown: [
|
|
551
|
-
t[0] || (t[0] = h((...
|
|
552
|
-
t[1] || (t[1] = h((...
|
|
553
|
-
t[2] || (t[2] = h((...
|
|
558
|
+
t[0] || (t[0] = h((...u) => e.onKeyDown && e.onKeyDown(...u), ["down"])),
|
|
559
|
+
t[1] || (t[1] = h((...u) => e.onKeyUp && e.onKeyUp(...u), ["up"])),
|
|
560
|
+
t[2] || (t[2] = h((...u) => e.closeMenu && e.closeMenu(...u), ["esc"]))
|
|
554
561
|
]
|
|
555
562
|
}, [
|
|
556
|
-
S(s,
|
|
563
|
+
S(s, Y({
|
|
557
564
|
ref: "menuButtonRef",
|
|
558
565
|
"aria-haspopup": "true"
|
|
559
|
-
}, e.
|
|
566
|
+
}, e.computedButtonPropsWithDefaults, {
|
|
560
567
|
"aria-expanded": `${e.showMenu}`,
|
|
561
568
|
"aria-controls": e.showMenu ? e.menuId : null,
|
|
562
569
|
inverse: e.isInverseColorSet,
|
|
563
570
|
onClick: e.toggleShowMenu
|
|
564
|
-
}),
|
|
571
|
+
}), j({ _: 2 }, [
|
|
565
572
|
!e.hasSlot("default") || e.hasSlot("iconLeft") ? {
|
|
566
573
|
name: "iconLeft",
|
|
567
574
|
fn: C(() => [
|
|
@@ -588,17 +595,17 @@ function We(e, t, _, i, d, a) {
|
|
|
588
595
|
key: "2"
|
|
589
596
|
} : void 0
|
|
590
597
|
]), 1040, ["aria-expanded", "aria-controls", "inverse", "onClick"]),
|
|
591
|
-
e.menuButtonRef ? (c(),
|
|
598
|
+
e.menuButtonRef ? (c(), I(n, {
|
|
592
599
|
key: 0,
|
|
593
600
|
disabled: !e.teleport
|
|
594
601
|
}, {
|
|
595
602
|
default: C(() => [
|
|
596
|
-
e.menuButtonRef ? (c(),
|
|
603
|
+
e.menuButtonRef ? (c(), I(o, {
|
|
597
604
|
key: 0,
|
|
598
605
|
id: e.menuId,
|
|
599
606
|
open: e.showMenu,
|
|
600
607
|
class: "b-menu__popover",
|
|
601
|
-
style:
|
|
608
|
+
style: J(e.computedMenuWidth),
|
|
602
609
|
"target-element": e.menuButtonRef,
|
|
603
610
|
position: e.menuPosition,
|
|
604
611
|
"fixed-positioning": e.menuFixedPositioning,
|
|
@@ -628,14 +635,14 @@ function We(e, t, _, i, d, a) {
|
|
|
628
635
|
_: 1
|
|
629
636
|
}, 8, ["disabled"])) : E("", !0)
|
|
630
637
|
], 34)), [
|
|
631
|
-
[
|
|
638
|
+
[d, e.closeMenu]
|
|
632
639
|
]);
|
|
633
640
|
}
|
|
634
|
-
const et = /* @__PURE__ */ R(
|
|
641
|
+
const et = /* @__PURE__ */ R(Ve, [["render", He], ["__scopeId", "data-v-27404df4"]]);
|
|
635
642
|
export {
|
|
636
643
|
et as B,
|
|
637
644
|
Oe as M,
|
|
638
|
-
|
|
645
|
+
We as O,
|
|
639
646
|
g as a
|
|
640
647
|
};
|
|
641
|
-
//# sourceMappingURL=index.
|
|
648
|
+
//# sourceMappingURL=index.e97ff2db.js.map
|