@adyen/bento-vue3 1.6.1 → 1.7.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/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +45 -0
- package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +229 -220
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +44 -46
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +8 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +8 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +46 -28
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +802 -52
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +64 -7
- package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +10 -1
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +7 -4
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +15 -15
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +173 -0
- package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
- package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
- package/dist/accordion.js +52 -43
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +210 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/checkmark.css +1 -0
- package/dist/assets/chevron-left.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -0
- 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/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -0
- package/dist/assets/index5.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/assets/listbox.css +1 -1
- package/dist/assets/refresh.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +30 -22
- package/dist/button.js.map +1 -1
- package/dist/card.js +84 -84
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.4b5ab17e.js → base-button.7897a95e.js} +2 -2
- package/dist/chunks/{base-button.4b5ab17e.js.map → base-button.7897a95e.js.map} +1 -1
- package/dist/chunks/{base-modal.53a229ac.js → base-modal.0c85e7cb.js} +4 -4
- package/dist/chunks/{base-modal.53a229ac.js.map → base-modal.0c85e7cb.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.fa35390c.js +107 -0
- package/dist/chunks/button-actions-with-menu.fa35390c.js.map +1 -0
- package/dist/chunks/{button.975d0bb8.js → button.e5177388.js} +44 -36
- package/dist/chunks/button.e5177388.js.map +1 -0
- package/dist/chunks/{calendar.cc37ac1f.js → calendar.c83d4e99.js} +274 -250
- package/dist/chunks/calendar.c83d4e99.js.map +1 -0
- package/dist/chunks/{checkbox.67ceb148.js → checkbox.3cdbdd52.js} +7 -7
- package/dist/chunks/{checkbox.67ceb148.js.map → checkbox.3cdbdd52.js.map} +1 -1
- package/dist/chunks/checkmark.83e4f1e0.js +30 -0
- package/dist/chunks/checkmark.83e4f1e0.js.map +1 -0
- package/dist/chunks/{chevron-right.aef416c6.js → chevron-left.2fd6b083.js} +10 -10
- package/dist/chunks/chevron-left.2fd6b083.js.map +1 -0
- package/dist/chunks/{controls-group.7214dc7f.js → controls-group.38b436f6.js} +2 -2
- package/dist/chunks/{controls-group.7214dc7f.js.map → controls-group.38b436f6.js.map} +1 -1
- package/dist/chunks/{copy.7a73d1fd.js → copy.86236c8d.js} +4 -4
- package/dist/chunks/{copy.7a73d1fd.js.map → copy.86236c8d.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.0f878a8d.js → dropdown-default-textbox.0b38fac3.js} +4 -4
- package/dist/chunks/dropdown-default-textbox.0b38fac3.js.map +1 -0
- package/dist/chunks/{dropdown.7a104ce3.js → dropdown.afff433b.js} +144 -110
- package/dist/chunks/dropdown.afff433b.js.map +1 -0
- package/dist/chunks/{error-message.b91afffc.js → error-message.64e1964b.js} +2 -2
- package/dist/chunks/{error-message.b91afffc.js.map → error-message.64e1964b.js.map} +1 -1
- package/dist/chunks/fixed-scroller.e5aa7b00.js +148 -0
- package/dist/chunks/fixed-scroller.e5aa7b00.js.map +1 -0
- package/dist/chunks/{footer-actions.13f19a22.js → footer-actions.1ce44374.js} +3 -3
- package/dist/chunks/{footer-actions.13f19a22.js.map → footer-actions.1ce44374.js.map} +1 -1
- package/dist/chunks/{index.7f24db66.js → index.2bd3812b.js} +2 -2
- package/dist/chunks/{index.7f24db66.js.map → index.2bd3812b.js.map} +1 -1
- package/dist/chunks/{index.1dc4ebae.js → index.369b0e66.js} +112 -92
- package/dist/chunks/index.369b0e66.js.map +1 -0
- package/dist/chunks/{index.536bcb56.js → index.6a665ade.js} +3 -3
- package/dist/chunks/{index.536bcb56.js.map → index.6a665ade.js.map} +1 -1
- package/dist/chunks/{index.4c951e0d.js → index.77f35162.js} +6 -6
- package/dist/chunks/{index.4c951e0d.js.map → index.77f35162.js.map} +1 -1
- package/dist/chunks/index.bcc58fdd.js +1334 -0
- package/dist/chunks/index.bcc58fdd.js.map +1 -0
- package/dist/chunks/index.c207e9ab.js +602 -0
- package/dist/chunks/index.c207e9ab.js.map +1 -0
- package/dist/chunks/{index.6700224a.js → index.e579bc02.js} +2 -2
- package/dist/chunks/{index.6700224a.js.map → index.e579bc02.js.map} +1 -1
- package/dist/chunks/{index.d68847b0.js → index.fa7b44f1.js} +2 -2
- package/dist/chunks/{index.d68847b0.js.map → index.fa7b44f1.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.0f31ecb2.js → listbox-option-tag.809ec40e.js} +3 -3
- package/dist/chunks/{listbox-option-tag.0f31ecb2.js.map → listbox-option-tag.809ec40e.js.map} +1 -1
- package/dist/chunks/listbox.f6e5a11d.js +1306 -0
- package/dist/chunks/listbox.f6e5a11d.js.map +1 -0
- package/dist/chunks/{loading-button.6523a015.js → loading-button.746b7fa1.js} +2 -2
- package/dist/chunks/{loading-button.6523a015.js.map → loading-button.746b7fa1.js.map} +1 -1
- package/dist/chunks/refresh.c38c9eee.js +30 -0
- package/dist/chunks/refresh.c38c9eee.js.map +1 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
- package/dist/chunks/{tooltip.b5391514.js → tooltip.f769eb14.js} +54 -51
- package/dist/chunks/{tooltip.b5391514.js.map → tooltip.f769eb14.js.map} +1 -1
- package/dist/code-snippet.js +6 -6
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +553 -541
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +10 -10
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +129 -118
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +44 -42
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +696 -683
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +3 -3
- package/dist/header.js +121 -198
- package/dist/header.js.map +1 -1
- package/dist/image.js +4 -4
- package/dist/index.js +164 -158
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +8 -8
- package/dist/input-field.js +7 -7
- package/dist/internal.js +20 -144
- package/dist/internal.js.map +1 -1
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +3 -592
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +3 -3
- package/dist/pagination.js +37 -21
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +50 -40
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +16 -16
- package/dist/popper-container.js +6 -1276
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +128 -97
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +130 -106
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +94 -91
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +146 -163
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +128 -99
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +216 -203
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +6 -6
- package/dist/tutorial.js +375 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -2
- package/dist/assets/chevron-right.css +0 -1
- package/dist/chunks/button.975d0bb8.js.map +0 -1
- package/dist/chunks/calendar.cc37ac1f.js.map +0 -1
- package/dist/chunks/chevron-right.aef416c6.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.0f878a8d.js.map +0 -1
- package/dist/chunks/dropdown.7a104ce3.js.map +0 -1
- package/dist/chunks/index.1dc4ebae.js.map +0 -1
- package/dist/chunks/listbox.0f25778d.js +0 -1213
- package/dist/chunks/listbox.0f25778d.js.map +0 -1
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { openBlock as f, createElementBlock as S, mergeProps as W, toDisplayString as P, createCommentVNode as K, pushScopeId as se, popScopeId as le, createElementVNode as O, defineComponent as E, computed as I, resolveComponent as h, createBlock as w, normalizeClass as N, createSlots as ie, withCtx as $, createVNode as k, createTextVNode as F, resolveDynamicComponent as ue, renderSlot as j, ref as p, onMounted as ae, Transition as re, withKeys as y, withModifiers as T, Fragment as Z, renderList as z, normalizeStyle as G, inject as ce, resolveDirective as de, withDirectives as me } from "vue";
|
|
2
|
+
import { _ as L } from "./_plugin-vue_export-helper.dad06003.js";
|
|
3
|
+
import { g as H } from "./unique-id.a2a2b458.js";
|
|
4
|
+
import { B as pe } from "./directive.0408e565.js";
|
|
5
|
+
import { a as fe } from "./button.e5177388.js";
|
|
6
|
+
import { BentoPopover as ve, BentoPopoverPositions as A } from "../popover.js";
|
|
7
|
+
import { a as _e, C as U } from "./chevron-left.2fd6b083.js";
|
|
8
|
+
import { B as be, a as V } from "./base-button.7897a95e.js";
|
|
9
|
+
import { B as ye } from "./index.2bd3812b.js";
|
|
10
|
+
import "../assets/index16.css";
|
|
11
|
+
let q = 0;
|
|
12
|
+
const Ce = {
|
|
13
|
+
beforeCreate() {
|
|
14
|
+
this.uuid = q.toString(), q += 1;
|
|
15
|
+
}
|
|
16
|
+
}, R = (e) => (se("data-v-c663a42e"), e = e(), le(), e), he = { key: 0 }, ge = /* @__PURE__ */ R(() => /* @__PURE__ */ O("path", {
|
|
17
|
+
fill: "#00112C",
|
|
18
|
+
"fill-rule": "evenodd",
|
|
19
|
+
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.00166 0.970945 7.70006 1.00065 7.42597 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.65804 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z",
|
|
20
|
+
"clip-rule": "evenodd"
|
|
21
|
+
}, null, -1)), $e = /* @__PURE__ */ R(() => /* @__PURE__ */ O("path", {
|
|
22
|
+
fill: "#00112C",
|
|
23
|
+
"fill-rule": "evenodd",
|
|
24
|
+
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.00166 11.9709 7.70006 12.0007 7.42597 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.65804 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z",
|
|
25
|
+
"clip-rule": "evenodd"
|
|
26
|
+
}, null, -1)), Ie = /* @__PURE__ */ R(() => /* @__PURE__ */ O("path", {
|
|
27
|
+
fill: "#00112C",
|
|
28
|
+
"fill-rule": "evenodd",
|
|
29
|
+
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.65804 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.42597 6.61418C7.70006 6.50065 8.00166 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",
|
|
30
|
+
"clip-rule": "evenodd"
|
|
31
|
+
}, null, -1));
|
|
32
|
+
function Me(e, t, m, s, a, r) {
|
|
33
|
+
return f(), S("svg", W({ role: "img" }, e.$attrs, {
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
+
width: "16",
|
|
36
|
+
height: "16",
|
|
37
|
+
fill: "none"
|
|
38
|
+
}), [
|
|
39
|
+
e.$attrs["svg-title"] ? (f(), S("title", he, P(e.$attrs["svg-title"]), 1)) : K("", !0),
|
|
40
|
+
ge,
|
|
41
|
+
$e,
|
|
42
|
+
Ie
|
|
43
|
+
], 16);
|
|
44
|
+
}
|
|
45
|
+
const Be = /* @__PURE__ */ L(Ce, [["render", Me], ["__scopeId", "data-v-c663a42e"]]), ke = E({
|
|
46
|
+
name: "menu-item",
|
|
47
|
+
components: { BaseButton: be, BentoTypography: ye, ChevronRightIcon: _e },
|
|
48
|
+
props: {
|
|
49
|
+
/**
|
|
50
|
+
* menu-item text that gets displayed as the main label
|
|
51
|
+
*/
|
|
52
|
+
text: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: !0
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* menu-item action that gets executed when the MeniItem is clicked
|
|
58
|
+
*/
|
|
59
|
+
handler: {
|
|
60
|
+
type: Function,
|
|
61
|
+
required: !0
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* menu-item text that gets displayed as the secondary label
|
|
65
|
+
*/
|
|
66
|
+
secondaryText: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: null
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Optional chevron icon displayed to the right of the menu-item
|
|
72
|
+
*/
|
|
73
|
+
chevron: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Optional icon displayed to the left of the menu-item
|
|
79
|
+
*/
|
|
80
|
+
icon: {
|
|
81
|
+
// Types for Vue2 (Object) and Vue3 (Function)
|
|
82
|
+
// TODO: Remove Object when fully migrated to Vue3
|
|
83
|
+
type: [Object, Function],
|
|
84
|
+
default: null
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Disables menu-item button functionality
|
|
88
|
+
*/
|
|
89
|
+
disabled: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: !1
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* Displays an indent variant od the menu-item
|
|
95
|
+
*/
|
|
96
|
+
indent: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !1
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* Displays menu-item button as critical
|
|
102
|
+
*/
|
|
103
|
+
critical: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: !1
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Renders the text in a bold variant
|
|
109
|
+
*/
|
|
110
|
+
isTitle: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: !1
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
emits: [V.CLICK],
|
|
116
|
+
setup(e, { emit: t }) {
|
|
117
|
+
return {
|
|
118
|
+
// Values
|
|
119
|
+
conditionalClasses: I(() => ({
|
|
120
|
+
"b-menu-item--critical": e.critical,
|
|
121
|
+
"b-menu-item--indent": e.indent
|
|
122
|
+
})),
|
|
123
|
+
// Methods
|
|
124
|
+
onClick: (a) => {
|
|
125
|
+
a.stopPropagation(), e.handler(), t(V.CLICK);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
function Se(e, t, m, s, a, r) {
|
|
131
|
+
const i = h("bento-typography"), l = h("chevron-right-icon"), o = h("base-button");
|
|
132
|
+
return f(), w(o, {
|
|
133
|
+
class: N(["b-menu-item", e.conditionalClasses]),
|
|
134
|
+
role: "menuitem",
|
|
135
|
+
disabled: e.disabled,
|
|
136
|
+
tabindex: "-1",
|
|
137
|
+
onClick: e.onClick
|
|
138
|
+
}, ie({
|
|
139
|
+
default: $(() => [
|
|
140
|
+
k(i, {
|
|
141
|
+
el: "span",
|
|
142
|
+
variant: "body",
|
|
143
|
+
stronger: e.isTitle,
|
|
144
|
+
class: "b-menu-item__primary-text"
|
|
145
|
+
}, {
|
|
146
|
+
default: $(() => [
|
|
147
|
+
F(P(e.text), 1)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["stronger"]),
|
|
151
|
+
e.secondaryText ? (f(), w(i, {
|
|
152
|
+
key: 0,
|
|
153
|
+
el: "span",
|
|
154
|
+
variant: "body",
|
|
155
|
+
class: "b-menu-item__secondary-text"
|
|
156
|
+
}, {
|
|
157
|
+
default: $(() => [
|
|
158
|
+
F(P(e.secondaryText), 1)
|
|
159
|
+
]),
|
|
160
|
+
_: 1
|
|
161
|
+
})) : K("", !0)
|
|
162
|
+
]),
|
|
163
|
+
_: 2
|
|
164
|
+
}, [
|
|
165
|
+
e.icon ? {
|
|
166
|
+
name: "iconLeft",
|
|
167
|
+
fn: $(() => [
|
|
168
|
+
(f(), w(ue(e.icon), {
|
|
169
|
+
class: "b-menu-item__icon-left",
|
|
170
|
+
"aria-hidden": "true"
|
|
171
|
+
}))
|
|
172
|
+
]),
|
|
173
|
+
key: "0"
|
|
174
|
+
} : void 0,
|
|
175
|
+
e.chevron ? {
|
|
176
|
+
name: "iconRight",
|
|
177
|
+
fn: $(() => [
|
|
178
|
+
k(l, { "aria-hidden": "true" })
|
|
179
|
+
]),
|
|
180
|
+
key: "1"
|
|
181
|
+
} : void 0
|
|
182
|
+
]), 1032, ["class", "disabled", "onClick"]);
|
|
183
|
+
}
|
|
184
|
+
const J = /* @__PURE__ */ L(ke, [["render", Se], ["__scopeId", "data-v-9e8afd9c"]]);
|
|
185
|
+
var C = /* @__PURE__ */ ((e) => (e.BACK = "back", e.CLOSE = "close", e.OPEN = "open", e))(C || {});
|
|
186
|
+
const we = E({
|
|
187
|
+
name: "bento-menu-list-container"
|
|
188
|
+
});
|
|
189
|
+
const Le = { class: "b-menu-list-container" };
|
|
190
|
+
function Oe(e, t, m, s, a, r) {
|
|
191
|
+
return f(), S("div", Le, [
|
|
192
|
+
j(e.$slots, "default", {}, void 0, !0)
|
|
193
|
+
]);
|
|
194
|
+
}
|
|
195
|
+
const Y = /* @__PURE__ */ L(we, [["render", Oe], ["__scopeId", "data-v-ea0113ba"]]), Q = {
|
|
196
|
+
"en-US": {
|
|
197
|
+
menuButton: "Open menu",
|
|
198
|
+
backButton: "Go back"
|
|
199
|
+
}
|
|
200
|
+
}, Ee = E({
|
|
201
|
+
i18n: { messages: Q },
|
|
202
|
+
name: "sub-menu-item-list",
|
|
203
|
+
components: { MenuItem: J, MenuListContainer: Y },
|
|
204
|
+
props: {
|
|
205
|
+
items: {
|
|
206
|
+
type: Array,
|
|
207
|
+
required: !0
|
|
208
|
+
},
|
|
209
|
+
title: {
|
|
210
|
+
type: String,
|
|
211
|
+
required: !0
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
emits: [C.CLOSE, C.BACK],
|
|
215
|
+
setup(e, { emit: t }) {
|
|
216
|
+
const m = p(null), s = p(0), a = p(e.items.length), r = () => t(C.CLOSE), i = () => t(C.BACK), l = I(() => {
|
|
217
|
+
var v;
|
|
218
|
+
const u = (v = e.items) == null ? void 0 : v.map((b) => ({
|
|
219
|
+
...b,
|
|
220
|
+
indent: !b.icon,
|
|
221
|
+
isTitle: !1,
|
|
222
|
+
clickHandler: r
|
|
223
|
+
}));
|
|
224
|
+
return [
|
|
225
|
+
{
|
|
226
|
+
text: e.title,
|
|
227
|
+
secondaryText: null,
|
|
228
|
+
critical: !1,
|
|
229
|
+
icon: U,
|
|
230
|
+
isTitle: !0,
|
|
231
|
+
disabled: !1,
|
|
232
|
+
indent: !1,
|
|
233
|
+
handler: i,
|
|
234
|
+
clickHandler: i
|
|
235
|
+
},
|
|
236
|
+
...u
|
|
237
|
+
];
|
|
238
|
+
}), o = async () => {
|
|
239
|
+
var u, v, b, M, g;
|
|
240
|
+
(g = (M = (b = (v = (u = m.value) == null ? void 0 : u.children) == null ? void 0 : v[s.value]) == null ? void 0 : b.children) == null ? void 0 : M[0]) == null || g.focus();
|
|
241
|
+
};
|
|
242
|
+
ae(async () => {
|
|
243
|
+
setTimeout(() => o(), 150);
|
|
244
|
+
});
|
|
245
|
+
const n = () => {
|
|
246
|
+
s.value > 0 ? (s.value -= 1, l.value[s.value].disabled && n()) : s.value = a.value, o();
|
|
247
|
+
}, d = () => {
|
|
248
|
+
s.value < a.value ? (s.value += 1, l.value[s.value].disabled && d()) : s.value = 0, o();
|
|
249
|
+
};
|
|
250
|
+
return {
|
|
251
|
+
// Enums
|
|
252
|
+
BentoMenuEvent: C,
|
|
253
|
+
// Values
|
|
254
|
+
subMenuItemListRefLocal: m,
|
|
255
|
+
subMenuFocusedIndex: s,
|
|
256
|
+
ChevronLeftIcon: U,
|
|
257
|
+
computedItems: l,
|
|
258
|
+
// Methods
|
|
259
|
+
closeMenu: r,
|
|
260
|
+
onBackButton: i,
|
|
261
|
+
focusPrevious: n,
|
|
262
|
+
focusNext: d
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
function Ke(e, t, m, s, a, r) {
|
|
267
|
+
const i = h("menu-item"), l = h("menu-list-container");
|
|
268
|
+
return f(), w(re, {
|
|
269
|
+
name: "b-sub-menu-item-list__transition",
|
|
270
|
+
appear: ""
|
|
271
|
+
}, {
|
|
272
|
+
default: $(() => [
|
|
273
|
+
k(l, { class: "b-sub-menu-item-list" }, {
|
|
274
|
+
default: $(() => [
|
|
275
|
+
O("ul", {
|
|
276
|
+
ref: "subMenuItemListRefLocal",
|
|
277
|
+
role: "menu",
|
|
278
|
+
class: "b-sub-menu-item-list__list",
|
|
279
|
+
onKeydown: [
|
|
280
|
+
t[0] || (t[0] = y(T((...o) => e.focusNext && e.focusNext(...o), ["stop"]), ["down"])),
|
|
281
|
+
t[1] || (t[1] = y(T((...o) => e.focusPrevious && e.focusPrevious(...o), ["stop"]), ["up"])),
|
|
282
|
+
t[2] || (t[2] = y(T((...o) => e.onBackButton && e.onBackButton(...o), ["stop"]), ["esc"]))
|
|
283
|
+
]
|
|
284
|
+
}, [
|
|
285
|
+
(f(!0), S(Z, null, z(e.computedItems, (o, n) => (f(), S("li", {
|
|
286
|
+
key: `sub-menu-item-list-item-${n}`,
|
|
287
|
+
class: N([
|
|
288
|
+
{ "b-sub-menu-item-list__back-button": n === 0 },
|
|
289
|
+
{ "b-sub-menu-item-list__first-item": n == 1 }
|
|
290
|
+
]),
|
|
291
|
+
role: "none"
|
|
292
|
+
}, [
|
|
293
|
+
k(i, {
|
|
294
|
+
text: o.text,
|
|
295
|
+
handler: o.handler,
|
|
296
|
+
"secondary-text": o.secondaryText,
|
|
297
|
+
icon: o.icon,
|
|
298
|
+
"is-title": o.isTitle,
|
|
299
|
+
disabled: o.disabled,
|
|
300
|
+
critical: o.critical,
|
|
301
|
+
indent: o.indent,
|
|
302
|
+
tabindex: n === e.subMenuFocusedIndex ? "0" : "-1",
|
|
303
|
+
onClick: o.clickHandler
|
|
304
|
+
}, null, 8, ["text", "handler", "secondary-text", "icon", "is-title", "disabled", "critical", "indent", "tabindex", "onClick"])
|
|
305
|
+
], 2))), 128))
|
|
306
|
+
], 544)
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
})
|
|
310
|
+
]),
|
|
311
|
+
_: 1
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
const Te = /* @__PURE__ */ L(Ee, [["render", Ke], ["__scopeId", "data-v-67456329"]]), Pe = E({
|
|
315
|
+
name: "menu-item-list",
|
|
316
|
+
components: { MenuItem: J, MenuListContainer: Y, SubMenuItemList: Te },
|
|
317
|
+
props: {
|
|
318
|
+
/**
|
|
319
|
+
* The data to be displayed in the list
|
|
320
|
+
*/
|
|
321
|
+
data: {
|
|
322
|
+
type: Array,
|
|
323
|
+
required: !0
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.
|
|
327
|
+
*/
|
|
328
|
+
indentItems: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: !1
|
|
331
|
+
},
|
|
332
|
+
/**
|
|
333
|
+
* If set to true, focuses the last item on the list instead of the first. Used for accessibility purposes when the menu is opened with the 'up' arrow key.
|
|
334
|
+
*/
|
|
335
|
+
focusLastElement: {
|
|
336
|
+
type: Boolean,
|
|
337
|
+
default: !1
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
emits: [C.CLOSE],
|
|
341
|
+
setup(e, { emit: t }) {
|
|
342
|
+
const m = p(null), s = p(null), a = p(null), r = p(!1), i = p(null), l = p(e.focusLastElement ? e.data.length - 1 : 0), o = p(0), n = p(e.data.length - 1), d = I(() => e.data.some((c) => c.icon)), u = I(() => e.indentItems || d.value ? e.data.map((c) => {
|
|
343
|
+
let _ = !1;
|
|
344
|
+
return c.icon || (_ = !0), {
|
|
345
|
+
...c,
|
|
346
|
+
// eslint-disable-next-line no-param-reassign
|
|
347
|
+
indent: _
|
|
348
|
+
};
|
|
349
|
+
}) : e.data), v = () => {
|
|
350
|
+
var c, _, B;
|
|
351
|
+
return (B = (_ = (c = m.value) == null ? void 0 : c.children[l.value]) == null ? void 0 : _.children[0]) == null ? void 0 : B.focus();
|
|
352
|
+
}, b = () => t(C.CLOSE), M = async (c, _) => {
|
|
353
|
+
c.items ? (i.value = _, r.value = !0) : (i.value = _, r.value = !1, b());
|
|
354
|
+
}, g = () => {
|
|
355
|
+
l.value > 0 ? (l.value -= 1, u.value[l.value].disabled && g()) : l.value = n.value, v();
|
|
356
|
+
}, D = () => {
|
|
357
|
+
l.value < n.value ? (l.value += 1, u.value[l.value].disabled && D()) : l.value = 0, v();
|
|
358
|
+
}, X = (c, _) => {
|
|
359
|
+
var B;
|
|
360
|
+
(B = c == null ? void 0 : c.items) != null && B.length && (i.value = _, r.value = !0);
|
|
361
|
+
}, x = () => {
|
|
362
|
+
i.value && r.value && (i.value = null, r.value = !1);
|
|
363
|
+
}, ee = () => {
|
|
364
|
+
r.value = !1, i.value = null, v();
|
|
365
|
+
}, ne = I(() => {
|
|
366
|
+
var c;
|
|
367
|
+
return (c = s == null ? void 0 : s.value) == null ? void 0 : c.offsetHeight;
|
|
368
|
+
}), te = I(() => {
|
|
369
|
+
var c, _, B;
|
|
370
|
+
return (B = (_ = (c = a == null ? void 0 : a.value) == null ? void 0 : c[0]) == null ? void 0 : _.$el) == null ? void 0 : B.offsetHeight;
|
|
371
|
+
}), oe = I(() => r.value ? `${te.value}px` : `${ne.value}px`);
|
|
372
|
+
return {
|
|
373
|
+
// Values
|
|
374
|
+
menuItemListRef: m,
|
|
375
|
+
menuItemListWrapperRef: s,
|
|
376
|
+
subMenuItemListRef: a,
|
|
377
|
+
computedData: u,
|
|
378
|
+
computedHeight: oe,
|
|
379
|
+
focusedIndex: l,
|
|
380
|
+
subMenuFocusedIndex: o,
|
|
381
|
+
showSubMenu: r,
|
|
382
|
+
visibleSubMenuIndex: i,
|
|
383
|
+
// Methods
|
|
384
|
+
toggleMenu: M,
|
|
385
|
+
closeMenu: b,
|
|
386
|
+
focusPrevious: g,
|
|
387
|
+
focusNext: D,
|
|
388
|
+
focusRight: X,
|
|
389
|
+
focusLeft: x,
|
|
390
|
+
onBackButton: ee
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
const Ne = ["onKeydown"];
|
|
395
|
+
function Re(e, t, m, s, a, r) {
|
|
396
|
+
const i = h("menu-item"), l = h("sub-menu-item-list"), o = h("menu-list-container");
|
|
397
|
+
return f(), w(o, {
|
|
398
|
+
ref: "menuItemListWrapperRef",
|
|
399
|
+
style: G({ height: e.computedHeight })
|
|
400
|
+
}, {
|
|
401
|
+
default: $(() => [
|
|
402
|
+
O("ul", {
|
|
403
|
+
ref: "menuItemListRef",
|
|
404
|
+
class: "b-menu-item-list",
|
|
405
|
+
role: "menu",
|
|
406
|
+
onKeydown: [
|
|
407
|
+
t[1] || (t[1] = y((...n) => e.focusNext && e.focusNext(...n), ["down"])),
|
|
408
|
+
t[2] || (t[2] = y((...n) => e.focusPrevious && e.focusPrevious(...n), ["up"])),
|
|
409
|
+
t[3] || (t[3] = y((...n) => e.closeMenu && e.closeMenu(...n), ["esc"])),
|
|
410
|
+
t[4] || (t[4] = y((...n) => e.closeMenu && e.closeMenu(...n), ["tab"]))
|
|
411
|
+
]
|
|
412
|
+
}, [
|
|
413
|
+
(f(!0), S(Z, null, z(e.computedData, (n, d) => {
|
|
414
|
+
var u, v, b, M;
|
|
415
|
+
return f(), S("li", {
|
|
416
|
+
key: `menu-item-${d}`,
|
|
417
|
+
class: "b-menu-item-list__item",
|
|
418
|
+
role: "none",
|
|
419
|
+
onKeydown: [
|
|
420
|
+
y((g) => e.focusRight(n, d), ["right"]),
|
|
421
|
+
t[0] || (t[0] = y((g) => e.focusLeft(), ["left"]))
|
|
422
|
+
]
|
|
423
|
+
}, [
|
|
424
|
+
k(i, {
|
|
425
|
+
text: n.text,
|
|
426
|
+
handler: (u = n.items) != null && u.length ? () => null : n.handler,
|
|
427
|
+
"secondary-text": n.secondaryText,
|
|
428
|
+
icon: n.icon,
|
|
429
|
+
chevron: !!((v = n.items) != null && v.length),
|
|
430
|
+
disabled: n.disabled,
|
|
431
|
+
critical: n.critical,
|
|
432
|
+
indent: n.indent,
|
|
433
|
+
tabindex: d === e.subMenuFocusedIndex ? "0" : "-1",
|
|
434
|
+
"aria-haspopup": !!((b = n.items) != null && b.length),
|
|
435
|
+
"aria-expanded": e.showSubMenu && e.visibleSubMenuIndex === d,
|
|
436
|
+
onClick: (g) => e.toggleMenu(n, d)
|
|
437
|
+
}, null, 8, ["text", "handler", "secondary-text", "icon", "chevron", "disabled", "critical", "indent", "tabindex", "aria-haspopup", "aria-expanded", "onClick"]),
|
|
438
|
+
(M = n.items) != null && M.length && e.showSubMenu && e.visibleSubMenuIndex === d ? (f(), w(l, {
|
|
439
|
+
key: 0,
|
|
440
|
+
ref_for: !0,
|
|
441
|
+
ref: "subMenuItemListRef",
|
|
442
|
+
items: n.items,
|
|
443
|
+
title: n.text,
|
|
444
|
+
onBack: e.onBackButton,
|
|
445
|
+
onClose: e.closeMenu
|
|
446
|
+
}, null, 8, ["items", "title", "onBack", "onClose"])) : K("", !0)
|
|
447
|
+
], 40, Ne);
|
|
448
|
+
}), 128))
|
|
449
|
+
], 544)
|
|
450
|
+
]),
|
|
451
|
+
_: 1
|
|
452
|
+
}, 8, ["style"]);
|
|
453
|
+
}
|
|
454
|
+
const De = /* @__PURE__ */ L(Pe, [["render", Re], ["__scopeId", "data-v-09b8d011"]]), Fe = Symbol("menu inverse style injection key"), He = E({
|
|
455
|
+
i18n: { messages: Q },
|
|
456
|
+
name: "bento-menu",
|
|
457
|
+
components: { BentoButton: fe, BentoPopover: ve, MenuItemList: De, OptionsVerticalIcon: Be },
|
|
458
|
+
directives: { BentoClickOutsideDirective: pe },
|
|
459
|
+
props: {
|
|
460
|
+
/**
|
|
461
|
+
* Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.
|
|
462
|
+
*/
|
|
463
|
+
button: {
|
|
464
|
+
type: Object,
|
|
465
|
+
default: () => ({
|
|
466
|
+
variant: "secondary"
|
|
467
|
+
})
|
|
468
|
+
},
|
|
469
|
+
/**
|
|
470
|
+
* The data to be displayed in the list
|
|
471
|
+
*/
|
|
472
|
+
data: {
|
|
473
|
+
type: Array,
|
|
474
|
+
required: !0
|
|
475
|
+
},
|
|
476
|
+
/**
|
|
477
|
+
* The position of where the menu should open.
|
|
478
|
+
*/
|
|
479
|
+
menuPosition: {
|
|
480
|
+
type: String,
|
|
481
|
+
default: A.BOTTOM_START,
|
|
482
|
+
validator: (e) => Object.values(A).includes(e)
|
|
483
|
+
},
|
|
484
|
+
/**
|
|
485
|
+
* Instructs the menu popover to be visible outside of the containing container.
|
|
486
|
+
* @see {@link https://floating-ui.com/docs/usefloating#strategy}
|
|
487
|
+
*/
|
|
488
|
+
menuFixedPositioning: {
|
|
489
|
+
type: Boolean,
|
|
490
|
+
default: !1
|
|
491
|
+
},
|
|
492
|
+
/**
|
|
493
|
+
* Sets a custom width for the menu popover.
|
|
494
|
+
*/
|
|
495
|
+
menuWidth: {
|
|
496
|
+
type: Number,
|
|
497
|
+
default: null
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
emits: [C.CLOSE, C.OPEN],
|
|
501
|
+
setup(e, { emit: t }) {
|
|
502
|
+
const m = p(null), s = p(!1), a = p(!1), r = H("menu"), i = H("menu-popover"), l = ce(Fe, p(!1)), o = I(() => ({
|
|
503
|
+
"b-menu--inverse": l.value
|
|
504
|
+
})), n = I(() => e.menuWidth ? { width: `${e.menuWidth}px` } : null), d = () => {
|
|
505
|
+
s.value = !0, t(C.OPEN);
|
|
506
|
+
}, u = () => {
|
|
507
|
+
s.value && (s.value = !1, m.value.$el.focus(), t(C.CLOSE));
|
|
508
|
+
};
|
|
509
|
+
return {
|
|
510
|
+
// Values
|
|
511
|
+
menuButtonRef: m,
|
|
512
|
+
menuId: r,
|
|
513
|
+
popoverId: i,
|
|
514
|
+
showMenu: s,
|
|
515
|
+
computedMenuWidth: n,
|
|
516
|
+
isLastElementFocused: a,
|
|
517
|
+
// Classes
|
|
518
|
+
computedClasses: o,
|
|
519
|
+
isInverseColorSet: l,
|
|
520
|
+
// Methods
|
|
521
|
+
onKeyDown: () => {
|
|
522
|
+
a.value = !1, d();
|
|
523
|
+
},
|
|
524
|
+
onKeyUp: () => {
|
|
525
|
+
a.value = !0, d();
|
|
526
|
+
},
|
|
527
|
+
closeMenu: u,
|
|
528
|
+
toggleShowMenu: (g) => {
|
|
529
|
+
g.stopPropagation(), s.value ? u() : d();
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
function Ae(e, t, m, s, a, r) {
|
|
535
|
+
const i = h("options-vertical-icon"), l = h("bento-button"), o = h("menu-item-list"), n = h("bento-popover"), d = de("bento-click-outside-directive");
|
|
536
|
+
return me((f(), S("div", {
|
|
537
|
+
class: N([e.computedClasses, "b-menu"]),
|
|
538
|
+
onKeydown: [
|
|
539
|
+
t[0] || (t[0] = y((...u) => e.onKeyDown && e.onKeyDown(...u), ["down"])),
|
|
540
|
+
t[1] || (t[1] = y((...u) => e.onKeyUp && e.onKeyUp(...u), ["up"])),
|
|
541
|
+
t[2] || (t[2] = y((...u) => e.closeMenu && e.closeMenu(...u), ["esc"]))
|
|
542
|
+
]
|
|
543
|
+
}, [
|
|
544
|
+
k(l, W({
|
|
545
|
+
ref: "menuButtonRef",
|
|
546
|
+
"aria-haspopup": "true"
|
|
547
|
+
}, e.button, {
|
|
548
|
+
"aria-expanded": `${e.showMenu}`,
|
|
549
|
+
"aria-controls": e.showMenu ? e.menuId : null,
|
|
550
|
+
inverse: e.isInverseColorSet,
|
|
551
|
+
onClick: e.toggleShowMenu
|
|
552
|
+
}), {
|
|
553
|
+
iconLeft: $(() => [
|
|
554
|
+
j(e.$slots, "default", {}, () => [
|
|
555
|
+
k(i, {
|
|
556
|
+
title: e.$t("menuButton")
|
|
557
|
+
}, null, 8, ["title"])
|
|
558
|
+
], !0)
|
|
559
|
+
]),
|
|
560
|
+
_: 3
|
|
561
|
+
}, 16, ["aria-expanded", "aria-controls", "inverse", "onClick"]),
|
|
562
|
+
e.menuButtonRef ? (f(), w(n, {
|
|
563
|
+
key: 0,
|
|
564
|
+
id: e.menuId,
|
|
565
|
+
open: e.showMenu,
|
|
566
|
+
class: "b-menu__popover",
|
|
567
|
+
style: G(e.computedMenuWidth),
|
|
568
|
+
"target-element": e.menuButtonRef,
|
|
569
|
+
position: e.menuPosition,
|
|
570
|
+
"fixed-positioning": e.menuFixedPositioning,
|
|
571
|
+
"fallback-position": [
|
|
572
|
+
"bottom-start",
|
|
573
|
+
"bottom-end",
|
|
574
|
+
"top-start",
|
|
575
|
+
"top-end",
|
|
576
|
+
"right-start",
|
|
577
|
+
"right-end",
|
|
578
|
+
"left-start",
|
|
579
|
+
"left-end"
|
|
580
|
+
],
|
|
581
|
+
"without-space": ""
|
|
582
|
+
}, {
|
|
583
|
+
default: $(() => [
|
|
584
|
+
k(o, {
|
|
585
|
+
data: e.data,
|
|
586
|
+
"focus-last-element": e.isLastElementFocused,
|
|
587
|
+
onClose: e.closeMenu
|
|
588
|
+
}, null, 8, ["data", "focus-last-element", "onClose"])
|
|
589
|
+
]),
|
|
590
|
+
_: 1
|
|
591
|
+
}, 8, ["id", "open", "style", "target-element", "position", "fixed-positioning"])) : K("", !0)
|
|
592
|
+
], 34)), [
|
|
593
|
+
[d, e.closeMenu]
|
|
594
|
+
]);
|
|
595
|
+
}
|
|
596
|
+
const Ye = /* @__PURE__ */ L(He, [["render", Ae], ["__scopeId", "data-v-7849afd2"]]);
|
|
597
|
+
export {
|
|
598
|
+
Ye as B,
|
|
599
|
+
Fe as M,
|
|
600
|
+
C as a
|
|
601
|
+
};
|
|
602
|
+
//# sourceMappingURL=index.c207e9ab.js.map
|