@adyen/bento-vue3 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +76 -30
- package/dist/@types/packages/vue2/src/components/country/composables/index.d.ts +0 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +23 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-title/form-layout-title.vue.d.ts +33 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-title/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/form-layout/form-layout.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/form-layout/form-layout.vue.d.ts +33 -0
- package/dist/@types/packages/vue2/src/components/form-layout/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +53 -22
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +51 -44
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +4 -12
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +50 -4
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +5 -3
- package/dist/@types/packages/vue2/src/components/sidepanel/components/sidepanel-page.vue.d.ts +68 -0
- package/dist/@types/packages/vue2/src/components/sidepanel/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.vue.d.ts +46 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/composables/use-form-layout-loading/use-form-layout-loading.d.ts +4 -0
- package/dist/@types/packages/vue2/src/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/utils/ts/dev-environment.d.ts +1 -0
- package/dist/accordion.js +1 -1
- package/dist/alert.js +3 -3
- package/dist/assets/arrow-left.css +1 -0
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/footer-actions.css +1 -0
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -0
- package/dist/assets/index42.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +3 -3
- package/dist/checkbox.js +111 -97
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/arrow-left.cdbcc128.js +30 -0
- package/dist/chunks/arrow-left.cdbcc128.js.map +1 -0
- package/dist/chunks/{base-button.4a56c2fb.js → base-button.20be08da.js} +2 -2
- package/dist/chunks/{base-button.4a56c2fb.js.map → base-button.20be08da.js.map} +1 -1
- package/dist/chunks/{button-actions.a6e541ad.js → button-actions.54e28e75.js} +2 -2
- package/dist/chunks/{button-actions.a6e541ad.js.map → button-actions.54e28e75.js.map} +1 -1
- package/dist/chunks/{button.1f630b6e.js → button.e1c39f66.js} +2 -2
- package/dist/chunks/{button.1f630b6e.js.map → button.e1c39f66.js.map} +1 -1
- package/dist/chunks/{calendar.08885a56.js → calendar.09b683b3.js} +6 -6
- package/dist/chunks/calendar.09b683b3.js.map +1 -0
- package/dist/chunks/{checkbox.cfb8b8df.js → checkbox.a404069b.js} +3 -3
- package/dist/chunks/{checkbox.cfb8b8df.js.map → checkbox.a404069b.js.map} +1 -1
- package/dist/chunks/controls-group.60fb2a86.js +136 -0
- package/dist/chunks/controls-group.60fb2a86.js.map +1 -0
- package/dist/chunks/{copy.1ce0203e.js → copy.2cf5e6c3.js} +3 -3
- package/dist/chunks/{copy.1ce0203e.js.map → copy.2cf5e6c3.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.dd77bb42.js → dropdown-default-textbox.203e747f.js} +54 -51
- package/dist/chunks/dropdown-default-textbox.203e747f.js.map +1 -0
- package/dist/chunks/{dropdown.f9997464.js → dropdown.8b415aac.js} +188 -185
- package/dist/chunks/dropdown.8b415aac.js.map +1 -0
- package/dist/chunks/{error-message.b88bb75a.js → error-message.ddfe8ea5.js} +2 -2
- package/dist/chunks/{error-message.b88bb75a.js.map → error-message.ddfe8ea5.js.map} +1 -1
- package/dist/chunks/footer-actions.0f640f87.js +106 -0
- package/dist/chunks/footer-actions.0f640f87.js.map +1 -0
- package/dist/chunks/form-layout.types.a7a1438d.js +5 -0
- package/dist/chunks/form-layout.types.a7a1438d.js.map +1 -0
- package/dist/chunks/{index.361c61d3.js → index.13949709.js} +2 -2
- package/dist/chunks/{index.361c61d3.js.map → index.13949709.js.map} +1 -1
- package/dist/chunks/index.222d29b0.js +120 -0
- package/dist/chunks/index.222d29b0.js.map +1 -0
- package/dist/chunks/{index.64b7b3cc.js → index.3da90517.js} +6 -6
- package/dist/chunks/{index.64b7b3cc.js.map → index.3da90517.js.map} +1 -1
- package/dist/chunks/{index.96001b1d.js → index.aa34e363.js} +3 -3
- package/dist/chunks/{index.96001b1d.js.map → index.aa34e363.js.map} +1 -1
- package/dist/chunks/{index.b46a5047.js → index.c9225c3b.js} +260 -253
- package/dist/chunks/{index.b46a5047.js.map → index.c9225c3b.js.map} +1 -1
- package/dist/chunks/{index.7dd953ea.js → index.d27367cd.js} +2 -2
- package/dist/chunks/{index.7dd953ea.js.map → index.d27367cd.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.73661a5d.js → listbox-option-tag.5ae8b79b.js} +3 -3
- package/dist/chunks/{listbox-option-tag.73661a5d.js.map → listbox-option-tag.5ae8b79b.js.map} +1 -1
- package/dist/chunks/{listbox.7b5e0eee.js → listbox.0c7c4e5e.js} +339 -339
- package/dist/chunks/listbox.0c7c4e5e.js.map +1 -0
- package/dist/chunks/loading-button.61d8ebe5.js +109 -0
- package/dist/chunks/loading-button.61d8ebe5.js.map +1 -0
- package/dist/chunks/{tooltip.53290a34.js → tooltip.835d9b52.js} +2 -2
- package/dist/chunks/tooltip.835d9b52.js.map +1 -0
- package/dist/chunks/use-form-layout-loading.d03e5d48.js +12 -0
- package/dist/chunks/use-form-layout-loading.d03e5d48.js.map +1 -0
- package/dist/code-snippet.js +6 -6
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +559 -595
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +682 -702
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +82 -75
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +67 -62
- package/dist/dropdown.js.map +1 -1
- package/dist/filter-bar.js +446 -442
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +188 -0
- package/dist/form-layout.js.map +1 -0
- package/dist/header.js +3 -3
- package/dist/index.js +191 -187
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +123 -121
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +6 -6
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +4 -4
- package/dist/modal.js +266 -397
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +4 -4
- package/dist/popper-container.js +2 -2
- package/dist/radio-group.js +127 -124
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +4 -4
- package/dist/sidepanel.js +279 -0
- package/dist/sidepanel.js.map +1 -0
- package/dist/status.js +2 -2
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +7 -7
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +97 -95
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +8 -8
- 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 +1 -1
- package/package.json +14 -7
- package/dist/@types/packages/vue2/src/components/country/composables/useCountryFlag.d.ts +0 -2
- package/dist/chunks/calendar.08885a56.js.map +0 -1
- package/dist/chunks/controls-group.806da9bd.js +0 -75
- package/dist/chunks/controls-group.806da9bd.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.dd77bb42.js.map +0 -1
- package/dist/chunks/dropdown.f9997464.js.map +0 -1
- package/dist/chunks/index.ebf5f6cf.js +0 -119
- package/dist/chunks/index.ebf5f6cf.js.map +0 -1
- package/dist/chunks/listbox.7b5e0eee.js.map +0 -1
- package/dist/chunks/loading-button.426d89b9.js +0 -113
- package/dist/chunks/loading-button.426d89b9.js.map +0 -1
- package/dist/chunks/tooltip.53290a34.js.map +0 -1
package/dist/modal.js
CHANGED
|
@@ -1,370 +1,251 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as
|
|
4
|
-
import { BentoDivider as
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const W = {
|
|
1
|
+
import { defineComponent as $, useAttrs as U, ref as J, computed as m, watch as X, onMounted as G, resolveComponent as f, openBlock as i, createElementBlock as I, createElementVNode as E, normalizeClass as z, withKeys as Z, createVNode as M, withCtx as n, normalizeStyle as P, renderSlot as s, createCommentVNode as h, createBlock as y, mergeProps as V, createSlots as K, toRefs as x, createTextVNode as ee, toDisplayString as oe, resolveDynamicComponent as te } from "vue";
|
|
2
|
+
import { B as ne, a as _ } from "./chunks/button.e1c39f66.js";
|
|
3
|
+
import { B as ae, a as le, b as se } from "./chunks/index.222d29b0.js";
|
|
4
|
+
import { BentoDivider as ie } from "./divider.js";
|
|
5
|
+
import { B as de } from "./chunks/index.13949709.js";
|
|
6
|
+
import { u as k } from "./chunks/use-has-slot.068222e6.js";
|
|
7
|
+
import { u as W } from "./chunks/i18n.6c402773.js";
|
|
8
|
+
import { C as re } from "./chunks/cross.5c36a670.js";
|
|
9
|
+
import { G as ue, a as ce } from "./chunks/grid-layout.a30855ff.js";
|
|
10
|
+
import { _ as N } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
11
|
+
import { F as me } from "./chunks/footer-actions.0f640f87.js";
|
|
12
|
+
import { B as fe, c as ye } from "./chunks/button-actions.54e28e75.js";
|
|
13
|
+
import "./assets/index12.css";
|
|
14
|
+
var w = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(w || {}), O = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(O || {}), B = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(B || {}), T = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(T || {}), g = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(g || {}), p = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(p || {});
|
|
15
|
+
const q = {
|
|
17
16
|
"en-US": {
|
|
18
17
|
ariaLabelFallback: "modal"
|
|
19
18
|
}
|
|
20
|
-
},
|
|
21
|
-
i18n: { messages:
|
|
19
|
+
}, pe = $({
|
|
20
|
+
i18n: { messages: q },
|
|
22
21
|
name: "base-modal",
|
|
23
|
-
components: { CrossIcon:
|
|
22
|
+
components: { CrossIcon: re, BentoTypography: ae, BentoButton: ne, BentoDivider: ie, BentoFocusTrap: de, GridLayout: ue },
|
|
24
23
|
props: {
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
25
|
+
* 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.
|
|
27
26
|
*/
|
|
28
|
-
|
|
27
|
+
columnsSize: {
|
|
29
28
|
type: String,
|
|
30
|
-
default:
|
|
29
|
+
default: B.SMALLER
|
|
31
30
|
},
|
|
32
31
|
/**
|
|
33
|
-
* If
|
|
32
|
+
* If provided, manages the padding of the whole modal container
|
|
34
33
|
*/
|
|
35
|
-
|
|
36
|
-
type: Boolean,
|
|
37
|
-
required: !0
|
|
38
|
-
},
|
|
34
|
+
customPadding: { type: String, default: null },
|
|
39
35
|
/**
|
|
40
36
|
* Hides a cross icon on the right side of the title
|
|
41
37
|
*/
|
|
42
|
-
hideCloseButton: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
required: !0
|
|
45
|
-
},
|
|
38
|
+
hideCloseButton: { type: Boolean, required: !0 },
|
|
46
39
|
/**
|
|
47
|
-
*
|
|
40
|
+
* Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
|
|
48
41
|
*/
|
|
49
|
-
|
|
50
|
-
type: String,
|
|
51
|
-
default: null
|
|
52
|
-
},
|
|
42
|
+
initiallyOpen: { type: Boolean, default: !1 },
|
|
53
43
|
/**
|
|
54
|
-
* If
|
|
44
|
+
* If set to true, it allows the modal to be closed by clicking outside of it
|
|
55
45
|
*/
|
|
56
|
-
|
|
57
|
-
type: Boolean,
|
|
58
|
-
default: !1
|
|
59
|
-
},
|
|
46
|
+
isDismissible: { type: Boolean, required: !0 },
|
|
60
47
|
/**
|
|
61
|
-
*
|
|
48
|
+
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
62
49
|
*/
|
|
63
|
-
|
|
64
|
-
type: String,
|
|
65
|
-
default: S.SMALLER
|
|
66
|
-
},
|
|
50
|
+
isOpen: { type: Boolean, required: !0 },
|
|
67
51
|
/**
|
|
68
|
-
*
|
|
52
|
+
* Defines whether the modal will be an alert modal
|
|
69
53
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
54
|
+
modalRole: { type: String, default: T.DIALOG },
|
|
55
|
+
/**
|
|
56
|
+
* Allows the inner elments to overflow the dialog
|
|
57
|
+
*/
|
|
58
|
+
overflowVisible: { type: Boolean, default: !1 },
|
|
74
59
|
/**
|
|
75
60
|
* Sets the width of the modal
|
|
76
61
|
*/
|
|
77
62
|
size: {
|
|
78
63
|
type: String,
|
|
79
|
-
default:
|
|
64
|
+
default: O.SMALL
|
|
80
65
|
},
|
|
81
66
|
/**
|
|
82
|
-
*
|
|
67
|
+
* If provided, renders the modal's content in a two-column layout an wth dividers separating its content
|
|
83
68
|
*/
|
|
84
|
-
|
|
85
|
-
type: Boolean,
|
|
86
|
-
default: !1
|
|
87
|
-
},
|
|
88
|
-
overflowVisible: {
|
|
89
|
-
type: Boolean,
|
|
90
|
-
default: !1
|
|
91
|
-
}
|
|
69
|
+
withColumnLayout: { type: Boolean, default: !1 }
|
|
92
70
|
},
|
|
93
|
-
emits: [
|
|
94
|
-
setup(e, { slots:
|
|
95
|
-
const { t:
|
|
96
|
-
|
|
97
|
-
), B = f(() => {
|
|
98
|
-
if (!s.value)
|
|
71
|
+
emits: [p.CLOSE_MODAL],
|
|
72
|
+
setup(e, { slots: l, emit: r }) {
|
|
73
|
+
const { t: a } = W({ messages: q }), u = U(), o = k(l), t = J(null), c = m(() => {
|
|
74
|
+
if (!e.customPadding)
|
|
99
75
|
return {};
|
|
100
|
-
const
|
|
101
|
-
paddingLeft:
|
|
102
|
-
paddingRight:
|
|
103
|
-
},
|
|
104
|
-
return
|
|
105
|
-
header: { ...
|
|
106
|
-
content:
|
|
107
|
-
actions: { ...
|
|
76
|
+
const A = {
|
|
77
|
+
paddingLeft: e.customPadding,
|
|
78
|
+
paddingRight: e.customPadding
|
|
79
|
+
}, R = { ...A, paddingTop: void 0, paddingBottom: void 0 };
|
|
80
|
+
return o("default") || (R.paddingTop = e.customPadding), o("actions") || (R.paddingBottom = e.customPadding), {
|
|
81
|
+
header: { ...A, paddingTop: e.customPadding },
|
|
82
|
+
content: R,
|
|
83
|
+
actions: { ...A, paddingBottom: e.customPadding }
|
|
108
84
|
};
|
|
109
|
-
}),
|
|
110
|
-
label
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, ne = f(() => ({
|
|
85
|
+
}), C = m(
|
|
86
|
+
() => u["aria-label"] ?? a("ariaLabelFallback")
|
|
87
|
+
), b = m(() => e.withColumnLayout && e.size === O.LARGE), L = () => {
|
|
88
|
+
t.value.showModal();
|
|
89
|
+
}, S = () => {
|
|
90
|
+
r(p.CLOSE_MODAL);
|
|
91
|
+
}, d = () => {
|
|
92
|
+
t.value.close(), S();
|
|
93
|
+
}, v = () => {
|
|
94
|
+
d();
|
|
95
|
+
}, D = ({ target: A }) => {
|
|
96
|
+
A && A.tagName === T.DIALOG.toUpperCase() && d();
|
|
97
|
+
}, Y = m(() => ({
|
|
123
98
|
[`b-modal-base__container--${e.size}`]: e.size,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
})),
|
|
128
|
-
"b-modal-base__content--column-layout":
|
|
129
|
-
"b-modal-base__content--with-header":
|
|
130
|
-
"b-modal-base__content--with-actions":
|
|
131
|
-
})),
|
|
132
|
-
return
|
|
133
|
-
() => [
|
|
99
|
+
"b-modal-base__container--visible": e.isOpen,
|
|
100
|
+
"b-modal-base__container--overflow-visible": e.overflowVisible,
|
|
101
|
+
"b-modal-base__container--column-layout": b.value
|
|
102
|
+
})), H = m(() => ({
|
|
103
|
+
"b-modal-base__content--column-layout": b.value,
|
|
104
|
+
"b-modal-base__content--with-header": o("default"),
|
|
105
|
+
"b-modal-base__content--with-actions": o("actions")
|
|
106
|
+
})), Q = m(() => e.columnsSize === B.SMALLER ? [{ small: 4, medium: 4, large: 4 }] : e.columnsSize === B.BIGGER ? [{ small: 8, medium: 8, large: 8 }] : [{ small: 6, medium: 6, large: 6 }]);
|
|
107
|
+
return X(
|
|
108
|
+
() => [e.isOpen, t.value],
|
|
134
109
|
() => {
|
|
135
|
-
|
|
110
|
+
e.isOpen && t.value ? L() : t.value && d();
|
|
136
111
|
},
|
|
137
112
|
{ immediate: !0 }
|
|
138
|
-
),
|
|
139
|
-
|
|
113
|
+
), G(() => {
|
|
114
|
+
e.isOpen && t.value && L();
|
|
140
115
|
}), {
|
|
141
116
|
// Refs
|
|
142
|
-
modal:
|
|
143
|
-
computedAriaLabel:
|
|
117
|
+
modal: t,
|
|
118
|
+
computedAriaLabel: C,
|
|
144
119
|
// Handling the state
|
|
145
|
-
openModal:
|
|
146
|
-
closeModalOnClickOutside:
|
|
120
|
+
openModal: L,
|
|
121
|
+
closeModalOnClickOutside: D,
|
|
147
122
|
// Methods
|
|
148
|
-
onCloseButtonClick:
|
|
149
|
-
hasSlot:
|
|
150
|
-
emitCloseEvent:
|
|
123
|
+
onCloseButtonClick: v,
|
|
124
|
+
hasSlot: o,
|
|
125
|
+
emitCloseEvent: S,
|
|
126
|
+
t: a,
|
|
151
127
|
// Styles
|
|
152
|
-
modalConditionalClasses:
|
|
153
|
-
modalContentConditionalClasses:
|
|
154
|
-
customPaddingStyles:
|
|
155
|
-
hasColumnLayout:
|
|
156
|
-
computedColumnWidth:
|
|
128
|
+
modalConditionalClasses: Y,
|
|
129
|
+
modalContentConditionalClasses: H,
|
|
130
|
+
customPaddingStyles: c,
|
|
131
|
+
hasColumnLayout: b,
|
|
132
|
+
computedColumnWidth: Q,
|
|
157
133
|
// Enums
|
|
158
|
-
BentoButtonVariant:
|
|
159
|
-
BentoTypographyElement:
|
|
160
|
-
BentoTypographyVariant:
|
|
161
|
-
GridLayoutContainerType:
|
|
134
|
+
BentoButtonVariant: _,
|
|
135
|
+
BentoTypographyElement: le,
|
|
136
|
+
BentoTypographyVariant: se,
|
|
137
|
+
GridLayoutContainerType: ce
|
|
162
138
|
};
|
|
163
139
|
}
|
|
164
140
|
});
|
|
165
|
-
const
|
|
141
|
+
const be = { class: "b-modal-base" }, ve = ["role", "aria-label", "open"], ge = { class: "b-modal-base__wrapper" }, Ce = { class: "b-modal-base__header" }, Le = {
|
|
166
142
|
"aria-label": "modal actions",
|
|
167
143
|
class: "b-modal-base__actions"
|
|
168
144
|
};
|
|
169
|
-
function
|
|
170
|
-
const
|
|
171
|
-
return
|
|
172
|
-
|
|
145
|
+
function he(e, l, r, a, u, o) {
|
|
146
|
+
const t = f("bento-typography"), c = f("cross-icon"), C = f("bento-button"), b = f("bento-divider"), L = f("grid-layout"), S = f("bento-focus-trap");
|
|
147
|
+
return i(), I("div", be, [
|
|
148
|
+
E("dialog", {
|
|
173
149
|
ref: "modal",
|
|
174
150
|
role: e.modalRole,
|
|
175
151
|
"aria-label": e.computedAriaLabel,
|
|
176
|
-
class:
|
|
152
|
+
class: z(["b-modal-base__container", e.modalConditionalClasses]),
|
|
177
153
|
open: e.initiallyOpen,
|
|
178
|
-
onClick:
|
|
179
|
-
onKeydown:
|
|
154
|
+
onClick: l[0] || (l[0] = (d) => e.isDismissible && e.closeModalOnClickOutside(d)),
|
|
155
|
+
onKeydown: l[1] || (l[1] = Z((...d) => e.emitCloseEvent && e.emitCloseEvent(...d), ["esc"]))
|
|
180
156
|
}, [
|
|
181
|
-
M(
|
|
182
|
-
default:
|
|
183
|
-
|
|
184
|
-
e.hasSlot("default") || !e.hideCloseButton ? (
|
|
157
|
+
M(S, null, {
|
|
158
|
+
default: n(() => [
|
|
159
|
+
E("div", ge, [
|
|
160
|
+
e.hasSlot("default") || !e.hideCloseButton ? (i(), I("div", {
|
|
185
161
|
key: 0,
|
|
186
162
|
class: "b-modal-base__header-container",
|
|
187
|
-
style:
|
|
163
|
+
style: P(e.customPaddingStyles.header)
|
|
188
164
|
}, [
|
|
189
|
-
|
|
190
|
-
M(
|
|
165
|
+
E("div", Ce, [
|
|
166
|
+
M(t, {
|
|
191
167
|
class: "b-modal-base__title",
|
|
192
168
|
"aria-label": "base modal title",
|
|
193
169
|
el: e.BentoTypographyElement.SPAN,
|
|
194
170
|
variant: e.BentoTypographyVariant.TITLE,
|
|
195
171
|
stronger: ""
|
|
196
172
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
e.hasSlot("default") ?
|
|
173
|
+
default: n(() => [
|
|
174
|
+
e.hasSlot("default") ? s(e.$slots, "default", { key: 0 }, void 0, !0) : h("", !0)
|
|
199
175
|
]),
|
|
200
176
|
_: 3
|
|
201
177
|
}, 8, ["el", "variant"]),
|
|
202
|
-
e.hideCloseButton ?
|
|
178
|
+
e.hideCloseButton ? h("", !0) : (i(), y(C, {
|
|
203
179
|
key: 0,
|
|
204
180
|
class: "b-modal-base__close-button",
|
|
205
181
|
variant: e.BentoButtonVariant.TERTIARY,
|
|
206
182
|
type: "button",
|
|
207
183
|
onClick: e.onCloseButtonClick
|
|
208
184
|
}, {
|
|
209
|
-
default:
|
|
210
|
-
M(
|
|
185
|
+
default: n(() => [
|
|
186
|
+
M(c, { "svg-title": "close" })
|
|
211
187
|
]),
|
|
212
188
|
_: 1
|
|
213
189
|
}, 8, ["variant", "onClick"]))
|
|
214
190
|
]),
|
|
215
|
-
e.hasColumnLayout ? (
|
|
191
|
+
e.hasColumnLayout ? (i(), y(b, {
|
|
216
192
|
key: 0,
|
|
217
193
|
class: "b-modal-base__divider"
|
|
218
|
-
})) :
|
|
219
|
-
], 4)) :
|
|
220
|
-
|
|
221
|
-
class:
|
|
222
|
-
style:
|
|
194
|
+
})) : h("", !0)
|
|
195
|
+
], 4)) : h("", !0),
|
|
196
|
+
E("div", {
|
|
197
|
+
class: z(["b-modal-base__content", e.modalContentConditionalClasses]),
|
|
198
|
+
style: P(e.customPaddingStyles.content)
|
|
223
199
|
}, [
|
|
224
|
-
e.hasSlot("content") ? (
|
|
200
|
+
e.hasSlot("content") ? (i(), y(t, {
|
|
225
201
|
key: 0,
|
|
226
202
|
"aria-label": "base modal content",
|
|
227
203
|
el: e.BentoTypographyElement.DIV,
|
|
228
204
|
variant: e.BentoTypographyVariant.BODY,
|
|
229
205
|
stronger: ""
|
|
230
206
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
e.hasColumnLayout ? (
|
|
207
|
+
default: n(() => [
|
|
208
|
+
e.hasColumnLayout ? (i(), y(L, {
|
|
233
209
|
key: 0,
|
|
234
210
|
"column-width": e.computedColumnWidth,
|
|
235
211
|
"container-type": e.GridLayoutContainerType.NORMAL,
|
|
236
212
|
class: "b-modal-base__grid"
|
|
237
213
|
}, {
|
|
238
|
-
"col-1":
|
|
239
|
-
|
|
214
|
+
"col-1": n(() => [
|
|
215
|
+
s(e.$slots, "content-col-1", {}, void 0, !0)
|
|
240
216
|
]),
|
|
241
|
-
"col-2":
|
|
242
|
-
|
|
217
|
+
"col-2": n(() => [
|
|
218
|
+
s(e.$slots, "content-col-2", {}, void 0, !0)
|
|
243
219
|
]),
|
|
244
220
|
_: 3
|
|
245
|
-
}, 8, ["column-width", "container-type"])) :
|
|
221
|
+
}, 8, ["column-width", "container-type"])) : s(e.$slots, "content", { key: 1 }, void 0, !0)
|
|
246
222
|
]),
|
|
247
223
|
_: 3
|
|
248
|
-
}, 8, ["el", "variant"])) :
|
|
224
|
+
}, 8, ["el", "variant"])) : h("", !0)
|
|
249
225
|
], 6),
|
|
250
|
-
e.hasSlot("actions") ? (
|
|
226
|
+
e.hasSlot("actions") ? (i(), I("div", {
|
|
251
227
|
key: 1,
|
|
252
228
|
class: "b-modal-base__actions-container",
|
|
253
|
-
style:
|
|
229
|
+
style: P(e.customPaddingStyles.actions)
|
|
254
230
|
}, [
|
|
255
|
-
e.hasColumnLayout ? (
|
|
231
|
+
e.hasColumnLayout ? (i(), y(b, {
|
|
256
232
|
key: 0,
|
|
257
233
|
class: "b-modal-base__divider"
|
|
258
|
-
})) :
|
|
259
|
-
|
|
260
|
-
|
|
234
|
+
})) : h("", !0),
|
|
235
|
+
E("div", Le, [
|
|
236
|
+
s(e.$slots, "actions", {}, void 0, !0)
|
|
261
237
|
])
|
|
262
|
-
], 4)) :
|
|
238
|
+
], 4)) : h("", !0)
|
|
263
239
|
])
|
|
264
240
|
]),
|
|
265
241
|
_: 3
|
|
266
242
|
})
|
|
267
|
-
], 42,
|
|
243
|
+
], 42, ve)
|
|
268
244
|
]);
|
|
269
245
|
}
|
|
270
|
-
const
|
|
271
|
-
...Ee,
|
|
272
|
-
__name: "footer-actions",
|
|
273
|
-
props: {
|
|
274
|
-
/**
|
|
275
|
-
* List of actions that will be used to render the buttons.
|
|
276
|
-
* First element in the list will be rendered as "primary".
|
|
277
|
-
* All elements after the first will be rendered as "secondary".
|
|
278
|
-
* But you may change the color of 1-st action to red with 'critial' key
|
|
279
|
-
* Not more than 3 action buttons can be provided
|
|
280
|
-
* Or 2 action buttons and 1 Label for them
|
|
281
|
-
*
|
|
282
|
-
* Each object in the list should have a `title`, an `event` and
|
|
283
|
-
* (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
|
|
284
|
-
*
|
|
285
|
-
* `title`: Button's text.
|
|
286
|
-
*
|
|
287
|
-
* `event`: Event triggered when clicking the Button.
|
|
288
|
-
*
|
|
289
|
-
* `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
|
|
290
|
-
*
|
|
291
|
-
* ```
|
|
292
|
-
* [{
|
|
293
|
-
* title: 'Primary',2
|
|
294
|
-
* event: () => { ... },
|
|
295
|
-
* icon: FourPeopleIcon
|
|
296
|
-
* }, {
|
|
297
|
-
* title: 'Secondary',
|
|
298
|
-
* event: () => { ... }
|
|
299
|
-
* }]
|
|
300
|
-
* ```
|
|
301
|
-
*/
|
|
302
|
-
actions: {
|
|
303
|
-
type: Array,
|
|
304
|
-
required: !0
|
|
305
|
-
},
|
|
306
|
-
/**
|
|
307
|
-
* Text label that is displayed left to the action buttons
|
|
308
|
-
*/
|
|
309
|
-
actionsLabel: {
|
|
310
|
-
type: String,
|
|
311
|
-
default: null
|
|
312
|
-
},
|
|
313
|
-
/**
|
|
314
|
-
* If passed - sets first button color to red
|
|
315
|
-
*/
|
|
316
|
-
destructiveActions: {
|
|
317
|
-
type: Boolean,
|
|
318
|
-
default: !1
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
setup(e) {
|
|
322
|
-
const t = e, { actions: l, destructiveActions: r } = G(t), a = f(() => {
|
|
323
|
-
const o = l.value.length < 3 ? l.value : l.value.slice(0, l.value.length - 1);
|
|
324
|
-
return o[0].critical = r.value, {
|
|
325
|
-
leftAligned: l.value.length === 3 ? [
|
|
326
|
-
{
|
|
327
|
-
...l.value[l.value.length - 1],
|
|
328
|
-
variant: w.SECONDARY
|
|
329
|
-
}
|
|
330
|
-
] : null,
|
|
331
|
-
rightAligned: [...o]
|
|
332
|
-
};
|
|
333
|
-
});
|
|
334
|
-
return z(() => {
|
|
335
|
-
if (t.actions && t.actions.length > 3)
|
|
336
|
-
throw new Error("Not more than 3 action buttons may be provided to Bento Modal default variant");
|
|
337
|
-
if (t.actionsLabel && t.actions && t.actions.length > 2)
|
|
338
|
-
throw new Error(
|
|
339
|
-
"Not more than 2 action buttons may be provided with actions label to Bento Modal default variant"
|
|
340
|
-
);
|
|
341
|
-
}), (o, n) => (d(), N("div", Oe, [
|
|
342
|
-
e.actionsLabel ? (d(), p(y(J), {
|
|
343
|
-
key: 0,
|
|
344
|
-
el: y(X).SPAN,
|
|
345
|
-
variant: y(Z).BODY,
|
|
346
|
-
stronger: ""
|
|
347
|
-
}, {
|
|
348
|
-
default: i(() => [
|
|
349
|
-
j(H(e.actionsLabel), 1)
|
|
350
|
-
]),
|
|
351
|
-
_: 1
|
|
352
|
-
}, 8, ["el", "variant"])) : g("", !0),
|
|
353
|
-
y(a).leftAligned ? (d(), p(y(F), {
|
|
354
|
-
key: 1,
|
|
355
|
-
actions: y(a).leftAligned,
|
|
356
|
-
layout: y(K).BUTTONS_START
|
|
357
|
-
}, null, 8, ["actions", "layout"])) : g("", !0),
|
|
358
|
-
M(y(F), {
|
|
359
|
-
actions: y(a).rightAligned,
|
|
360
|
-
layout: y(K).BUTTONS_END
|
|
361
|
-
}, null, 8, ["actions", "layout"])
|
|
362
|
-
]));
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
const Me = /* @__PURE__ */ $(De, [["__scopeId", "data-v-7d3e4571"]]), we = T({
|
|
246
|
+
const j = /* @__PURE__ */ N(pe, [["render", he], ["__scopeId", "data-v-3bd8058e"]]), Be = $({
|
|
366
247
|
name: "bento-modal-default",
|
|
367
|
-
components: { BaseModal:
|
|
248
|
+
components: { BaseModal: j, FooterActions: me },
|
|
368
249
|
props: {
|
|
369
250
|
/**
|
|
370
251
|
* Adds a cross icon on the right side of the alert
|
|
@@ -423,7 +304,7 @@ const Me = /* @__PURE__ */ $(De, [["__scopeId", "data-v-7d3e4571"]]), we = T({
|
|
|
423
304
|
*/
|
|
424
305
|
columnsSize: {
|
|
425
306
|
type: String,
|
|
426
|
-
default:
|
|
307
|
+
default: B.SMALLER
|
|
427
308
|
},
|
|
428
309
|
/**
|
|
429
310
|
* List of actions that will be used to render the buttons.
|
|
@@ -479,25 +360,24 @@ const Me = /* @__PURE__ */ $(De, [["__scopeId", "data-v-7d3e4571"]]), we = T({
|
|
|
479
360
|
default: !1
|
|
480
361
|
}
|
|
481
362
|
},
|
|
482
|
-
emits: [
|
|
483
|
-
setup(e, { slots:
|
|
484
|
-
const
|
|
485
|
-
|
|
363
|
+
emits: [p.CLOSE_MODAL],
|
|
364
|
+
setup(e, { slots: l, emit: r }) {
|
|
365
|
+
const a = k(l), u = () => {
|
|
366
|
+
r(p.CLOSE_MODAL);
|
|
486
367
|
};
|
|
487
|
-
return
|
|
488
|
-
if (!(
|
|
368
|
+
return G(() => {
|
|
369
|
+
if (!(a("content") || a("content-col-1") && a("content-col-2")))
|
|
489
370
|
throw new Error("Bento Modal default variant requires content slot or column slots");
|
|
490
371
|
}), {
|
|
491
372
|
// Methods
|
|
492
|
-
onCloseModal:
|
|
493
|
-
hasSlot:
|
|
373
|
+
onCloseModal: u,
|
|
374
|
+
hasSlot: a
|
|
494
375
|
};
|
|
495
376
|
}
|
|
496
377
|
});
|
|
497
|
-
function
|
|
498
|
-
const
|
|
499
|
-
return
|
|
500
|
-
class: "b-modal-default",
|
|
378
|
+
function Se(e, l, r, a, u, o) {
|
|
379
|
+
const t = f("footer-actions"), c = f("base-modal");
|
|
380
|
+
return i(), y(c, V({ class: "b-modal-default" }, e.$attrs, {
|
|
501
381
|
size: e.size,
|
|
502
382
|
"hide-close-button": e.hideCloseButton,
|
|
503
383
|
"custom-padding": e.customPadding,
|
|
@@ -507,30 +387,30 @@ function Te(e, t, l, r, a, o) {
|
|
|
507
387
|
"with-column-layout": e.withColumnLayout,
|
|
508
388
|
"initially-open": e.initiallyOpen,
|
|
509
389
|
onCloseModal: e.onCloseModal
|
|
510
|
-
},
|
|
511
|
-
"content-col-1":
|
|
512
|
-
|
|
390
|
+
}), K({
|
|
391
|
+
"content-col-1": n(() => [
|
|
392
|
+
s(e.$slots, "content-col-1")
|
|
513
393
|
]),
|
|
514
|
-
"content-col-2":
|
|
515
|
-
|
|
394
|
+
"content-col-2": n(() => [
|
|
395
|
+
s(e.$slots, "content-col-2")
|
|
516
396
|
]),
|
|
517
|
-
content:
|
|
518
|
-
|
|
397
|
+
content: n(() => [
|
|
398
|
+
s(e.$slots, "content")
|
|
519
399
|
]),
|
|
520
400
|
_: 2
|
|
521
401
|
}, [
|
|
522
402
|
e.hasSlot("default") ? {
|
|
523
403
|
name: "default",
|
|
524
|
-
fn:
|
|
525
|
-
|
|
404
|
+
fn: n(() => [
|
|
405
|
+
s(e.$slots, "default")
|
|
526
406
|
]),
|
|
527
407
|
key: "0"
|
|
528
408
|
} : void 0,
|
|
529
409
|
e.actions ? {
|
|
530
410
|
name: "actions",
|
|
531
|
-
fn:
|
|
532
|
-
|
|
533
|
-
M(
|
|
411
|
+
fn: n(() => [
|
|
412
|
+
s(e.$slots, "actions", {}, () => [
|
|
413
|
+
M(t, {
|
|
534
414
|
actions: e.actions,
|
|
535
415
|
"actions-label": e.actionsLabel,
|
|
536
416
|
"destructive-actions": e.destructiveActions
|
|
@@ -539,16 +419,16 @@ function Te(e, t, l, r, a, o) {
|
|
|
539
419
|
]),
|
|
540
420
|
key: "1"
|
|
541
421
|
} : void 0
|
|
542
|
-
]),
|
|
422
|
+
]), 1040, ["size", "hide-close-button", "custom-padding", "is-dismissible", "is-open", "overflow-visible", "with-column-layout", "initially-open", "onCloseModal"]);
|
|
543
423
|
}
|
|
544
|
-
const
|
|
424
|
+
const Ae = /* @__PURE__ */ N(Be, [["render", Se]]), F = {
|
|
545
425
|
"en-US": {
|
|
546
426
|
okButtonText: "OK"
|
|
547
427
|
}
|
|
548
|
-
},
|
|
549
|
-
i18n: { messages:
|
|
428
|
+
}, Oe = $({
|
|
429
|
+
i18n: { messages: F },
|
|
550
430
|
name: "bento-modal-dialog",
|
|
551
|
-
components: { BaseModal:
|
|
431
|
+
components: { BaseModal: j, BentoButtonActions: fe },
|
|
552
432
|
props: {
|
|
553
433
|
/**
|
|
554
434
|
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
@@ -618,102 +498,101 @@ const $e = /* @__PURE__ */ $(we, [["render", Te]]), Y = {
|
|
|
618
498
|
default: !1
|
|
619
499
|
}
|
|
620
500
|
},
|
|
621
|
-
emits: [
|
|
622
|
-
setup(e, { slots:
|
|
623
|
-
const { t:
|
|
624
|
-
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
},
|
|
501
|
+
emits: [p.CLOSE_MODAL],
|
|
502
|
+
setup(e, { slots: l, emit: r }) {
|
|
503
|
+
const { t: a } = W({ messages: F }), u = k(l), { actions: o, dialogType: t } = x(e), c = () => {
|
|
504
|
+
r(p.CLOSE_MODAL);
|
|
505
|
+
}, C = () => {
|
|
506
|
+
c();
|
|
507
|
+
}, b = m(() => [
|
|
628
508
|
{
|
|
629
|
-
title:
|
|
630
|
-
event:
|
|
631
|
-
variant:
|
|
509
|
+
title: a("okButtonText"),
|
|
510
|
+
event: C,
|
|
511
|
+
variant: _.SECONDARY
|
|
632
512
|
}
|
|
633
|
-
]),
|
|
634
|
-
var
|
|
635
|
-
const
|
|
513
|
+
]), L = m(() => {
|
|
514
|
+
var D;
|
|
515
|
+
const d = {
|
|
636
516
|
title: "Cancel",
|
|
637
|
-
event:
|
|
638
|
-
},
|
|
639
|
-
return
|
|
640
|
-
}),
|
|
641
|
-
[`b-modal-dialog--${
|
|
517
|
+
event: C
|
|
518
|
+
}, v = (D = o == null ? void 0 : o.value) == null ? void 0 : D[0];
|
|
519
|
+
return t.value === g.DESTRUCTIVE ? v.critical = !0 : t.value === g.INFO && (v.variant = _.SECONDARY), [v, d];
|
|
520
|
+
}), S = m(() => ({
|
|
521
|
+
[`b-modal-dialog--${t.value}`]: t.value
|
|
642
522
|
}));
|
|
643
|
-
return
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
523
|
+
return G(() => {
|
|
524
|
+
var d, v;
|
|
525
|
+
if (!u("default") || !e.content)
|
|
646
526
|
throw new Error("Bento Modal Dialog requires header title and content");
|
|
647
|
-
if (((
|
|
527
|
+
if (((d = o == null ? void 0 : o.value) == null ? void 0 : d.length) > 1)
|
|
648
528
|
throw new Error("Not more than 1 action button may be provided to Modal Dialog");
|
|
649
|
-
if (
|
|
529
|
+
if (t.value !== g.ACKNOWLEDGEMENT && !(o != null && o.value))
|
|
650
530
|
throw new Error(
|
|
651
531
|
"Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button"
|
|
652
532
|
);
|
|
653
|
-
if (
|
|
533
|
+
if (t.value === g.ACKNOWLEDGEMENT && ((v = o == null ? void 0 : o.value) != null && v.length))
|
|
654
534
|
throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
|
|
655
535
|
}), {
|
|
656
536
|
// Values
|
|
657
|
-
dialogActions:
|
|
658
|
-
acknowledgementDialogActions:
|
|
537
|
+
dialogActions: L,
|
|
538
|
+
acknowledgementDialogActions: b,
|
|
659
539
|
// Methods
|
|
660
|
-
onCloseModal:
|
|
661
|
-
onCloseActionButton:
|
|
540
|
+
onCloseModal: c,
|
|
541
|
+
onCloseActionButton: C,
|
|
662
542
|
// Styles
|
|
663
|
-
modalDialogConditionalClasses:
|
|
543
|
+
modalDialogConditionalClasses: S,
|
|
664
544
|
// Enums
|
|
665
|
-
BentoModalRole:
|
|
666
|
-
BentoModalSize:
|
|
667
|
-
BentoButtonVariant:
|
|
668
|
-
BentoModalDialogType:
|
|
669
|
-
BentoButtonActionsLayout:
|
|
545
|
+
BentoModalRole: T,
|
|
546
|
+
BentoModalSize: O,
|
|
547
|
+
BentoButtonVariant: _,
|
|
548
|
+
BentoModalDialogType: g,
|
|
549
|
+
BentoButtonActionsLayout: ye
|
|
670
550
|
};
|
|
671
551
|
}
|
|
672
552
|
});
|
|
673
|
-
function
|
|
674
|
-
const
|
|
675
|
-
return
|
|
676
|
-
class:
|
|
553
|
+
function Ee(e, l, r, a, u, o) {
|
|
554
|
+
const t = f("bento-button-actions"), c = f("base-modal");
|
|
555
|
+
return i(), y(c, V({
|
|
556
|
+
class: ["b-modal-dialog", e.modalDialogConditionalClasses],
|
|
677
557
|
"hide-close-button": !0,
|
|
678
558
|
size: e.BentoModalSize.SMALL,
|
|
679
559
|
"is-dismissible": e.isDismissible,
|
|
680
560
|
"is-open": e.isOpen,
|
|
681
561
|
"overflow-visible": e.overflowVisible,
|
|
682
562
|
"modal-role": e.BentoModalRole.ALERT_DIALOG,
|
|
683
|
-
"initially-open": e.initiallyOpen
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
u(e.$slots, "default")
|
|
563
|
+
"initially-open": e.initiallyOpen
|
|
564
|
+
}, e.$attrs, { onCloseModal: e.onCloseModal }), {
|
|
565
|
+
default: n(() => [
|
|
566
|
+
s(e.$slots, "default")
|
|
688
567
|
]),
|
|
689
|
-
content:
|
|
690
|
-
|
|
568
|
+
content: n(() => [
|
|
569
|
+
ee(oe(e.content), 1)
|
|
691
570
|
]),
|
|
692
|
-
actions:
|
|
693
|
-
e.dialogType === e.BentoModalDialogType.ACKNOWLEDGEMENT ? (
|
|
571
|
+
actions: n(() => [
|
|
572
|
+
e.dialogType === e.BentoModalDialogType.ACKNOWLEDGEMENT ? (i(), y(t, {
|
|
694
573
|
key: 0,
|
|
695
574
|
actions: e.acknowledgementDialogActions,
|
|
696
575
|
layout: e.BentoButtonActionsLayout.BUTTONS_END
|
|
697
|
-
}, null, 8, ["actions", "layout"])) : (
|
|
576
|
+
}, null, 8, ["actions", "layout"])) : (i(), y(t, {
|
|
698
577
|
key: 1,
|
|
699
578
|
actions: e.dialogActions,
|
|
700
579
|
layout: e.BentoButtonActionsLayout.BUTTONS_END
|
|
701
580
|
}, null, 8, ["actions", "layout"]))
|
|
702
581
|
]),
|
|
703
582
|
_: 3
|
|
704
|
-
},
|
|
583
|
+
}, 16, ["class", "size", "is-dismissible", "is-open", "overflow-visible", "modal-role", "initially-open", "onCloseModal"]);
|
|
705
584
|
}
|
|
706
|
-
const
|
|
585
|
+
const De = /* @__PURE__ */ N(Oe, [["render", Ee]]), Me = $({
|
|
707
586
|
name: "bento-modal",
|
|
708
|
-
components: { BentoModalDefault:
|
|
587
|
+
components: { BentoModalDefault: Ae, BentoModalDialog: De },
|
|
709
588
|
props: {
|
|
710
589
|
/**
|
|
711
590
|
* Choose between default or dialog versions of modal
|
|
712
591
|
*/
|
|
713
592
|
variant: {
|
|
714
593
|
type: String,
|
|
715
|
-
default:
|
|
716
|
-
validator: (e) => Object.values(
|
|
594
|
+
default: w.DEFAULT,
|
|
595
|
+
validator: (e) => Object.values(w).includes(e)
|
|
717
596
|
},
|
|
718
597
|
// Shared Modal Default and Modal Default props
|
|
719
598
|
/**
|
|
@@ -779,8 +658,8 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
|
|
|
779
658
|
*/
|
|
780
659
|
size: {
|
|
781
660
|
type: String,
|
|
782
|
-
default:
|
|
783
|
-
validator: (e) => Object.values(
|
|
661
|
+
default: O.SMALL,
|
|
662
|
+
validator: (e) => Object.values(O).includes(e)
|
|
784
663
|
},
|
|
785
664
|
/**
|
|
786
665
|
* If provided, manages the padding of the whole modal container
|
|
@@ -801,8 +680,8 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
|
|
|
801
680
|
*/
|
|
802
681
|
columnsSize: {
|
|
803
682
|
type: String,
|
|
804
|
-
default:
|
|
805
|
-
validator: (e) => Object.values(
|
|
683
|
+
default: B.SMALLER,
|
|
684
|
+
validator: (e) => Object.values(B).includes(e)
|
|
806
685
|
},
|
|
807
686
|
/**
|
|
808
687
|
* Text label that is displayed left to the action buttons
|
|
@@ -824,8 +703,8 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
|
|
|
824
703
|
*/
|
|
825
704
|
dialogType: {
|
|
826
705
|
type: String,
|
|
827
|
-
default:
|
|
828
|
-
validator: (e) => Object.values(
|
|
706
|
+
default: g.CONFIRMATION,
|
|
707
|
+
validator: (e) => Object.values(g).includes(e)
|
|
829
708
|
},
|
|
830
709
|
/**
|
|
831
710
|
* Text that will be displayed in the content section of Modal
|
|
@@ -835,90 +714,80 @@ const Re = /* @__PURE__ */ $(ke, [["render", Ne]]), Ie = T({
|
|
|
835
714
|
default: null
|
|
836
715
|
}
|
|
837
716
|
},
|
|
838
|
-
emits: [
|
|
839
|
-
setup(e, { slots:
|
|
840
|
-
const
|
|
841
|
-
variant
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
withColumnLayout: m
|
|
852
|
-
} = G(e), _ = f(
|
|
853
|
-
() => r.value === R.DEFAULT ? {
|
|
854
|
-
hideCloseButton: a.value,
|
|
855
|
-
size: o.value,
|
|
856
|
-
customPadding: B.value,
|
|
857
|
-
actionsLabel: A.value,
|
|
858
|
-
destructiveActions: c.value,
|
|
859
|
-
isDismissible: n.value ?? !0,
|
|
860
|
-
overflowVisible: s.value,
|
|
861
|
-
withColumnLayout: m.value
|
|
717
|
+
emits: [p.CLOSE_MODAL],
|
|
718
|
+
setup(e, { slots: l, emit: r }) {
|
|
719
|
+
const a = U(), u = m(
|
|
720
|
+
() => e.variant === w.DEFAULT ? {
|
|
721
|
+
hideCloseButton: e.hideCloseButton,
|
|
722
|
+
size: e.size,
|
|
723
|
+
customPadding: e.customPadding,
|
|
724
|
+
actionsLabel: e.actionsLabel,
|
|
725
|
+
destructiveActions: e.destructiveActions,
|
|
726
|
+
isDismissible: e.isDismissible ?? !0,
|
|
727
|
+
overflowVisible: e.overflowVisible,
|
|
728
|
+
withColumnLayout: e.withColumnLayout,
|
|
729
|
+
...a
|
|
862
730
|
} : {
|
|
863
|
-
dialogType:
|
|
864
|
-
content:
|
|
865
|
-
isDismissible:
|
|
866
|
-
overflowVisible:
|
|
731
|
+
dialogType: e.dialogType,
|
|
732
|
+
content: e.content,
|
|
733
|
+
isDismissible: e.isDismissible ?? !1,
|
|
734
|
+
overflowVisible: e.overflowVisible,
|
|
735
|
+
...a
|
|
867
736
|
}
|
|
868
737
|
);
|
|
869
738
|
return {
|
|
870
739
|
onCloseModal: () => {
|
|
871
|
-
|
|
740
|
+
r(p.CLOSE_MODAL);
|
|
872
741
|
},
|
|
873
|
-
customProps:
|
|
874
|
-
hasSlot:
|
|
742
|
+
customProps: u,
|
|
743
|
+
hasSlot: k(l)
|
|
875
744
|
};
|
|
876
745
|
}
|
|
877
746
|
});
|
|
878
|
-
function
|
|
879
|
-
return
|
|
747
|
+
function _e(e, l, r, a, u, o) {
|
|
748
|
+
return i(), y(te(e.variant), V({
|
|
880
749
|
class: "b-modal",
|
|
881
750
|
"is-open": e.isOpen,
|
|
882
751
|
actions: e.actions
|
|
883
|
-
}, e.customProps, { onCloseModal: e.onCloseModal }),
|
|
752
|
+
}, e.customProps, { onCloseModal: e.onCloseModal }), K({ _: 2 }, [
|
|
884
753
|
e.hasSlot("default") ? {
|
|
885
754
|
name: "default",
|
|
886
|
-
fn:
|
|
887
|
-
|
|
755
|
+
fn: n(() => [
|
|
756
|
+
s(e.$slots, "default")
|
|
888
757
|
]),
|
|
889
758
|
key: "0"
|
|
890
759
|
} : void 0,
|
|
891
760
|
e.hasSlot("content-col-1") ? {
|
|
892
761
|
name: "content-col-1",
|
|
893
|
-
fn:
|
|
894
|
-
|
|
762
|
+
fn: n(() => [
|
|
763
|
+
s(e.$slots, "content-col-1")
|
|
895
764
|
]),
|
|
896
765
|
key: "1"
|
|
897
766
|
} : void 0,
|
|
898
767
|
e.hasSlot("content-col-2") ? {
|
|
899
768
|
name: "content-col-2",
|
|
900
|
-
fn:
|
|
901
|
-
|
|
769
|
+
fn: n(() => [
|
|
770
|
+
s(e.$slots, "content-col-2")
|
|
902
771
|
]),
|
|
903
772
|
key: "2"
|
|
904
773
|
} : void 0,
|
|
905
774
|
e.hasSlot("content") ? {
|
|
906
775
|
name: "content",
|
|
907
|
-
fn:
|
|
908
|
-
|
|
776
|
+
fn: n(() => [
|
|
777
|
+
s(e.$slots, "content")
|
|
909
778
|
]),
|
|
910
779
|
key: "3"
|
|
911
780
|
} : void 0
|
|
912
781
|
]), 1040, ["is-open", "actions", "onCloseModal"]);
|
|
913
782
|
}
|
|
914
|
-
const
|
|
783
|
+
const Fe = /* @__PURE__ */ N(Me, [["render", _e]]);
|
|
915
784
|
export {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
785
|
+
Fe as BentoModal,
|
|
786
|
+
B as BentoModalColumnLayoutVariant,
|
|
787
|
+
g as BentoModalDialogType,
|
|
788
|
+
p as BentoModalEvent,
|
|
789
|
+
T as BentoModalRole,
|
|
790
|
+
O as BentoModalSize,
|
|
791
|
+
w as BentoModalVariant
|
|
923
792
|
};
|
|
924
793
|
//# sourceMappingURL=modal.js.map
|