@adyen/bento-vue3 1.87.1 → 1.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +127 -66
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/chunks/action-bar.BS2cJzG_.js +355 -0
- package/dist/chunks/action-bar.BS2cJzG_.js.map +1 -0
- package/dist/chunks/{code-snippet.Dl1MEedz.js → code-snippet.CJDFfbit.js} +2 -2
- package/dist/chunks/{code-snippet.Dl1MEedz.js.map → code-snippet.CJDFfbit.js.map} +1 -1
- package/dist/chunks/{data-grid.DKys-Nai.js → data-grid.CWop1cFU.js} +412 -405
- package/dist/chunks/data-grid.CWop1cFU.js.map +1 -0
- package/dist/chunks/{date-picker.D5B_SECc.js → date-picker.BtNEBZfS.js} +11 -11
- package/dist/chunks/{date-picker.D5B_SECc.js.map → date-picker.BtNEBZfS.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CHq6WwCb.js → date-range-picker.DVpgkLuA.js} +21 -21
- package/dist/chunks/{date-range-picker.CHq6WwCb.js.map → date-range-picker.DVpgkLuA.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.CwSzUwa7.js → dropdown-tag.DyKf9OvB.js} +2 -2
- package/dist/chunks/{dropdown-tag.CwSzUwa7.js.map → dropdown-tag.DyKf9OvB.js.map} +1 -1
- package/dist/chunks/{dropdown.Bdw2B-Cw.js → dropdown.BXbfqIpi.js} +179 -178
- package/dist/chunks/dropdown.BXbfqIpi.js.map +1 -0
- package/dist/chunks/{filter-bar.CuN1cxZZ.js → filter-bar.l5_cF2g4.js} +7 -7
- package/dist/chunks/{filter-bar.CuN1cxZZ.js.map → filter-bar.l5_cF2g4.js.map} +1 -1
- package/dist/chunks/{header-with-views.BwhK4MPe.js → header-with-views.RTgwVY-Y.js} +2 -2
- package/dist/chunks/{header-with-views.BwhK4MPe.js.map → header-with-views.RTgwVY-Y.js.map} +1 -1
- package/dist/chunks/{input-field-password.CKhqGBVB.js → input-field-password.DEWVmJBO.js} +3 -3
- package/dist/chunks/{input-field-password.CKhqGBVB.js.map → input-field-password.DEWVmJBO.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.Cailj_71.js → input-field-phone-number.CnCDyXmY.js} +3 -3
- package/dist/chunks/{input-field-phone-number.Cailj_71.js.map → input-field-phone-number.CnCDyXmY.js.map} +1 -1
- package/dist/chunks/{input-field.DqXVoKpy.js → input-field.BHdMoXK2.js} +2 -2
- package/dist/chunks/{input-field.DqXVoKpy.js.map → input-field.BHdMoXK2.js.map} +1 -1
- package/dist/chunks/{pagination.CqCd5JCe.js → pagination.DWbONyCn.js} +2 -2
- package/dist/chunks/{pagination.CqCd5JCe.js.map → pagination.DWbONyCn.js.map} +1 -1
- package/dist/chunks/{radio-group.v8mDVZ-o.js → radio-group.DEYzF6o7.js} +2 -2
- package/dist/chunks/{radio-group.v8mDVZ-o.js.map → radio-group.DEYzF6o7.js.map} +1 -1
- package/dist/chunks/{radio-input.DektLjN4.js → radio-input.FC4PVCHr.js} +36 -34
- package/dist/chunks/radio-input.FC4PVCHr.js.map +1 -0
- package/dist/chunks/{search-bar.DGpLNVng.js → search-bar.Dzrc_qhy.js} +3 -3
- package/dist/chunks/{search-bar.DGpLNVng.js.map → search-bar.Dzrc_qhy.js.map} +1 -1
- package/dist/chunks/{secondary-nav.l_60nnXA.js → secondary-nav.D2Llqw3y.js} +2 -2
- package/dist/chunks/{secondary-nav.l_60nnXA.js.map → secondary-nav.D2Llqw3y.js.map} +1 -1
- package/dist/chunks/{selection-card-group.BuA6CLom.js → selection-card-group.B3LCxON_.js} +2 -2
- package/dist/chunks/{selection-card-group.BuA6CLom.js.map → selection-card-group.B3LCxON_.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +2 -2
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +18 -18
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/chunks/action-bar.Ho_fXeXK.js +0 -209
- package/dist/chunks/action-bar.Ho_fXeXK.js.map +0 -1
- package/dist/chunks/data-grid.DKys-Nai.js.map +0 -1
- package/dist/chunks/dropdown.Bdw2B-Cw.js.map +0 -1
- package/dist/chunks/radio-input.DektLjN4.js.map +0 -1
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { defineComponent as W, computed as i, ref as _, toRefs as K, watch as g, provide as M, nextTick as f, openBlock as c, createBlock as b, Transition as z, withCtx as B, createElementVNode as N, unref as a, normalizeClass as D, createElementBlock as C, createVNode as y, createCommentVNode as J, Fragment as I, createTextVNode as T, toDisplayString as A } from "vue";
|
|
2
|
-
import { B as Z } from "./button.C6t9_lzm.js";
|
|
3
|
-
import { B as j } from "./typography.B3J6_tYk.js";
|
|
4
|
-
import { B as Y } from "./button-actions-with-menu.Tba1ME79.js";
|
|
5
|
-
import { C as $ } from "./cross.CCHdi6v3.js";
|
|
6
|
-
import { u as q } from "./index.B875RXHM.js";
|
|
7
|
-
import { u as H } from "./index.Dppy4qHk.js";
|
|
8
|
-
import { P as Q, B as X } from "./button-actions.BYBpjNqy.js";
|
|
9
|
-
import { _ as ee } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
10
|
-
import "../assets/action-bar.css";
|
|
11
|
-
const O = {
|
|
12
|
-
"en-US": {
|
|
13
|
-
actionBar: "Action bar",
|
|
14
|
-
cancel: "Cancel",
|
|
15
|
-
close: "Close",
|
|
16
|
-
save: "Save",
|
|
17
|
-
selected: "selected",
|
|
18
|
-
unsavedChanges: "Unsaved changes | unsaved change | unsaved changes"
|
|
19
|
-
},
|
|
20
|
-
"ja-JP": {
|
|
21
|
-
actionBar: "アクションバー",
|
|
22
|
-
cancel: "キャンセル",
|
|
23
|
-
close: "閉じる",
|
|
24
|
-
save: "保存",
|
|
25
|
-
selected: "選択済み",
|
|
26
|
-
unsavedChanges: "保存されていない変更 | 保存されていない変更 | 保存されていない変更"
|
|
27
|
-
},
|
|
28
|
-
"pt-BR": {
|
|
29
|
-
actionBar: "Barra de ação",
|
|
30
|
-
cancel: "Cancelar",
|
|
31
|
-
close: "Fechar",
|
|
32
|
-
save: "Salvar",
|
|
33
|
-
selected: "selecionado",
|
|
34
|
-
unsavedChanges: "Alterações não salvas | alteração não salva | alterações não salvas"
|
|
35
|
-
}
|
|
36
|
-
}, ae = ["aria-label"], te = {
|
|
37
|
-
key: 0,
|
|
38
|
-
class: "b-action-bar__close-button"
|
|
39
|
-
}, ne = {
|
|
40
|
-
i18n: { messages: O }
|
|
41
|
-
}, oe = /* @__PURE__ */ W({
|
|
42
|
-
...ne,
|
|
43
|
-
__name: "action-bar",
|
|
44
|
-
props: {
|
|
45
|
-
/**
|
|
46
|
-
* List of actions that will be used to render the buttons.
|
|
47
|
-
* Required and used for the `default` variant.
|
|
48
|
-
*
|
|
49
|
-
* Each object in the list should have a `title`, an `event` and,
|
|
50
|
-
* optionally, an `icon`.
|
|
51
|
-
*
|
|
52
|
-
* The component will display 4 actions and the hide the rest inside a menu.
|
|
53
|
-
*
|
|
54
|
-
* @see BentoButton for a list of all the other props supported by each button action.
|
|
55
|
-
*/
|
|
56
|
-
actions: {
|
|
57
|
-
type: Array,
|
|
58
|
-
default: () => []
|
|
59
|
-
},
|
|
60
|
-
/**
|
|
61
|
-
* How many actions should be visible outside the menu, cannot be more than 4
|
|
62
|
-
*/
|
|
63
|
-
visibleActions: {
|
|
64
|
-
type: Number,
|
|
65
|
-
default: 4,
|
|
66
|
-
validator: (o) => o > 0 && o <= 4
|
|
67
|
-
},
|
|
68
|
-
/**
|
|
69
|
-
* Use when there are sticky elements at the bottom, like sticky pagination
|
|
70
|
-
*/
|
|
71
|
-
extraBottomSpacing: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: !1
|
|
74
|
-
},
|
|
75
|
-
/**
|
|
76
|
-
* Show how many items are selected.
|
|
77
|
-
* When omitted in the `confirmation` variant, a generic "Unsaved changes" label is displayed.
|
|
78
|
-
*/
|
|
79
|
-
itemCounter: {
|
|
80
|
-
type: Number,
|
|
81
|
-
default: null
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
* Label for the selection, e.g. 'selected'/'changed'
|
|
85
|
-
*/
|
|
86
|
-
selectionLabel: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: null
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* Variant for the action bar
|
|
92
|
-
* @values default, confirmation
|
|
93
|
-
*/
|
|
94
|
-
variant: {
|
|
95
|
-
type: String,
|
|
96
|
-
default: "default"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
emits: ["close", "cancel", "save"],
|
|
100
|
-
setup(o, { emit: k }) {
|
|
101
|
-
const n = o, m = k, { t: l, tc: h, n: P } = q({ messages: O }), V = i(() => n.selectionLabel ? n.selectionLabel : l("selected")), u = _(null), { extraBottomSpacing: w, visibleActions: x } = K(n), { width: v } = H(), e = _(null), p = _(null), r = i(() => n.variant === "confirmation");
|
|
102
|
-
g(
|
|
103
|
-
() => x.value,
|
|
104
|
-
(t) => {
|
|
105
|
-
p.value = t <= 4 ? t : 4, e.value = p.value;
|
|
106
|
-
},
|
|
107
|
-
{ immediate: !0 }
|
|
108
|
-
);
|
|
109
|
-
const R = i(() => ({
|
|
110
|
-
"b-action-bar--extra-spacing": w.value,
|
|
111
|
-
"b-action-bar--confirmation": r.value
|
|
112
|
-
}));
|
|
113
|
-
M(Q, 7);
|
|
114
|
-
const F = i(() => {
|
|
115
|
-
const t = n.actions.map((L) => ({
|
|
116
|
-
...L,
|
|
117
|
-
variant: "secondary"
|
|
118
|
-
})), s = t.slice(0, e.value).reverse(), d = t.slice(e.value);
|
|
119
|
-
return [...s, ...d];
|
|
120
|
-
}), U = i(() => [
|
|
121
|
-
{
|
|
122
|
-
title: l("save"),
|
|
123
|
-
event: () => m("save")
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
title: l("cancel"),
|
|
127
|
-
variant: "secondary",
|
|
128
|
-
event: () => m("cancel")
|
|
129
|
-
}
|
|
130
|
-
]), G = i(() => n.itemCounter == null || n.itemCounter < 1), E = async () => {
|
|
131
|
-
await f(), v.value > u.value.clientWidth + 32 + 100 && e.value < p.value && (e.value += 1, E());
|
|
132
|
-
}, S = async () => {
|
|
133
|
-
await f(), v.value < u.value.clientWidth + 32 && e.value > 0 && (e.value -= 1, S());
|
|
134
|
-
};
|
|
135
|
-
return g(
|
|
136
|
-
() => v.value,
|
|
137
|
-
async (t, s) => {
|
|
138
|
-
if (await f(), !u.value)
|
|
139
|
-
return;
|
|
140
|
-
const d = t > s;
|
|
141
|
-
v.value < 500 ? e.value = 0 : d ? E() : S();
|
|
142
|
-
},
|
|
143
|
-
{ immediate: !0 }
|
|
144
|
-
), (t, s) => (c(), b(z, {
|
|
145
|
-
name: "b-action-bar__animation",
|
|
146
|
-
appear: ""
|
|
147
|
-
}, {
|
|
148
|
-
default: B(() => [
|
|
149
|
-
N("section", {
|
|
150
|
-
class: D(["b-action-bar", R.value]),
|
|
151
|
-
"aria-label": a(l)("actionBar")
|
|
152
|
-
}, [
|
|
153
|
-
N("div", {
|
|
154
|
-
ref_key: "actionBar",
|
|
155
|
-
ref: u,
|
|
156
|
-
class: "b-action-bar__container"
|
|
157
|
-
}, [
|
|
158
|
-
r.value ? J("", !0) : (c(), C("div", te, [
|
|
159
|
-
y(a(Z), {
|
|
160
|
-
variant: "tertiary",
|
|
161
|
-
inverse: "",
|
|
162
|
-
"aria-label": a(l)("close"),
|
|
163
|
-
onClick: s[0] || (s[0] = (d) => m("close"))
|
|
164
|
-
}, {
|
|
165
|
-
iconLeft: B(() => [
|
|
166
|
-
y(a($), { "aria-hidden": !0 })
|
|
167
|
-
]),
|
|
168
|
-
_: 1
|
|
169
|
-
}, 8, ["aria-label"])
|
|
170
|
-
])),
|
|
171
|
-
y(a(j), {
|
|
172
|
-
el: "span",
|
|
173
|
-
stronger: "",
|
|
174
|
-
class: "b-action-bar__selection"
|
|
175
|
-
}, {
|
|
176
|
-
default: B(() => [
|
|
177
|
-
r.value && G.value ? (c(), C(I, { key: 0 }, [
|
|
178
|
-
T(A(a(h)("unsavedChanges", 0)), 1)
|
|
179
|
-
], 64)) : (c(), C(I, { key: 1 }, [
|
|
180
|
-
T(A(a(P)(o.itemCounter)) + " " + A(r.value ? a(h)("unsavedChanges", o.itemCounter) : V.value), 1)
|
|
181
|
-
], 64))
|
|
182
|
-
]),
|
|
183
|
-
_: 1
|
|
184
|
-
}),
|
|
185
|
-
r.value ? (c(), b(a(X), {
|
|
186
|
-
key: 1,
|
|
187
|
-
actions: U.value,
|
|
188
|
-
class: "b-action-bar__actions",
|
|
189
|
-
inverse: ""
|
|
190
|
-
}, null, 8, ["actions"])) : (c(), b(Y, {
|
|
191
|
-
key: 2,
|
|
192
|
-
actions: F.value,
|
|
193
|
-
class: "b-action-bar__actions",
|
|
194
|
-
"displayed-actions": e.value,
|
|
195
|
-
"menu-position": "top-end",
|
|
196
|
-
"disable-responsive-behavior": "",
|
|
197
|
-
inverse: ""
|
|
198
|
-
}, null, 8, ["actions", "displayed-actions"]))
|
|
199
|
-
], 512)
|
|
200
|
-
], 10, ae)
|
|
201
|
-
]),
|
|
202
|
-
_: 1
|
|
203
|
-
}));
|
|
204
|
-
}
|
|
205
|
-
}), Be = /* @__PURE__ */ ee(oe, [["__scopeId", "data-v-d8fbdc77"]]);
|
|
206
|
-
export {
|
|
207
|
-
Be as B
|
|
208
|
-
};
|
|
209
|
-
//# sourceMappingURL=action-bar.Ho_fXeXK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-bar.Ho_fXeXK.js","sources":["../../../vue2/src/components/action-bar/action-bar.vue"],"sourcesContent":["<template>\n <Transition name=\"b-action-bar__animation\" appear>\n <section class=\"b-action-bar\" :class=\"conditionalClasses\" :aria-label=\"t('actionBar')\">\n <div ref=\"actionBar\" class=\"b-action-bar__container\">\n <div v-if=\"!isConfirmationVariant\" class=\"b-action-bar__close-button\">\n <bento-button variant=\"tertiary\" inverse :aria-label=\"t('close')\" @click=\"emit('close')\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n <bento-typography el=\"span\" stronger class=\"b-action-bar__selection\">\n <template v-if=\"isConfirmationVariant && noItemCounter\">\n {{ tc('unsavedChanges', 0) }}\n </template>\n <template v-else>\n {{ n(itemCounter) }}\n {{ isConfirmationVariant ? tc('unsavedChanges', itemCounter) : label }}\n </template>\n </bento-typography>\n <bento-button-actions\n v-if=\"isConfirmationVariant\"\n :actions=\"confirmationActions\"\n class=\"b-action-bar__actions\"\n inverse\n />\n <button-actions-with-menu\n v-else\n :actions=\"actionsInternal\"\n class=\"b-action-bar__actions\"\n :displayed-actions=\"internalDisplayedActions\"\n menu-position=\"top-end\"\n disable-responsive-behavior\n inverse\n />\n </div>\n </section>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, type PropType, provide, ref, toRefs, watch } from 'vue';\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { type BentoActionBarVariant } from '@/components/action-bar/action-bar.types';\n import ButtonActionsWithMenu from '@/components/internal/button-actions-with-menu/button-actions-with-menu.vue';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { useWindowSize } from '@vueuse/core';\n\n import messages from './messages.json';\n import { POPOVER_OFFSET_INJECTION_KEY } from '@/components/popover/popover.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // Constants\n const AVERAGE_BUTTON_SIZE = 100;\n const MENU_OFFSET = 7;\n const RESPONSIVE_BREAKPOINT = 500;\n const SPACING = 32;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Required and used for the `default` variant.\n *\n * Each object in the list should have a `title`, an `event` and,\n * optionally, an `icon`.\n *\n * The component will display 4 actions and the hide the rest inside a menu.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: () => [],\n },\n /**\n * How many actions should be visible outside the menu, cannot be more than 4\n */\n visibleActions: {\n type: Number,\n default: 4,\n validator: (value: number) => value > 0 && value <= 4,\n },\n /**\n * Use when there are sticky elements at the bottom, like sticky pagination\n */\n extraBottomSpacing: {\n type: Boolean,\n default: false,\n },\n /**\n * Show how many items are selected.\n * When omitted in the `confirmation` variant, a generic \"Unsaved changes\" label is displayed.\n */\n itemCounter: {\n type: Number,\n default: null,\n },\n /**\n * Label for the selection, e.g. 'selected'/'changed'\n */\n selectionLabel: {\n type: String,\n default: null,\n },\n /**\n * Variant for the action bar\n * @values default, confirmation\n */\n variant: {\n type: String as PropType<BentoActionBarVariant>,\n default: 'default',\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event emitted when the user click the close button\n */\n (e: 'close'): void;\n (e: 'cancel'): void;\n (e: 'save'): void;\n }>();\n\n const { t, tc, n } = useI18n<{ message: MessageSchema }>({ messages });\n const label = computed(() => (props.selectionLabel ? props.selectionLabel : t('selected')));\n\n // Refs\n const actionBar = ref<HTMLDivElement>(null);\n const { extraBottomSpacing, visibleActions } = toRefs(props);\n const { width } = useWindowSize();\n const internalDisplayedActions = ref(null);\n const internalVisibleActions = ref(null);\n\n const isConfirmationVariant = computed(() => props.variant === 'confirmation');\n\n watch(\n () => visibleActions.value,\n value => {\n internalVisibleActions.value = value <= 4 ? value : 4;\n internalDisplayedActions.value = internalVisibleActions.value;\n },\n { immediate: true }\n );\n\n // Styling\n const conditionalClasses = computed(() => ({\n 'b-action-bar--extra-spacing': extraBottomSpacing.value,\n 'b-action-bar--confirmation': isConfirmationVariant.value,\n }));\n\n // Provide POPOVER_OFFSET_INJECTION_KEY to change the value of the popover offset\n provide(POPOVER_OFFSET_INJECTION_KEY, MENU_OFFSET);\n\n // Manipulate actions array to display as intended\n const actionsInternal = computed(() => {\n // All buttons should be of type secondary in the action bar\n const actions = props.actions.map(action => ({\n ...action,\n variant: 'secondary',\n })) as BentoButtonActionsList;\n // Shown actions should display from left to right in action bar, instead of right to left which is the button actions default\n const shownActions = actions.slice(0, internalDisplayedActions.value).reverse();\n const hiddenActions = actions.slice(internalDisplayedActions.value);\n\n return [...shownActions, ...hiddenActions];\n });\n\n const confirmationActions = computed<BentoButtonActionsList>(() => [\n {\n title: t('save'),\n event: () => emit('save'),\n },\n {\n title: t('cancel'),\n variant: 'secondary',\n event: () => emit('cancel'),\n },\n ]);\n\n const noItemCounter = computed(() => {\n return props.itemCounter == null || props.itemCounter < 1;\n });\n\n // Recursive functions to determine how many actions should be visible/hidden based on the screens width\n const showActions = async () => {\n await nextTick();\n if (\n width.value > actionBar.value.clientWidth + SPACING + AVERAGE_BUTTON_SIZE &&\n internalDisplayedActions.value < internalVisibleActions.value\n ) {\n internalDisplayedActions.value += 1;\n showActions();\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n if (width.value < actionBar.value.clientWidth + SPACING && internalDisplayedActions.value > 0) {\n internalDisplayedActions.value -= 1;\n hideActions();\n }\n };\n\n // Screen width watcher to toggle hidden/visible actions\n watch(\n () => width.value,\n async (newValue, oldValue) => {\n await nextTick();\n if (!actionBar.value) {\n return;\n }\n const isIncreasing = newValue > oldValue;\n if (width.value < RESPONSIVE_BREAKPOINT) {\n internalDisplayedActions.value = 0;\n } else if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Action bar is a floating bar that provides users with quick access to key actions that can be applied to one or multiple items.\n *\n * @example\n * import { BentoActionBar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoActionBar },\n * template: `\n * <bento-action-bar\n * :actions='[\n * {\n * title: 'Delete',\n * critical: true,\n * icon: BinIcon,\n * event: () => true,\n * },\n * {\n * title: 'Edit',\n * icon: EditIcon,\n * event: () => true,\n * }\n * ]'\n * @close=\"closeAction\"\n * :item-counter=\"5\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./action-bar.scss\" />\n"],"names":["__default__","messages","props","__props","emit","__emit","t","tc","n","useI18n","label","computed","actionBar","ref","extraBottomSpacing","visibleActions","toRefs","width","useWindowSize","internalDisplayedActions","internalVisibleActions","isConfirmationVariant","watch","value","conditionalClasses","provide","POPOVER_OFFSET_INJECTION_KEY","actionsInternal","actions","action","shownActions","hiddenActions","confirmationActions","noItemCounter","showActions","nextTick","hideActions","newValue","oldValue","isIncreasing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiQIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtMA,UAAAC,IAAAC,GAwDAC,IAAAC,GASA,EAAA,GAAAC,GAAA,IAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAR,EAAA,CAAA,GACAS,IAAAC,EAAA,M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