@adyen/bento-vue2 0.10.0 → 0.10.1-2
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/currency/currency.vue.d.ts +9 -0
- package/dist/@types/components/data-grid/data-grid.vue.d.ts +3 -3
- package/dist/@types/components/date/date.vue.d.ts +9 -0
- package/dist/@types/components/modal/components/base-modal/base-modal.vue.d.ts +10 -0
- package/dist/@types/components/modal/components/modal-default/modal-default.vue.d.ts +9 -0
- package/dist/@types/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +9 -0
- package/dist/@types/components/modal/modal.vue.d.ts +11 -0
- package/dist/@types/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +1 -1
- package/dist/@types/components/segmented-control/index.d.ts +2 -0
- package/dist/@types/components/segmented-control/segmented-control.types.d.ts +8 -0
- package/dist/@types/components/segmented-control/segmented-control.vue.d.ts +53 -0
- package/dist/@types/components.d.ts +2 -4
- package/dist/@types/index.d.ts +1 -0
- package/dist/accordion.js +206 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert.js +103 -0
- package/dist/alert.js.map +1 -0
- package/dist/assets/base-button.css +1 -0
- package/dist/assets/button-actions.css +1 -0
- package/dist/assets/button.css +1 -0
- package/dist/assets/checkbox.css +1 -0
- package/dist/assets/checkmark-circle-fill.css +1 -0
- package/dist/assets/checkmark-small.css +1 -0
- package/dist/assets/chevron-left.css +1 -0
- package/dist/assets/chevron-up.css +1 -0
- package/dist/assets/copy.css +1 -0
- package/dist/assets/cross-circle-fill.css +1 -0
- package/dist/assets/cross-small.css +1 -0
- package/dist/assets/cross.css +1 -0
- package/dist/assets/dropdown.css +1 -0
- package/dist/assets/grid-layout.css +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/assets/index10.css +1 -0
- package/dist/assets/index11.css +1 -0
- package/dist/assets/index12.css +1 -0
- package/dist/assets/index13.css +1 -0
- package/dist/assets/index14.css +1 -0
- package/dist/assets/index15.css +1 -0
- package/dist/assets/index16.css +1 -0
- package/dist/assets/index17.css +1 -0
- package/dist/assets/index18.css +1 -0
- package/dist/assets/index19.css +1 -0
- package/dist/assets/index2.css +1 -0
- package/dist/assets/index20.css +1 -0
- package/dist/assets/index21.css +1 -0
- package/dist/assets/index22.css +1 -0
- package/dist/assets/index23.css +1 -0
- package/dist/assets/index24.css +1 -0
- package/dist/assets/index25.css +1 -0
- package/dist/assets/index26.css +1 -0
- package/dist/assets/index27.css +1 -0
- package/dist/assets/index28.css +1 -0
- package/dist/assets/index29.css +1 -0
- package/dist/assets/index3.css +1 -0
- package/dist/assets/index30.css +1 -0
- package/dist/assets/index31.css +1 -0
- package/dist/assets/index32.css +1 -0
- package/dist/assets/index33.css +1 -0
- package/dist/assets/index34.css +1 -0
- package/dist/assets/index35.css +1 -0
- package/dist/assets/index36.css +1 -0
- package/dist/assets/index37.css +1 -0
- package/dist/assets/index38.css +1 -0
- package/dist/assets/index4.css +1 -0
- package/dist/assets/index5.css +1 -0
- package/dist/assets/index6.css +1 -0
- package/dist/assets/index7.css +1 -0
- package/dist/assets/index8.css +1 -0
- package/dist/assets/index9.css +1 -0
- package/dist/assets/info-filled.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -0
- package/dist/assets/listbox.css +1 -0
- package/dist/assets/search.css +1 -0
- package/dist/assets/tooltip.css +1 -0
- package/dist/avatar-image.js +7 -0
- package/dist/avatar-image.js.map +1 -0
- package/dist/badge.js +57 -0
- package/dist/badge.js.map +1 -0
- package/dist/button.js +110 -0
- package/dist/button.js.map +1 -0
- package/dist/card.js +178 -0
- package/dist/card.js.map +1 -0
- package/dist/checkbox.js +94 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js +33 -0
- package/dist/chunks/_plugin-vue2_normalizer.71e2aa87.js.map +1 -0
- package/dist/chunks/aria-label.ac9651a5.js +13 -0
- package/dist/chunks/aria-label.ac9651a5.js.map +1 -0
- package/dist/chunks/base-button.38651156.js +83 -0
- package/dist/chunks/base-button.38651156.js.map +1 -0
- package/dist/chunks/button-actions.59406268.js +105 -0
- package/dist/chunks/button-actions.59406268.js.map +1 -0
- package/dist/chunks/button.31b757d1.js +102 -0
- package/dist/chunks/button.31b757d1.js.map +1 -0
- package/dist/chunks/checkbox.fab16cce.js +138 -0
- package/dist/chunks/checkbox.fab16cce.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.d1aa324d.js +26 -0
- package/dist/chunks/checkmark-circle-fill.d1aa324d.js.map +1 -0
- package/dist/chunks/checkmark-small.1371dd20.js +26 -0
- package/dist/chunks/checkmark-small.1371dd20.js.map +1 -0
- package/dist/chunks/chevron-left.e3a49e62.js +47 -0
- package/dist/chunks/chevron-left.e3a49e62.js.map +1 -0
- package/dist/chunks/chevron-up.416431cd.js +47 -0
- package/dist/chunks/chevron-up.416431cd.js.map +1 -0
- package/dist/chunks/copy.fa9aa27e.js +105 -0
- package/dist/chunks/copy.fa9aa27e.js.map +1 -0
- package/dist/chunks/cross-circle-fill.0a1d738c.js +26 -0
- package/dist/chunks/cross-circle-fill.0a1d738c.js.map +1 -0
- package/dist/chunks/cross-small.7ecb1b97.js +26 -0
- package/dist/chunks/cross-small.7ecb1b97.js.map +1 -0
- package/dist/chunks/cross.db1f9177.js +26 -0
- package/dist/chunks/cross.db1f9177.js.map +1 -0
- package/dist/chunks/directive.23e35ab0.js +21 -0
- package/dist/chunks/directive.23e35ab0.js.map +1 -0
- package/dist/chunks/dropdown.0d394d2f.js +771 -0
- package/dist/chunks/dropdown.0d394d2f.js.map +1 -0
- package/dist/chunks/grid-layout.14423a2e.js +69 -0
- package/dist/chunks/grid-layout.14423a2e.js.map +1 -0
- package/dist/chunks/hasSlot.dceac207.js +5 -0
- package/dist/chunks/hasSlot.dceac207.js.map +1 -0
- package/dist/chunks/i18n.8934ef6c.js +1695 -0
- package/dist/chunks/i18n.8934ef6c.js.map +1 -0
- package/dist/chunks/index.2e54c294.js +801 -0
- package/dist/chunks/index.2e54c294.js.map +1 -0
- package/dist/chunks/index.34eba2c4.js +107 -0
- package/dist/chunks/index.34eba2c4.js.map +1 -0
- package/dist/chunks/index.59dc2e3f.js +801 -0
- package/dist/chunks/index.59dc2e3f.js.map +1 -0
- package/dist/chunks/index.73d7902e.js +29 -0
- package/dist/chunks/index.73d7902e.js.map +1 -0
- package/dist/chunks/index.8c38e06b.js +441 -0
- package/dist/chunks/index.8c38e06b.js.map +1 -0
- package/dist/chunks/index.8e9cdc73.js +441 -0
- package/dist/chunks/index.8e9cdc73.js.map +1 -0
- package/dist/chunks/index.a7a22907.js +929 -0
- package/dist/chunks/index.a7a22907.js.map +1 -0
- package/dist/chunks/index.ad5e1dbd.js +107 -0
- package/dist/chunks/index.ad5e1dbd.js.map +1 -0
- package/dist/chunks/index.e2141d95.js +86 -0
- package/dist/chunks/index.e2141d95.js.map +1 -0
- package/dist/chunks/index.f4582460.js +86 -0
- package/dist/chunks/index.f4582460.js.map +1 -0
- package/dist/chunks/index.f55fdc32.js +1118 -0
- package/dist/chunks/index.f55fdc32.js.map +1 -0
- package/dist/chunks/info-filled.9748686e.js +26 -0
- package/dist/chunks/info-filled.9748686e.js.map +1 -0
- package/dist/chunks/listbox-option-tag.2e5c4012.js +111 -0
- package/dist/chunks/listbox-option-tag.2e5c4012.js.map +1 -0
- package/dist/chunks/listbox-option-tag.f44b4ee0.js +111 -0
- package/dist/chunks/listbox-option-tag.f44b4ee0.js.map +1 -0
- package/dist/chunks/listbox.152dab0a.js +485 -0
- package/dist/chunks/listbox.152dab0a.js.map +1 -0
- package/dist/chunks/on-click-outside.3e0c3e2a.js +91 -0
- package/dist/chunks/on-click-outside.3e0c3e2a.js.map +1 -0
- package/dist/chunks/search.6be3396b.js +26 -0
- package/dist/chunks/search.6be3396b.js.map +1 -0
- package/dist/chunks/toastController.b1b08299.js +15 -0
- package/dist/chunks/toastController.b1b08299.js.map +1 -0
- package/dist/chunks/tooltip.a4625a7b.js +220 -0
- package/dist/chunks/tooltip.a4625a7b.js.map +1 -0
- package/dist/chunks/unique-id.a2a2b458.js +34 -0
- package/dist/chunks/unique-id.a2a2b458.js.map +1 -0
- package/dist/chunks/use-default-slot-validator.83d977a1.js +11 -0
- package/dist/chunks/use-default-slot-validator.83d977a1.js.map +1 -0
- package/dist/chunks/useCountryItems.cbe60557.js +29 -0
- package/dist/chunks/useCountryItems.cbe60557.js.map +1 -0
- package/dist/click-outside.js +23 -0
- package/dist/click-outside.js.map +1 -0
- package/dist/controls-group.js +59 -0
- package/dist/controls-group.js.map +1 -0
- package/dist/country.js +5979 -0
- package/dist/country.js.map +1 -0
- package/dist/currency.js +119 -0
- package/dist/currency.js.map +1 -0
- package/dist/data-grid.js +1169 -0
- package/dist/data-grid.js.map +1 -0
- package/dist/date-picker.js +8 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/date.js +6 -0
- package/dist/date.js.map +1 -0
- package/dist/divider.js +35 -0
- package/dist/divider.js.map +1 -0
- package/dist/dropdown.js +262 -0
- package/dist/dropdown.js.map +1 -0
- package/dist/filter-bar.js +1735 -0
- package/dist/filter-bar.js.map +1 -0
- package/dist/focus-trap.js +5 -0
- package/dist/focus-trap.js.map +1 -0
- package/dist/header.js +205 -0
- package/dist/header.js.map +1 -0
- package/dist/index.js +335 -21278
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +61 -0
- package/dist/info-icon.js.map +1 -0
- package/dist/input-field.js +168 -0
- package/dist/input-field.js.map +1 -0
- package/dist/internal.js +13 -0
- package/dist/internal.js.map +1 -0
- package/dist/link.js +46 -0
- package/dist/link.js.map +1 -0
- package/dist/loading-indicator.js +51 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/menu.js +474 -0
- package/dist/menu.js.map +1 -0
- package/dist/modal.js +709 -0
- package/dist/modal.js.map +1 -0
- package/dist/pagination.js +487 -0
- package/dist/pagination.js.map +1 -0
- package/dist/payment-method.js +84 -0
- package/dist/payment-method.js.map +1 -0
- package/dist/popover.js +284 -0
- package/dist/popover.js.map +1 -0
- package/dist/popper-container.js +225 -0
- package/dist/popper-container.js.map +1 -0
- package/dist/radio-group.js +192 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/search-bar.js +106 -0
- package/dist/search-bar.js.map +1 -0
- package/dist/status.js +47 -0
- package/dist/status.js.map +1 -0
- package/dist/structured-list.js +98 -0
- package/dist/structured-list.js.map +1 -0
- package/dist/summary-grid.js +526 -0
- package/dist/summary-grid.js.map +1 -0
- package/dist/tabs.js +106 -0
- package/dist/tabs.js.map +1 -0
- package/dist/tag.js +73 -0
- package/dist/tag.js.map +1 -0
- package/dist/textarea.js +64 -0
- package/dist/textarea.js.map +1 -0
- package/dist/toast.js +132 -0
- package/dist/toast.js.map +1 -0
- package/dist/toggle.js +6 -0
- package/dist/toggle.js.map +1 -0
- package/dist/typography.js +111 -0
- package/dist/typography.js.map +1 -0
- package/dist/web-types.json +130 -13
- package/package.json +6 -4
- package/dist/@types/utils/ts/inject-css.d.ts +0 -2
package/dist/modal.js
ADDED
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
import "./assets/index13.css";
|
|
2
|
+
import { defineComponent as S, ref as U, toRefs as E, computed as i, watch as q, onMounted as w } from "vue";
|
|
3
|
+
import { B as W, a as C } from "./chunks/button.31b757d1.js";
|
|
4
|
+
import { BentoTypography as M, BentoTypographyElement as T, BentoTypographyVariant as k } from "./typography.js";
|
|
5
|
+
import { BentoDivider as K } from "./divider.js";
|
|
6
|
+
import { B as Y } from "./chunks/index.8e9cdc73.js";
|
|
7
|
+
import { h as f } from "./chunks/hasSlot.dceac207.js";
|
|
8
|
+
import { u as j } from "./chunks/aria-label.ac9651a5.js";
|
|
9
|
+
import { u as N } from "./chunks/i18n.8934ef6c.js";
|
|
10
|
+
import { C as Q } from "./chunks/cross.db1f9177.js";
|
|
11
|
+
import { G as H, a as J } from "./chunks/grid-layout.14423a2e.js";
|
|
12
|
+
import { n as O } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
13
|
+
import { B as x, c as R } from "./chunks/button-actions.59406268.js";
|
|
14
|
+
var D = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(D || {}), h = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(h || {}), y = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(y || {}), B = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(B || {}), p = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(p || {}), c = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(c || {});
|
|
15
|
+
const X = {
|
|
16
|
+
"en-US": {
|
|
17
|
+
ariaLabelFallback: "modal"
|
|
18
|
+
}
|
|
19
|
+
}, Z = S({
|
|
20
|
+
i18n: { messages: X },
|
|
21
|
+
name: "base-modal",
|
|
22
|
+
components: { CrossIcon: Q, BentoTypography: M, BentoButton: W, BentoDivider: K, BentoFocusTrap: Y, GridLayout: H },
|
|
23
|
+
props: {
|
|
24
|
+
/**
|
|
25
|
+
* Defines whether the modal will be an alert modal
|
|
26
|
+
*/
|
|
27
|
+
modalRole: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: B.DIALOG
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* If set to true, it allows the modal to be closed by clicking outside of it
|
|
33
|
+
*/
|
|
34
|
+
isDismissible: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: !0
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Hides a cross icon on the right side of the title
|
|
40
|
+
*/
|
|
41
|
+
hideCloseButton: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: !0
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* If provided, manages the padding of the whole modal container
|
|
47
|
+
*/
|
|
48
|
+
customPadding: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: null
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* If provided, renders the modal's content in a two-column layout an wth dividers separating its content
|
|
54
|
+
*/
|
|
55
|
+
withColumnLayout: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !1
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* 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.
|
|
61
|
+
*/
|
|
62
|
+
columnsSize: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: y.SMALLER
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
68
|
+
*/
|
|
69
|
+
isOpen: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
required: !0
|
|
72
|
+
},
|
|
73
|
+
/**
|
|
74
|
+
* Sets the width of the modal
|
|
75
|
+
*/
|
|
76
|
+
size: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: h.SMALL
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
|
|
82
|
+
*/
|
|
83
|
+
initiallyOpen: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: !1
|
|
86
|
+
},
|
|
87
|
+
overflowVisible: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: !1
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
emits: [c.CLOSE_MODAL],
|
|
93
|
+
setup(e, { slots: t, emit: o }) {
|
|
94
|
+
const { t: a } = N(), n = U(null), { isOpen: l, customPadding: s, overflowVisible: u } = E(e), _ = i(
|
|
95
|
+
() => {
|
|
96
|
+
var g;
|
|
97
|
+
return f(t)("default") && t.default() ? (g = t.default()[0]) == null ? void 0 : g.text : null;
|
|
98
|
+
}
|
|
99
|
+
), v = i(() => s.value ? { padding: s.value } : {}), b = i(
|
|
100
|
+
() => s.value ? { marginLeft: `-${s.value}`, width: `calc(100% + calc(${s.value} * 2))` } : {}
|
|
101
|
+
), d = j({
|
|
102
|
+
label: _,
|
|
103
|
+
defaultFallback: a("ariaLabelFallback")
|
|
104
|
+
}), r = i(() => e.withColumnLayout && e.size === h.LARGE), m = () => {
|
|
105
|
+
n.value.showModal();
|
|
106
|
+
}, A = () => {
|
|
107
|
+
o(c.CLOSE_MODAL);
|
|
108
|
+
}, L = () => {
|
|
109
|
+
n.value.close(), A();
|
|
110
|
+
}, G = () => {
|
|
111
|
+
L();
|
|
112
|
+
}, z = ({ target: g }) => {
|
|
113
|
+
g && g.tagName === B.DIALOG.toUpperCase() && L();
|
|
114
|
+
}, P = i(() => ({
|
|
115
|
+
[`b-modal-base__container--${e.size}`]: e.size,
|
|
116
|
+
["b-modal-base__container--visible"]: l.value,
|
|
117
|
+
["b-modal-base__container--overflow-visible"]: u.value
|
|
118
|
+
})), V = i(() => ({
|
|
119
|
+
"b-modal-base__content--column-layout": r.value
|
|
120
|
+
})), F = i(() => ({
|
|
121
|
+
"b-modal-base__actions--column-layout": r.value
|
|
122
|
+
})), $ = i(() => e.columnsSize === y.SMALLER ? [{ small: 4, medium: 4, large: 4 }] : e.columnsSize === y.BIGGER ? [{ small: 8, medium: 8, large: 8 }] : [{ small: 6, medium: 6, large: 6 }]);
|
|
123
|
+
return q(
|
|
124
|
+
() => [l.value, n.value],
|
|
125
|
+
() => {
|
|
126
|
+
l.value && n.value ? m() : n.value && L();
|
|
127
|
+
},
|
|
128
|
+
{ immediate: !0 }
|
|
129
|
+
), w(() => {
|
|
130
|
+
l.value && n.value && m();
|
|
131
|
+
}), {
|
|
132
|
+
// Refs
|
|
133
|
+
modal: n,
|
|
134
|
+
computedAriaLabel: d,
|
|
135
|
+
// Handling the state
|
|
136
|
+
openModal: m,
|
|
137
|
+
closeModalOnClickOutside: z,
|
|
138
|
+
// Methods
|
|
139
|
+
onCloseButtonClick: G,
|
|
140
|
+
hasSlot: f(t),
|
|
141
|
+
emitCloseEvent: A,
|
|
142
|
+
// Styles
|
|
143
|
+
modalActionsConditionalClasses: F,
|
|
144
|
+
modalConditionalClasses: P,
|
|
145
|
+
modalContentConditionalClasses: V,
|
|
146
|
+
wrapperStyles: v,
|
|
147
|
+
dividerStyles: b,
|
|
148
|
+
hasColumnLayout: r,
|
|
149
|
+
computedColumnWidth: $,
|
|
150
|
+
// Enums
|
|
151
|
+
BentoButtonVariant: C,
|
|
152
|
+
BentoTypographyElement: T,
|
|
153
|
+
BentoTypographyVariant: k,
|
|
154
|
+
GridLayoutContainerType: J
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
var tt = function() {
|
|
159
|
+
var t = this, o = t._self._c;
|
|
160
|
+
return t._self._setupProxy, o("div", { staticClass: "b-modal-base" }, [o("dialog", { ref: "modal", staticClass: "b-modal-base__container", class: t.modalConditionalClasses, attrs: { role: t.modalRole, "aria-label": t.computedAriaLabel, open: t.initiallyOpen }, on: { click: function(a) {
|
|
161
|
+
t.isDismissible && t.closeModalOnClickOutside(a);
|
|
162
|
+
}, keydown: function(a) {
|
|
163
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : t.emitCloseEvent.apply(null, arguments);
|
|
164
|
+
} } }, [o("bento-focus-trap", [o("div", { staticClass: "b-modal-base__wrapper", style: t.wrapperStyles }, [t.hasSlot("default") || !t.hideCloseButton ? o("div", { staticClass: "b-modal-base__header" }, [o("bento-typography", { staticClass: "b-modal-base__title", attrs: { "aria-label": "base modal title", el: t.BentoTypographyElement.SPAN, variant: t.BentoTypographyVariant.TITLE, stronger: "" } }, [t.hasSlot("default") ? t._t("default") : t._e()], 2), t.hideCloseButton ? t._e() : o("bento-button", { staticClass: "b-modal-base__close-button", attrs: { variant: t.BentoButtonVariant.TERTIARY, type: "button" }, on: { click: t.onCloseButtonClick } }, [o("cross-icon", { attrs: { "svg-title": "close" } })], 1)], 1) : t._e(), t.hasColumnLayout && t.hasSlot("default") ? o("bento-divider", { staticClass: "b-modal-base__divider", style: t.dividerStyles }) : t._e(), o("div", { staticClass: "b-modal-base__content", class: t.modalContentConditionalClasses }, [t.hasSlot("content") ? o("bento-typography", { attrs: { "aria-label": "base modal content", el: t.BentoTypographyElement.DIV, variant: t.BentoTypographyVariant.BODY, stronger: "" } }, [t.hasColumnLayout ? o("grid-layout", { staticClass: "b-modal-base__grid", attrs: { "column-width": t.computedColumnWidth, "container-type": t.GridLayoutContainerType.NORMAL }, scopedSlots: t._u([{ key: "col-1", fn: function() {
|
|
165
|
+
return [t._t("content-col-1")];
|
|
166
|
+
}, proxy: !0 }, { key: "col-2", fn: function() {
|
|
167
|
+
return [t._t("content-col-2")];
|
|
168
|
+
}, proxy: !0 }], null, !0) }) : t._t("content")], 2) : t._e()], 1), t.hasSlot("actions") ? o("div", { staticClass: "b-modal-base__actions-container" }, [t.hasColumnLayout ? o("bento-divider", { staticClass: "b-modal-base__divider", style: t.dividerStyles }) : t._e(), o("div", { staticClass: "b-modal-base__actions", class: t.modalActionsConditionalClasses, attrs: { "aria-label": "modal actions" } }, [t._t("actions")], 2)], 1) : t._e()], 1)])], 1)]);
|
|
169
|
+
}, et = [], ot = /* @__PURE__ */ O(
|
|
170
|
+
Z,
|
|
171
|
+
tt,
|
|
172
|
+
et,
|
|
173
|
+
!1,
|
|
174
|
+
null,
|
|
175
|
+
"89e76b27",
|
|
176
|
+
null,
|
|
177
|
+
null
|
|
178
|
+
);
|
|
179
|
+
const I = ot.exports, nt = S({
|
|
180
|
+
name: "bento-modal-default",
|
|
181
|
+
components: { BaseModal: I, BentoButtonActions: x, BentoTypography: M },
|
|
182
|
+
inheritAttrs: !1,
|
|
183
|
+
props: {
|
|
184
|
+
/**
|
|
185
|
+
* Adds a cross icon on the right side of the alert
|
|
186
|
+
*/
|
|
187
|
+
/**
|
|
188
|
+
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
189
|
+
*/
|
|
190
|
+
isOpen: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
required: !0
|
|
193
|
+
},
|
|
194
|
+
/**
|
|
195
|
+
* If set to true, it allows the modal to be closed by clicking outside of it
|
|
196
|
+
*/
|
|
197
|
+
isDismissible: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
required: !0
|
|
200
|
+
},
|
|
201
|
+
/**
|
|
202
|
+
* If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown
|
|
203
|
+
*/
|
|
204
|
+
overflowVisible: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: !1
|
|
207
|
+
},
|
|
208
|
+
/**
|
|
209
|
+
* Hides a cross icon on the right side of the title
|
|
210
|
+
*/
|
|
211
|
+
hideCloseButton: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
default: !1
|
|
214
|
+
},
|
|
215
|
+
/**
|
|
216
|
+
* Sets the width of the modal
|
|
217
|
+
*/
|
|
218
|
+
size: {
|
|
219
|
+
type: String,
|
|
220
|
+
required: !0
|
|
221
|
+
},
|
|
222
|
+
/**
|
|
223
|
+
* If provided, manages the padding of the whole modal container
|
|
224
|
+
*/
|
|
225
|
+
customPadding: {
|
|
226
|
+
type: String,
|
|
227
|
+
default: null
|
|
228
|
+
},
|
|
229
|
+
/**
|
|
230
|
+
* If provided, renders the modal's content in a two-column layout an wth dividers separating its content
|
|
231
|
+
*/
|
|
232
|
+
withColumnLayout: {
|
|
233
|
+
type: Boolean,
|
|
234
|
+
default: !1
|
|
235
|
+
},
|
|
236
|
+
/**
|
|
237
|
+
* 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.
|
|
238
|
+
*/
|
|
239
|
+
columnsSize: {
|
|
240
|
+
type: String,
|
|
241
|
+
default: y.SMALLER
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
* List of actions that will be used to render the buttons.
|
|
245
|
+
* First element in the list will be rendered as "primary".
|
|
246
|
+
* All elements after the first will be rendered as "secondary".
|
|
247
|
+
* But you may change the color of 1-st action to red with 'critial' key
|
|
248
|
+
* Not more than 3 action buttons can be provided
|
|
249
|
+
* Or 2 action buttons and 1 Label for them
|
|
250
|
+
*
|
|
251
|
+
* Each object in the list should have a `title`, an `event` and
|
|
252
|
+
* (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
|
|
253
|
+
*
|
|
254
|
+
* `title`: Button's text.
|
|
255
|
+
*
|
|
256
|
+
* `event`: Event triggered when clicking the Button.
|
|
257
|
+
*
|
|
258
|
+
* `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
|
|
259
|
+
*
|
|
260
|
+
* ```
|
|
261
|
+
* [{
|
|
262
|
+
* title: 'Primary',2
|
|
263
|
+
* event: () => { ... },
|
|
264
|
+
* icon: FourPeopleIcon
|
|
265
|
+
* }, {
|
|
266
|
+
* title: 'Secondary',
|
|
267
|
+
* event: () => { ... }
|
|
268
|
+
* }]
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
271
|
+
actions: {
|
|
272
|
+
type: Array,
|
|
273
|
+
default: null
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* Text label that is displayed left to the action buttons
|
|
277
|
+
*/
|
|
278
|
+
actionsLabel: {
|
|
279
|
+
type: String,
|
|
280
|
+
default: null
|
|
281
|
+
},
|
|
282
|
+
/**
|
|
283
|
+
* If passed - sets first button color to red
|
|
284
|
+
*/
|
|
285
|
+
destructiveActions: {
|
|
286
|
+
type: Boolean,
|
|
287
|
+
default: !1
|
|
288
|
+
},
|
|
289
|
+
/**
|
|
290
|
+
* Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
|
|
291
|
+
*/
|
|
292
|
+
initiallyOpen: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: !1
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
emits: [c.CLOSE_MODAL],
|
|
298
|
+
setup(e, { slots: t, emit: o }) {
|
|
299
|
+
const { actions: a, destructiveActions: n } = E(e), l = i(() => {
|
|
300
|
+
const u = a.value.length < 3 ? a.value : a.value.slice(0, a.value.length - 1);
|
|
301
|
+
return n.value && (u[0].critical = !0), {
|
|
302
|
+
leftAligned: a.value.length === 3 ? [
|
|
303
|
+
{
|
|
304
|
+
...a.value[a.value.length - 1],
|
|
305
|
+
variant: C.SECONDARY
|
|
306
|
+
}
|
|
307
|
+
] : null,
|
|
308
|
+
rightAligned: u
|
|
309
|
+
};
|
|
310
|
+
}), s = () => {
|
|
311
|
+
o(c.CLOSE_MODAL);
|
|
312
|
+
};
|
|
313
|
+
return w(() => {
|
|
314
|
+
if (!(f(t)("content") || f(t)("content-col-1") && f(t)("content-col-2")))
|
|
315
|
+
throw new Error("Bento Modal default variant requires content slot or column slots");
|
|
316
|
+
if (e.actions && e.actions.length > 3)
|
|
317
|
+
throw new Error("Not more than 3 action buttons may be provided to Bento Modal default variant");
|
|
318
|
+
if (e.actionsLabel && e.actions && e.actions.length > 2)
|
|
319
|
+
throw new Error(
|
|
320
|
+
"Not more than 2 action buttons may be provided with actions label to Bento Modal default variant"
|
|
321
|
+
);
|
|
322
|
+
}), {
|
|
323
|
+
// Values
|
|
324
|
+
alignedActions: l,
|
|
325
|
+
// Methods
|
|
326
|
+
onCloseModal: s,
|
|
327
|
+
hasSlot: f(t),
|
|
328
|
+
// Enums
|
|
329
|
+
BentoButtonActionsLayout: R,
|
|
330
|
+
BentoTypographyElement: T,
|
|
331
|
+
BentoTypographyVariant: k
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
var at = function() {
|
|
336
|
+
var t = this, o = t._self._c;
|
|
337
|
+
return t._self._setupProxy, o("base-modal", { staticClass: "b-modal-default", attrs: { size: t.size, "hide-close-button": t.hideCloseButton, "custom-padding": t.customPadding, "is-dismissible": t.isDismissible, "is-open": t.isOpen, "overflow-visible": t.overflowVisible, "with-column-layout": t.withColumnLayout, "initially-open": t.initiallyOpen }, on: { "close-modal": t.onCloseModal }, scopedSlots: t._u([t.hasSlot("default") ? { key: "default", fn: function() {
|
|
338
|
+
return [t._t("default")];
|
|
339
|
+
}, proxy: !0 } : null, { key: "content-col-1", fn: function() {
|
|
340
|
+
return [t._t("content-col-1")];
|
|
341
|
+
}, proxy: !0 }, { key: "content-col-2", fn: function() {
|
|
342
|
+
return [t._t("content-col-2")];
|
|
343
|
+
}, proxy: !0 }, { key: "content", fn: function() {
|
|
344
|
+
return [t._t("content")];
|
|
345
|
+
}, proxy: !0 }, t.actions ? { key: "actions", fn: function() {
|
|
346
|
+
return [t._t("actions", function() {
|
|
347
|
+
return [t.actionsLabel ? o("bento-typography", { staticClass: "b-modal-base__title", attrs: { "aria-label": "base modal title", el: t.BentoTypographyElement.SPAN, variant: t.BentoTypographyVariant.BODY, stronger: "" } }, [t._v(" " + t._s(t.actionsLabel) + " ")]) : t._e(), t.alignedActions.leftAligned ? o("bento-button-actions", { attrs: { actions: t.alignedActions.leftAligned, layout: t.BentoButtonActionsLayout.BUTTONS_START } }) : t._e(), o("bento-button-actions", { attrs: { actions: t.alignedActions.rightAligned, layout: t.BentoButtonActionsLayout.BUTTONS_END } })];
|
|
348
|
+
})];
|
|
349
|
+
}, proxy: !0 } : null], null, !0) });
|
|
350
|
+
}, lt = [], st = /* @__PURE__ */ O(
|
|
351
|
+
nt,
|
|
352
|
+
at,
|
|
353
|
+
lt,
|
|
354
|
+
!1,
|
|
355
|
+
null,
|
|
356
|
+
null,
|
|
357
|
+
null,
|
|
358
|
+
null
|
|
359
|
+
);
|
|
360
|
+
const it = st.exports, rt = {
|
|
361
|
+
"en-US": {
|
|
362
|
+
okButtonText: "OK"
|
|
363
|
+
}
|
|
364
|
+
}, ut = S({
|
|
365
|
+
i18n: { messages: rt },
|
|
366
|
+
name: "bento-modal-dialog",
|
|
367
|
+
components: { BaseModal: I, BentoButtonActions: x },
|
|
368
|
+
inheritAttrs: !1,
|
|
369
|
+
props: {
|
|
370
|
+
/**
|
|
371
|
+
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
372
|
+
*/
|
|
373
|
+
isOpen: {
|
|
374
|
+
type: Boolean,
|
|
375
|
+
required: !0
|
|
376
|
+
},
|
|
377
|
+
/**
|
|
378
|
+
* If set to true, it allows the modal to be closed by clicking outside of it
|
|
379
|
+
*/
|
|
380
|
+
isDismissible: {
|
|
381
|
+
type: Boolean,
|
|
382
|
+
required: !0
|
|
383
|
+
},
|
|
384
|
+
/**
|
|
385
|
+
* If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown
|
|
386
|
+
*/
|
|
387
|
+
overflowVisible: {
|
|
388
|
+
type: Boolean,
|
|
389
|
+
default: !1
|
|
390
|
+
},
|
|
391
|
+
/**
|
|
392
|
+
* Sets different action buttons styling and appearance
|
|
393
|
+
*/
|
|
394
|
+
dialogType: {
|
|
395
|
+
type: String,
|
|
396
|
+
required: !0
|
|
397
|
+
},
|
|
398
|
+
/**
|
|
399
|
+
* Text that is displayed in the content section of modal
|
|
400
|
+
*/
|
|
401
|
+
content: {
|
|
402
|
+
type: String,
|
|
403
|
+
required: !0
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* List of actions that will be used to render the buttons.
|
|
407
|
+
* Only 1 action button is allowed for Modal Dialog
|
|
408
|
+
*
|
|
409
|
+
* Each object in the list should have a `title`, an `event` and
|
|
410
|
+
* (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
|
|
411
|
+
*
|
|
412
|
+
* `title`: Button's text.
|
|
413
|
+
*
|
|
414
|
+
* `event`: Event triggered when clicking the Button.
|
|
415
|
+
*
|
|
416
|
+
* `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
|
|
417
|
+
*
|
|
418
|
+
* ```
|
|
419
|
+
* [{
|
|
420
|
+
* title: 'Primary',2
|
|
421
|
+
* event: () => { ... },
|
|
422
|
+
* icon: FourPeopleIcon
|
|
423
|
+
* }]
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
actions: {
|
|
427
|
+
type: Array,
|
|
428
|
+
default: null
|
|
429
|
+
},
|
|
430
|
+
/**
|
|
431
|
+
* Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.
|
|
432
|
+
*/
|
|
433
|
+
initiallyOpen: {
|
|
434
|
+
type: Boolean,
|
|
435
|
+
default: !1
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
emits: [c.CLOSE_MODAL],
|
|
439
|
+
setup(e, { slots: t, emit: o }) {
|
|
440
|
+
const { t: a } = N(), { actions: n, dialogType: l } = E(e), s = () => {
|
|
441
|
+
o(c.CLOSE_MODAL);
|
|
442
|
+
}, u = () => {
|
|
443
|
+
s();
|
|
444
|
+
}, _ = i(() => [
|
|
445
|
+
{
|
|
446
|
+
title: a("okButtonText"),
|
|
447
|
+
event: u,
|
|
448
|
+
variant: C.SECONDARY
|
|
449
|
+
}
|
|
450
|
+
]), v = i(() => {
|
|
451
|
+
var m;
|
|
452
|
+
const d = {
|
|
453
|
+
title: "Cancel",
|
|
454
|
+
event: u
|
|
455
|
+
}, r = (m = n == null ? void 0 : n.value) == null ? void 0 : m[0];
|
|
456
|
+
return l.value === p.DESTRUCTIVE ? r.critical = !0 : l.value === p.INFO && (r.variant = C.SECONDARY), [r, d];
|
|
457
|
+
}), b = i(() => ({
|
|
458
|
+
[`b-modal-dialog--${l.value}`]: l.value
|
|
459
|
+
}));
|
|
460
|
+
return w(() => {
|
|
461
|
+
var d, r;
|
|
462
|
+
if (!f(t)("default") || !e.content)
|
|
463
|
+
throw new Error("Bento Modal Dialog requires header title and content");
|
|
464
|
+
if (((d = n == null ? void 0 : n.value) == null ? void 0 : d.length) > 1)
|
|
465
|
+
throw new Error("Not more than 1 action button may be provided to Modal Dialog");
|
|
466
|
+
if (l.value !== p.ACKNOWLEDGEMENT && !(n != null && n.value))
|
|
467
|
+
throw new Error(
|
|
468
|
+
"Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button"
|
|
469
|
+
);
|
|
470
|
+
if (l.value === p.ACKNOWLEDGEMENT && ((r = n == null ? void 0 : n.value) != null && r.length))
|
|
471
|
+
throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
|
|
472
|
+
}), {
|
|
473
|
+
// Values
|
|
474
|
+
dialogActions: v,
|
|
475
|
+
acknowledgementDialogActions: _,
|
|
476
|
+
// Methods
|
|
477
|
+
onCloseModal: s,
|
|
478
|
+
onCloseActionButton: u,
|
|
479
|
+
// Styles
|
|
480
|
+
modalDialogConditionalClasses: b,
|
|
481
|
+
// Enums
|
|
482
|
+
BentoModalRole: B,
|
|
483
|
+
BentoModalSize: h,
|
|
484
|
+
BentoButtonVariant: C,
|
|
485
|
+
BentoModalDialogType: p,
|
|
486
|
+
BentoButtonActionsLayout: R
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
var ct = function() {
|
|
491
|
+
var t = this, o = t._self._c;
|
|
492
|
+
return t._self._setupProxy, o("base-modal", { staticClass: "b-modal-dialog", class: t.modalDialogConditionalClasses, attrs: { "hide-close-button": !0, size: t.BentoModalSize.SMALL, "is-dismissible": t.isDismissible, "is-open": t.isOpen, "overflow-visible": t.overflowVisible, "modal-role": t.BentoModalRole.ALERT_DIALOG, "initially-open": t.initiallyOpen }, on: { "close-modal": t.onCloseModal }, scopedSlots: t._u([{ key: "default", fn: function() {
|
|
493
|
+
return [t._t("default")];
|
|
494
|
+
}, proxy: !0 }, { key: "content", fn: function() {
|
|
495
|
+
return [t._v(" " + t._s(t.content) + " ")];
|
|
496
|
+
}, proxy: !0 }, { key: "actions", fn: function() {
|
|
497
|
+
return [t.dialogType === t.BentoModalDialogType.ACKNOWLEDGEMENT ? o("bento-button-actions", { attrs: { actions: t.acknowledgementDialogActions, layout: t.BentoButtonActionsLayout.BUTTONS_END } }) : o("bento-button-actions", { attrs: { actions: t.dialogActions, layout: t.BentoButtonActionsLayout.BUTTONS_END } })];
|
|
498
|
+
}, proxy: !0 }], null, !0) });
|
|
499
|
+
}, dt = [], mt = /* @__PURE__ */ O(
|
|
500
|
+
ut,
|
|
501
|
+
ct,
|
|
502
|
+
dt,
|
|
503
|
+
!1,
|
|
504
|
+
null,
|
|
505
|
+
null,
|
|
506
|
+
null,
|
|
507
|
+
null
|
|
508
|
+
);
|
|
509
|
+
const ft = mt.exports, pt = S({
|
|
510
|
+
name: "bento-modal",
|
|
511
|
+
components: { BentoModalDefault: it, BentoModalDialog: ft },
|
|
512
|
+
inheritAttrs: !1,
|
|
513
|
+
props: {
|
|
514
|
+
/**
|
|
515
|
+
* Choose between default or dialog versions of modal
|
|
516
|
+
*/
|
|
517
|
+
variant: {
|
|
518
|
+
type: String,
|
|
519
|
+
default: D.DEFAULT
|
|
520
|
+
},
|
|
521
|
+
// Shared Modal Default and Modal Default props
|
|
522
|
+
/**
|
|
523
|
+
* If set to true, it allows the modal to be closed by clicking outside of it
|
|
524
|
+
*/
|
|
525
|
+
isDismissible: {
|
|
526
|
+
type: Boolean,
|
|
527
|
+
default: null
|
|
528
|
+
},
|
|
529
|
+
/**
|
|
530
|
+
* If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown
|
|
531
|
+
*/
|
|
532
|
+
overflowVisible: {
|
|
533
|
+
type: Boolean,
|
|
534
|
+
default: !1
|
|
535
|
+
},
|
|
536
|
+
/**
|
|
537
|
+
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
538
|
+
*/
|
|
539
|
+
isOpen: {
|
|
540
|
+
type: Boolean,
|
|
541
|
+
default: !1
|
|
542
|
+
},
|
|
543
|
+
/**
|
|
544
|
+
* List of actions that will be used to render the buttons.
|
|
545
|
+
* First element in the list will be rendered as "primary".
|
|
546
|
+
* All elements after the first will be rendered as "secondary".
|
|
547
|
+
*
|
|
548
|
+
* Each object in the list should have a `title`, an `event` and
|
|
549
|
+
* (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
|
|
550
|
+
*
|
|
551
|
+
* `title`: Button's text.
|
|
552
|
+
*
|
|
553
|
+
* `event`: Event triggered when clicking the Button.
|
|
554
|
+
*
|
|
555
|
+
* `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
|
|
556
|
+
*
|
|
557
|
+
* ```
|
|
558
|
+
* [{
|
|
559
|
+
* title: 'Primary',2
|
|
560
|
+
* event: () => { ... },
|
|
561
|
+
* icon: FourPeopleIcon
|
|
562
|
+
* }, {
|
|
563
|
+
* title: 'Secondary',
|
|
564
|
+
* event: () => { ... }
|
|
565
|
+
* }]
|
|
566
|
+
* ```
|
|
567
|
+
*/
|
|
568
|
+
actions: {
|
|
569
|
+
type: Array,
|
|
570
|
+
default: null
|
|
571
|
+
},
|
|
572
|
+
// Specific to Modal Default props
|
|
573
|
+
/**
|
|
574
|
+
* Hides a cross icon on the right side of the title
|
|
575
|
+
*/
|
|
576
|
+
hideCloseButton: {
|
|
577
|
+
type: Boolean,
|
|
578
|
+
default: !1
|
|
579
|
+
},
|
|
580
|
+
/**
|
|
581
|
+
* Sets the width of the modal
|
|
582
|
+
*/
|
|
583
|
+
size: {
|
|
584
|
+
type: String,
|
|
585
|
+
default: h.SMALL
|
|
586
|
+
},
|
|
587
|
+
/**
|
|
588
|
+
* If provided, manages the padding of the whole modal container
|
|
589
|
+
*/
|
|
590
|
+
customPadding: {
|
|
591
|
+
type: String,
|
|
592
|
+
default: null
|
|
593
|
+
},
|
|
594
|
+
/**
|
|
595
|
+
* If provided, renders the modal's content in a two-column layout an wth dividers separating its content
|
|
596
|
+
*/
|
|
597
|
+
withColumnLayout: {
|
|
598
|
+
type: Boolean,
|
|
599
|
+
default: !1
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* 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.
|
|
603
|
+
*/
|
|
604
|
+
columnsSize: {
|
|
605
|
+
type: String,
|
|
606
|
+
default: y.SMALLER
|
|
607
|
+
},
|
|
608
|
+
/**
|
|
609
|
+
* Text label that is displayed left to the action buttons
|
|
610
|
+
*/
|
|
611
|
+
actionsLabel: {
|
|
612
|
+
type: String,
|
|
613
|
+
default: null
|
|
614
|
+
},
|
|
615
|
+
/**
|
|
616
|
+
* If passed - sets first button color to red
|
|
617
|
+
*/
|
|
618
|
+
destructiveActions: {
|
|
619
|
+
type: Boolean,
|
|
620
|
+
default: !1
|
|
621
|
+
},
|
|
622
|
+
// Specific to Modal dialog props
|
|
623
|
+
/**
|
|
624
|
+
* Changes the visual styling of action buttons
|
|
625
|
+
*/
|
|
626
|
+
dialogType: {
|
|
627
|
+
type: String,
|
|
628
|
+
default: p.CONFIRMATION
|
|
629
|
+
},
|
|
630
|
+
/**
|
|
631
|
+
* Text that will be displayed in the content section of Modal
|
|
632
|
+
*/
|
|
633
|
+
content: {
|
|
634
|
+
type: String,
|
|
635
|
+
default: null
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
emits: [c.CLOSE_MODAL],
|
|
639
|
+
setup(e, { slots: t, emit: o }) {
|
|
640
|
+
const {
|
|
641
|
+
variant: a,
|
|
642
|
+
hideCloseButton: n,
|
|
643
|
+
size: l,
|
|
644
|
+
isDismissible: s,
|
|
645
|
+
overflowVisible: u,
|
|
646
|
+
dialogType: _,
|
|
647
|
+
content: v,
|
|
648
|
+
customPadding: b,
|
|
649
|
+
actionsLabel: d,
|
|
650
|
+
destructiveActions: r,
|
|
651
|
+
withColumnLayout: m
|
|
652
|
+
} = E(e), A = i(
|
|
653
|
+
() => a.value === D.DEFAULT ? {
|
|
654
|
+
hideCloseButton: n.value,
|
|
655
|
+
size: l.value,
|
|
656
|
+
customPadding: b.value,
|
|
657
|
+
actionsLabel: d.value,
|
|
658
|
+
destructiveActions: r.value,
|
|
659
|
+
isDismissible: s.value ?? !0,
|
|
660
|
+
overflowVisible: u.value,
|
|
661
|
+
withColumnLayout: m.value
|
|
662
|
+
} : {
|
|
663
|
+
dialogType: _.value,
|
|
664
|
+
content: v.value,
|
|
665
|
+
isDismissible: s.value ?? !1,
|
|
666
|
+
overflowVisible: u.value
|
|
667
|
+
}
|
|
668
|
+
);
|
|
669
|
+
return {
|
|
670
|
+
onCloseModal: () => {
|
|
671
|
+
o(c.CLOSE_MODAL);
|
|
672
|
+
},
|
|
673
|
+
customProps: A,
|
|
674
|
+
hasSlot: f(t)
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
var yt = function() {
|
|
679
|
+
var t = this, o = t._self._c;
|
|
680
|
+
return t._self._setupProxy, o(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() {
|
|
681
|
+
return [t._t("default")];
|
|
682
|
+
}, proxy: !0 } : null, t.hasSlot("content-col-1") ? { key: "content-col-1", fn: function() {
|
|
683
|
+
return [t._t("content-col-1")];
|
|
684
|
+
}, proxy: !0 } : null, t.hasSlot("content-col-2") ? { key: "content-col-2", fn: function() {
|
|
685
|
+
return [t._t("content-col-2")];
|
|
686
|
+
}, proxy: !0 } : null, t.hasSlot("content") ? { key: "content", fn: function() {
|
|
687
|
+
return [t._t("content")];
|
|
688
|
+
}, proxy: !0 } : null], null, !0) }, "component", t.customProps, !1));
|
|
689
|
+
}, _t = [], vt = /* @__PURE__ */ O(
|
|
690
|
+
pt,
|
|
691
|
+
yt,
|
|
692
|
+
_t,
|
|
693
|
+
!1,
|
|
694
|
+
null,
|
|
695
|
+
null,
|
|
696
|
+
null,
|
|
697
|
+
null
|
|
698
|
+
);
|
|
699
|
+
const Tt = vt.exports;
|
|
700
|
+
export {
|
|
701
|
+
Tt as BentoModal,
|
|
702
|
+
y as BentoModalColumnLayoutVariant,
|
|
703
|
+
p as BentoModalDialogType,
|
|
704
|
+
c as BentoModalEvent,
|
|
705
|
+
B as BentoModalRole,
|
|
706
|
+
h as BentoModalSize,
|
|
707
|
+
D as BentoModalVariant
|
|
708
|
+
};
|
|
709
|
+
//# sourceMappingURL=modal.js.map
|