@adyen/bento-vue2 1.5.0 → 1.6.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/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +97 -97
- 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/card/card.vue.d.ts +7 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateStickyElementHeight/useCalculateStickyElementHeight.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useColumnReorderer/useColumnReorderer.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useConfigSettings/useConfigSettings.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +41 -4
- 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 +33 -34
- 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/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +20 -20
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-filter/date-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +7 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +17 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-tip.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/composables/useFixedScroller.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +4 -5
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +9 -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 +4 -4
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -1
- 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/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +18 -46
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +12 -12
- package/dist/@types/packages/vue2/src/composables/use-expandable-content-height/use-expandable-content-height.d.ts +4 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +121 -1
- package/dist/@types/packages/vue2/src/templates/data-grid-template/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/utils/ts/truncate.d.ts +1 -1
- package/dist/accordion.js +33 -36
- package/dist/accordion.js.map +1 -1
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.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/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/index43.css +1 -1
- package/dist/assets/index44.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/loading-button.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 +84 -80
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +14 -15
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.89e9efbd.js → base-button.431fb8cf.js} +2 -2
- package/dist/chunks/{base-button.89e9efbd.js.map → base-button.431fb8cf.js.map} +1 -1
- package/dist/chunks/{base-modal.6eaa7e53.js → base-modal.f462dac0.js} +41 -41
- package/dist/chunks/base-modal.f462dac0.js.map +1 -0
- package/dist/chunks/{button.66df5734.js → button.38099670.js} +2 -2
- package/dist/chunks/{button.66df5734.js.map → button.38099670.js.map} +1 -1
- package/dist/chunks/{calendar.44459d87.js → calendar.371e5ae2.js} +8 -7
- package/dist/chunks/{calendar.44459d87.js.map → calendar.371e5ae2.js.map} +1 -1
- package/dist/chunks/{checkbox.b69b8f22.js → checkbox.b8c2e583.js} +3 -3
- package/dist/chunks/{checkbox.b69b8f22.js.map → checkbox.b8c2e583.js.map} +1 -1
- package/dist/chunks/{controls-group.a2a2916f.js → controls-group.d75f1d37.js} +2 -2
- package/dist/chunks/{controls-group.a2a2916f.js.map → controls-group.d75f1d37.js.map} +1 -1
- package/dist/chunks/{copy.57f969d4.js → copy.8e44a660.js} +3 -3
- package/dist/chunks/{copy.57f969d4.js.map → copy.8e44a660.js.map} +1 -1
- package/dist/chunks/date-input.9186a0bf.js.map +1 -1
- package/dist/chunks/{dropdown-default-textbox.2d093874.js → dropdown-default-textbox.6135874c.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.2d093874.js.map → dropdown-default-textbox.6135874c.js.map} +1 -1
- package/dist/chunks/{dropdown.10ea8304.js → dropdown.5d22958c.js} +184 -179
- package/dist/chunks/dropdown.5d22958c.js.map +1 -0
- package/dist/chunks/{error-message.7a5db7f6.js → error-message.a04e8f9a.js} +2 -2
- package/dist/chunks/{error-message.7a5db7f6.js.map → error-message.a04e8f9a.js.map} +1 -1
- package/dist/chunks/{footer-actions.6ddac024.js → footer-actions.ee645663.js} +3 -3
- package/dist/chunks/{footer-actions.6ddac024.js.map → footer-actions.ee645663.js.map} +1 -1
- package/dist/chunks/{index.4a11da21.js → index.5d058912.js} +22 -21
- package/dist/chunks/{index.4a11da21.js.map → index.5d058912.js.map} +1 -1
- package/dist/chunks/{index.f607a3f1.js → index.64cce50b.js} +6 -6
- package/dist/chunks/{index.f607a3f1.js.map → index.64cce50b.js.map} +1 -1
- package/dist/chunks/{index.0f8690c4.js → index.74258013.js} +2 -2
- package/dist/chunks/{index.0f8690c4.js.map → index.74258013.js.map} +1 -1
- package/dist/chunks/{index.1645ffcb.js → index.74da0d41.js} +2 -2
- package/dist/chunks/{index.1645ffcb.js.map → index.74da0d41.js.map} +1 -1
- package/dist/chunks/{index.660f2f2e.js → index.98b6db0e.js} +3 -3
- package/dist/chunks/{index.660f2f2e.js.map → index.98b6db0e.js.map} +1 -1
- package/dist/chunks/index.af05ced4.js.map +1 -1
- package/dist/chunks/{index.e722eb60.js → index.fd557233.js} +2 -2
- package/dist/chunks/{index.e722eb60.js.map → index.fd557233.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.e2688e54.js → listbox-option-tag.a651fa46.js} +3 -3
- package/dist/chunks/{listbox-option-tag.e2688e54.js.map → listbox-option-tag.a651fa46.js.map} +1 -1
- package/dist/chunks/{listbox.201a8521.js → listbox.cbb27077.js} +7 -7
- package/dist/chunks/{listbox.201a8521.js.map → listbox.cbb27077.js.map} +1 -1
- package/dist/chunks/{loading-button.9d18b4f2.js → loading-button.21c48d50.js} +24 -24
- package/dist/chunks/loading-button.21c48d50.js.map +1 -0
- package/dist/chunks/on-click-outside.3e0c3e2a.js.map +1 -1
- package/dist/chunks/{tooltip.f89cb0cd.js → tooltip.ca9673ee.js} +2 -2
- package/dist/chunks/tooltip.ca9673ee.js.map +1 -0
- package/dist/chunks/use-expandable-content-height.62fc84e5.js +17 -0
- package/dist/chunks/use-expandable-content-height.62fc84e5.js.map +1 -0
- package/dist/chunks/use-has-slot.6052d56a.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 +707 -655
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +26 -26
- 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 +3 -3
- package/dist/filter-bar.js +727 -638
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +71 -60
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +39 -36
- package/dist/header.js.map +1 -1
- package/dist/index.js +28 -28
- package/dist/info-icon.js +7 -7
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +71 -67
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +106 -18
- package/dist/internal.js.map +1 -1
- package/dist/link.js +29 -28
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +8 -6
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +20 -13
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +3 -3
- package/dist/popper-container.js +2 -2
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +6 -6
- package/dist/search-bar.js.map +1 -1
- package/dist/segmented-control.js +4 -4
- package/dist/sidepanel.js +28 -28
- 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 +2 -2
- package/dist/tabs.js +48 -48
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +89 -126
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +38 -38
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/typography.js +1 -1
- package/dist/web-types.json +289 -222
- package/package.json +5 -3
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +0 -2
- package/dist/chunks/base-modal.6eaa7e53.js.map +0 -1
- package/dist/chunks/dropdown.10ea8304.js.map +0 -1
- package/dist/chunks/loading-button.9d18b4f2.js.map +0 -1
- package/dist/chunks/tooltip.f89cb0cd.js.map +0 -1
package/dist/menu.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as k, computed as b, ref as c, onMounted as U } from "vue";
|
|
2
2
|
import { n as C } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
3
3
|
import { g as w } from "./chunks/unique-id.a2a2b458.js";
|
|
4
|
-
import { a as H } from "./chunks/button.
|
|
4
|
+
import { a as H } from "./chunks/button.38099670.js";
|
|
5
5
|
import { BentoPopover as N, BentoPopoverPositions as B } from "./popover.js";
|
|
6
6
|
import { a as q, C as I } from "./chunks/chevron-right.3b826337.js";
|
|
7
|
-
import { B as W, a as L } from "./chunks/base-button.
|
|
8
|
-
import { B as j } from "./chunks/index.
|
|
7
|
+
import { B as W, a as L } from "./chunks/base-button.431fb8cf.js";
|
|
8
|
+
import { B as j } from "./chunks/index.74da0d41.js";
|
|
9
9
|
import { B as Z } from "./chunks/directive.0408e565.js";
|
|
10
|
-
import "./assets/
|
|
10
|
+
import "./assets/index39.css";
|
|
11
11
|
let O = 0;
|
|
12
12
|
const $ = {
|
|
13
13
|
beforeCreate() {
|
|
@@ -63,7 +63,9 @@ const J = G.exports, Q = k({
|
|
|
63
63
|
* Optional icon displayed to the left of the menu-item
|
|
64
64
|
*/
|
|
65
65
|
icon: {
|
|
66
|
-
|
|
66
|
+
// Types for Vue2 (Object) and Vue3 (Function)
|
|
67
|
+
// TODO: Remove Object when fully migrated to Vue3
|
|
68
|
+
type: [Object, Function],
|
|
67
69
|
default: null
|
|
68
70
|
},
|
|
69
71
|
/**
|
|
@@ -125,7 +127,7 @@ var X = function() {
|
|
|
125
127
|
Y,
|
|
126
128
|
!1,
|
|
127
129
|
null,
|
|
128
|
-
"
|
|
130
|
+
"49e4a0fe",
|
|
129
131
|
null,
|
|
130
132
|
null
|
|
131
133
|
);
|
package/dist/menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sources":["../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/options-vertical.vue","../src/components/menu/components/menu-item/menu-item.vue","../src/components/menu/menu.types.ts","../src/components/menu/components/menu-list-container/menu-list-container.vue","../src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../src/components/menu/components/menu-item-list/menu-item-list.vue","../src/components/menu/menu.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" 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\" clip-rule=\"evenodd\"/><path fill=\"#00112C\" fill-rule=\"evenodd\" 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\" clip-rule=\"evenodd\"/><path fill=\"#00112C\" fill-rule=\"evenodd\" 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\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"secondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ secondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { VueNodeElement } from '@/types';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n type: Object as PropType<VueNodeElement>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { BentoButton } from '../button';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n","<template>\n <div class=\"b-menu-list-container\"><slot></slot></div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default defineComponent({\n name: 'bento-menu-list-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li\n v-for=\"(item, index) in computedItems\"\n :key=\"`sub-menu-item-list-item-${index}`\"\n :class=\"[\n { 'b-sub-menu-item-list__back-button': index === 0 },\n { 'b-sub-menu-item-list__first-item': index == 1 },\n ]\"\n role=\"none\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"{ height: computedHeight }\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"toggleMenu(item, index)\"\n />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * 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.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoMenuEvent.CLOSE],\n setup(props, { emit }) {\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n // eslint-disable-next-line no-param-reassign\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = () => menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const toggleMenu = async (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n } else {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n closeMenu();\n }\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n const menuHeight = computed(() => menuItemListWrapperRef?.value?.$el.offsetHeight);\n\n const subMenuHeight = computed(() => subMenuItemListRef?.value?.[0]?.$el?.offsetHeight);\n\n const computedHeight = computed(() => {\n if (showSubMenu.value) {\n return `${subMenuHeight.value}px`;\n }\n return `${menuHeight.value}px`;\n });\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n\n computedData,\n computedHeight,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n toggleMenu,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","<template>\n <div\n v-bento-click-outside-directive=\"closeMenu\"\n class=\"b-menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu\"\n >\n <bento-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"button\"\n :aria-expanded=\"`${showMenu}`\"\n :aria-controls=\"showMenu ? menuId : null\"\n @click=\"toggleShowMenu\"\n >\n <template #iconLeft>\n <slot>\n <options-vertical-icon :title=\"$t('menuButton')\" />\n </slot>\n </template>\n </bento-button>\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n without-space\n >\n <menu-item-list :data=\"data\" :focus-last-element=\"isLastElementFocused\" @close=\"closeMenu\" />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoButton } from '@/components/button';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoMenuItem, MenuItemList } from './components';\n import { BentoMenuButtonProps, BentoMenuEvent } from './menu.types';\n import messages from './messages.json';\n\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-menu',\n components: { BentoButton, BentoPopover, MenuItemList, OptionsVerticalIcon },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n\n /**\n * The position of where the menu should open.\n */\n menuPosition: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth: {\n type: Number,\n default: null,\n },\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoMenuButtonProps>,\n default: () =>\n ({\n variant: 'secondary',\n } as BentoMenuButtonProps),\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.OPEN],\n setup(props, { emit }) {\n const menuButtonRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const menuId = generateUid('menu');\n const popoverId = generateUid('menu-popover');\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = () => {\n if (showMenu.value) {\n showMenu.value = false;\n menuButtonRef.value.$el.focus();\n emit(BentoMenuEvent.CLOSE);\n }\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = () => {\n isLastElementFocused.value = false;\n openMenu();\n };\n\n const onKeyUp = () => {\n isLastElementFocused.value = true;\n openMenu();\n };\n\n return {\n // Values\n menuButtonRef,\n menuId,\n popoverId,\n showMenu,\n computedMenuWidth,\n isLastElementFocused,\n\n // Methods\n onKeyDown,\n onKeyUp,\n closeMenu,\n toggleShowMenu,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["uuid","_sfc_main$5","_sfc_main$4","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","computed","e","BentoMenuEvent","BentoMenuEvent2","_sfc_main$3","_sfc_main$2","messages","MenuItem","MenuListContainer","subMenuItemListRefLocal","ref","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","_sfc_main$1","SubMenuItemList","menuItemListRef","menuItemListWrapperRef","subMenuItemListRef","showSubMenu","visibleSubMenuIndex","focusedIndex","hasMenuItemsWithIcon","computedData","indent","toggleMenu","item","index","focusRight","focusLeft","menuHeight","subMenuHeight","computedHeight","_sfc_main","BentoButton","BentoPopover","MenuItemList","OptionsVerticalIcon","BentoClickOutsideDirective","BentoPopoverPositions","value","menuButtonRef","showMenu","isLastElementFocused","menuId","generateUid","popoverId","computedMenuWidth","openMenu"],"mappings":";;;;;;;;;;AAKA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;qBCuBAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,GAAA,iBAAAC,GAAA,kBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,eAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;A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AA;AACA,QAAAA,EAAA,gBAAA,GACAuD,EAAA,QAGA3C,EAAA,IAFAiD,EAAA;AAAA,MAGA;AAAA,IA0BA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"menu.js","sources":["../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/options-vertical.vue","../src/components/menu/components/menu-item/menu-item.vue","../src/components/menu/menu.types.ts","../src/components/menu/components/menu-list-container/menu-list-container.vue","../src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../src/components/menu/components/menu-item-list/menu-item-list.vue","../src/components/menu/menu.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" 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\" clip-rule=\"evenodd\"/><path fill=\"#00112C\" fill-rule=\"evenodd\" 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\" clip-rule=\"evenodd\"/><path fill=\"#00112C\" fill-rule=\"evenodd\" 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\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"secondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ secondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n // Types for Vue2 (Object) and Vue3 (Function)\n // TODO: Remove Object when fully migrated to Vue3\n type: [Object, Function] as PropType<BentoMenuItem['icon']>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { BentoButton } from '../button';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n","<template>\n <div class=\"b-menu-list-container\"><slot></slot></div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default defineComponent({\n name: 'bento-menu-list-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li\n v-for=\"(item, index) in computedItems\"\n :key=\"`sub-menu-item-list-item-${index}`\"\n :class=\"[\n { 'b-sub-menu-item-list__back-button': index === 0 },\n { 'b-sub-menu-item-list__first-item': index == 1 },\n ]\"\n role=\"none\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"{ height: computedHeight }\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"toggleMenu(item, index)\"\n />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * 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.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoMenuEvent.CLOSE],\n setup(props, { emit }) {\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n // eslint-disable-next-line no-param-reassign\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = () => menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const toggleMenu = async (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n } else {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n closeMenu();\n }\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n const menuHeight = computed(() => menuItemListWrapperRef?.value?.$el.offsetHeight);\n\n const subMenuHeight = computed(() => subMenuItemListRef?.value?.[0]?.$el?.offsetHeight);\n\n const computedHeight = computed(() => {\n if (showSubMenu.value) {\n return `${subMenuHeight.value}px`;\n }\n return `${menuHeight.value}px`;\n });\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n\n computedData,\n computedHeight,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n toggleMenu,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","<template>\n <div\n v-bento-click-outside-directive=\"closeMenu\"\n class=\"b-menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu\"\n >\n <bento-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"button\"\n :aria-expanded=\"`${showMenu}`\"\n :aria-controls=\"showMenu ? menuId : null\"\n @click=\"toggleShowMenu\"\n >\n <template #iconLeft>\n <slot>\n <options-vertical-icon :title=\"$t('menuButton')\" />\n </slot>\n </template>\n </bento-button>\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n without-space\n >\n <menu-item-list :data=\"data\" :focus-last-element=\"isLastElementFocused\" @close=\"closeMenu\" />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoButton } from '@/components/button';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoMenuItem, MenuItemList } from './components';\n import { BentoMenuButtonProps, BentoMenuEvent } from './menu.types';\n import messages from './messages.json';\n\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-menu',\n components: { BentoButton, BentoPopover, MenuItemList, OptionsVerticalIcon },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n\n /**\n * The position of where the menu should open.\n */\n menuPosition: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth: {\n type: Number,\n default: null,\n },\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoMenuButtonProps>,\n default: () =>\n ({\n variant: 'secondary',\n } as BentoMenuButtonProps),\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.OPEN],\n setup(props, { emit }) {\n const menuButtonRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const menuId = generateUid('menu');\n const popoverId = generateUid('menu-popover');\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = () => {\n if (showMenu.value) {\n showMenu.value = false;\n menuButtonRef.value.$el.focus();\n emit(BentoMenuEvent.CLOSE);\n }\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = () => {\n isLastElementFocused.value = false;\n openMenu();\n };\n\n const onKeyUp = () => {\n isLastElementFocused.value = true;\n openMenu();\n };\n\n return {\n // Values\n menuButtonRef,\n menuId,\n popoverId,\n showMenu,\n computedMenuWidth,\n isLastElementFocused,\n\n // Methods\n onKeyDown,\n onKeyUp,\n closeMenu,\n toggleShowMenu,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["uuid","_sfc_main$5","_sfc_main$4","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","computed","e","BentoMenuEvent","BentoMenuEvent2","_sfc_main$3","_sfc_main$2","messages","MenuItem","MenuListContainer","subMenuItemListRefLocal","ref","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","_sfc_main$1","SubMenuItemList","menuItemListRef","menuItemListWrapperRef","subMenuItemListRef","showSubMenu","visibleSubMenuIndex","focusedIndex","hasMenuItemsWithIcon","computedData","indent","toggleMenu","item","index","focusRight","focusLeft","menuHeight","subMenuHeight","computedHeight","_sfc_main","BentoButton","BentoPopover","MenuItemList","OptionsVerticalIcon","BentoClickOutsideDirective","BentoPopoverPositions","value","menuButtonRef","showMenu","isLastElementFocused","menuId","generateUid","popoverId","computedMenuWidth","openMenu"],"mappings":";;;;;;;;;;AAKA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;qBCsBAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,GAAA,iBAAAC,GAAA,kBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,eAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA;AAAA;AAAA,MAIA,MAAA,CAAA,QAAA,QAAA;AAAA,MAGA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AA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AAAA,EACA,MAAAJ,GAAA,EAAA,MAAAC,EAAA,GAAA;AAEA,UAAAwD,IAAA7C,EAAA,IAAA,GACA8C,IAAA9C,EAAA,EAAA,GACA+C,IAAA/C,EAAA,EAAA,GACAgD,IAAAC,EAAA,MAAA,GACAC,IAAAD,EAAA,cAAA,GAEAE,IAAA7D,EAAA,MAAAF,EAAA,YAAA,EAAA,OAAA,GAAAA,EAAA,cAAA,IAAA,IAAA,GAEAgE,IAAA,MAAA;AACA,MAAAN,EAAA,QAAA,IACAzD,EAAAG,EAAA,IAAA;AAAA,IAAA,GAGAW,IAAA,MAAA;AACA,MAAA2C,EAAA,UACAA,EAAA,QAAA,IACAD,EAAA,MAAA,IAAA,MAAA,GACAxD,EAAAG,EAAA,KAAA;AAAA,IACA;AAsBA,WAAA;AAAA;AAAA,MAAA,eAAAqD;AAAA,MAEA,QAAAG;AAAA,MACA,WAAAE;AAAA,MACA,UAAAJ;AAAA,MACA,mBAAAK;AAAA,MACA,sBAAAJ;AAAA;AAAA,MACA,WAjBA,MAAA;AACA,QAAAA,EAAA,QAAA,IACAK,EAAA;AAAA,MAAA;AAAA,MAkBA,SAfA,MAAA;AACA,QAAAL,EAAA,QAAA,IACAK,EAAA;AAAA,MAAA;AAAA,MAcA,WAAAjD;AAAA,MACA,gBA/BA,CAAAZ,MAAA;AACA,QAAAA,EAAA,gBAAA,GACAuD,EAAA,QAGA3C,EAAA,IAFAiD,EAAA;AAAA,MAGA;AAAA,IA0BA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/dist/modal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as _, onMounted as C, toRefs as M, computed as f, useAttrs as h, watch as E } from "vue";
|
|
2
|
-
import { f as A, b as p, e as r, d as u, c as w, B as y, a as
|
|
2
|
+
import { f as A, b as p, e as r, d as u, c as w, B as y, a as B } from "./chunks/base-modal.f462dac0.js";
|
|
3
3
|
import { u as v } from "./chunks/use-has-slot.6052d56a.js";
|
|
4
|
-
import { F as x } from "./chunks/footer-actions.
|
|
4
|
+
import { F as x } from "./chunks/footer-actions.ee645663.js";
|
|
5
5
|
import { n as b } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
|
-
import { B } from "./chunks/button.
|
|
6
|
+
import { B as S } from "./chunks/button.38099670.js";
|
|
7
7
|
import { u as T } from "./chunks/i18n.155748d6.js";
|
|
8
8
|
import { BentoButtonActions as k } from "./button.js";
|
|
9
9
|
const N = _({
|
|
@@ -246,19 +246,19 @@ const P = V.exports, $ = {
|
|
|
246
246
|
n(r.CLOSE_MODAL);
|
|
247
247
|
}, m = () => {
|
|
248
248
|
c();
|
|
249
|
-
},
|
|
249
|
+
}, O = f(() => [
|
|
250
250
|
{
|
|
251
251
|
title: l("okButtonText"),
|
|
252
252
|
event: m,
|
|
253
|
-
variant:
|
|
253
|
+
variant: S.SECONDARY
|
|
254
254
|
}
|
|
255
|
-
]),
|
|
255
|
+
]), L = f(() => {
|
|
256
256
|
var g;
|
|
257
257
|
const d = {
|
|
258
258
|
title: "Cancel",
|
|
259
259
|
event: m
|
|
260
260
|
}, i = (g = o == null ? void 0 : o.value) == null ? void 0 : g[0];
|
|
261
|
-
return a.value === u.DESTRUCTIVE ? i.critical = !0 : a.value === u.INFO && (i.variant =
|
|
261
|
+
return a.value === u.DESTRUCTIVE ? i.critical = !0 : a.value === u.INFO && (i.variant = S.SECONDARY), [i, d];
|
|
262
262
|
}), D = f(() => ({
|
|
263
263
|
[`b-modal-dialog--${a.value}`]: a.value
|
|
264
264
|
}));
|
|
@@ -276,8 +276,8 @@ const P = V.exports, $ = {
|
|
|
276
276
|
throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
|
|
277
277
|
}), {
|
|
278
278
|
// Values
|
|
279
|
-
dialogActions:
|
|
280
|
-
acknowledgementDialogActions:
|
|
279
|
+
dialogActions: L,
|
|
280
|
+
acknowledgementDialogActions: O,
|
|
281
281
|
// Methods
|
|
282
282
|
onCloseModal: c,
|
|
283
283
|
onCloseActionButton: m,
|
|
@@ -341,6 +341,13 @@ const G = j.exports, U = 500, K = _({
|
|
|
341
341
|
type: Boolean,
|
|
342
342
|
default: !1
|
|
343
343
|
},
|
|
344
|
+
/**
|
|
345
|
+
* Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
|
|
346
|
+
*/
|
|
347
|
+
initiallyOpen: {
|
|
348
|
+
type: Boolean,
|
|
349
|
+
default: !1
|
|
350
|
+
},
|
|
344
351
|
/**
|
|
345
352
|
* List of actions that will be used to render the buttons.
|
|
346
353
|
* First element in the list will be rendered as "primary".
|
|
@@ -383,8 +390,8 @@ const G = j.exports, U = 500, K = _({
|
|
|
383
390
|
*/
|
|
384
391
|
size: {
|
|
385
392
|
type: String,
|
|
386
|
-
default:
|
|
387
|
-
validator: (e) => Object.values(
|
|
393
|
+
default: B.SMALL,
|
|
394
|
+
validator: (e) => Object.values(B).includes(e)
|
|
388
395
|
},
|
|
389
396
|
/**
|
|
390
397
|
* If provided, manages the padding of the whole modal container
|
|
@@ -478,7 +485,7 @@ const G = j.exports, U = 500, K = _({
|
|
|
478
485
|
});
|
|
479
486
|
var W = function() {
|
|
480
487
|
var t = this, n = t._self._c;
|
|
481
|
-
return t._self._setupProxy, n(t.variant, t._b({ tag: "component", staticClass: "b-modal", attrs: { "is-open": t.isOpen, actions: t.actions }, on: { "close-modal": t.onCloseModal }, scopedSlots: t._u([t.hasSlot("default") ? { key: "default", fn: function() {
|
|
488
|
+
return t._self._setupProxy, n(t.variant, t._b({ tag: "component", staticClass: "b-modal", attrs: { "is-open": t.isOpen, actions: t.actions, "initially-open": t.initiallyOpen }, on: { "close-modal": t.onCloseModal }, scopedSlots: t._u([t.hasSlot("default") ? { key: "default", fn: function() {
|
|
482
489
|
return [t._t("default")];
|
|
483
490
|
}, proxy: !0 } : null, t.hasSlot("content-col-1") ? { key: "content-col-1", fn: function() {
|
|
484
491
|
return [t._t("content-col-1")];
|
|
@@ -504,7 +511,7 @@ export {
|
|
|
504
511
|
u as BentoModalDialogType,
|
|
505
512
|
r as BentoModalEvent,
|
|
506
513
|
w as BentoModalRole,
|
|
507
|
-
|
|
514
|
+
B as BentoModalSize,
|
|
508
515
|
y as BentoModalVariant
|
|
509
516
|
};
|
|
510
517
|
//# sourceMappingURL=modal.js.map
|
package/dist/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, onMounted, PropType } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n export default defineComponent({\n name: 'bento-modal-default',\n components: { BaseModal, FooterActions },\n props: {\n /**\n * Adds a cross icon on the right side of the alert\n */\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n\n return {\n // Methods\n onCloseModal,\n hasSlot,\n };\n },\n });\n</script>\n","<template>\n <base-modal\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\"></bento-button-actions>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, toRefs } from 'vue';\n import { BentoModalDialogType, BentoModalEvent, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n components: { BaseModal, BentoButtonActions },\n props: {\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n /**\n * Text that is displayed in the content section of modal\n */\n content: {\n type: String,\n required: true,\n },\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n const onCloseActionButton = () => {\n onCloseModal();\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error(\n 'Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button'\n );\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n\n return {\n // Values\n dialogActions,\n acknowledgementDialogActions,\n\n // Methods\n onCloseModal,\n onCloseActionButton,\n\n // Styles\n modalDialogConditionalClasses,\n\n // Enums\n BentoModalRole,\n };\n },\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalSize,\n BentoModalVariant,\n } from '@/components/modal/modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n /**\n * Modal is a window that appear over any other page content and focus user attention exclusively on one task or piece of information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-modal',\n components: { BentoModalDefault, BentoModalDialog },\n props: {\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).includes(value),\n },\n\n // Shared Modal Default and Modal Default props\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n default: null,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n // Specific to Modal Default props\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n // Specific to Modal dialog props\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: {\n type: String,\n default: null,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const attrs = useAttrs();\n\n const customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n return {\n onCloseModal,\n customProps,\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n"],"names":["_sfc_main$2","defineComponent","BaseModal","FooterActions","BentoModalColumnLayoutVariant","BentoModalEvent","props","slots","emit","hasSlot","useHasSlot","onCloseModal","onMounted","_sfc_main$1","messages","BentoButtonActions","t","useI18n","actions","dialogType","toRefs","onCloseActionButton","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalRole","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","BentoModalDefault","BentoModalDialog","BentoModalVariant","value","BentoModalSize","attrs","useAttrs","customProps","watch"],"mappings":";;;;;;;;AA0CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA,eAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,M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AH,EAAA,WAAA;AAAA,IAAA;AAKA,WAAAsC;AAAA,MACA,MAAArC,EAAA;AAAA,MACA,MAAA;;AACA,UAAAyB,KAAAH,IAAAtB,EAAA,YAAA,gBAAAsB,EAAA,OAAA,gBAAAG,EAAA,WAAA,aACA,WAAApB,GAAAsB,CAAA;AAAA,MAEA;AAAA,IAAA,GAGA;AAAA,MACA,cAAAtB;AAAA,MACA,aAAA+B;AAAA,MACA,SAAAhC,EAAAH,CAAA;AAAA,IAAA;AAAA,EAEA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, onMounted, PropType } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n export default defineComponent({\n name: 'bento-modal-default',\n components: { BaseModal, FooterActions },\n props: {\n /**\n * Adds a cross icon on the right side of the alert\n */\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n\n return {\n // Methods\n onCloseModal,\n hasSlot,\n };\n },\n });\n</script>\n","<template>\n <base-modal\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\"></bento-button-actions>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, toRefs } from 'vue';\n import { BentoModalDialogType, BentoModalEvent, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n components: { BaseModal, BentoButtonActions },\n props: {\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n /**\n * Text that is displayed in the content section of modal\n */\n content: {\n type: String,\n required: true,\n },\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n const onCloseActionButton = () => {\n onCloseModal();\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error(\n 'Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button'\n );\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n\n return {\n // Values\n dialogActions,\n acknowledgementDialogActions,\n\n // Methods\n onCloseModal,\n onCloseActionButton,\n\n // Styles\n modalDialogConditionalClasses,\n\n // Enums\n BentoModalRole,\n };\n },\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalSize,\n BentoModalVariant,\n } from '@/components/modal/modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n /**\n * Modal is a window that appear over any other page content and focus user attention exclusively on one task or piece of information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-modal',\n components: { BentoModalDefault, BentoModalDialog },\n props: {\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).includes(value),\n },\n\n // Shared Modal Default and Modal Default props\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n default: null,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n // Specific to Modal Default props\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n // Specific to Modal dialog props\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: {\n type: String,\n default: null,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const attrs = useAttrs();\n\n const customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n return {\n onCloseModal,\n customProps,\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n"],"names":["_sfc_main$2","defineComponent","BaseModal","FooterActions","BentoModalColumnLayoutVariant","BentoModalEvent","props","slots","emit","hasSlot","useHasSlot","onCloseModal","onMounted","_sfc_main$1","messages","BentoButtonActions","t","useI18n","actions","dialogType","toRefs","onCloseActionButton","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalRole","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","BentoModalDefault","BentoModalDialog","BentoModalVariant","value","BentoModalSize","attrs","useAttrs","customProps","watch"],"mappings":";;;;;;;;AA0CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA,eAAA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QACA,kBAAAA,EAAA;AAAA,QACA,YAAAA,EAAA;AAAA,QACA,GAAAkC;AAAA,MAAA,IAEA;AAAA,QACA,YAAAlC,EAAA;AAAA,QACA,SAAAA,EAAA;AAAA,QACA,eAAAA,EAAA,iBAAA;AAAA,QACA,iBAAAA,EAAA;AAAA,QACA,GAAAkC;AAAA,MACA;AAAA,IAAA,GAGA7B,IAAA,MAAA;AACA,MAAAH,EAAAH,EAAA,WAAA;AAAA,IAAA;AAKA,WAAAsC;AAAA,MACA,MAAArC,EAAA;AAAA,MACA,MAAA;;AACA,UAAAyB,KAAAH,IAAAtB,EAAA,YAAA,gBAAAsB,EAAA,OAAA,gBAAAG,EAAA,WAAA,aACA,WAAApB,GAAAsB,CAAA;AAAA,MAEA;AAAA,IAAA,GAGA;AAAA,MACA,cAAAtB;AAAA,MACA,aAAA+B;AAAA,MACA,SAAAhC,EAAAH,CAAA;AAAA,IAAA;AAAA,EAEA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/pagination.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as _, ref as C, computed as i, toRefs as w } from "vue";
|
|
2
2
|
import { u as N } from "./chunks/aria-label.ac9651a5.js";
|
|
3
|
-
import { B as P } from "./chunks/index.
|
|
4
|
-
import { B as b } from "./chunks/dropdown.
|
|
3
|
+
import { B as P } from "./chunks/index.74da0d41.js";
|
|
4
|
+
import { B as b } from "./chunks/dropdown.5d22958c.js";
|
|
5
5
|
import { g as T } from "./chunks/unique-id.a2a2b458.js";
|
|
6
6
|
import { g as y, a as x } from "./chunks/i18n.155748d6.js";
|
|
7
7
|
import { n as r } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
|
-
import { a as S } from "./chunks/button.
|
|
9
|
-
import "./assets/
|
|
8
|
+
import { a as S } from "./chunks/button.38099670.js";
|
|
9
|
+
import "./assets/index37.css";
|
|
10
10
|
const L = {
|
|
11
11
|
"en-US": {
|
|
12
12
|
showingItems: "Showing {itemCount} items",
|