@adyen/bento-vue2 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/README.md +60 -29
- 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/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +1 -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 +2 -1
- 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 +43 -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/types/utils-events.d.ts +0 -1
- 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 -0
- package/dist/assets/index41.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 +93 -84
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/arrow-left.1d5d08bd.js +26 -0
- package/dist/chunks/arrow-left.1d5d08bd.js.map +1 -0
- package/dist/chunks/{base-button.d4487ac9.js → base-button.98379576.js} +2 -2
- package/dist/chunks/{base-button.d4487ac9.js.map → base-button.98379576.js.map} +1 -1
- package/dist/chunks/{button-actions.cf73ed47.js → button-actions.bd397c79.js} +2 -2
- package/dist/chunks/{button-actions.cf73ed47.js.map → button-actions.bd397c79.js.map} +1 -1
- package/dist/chunks/{button.c27a7ce2.js → button.d0c9527d.js} +2 -2
- package/dist/chunks/{button.c27a7ce2.js.map → button.d0c9527d.js.map} +1 -1
- package/dist/chunks/{calendar.8f50a65a.js → calendar.0ae43a96.js} +6 -6
- package/dist/chunks/calendar.0ae43a96.js.map +1 -0
- package/dist/chunks/{checkbox.c06daf12.js → checkbox.f8457c93.js} +3 -3
- package/dist/chunks/{checkbox.c06daf12.js.map → checkbox.f8457c93.js.map} +1 -1
- package/dist/chunks/controls-group.b827382b.js +87 -0
- package/dist/chunks/controls-group.b827382b.js.map +1 -0
- package/dist/chunks/{copy.b62beae5.js → copy.5a4cbd4d.js} +3 -3
- package/dist/chunks/{copy.b62beae5.js.map → copy.5a4cbd4d.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.a5eca928.js → dropdown-default-textbox.819e43f7.js} +32 -30
- package/dist/chunks/dropdown-default-textbox.819e43f7.js.map +1 -0
- package/dist/chunks/{dropdown.368486b1.js → dropdown.c05678d0.js} +142 -139
- package/dist/chunks/dropdown.c05678d0.js.map +1 -0
- package/dist/chunks/{error-message.a581a172.js → error-message.0433b539.js} +2 -2
- package/dist/chunks/{error-message.a581a172.js.map → error-message.0433b539.js.map} +1 -1
- package/dist/chunks/footer-actions.67642347.js +98 -0
- package/dist/chunks/footer-actions.67642347.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.3b6fc08a.js → index.0cf00b47.js} +6 -6
- package/dist/chunks/{index.3b6fc08a.js.map → index.0cf00b47.js.map} +1 -1
- package/dist/chunks/{index.f0d99471.js → index.10aaf539.js} +198 -192
- package/dist/chunks/{index.f0d99471.js.map → index.10aaf539.js.map} +1 -1
- package/dist/chunks/{index.ad39b625.js → index.133e4da0.js} +2 -2
- package/dist/chunks/{index.ad39b625.js.map → index.133e4da0.js.map} +1 -1
- package/dist/chunks/{index.175f9e2d.js → index.56858f4e.js} +15 -14
- package/dist/chunks/index.56858f4e.js.map +1 -0
- package/dist/chunks/{index.d07f9800.js → index.73d50fa6.js} +2 -2
- package/dist/chunks/{index.d07f9800.js.map → index.73d50fa6.js.map} +1 -1
- package/dist/chunks/{index.3dfea3bd.js → index.f0f8ed98.js} +3 -3
- package/dist/chunks/{index.3dfea3bd.js.map → index.f0f8ed98.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.c7e9a228.js → listbox-option-tag.8d6cccac.js} +3 -3
- package/dist/chunks/{listbox-option-tag.c7e9a228.js.map → listbox-option-tag.8d6cccac.js.map} +1 -1
- package/dist/chunks/{listbox.f51e92cd.js → listbox.116ed0c1.js} +177 -177
- package/dist/chunks/listbox.116ed0c1.js.map +1 -0
- package/dist/chunks/{loading-button.6d34f66f.js → loading-button.1c201f87.js} +10 -10
- package/dist/chunks/loading-button.1c201f87.js.map +1 -0
- package/dist/chunks/{tooltip.9af34fba.js → tooltip.2aff4fa6.js} +2 -2
- package/dist/chunks/tooltip.2aff4fa6.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 +149 -174
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +482 -499
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +80 -74
- 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 +72 -67
- package/dist/dropdown.js.map +1 -1
- package/dist/filter-bar.js +268 -265
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +174 -0
- package/dist/form-layout.js.map +1 -0
- package/dist/header.js +3 -3
- package/dist/index.js +164 -155
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +69 -67
- 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 +203 -324
- 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 +97 -99
- 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 +218 -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 +3 -3
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +84 -82
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +23 -23
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +2 -2
- package/dist/toggle.js +2 -2
- package/dist/typography.js +1 -1
- package/dist/web-types.json +455 -73
- package/package.json +10 -8
- package/dist/@types/packages/vue2/src/components/country/composables/useCountryFlag.d.ts +0 -2
- package/dist/chunks/calendar.8f50a65a.js.map +0 -1
- package/dist/chunks/controls-group.9d58a091.js +0 -64
- package/dist/chunks/controls-group.9d58a091.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.a5eca928.js.map +0 -1
- package/dist/chunks/dropdown.368486b1.js.map +0 -1
- package/dist/chunks/index.175f9e2d.js.map +0 -1
- package/dist/chunks/listbox.f51e92cd.js.map +0 -1
- package/dist/chunks/loading-button.6d34f66f.js.map +0 -1
- package/dist/chunks/tooltip.9af34fba.js.map +0 -1
package/dist/modal.js
CHANGED
|
@@ -1,278 +1,167 @@
|
|
|
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 { C as Q } from "./chunks/cross.a2cadac5.js";
|
|
11
|
-
import { G as J, a as X } from "./chunks/grid-layout.73f23b1b.js";
|
|
1
|
+
import { defineComponent as S, useAttrs as M, ref as N, computed as s, watch as P, onMounted as D, toRefs as I } from "vue";
|
|
2
|
+
import { B as G, a as L } from "./chunks/button.d0c9527d.js";
|
|
3
|
+
import { B as z, a as F, b as V } from "./chunks/index.56858f4e.js";
|
|
4
|
+
import { BentoDivider as $ } from "./divider.js";
|
|
5
|
+
import { B as q } from "./chunks/index.133e4da0.js";
|
|
6
|
+
import { u as O } from "./chunks/use-has-slot.068222e6.js";
|
|
7
|
+
import { u as w } from "./chunks/i18n.155748d6.js";
|
|
8
|
+
import { C as U } from "./chunks/cross.a2cadac5.js";
|
|
9
|
+
import { G as W, a as K } from "./chunks/grid-layout.73f23b1b.js";
|
|
12
10
|
import { n as A } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
13
|
-
import {
|
|
14
|
-
import "./
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
import { F as j } from "./chunks/footer-actions.67642347.js";
|
|
12
|
+
import { B as Y, c as H } from "./chunks/button-actions.bd397c79.js";
|
|
13
|
+
import "./assets/index17.css";
|
|
14
|
+
var B = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(B || {}), _ = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(_ || {}), m = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(m || {}), h = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(h || {}), c = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(c || {}), i = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(i || {});
|
|
15
|
+
const Q = {
|
|
17
16
|
"en-US": {
|
|
18
17
|
ariaLabelFallback: "modal"
|
|
19
18
|
}
|
|
20
|
-
},
|
|
21
|
-
i18n: { messages:
|
|
19
|
+
}, J = S({
|
|
20
|
+
i18n: { messages: Q },
|
|
22
21
|
name: "base-modal",
|
|
23
|
-
components: { CrossIcon:
|
|
22
|
+
components: { CrossIcon: U, BentoTypography: z, BentoButton: G, BentoDivider: $, BentoFocusTrap: q, GridLayout: W },
|
|
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: m.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: _.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: h.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: _.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: [
|
|
71
|
+
emits: [i.CLOSE_MODAL],
|
|
94
72
|
setup(e, { slots: t, emit: o }) {
|
|
95
|
-
const { t:
|
|
96
|
-
|
|
97
|
-
), g = u(() => {
|
|
98
|
-
if (!i.value)
|
|
73
|
+
const { t: a } = w(), d = M(), n = O(t), l = N(null), v = s(() => {
|
|
74
|
+
if (!e.customPadding)
|
|
99
75
|
return {};
|
|
100
|
-
const
|
|
101
|
-
paddingLeft:
|
|
102
|
-
paddingRight:
|
|
103
|
-
},
|
|
104
|
-
return
|
|
105
|
-
header: { ...
|
|
106
|
-
content:
|
|
107
|
-
actions: { ...
|
|
76
|
+
const f = {
|
|
77
|
+
paddingLeft: e.customPadding,
|
|
78
|
+
paddingRight: e.customPadding
|
|
79
|
+
}, E = { ...f, paddingTop: void 0, paddingBottom: void 0 };
|
|
80
|
+
return n("default") || (E.paddingTop = e.customPadding), n("actions") || (E.paddingBottom = e.customPadding), {
|
|
81
|
+
header: { ...f, paddingTop: e.customPadding },
|
|
82
|
+
content: E,
|
|
83
|
+
actions: { ...f, paddingBottom: e.customPadding }
|
|
108
84
|
};
|
|
109
|
-
}),
|
|
110
|
-
label
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}, $ = u(() => ({
|
|
85
|
+
}), y = s(
|
|
86
|
+
() => d["aria-label"] ?? a("ariaLabelFallback")
|
|
87
|
+
), p = s(() => e.withColumnLayout && e.size === _.LARGE), b = () => {
|
|
88
|
+
l.value.showModal();
|
|
89
|
+
}, g = () => {
|
|
90
|
+
o(i.CLOSE_MODAL);
|
|
91
|
+
}, r = () => {
|
|
92
|
+
l.value.close(), g();
|
|
93
|
+
}, u = () => {
|
|
94
|
+
r();
|
|
95
|
+
}, C = ({ target: f }) => {
|
|
96
|
+
f && f.tagName === h.DIALOG.toUpperCase() && r();
|
|
97
|
+
}, k = s(() => ({
|
|
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": p.value
|
|
102
|
+
})), x = s(() => ({
|
|
103
|
+
"b-modal-base__content--column-layout": p.value,
|
|
104
|
+
"b-modal-base__content--with-header": n("default"),
|
|
105
|
+
"b-modal-base__content--with-actions": n("actions")
|
|
106
|
+
})), R = s(() => e.columnsSize === m.SMALLER ? [{ small: 4, medium: 4, large: 4 }] : e.columnsSize === m.BIGGER ? [{ small: 8, medium: 8, large: 8 }] : [{ small: 6, medium: 6, large: 6 }]);
|
|
107
|
+
return P(
|
|
108
|
+
() => [e.isOpen, l.value],
|
|
134
109
|
() => {
|
|
135
|
-
|
|
110
|
+
e.isOpen && l.value ? b() : l.value && r();
|
|
136
111
|
},
|
|
137
112
|
{ immediate: !0 }
|
|
138
113
|
), D(() => {
|
|
139
|
-
|
|
114
|
+
e.isOpen && l.value && b();
|
|
140
115
|
}), {
|
|
141
116
|
// Refs
|
|
142
|
-
modal:
|
|
143
|
-
computedAriaLabel:
|
|
117
|
+
modal: l,
|
|
118
|
+
computedAriaLabel: y,
|
|
144
119
|
// Handling the state
|
|
145
|
-
openModal:
|
|
146
|
-
closeModalOnClickOutside:
|
|
120
|
+
openModal: b,
|
|
121
|
+
closeModalOnClickOutside: C,
|
|
147
122
|
// Methods
|
|
148
|
-
onCloseButtonClick:
|
|
149
|
-
hasSlot:
|
|
150
|
-
emitCloseEvent:
|
|
123
|
+
onCloseButtonClick: u,
|
|
124
|
+
hasSlot: n,
|
|
125
|
+
emitCloseEvent: g,
|
|
126
|
+
t: a,
|
|
151
127
|
// Styles
|
|
152
|
-
modalConditionalClasses:
|
|
153
|
-
modalContentConditionalClasses:
|
|
154
|
-
customPaddingStyles:
|
|
155
|
-
hasColumnLayout:
|
|
156
|
-
computedColumnWidth:
|
|
128
|
+
modalConditionalClasses: k,
|
|
129
|
+
modalContentConditionalClasses: x,
|
|
130
|
+
customPaddingStyles: v,
|
|
131
|
+
hasColumnLayout: p,
|
|
132
|
+
computedColumnWidth: R,
|
|
157
133
|
// Enums
|
|
158
|
-
BentoButtonVariant:
|
|
159
|
-
BentoTypographyElement:
|
|
160
|
-
BentoTypographyVariant:
|
|
161
|
-
GridLayoutContainerType:
|
|
134
|
+
BentoButtonVariant: L,
|
|
135
|
+
BentoTypographyElement: F,
|
|
136
|
+
BentoTypographyVariant: V,
|
|
137
|
+
GridLayoutContainerType: K
|
|
162
138
|
};
|
|
163
139
|
}
|
|
164
140
|
});
|
|
165
|
-
var
|
|
141
|
+
var X = function() {
|
|
166
142
|
var t = this, o = t._self._c;
|
|
167
|
-
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(
|
|
168
|
-
t.isDismissible && t.closeModalOnClickOutside(
|
|
169
|
-
}, keydown: function(
|
|
170
|
-
return !
|
|
143
|
+
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) {
|
|
144
|
+
t.isDismissible && t.closeModalOnClickOutside(a);
|
|
145
|
+
}, keydown: function(a) {
|
|
146
|
+
return !a.type.indexOf("key") && t._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : t.emitCloseEvent.apply(null, arguments);
|
|
171
147
|
} } }, [o("bento-focus-trap", [o("div", { staticClass: "b-modal-base__wrapper" }, [t.hasSlot("default") || !t.hideCloseButton ? o("div", { staticClass: "b-modal-base__header-container", style: t.customPaddingStyles.header }, [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.hasColumnLayout ? o("bento-divider", { staticClass: "b-modal-base__divider" }) : t._e()], 1) : t._e(), o("div", { staticClass: "b-modal-base__content", class: t.modalContentConditionalClasses, style: t.customPaddingStyles.content }, [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() {
|
|
172
148
|
return [t._t("content-col-1")];
|
|
173
149
|
}, proxy: !0 }, { key: "col-2", fn: function() {
|
|
174
150
|
return [t._t("content-col-2")];
|
|
175
151
|
}, proxy: !0 }], null, !0) }) : t._t("content")], 2) : t._e()], 1), t.hasSlot("actions") ? o("div", { staticClass: "b-modal-base__actions-container", style: t.customPaddingStyles.actions }, [t.hasColumnLayout ? o("bento-divider", { staticClass: "b-modal-base__divider" }) : t._e(), o("div", { staticClass: "b-modal-base__actions", attrs: { "aria-label": "modal actions" } }, [t._t("actions")], 2)], 1) : t._e()])])], 1)]);
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
152
|
+
}, Z = [], tt = /* @__PURE__ */ A(
|
|
153
|
+
J,
|
|
154
|
+
X,
|
|
155
|
+
Z,
|
|
180
156
|
!1,
|
|
181
157
|
null,
|
|
182
|
-
"
|
|
158
|
+
"68c26733",
|
|
183
159
|
null,
|
|
184
160
|
null
|
|
185
161
|
);
|
|
186
|
-
const
|
|
187
|
-
...at,
|
|
188
|
-
__name: "footer-actions",
|
|
189
|
-
props: {
|
|
190
|
-
/**
|
|
191
|
-
* List of actions that will be used to render the buttons.
|
|
192
|
-
* First element in the list will be rendered as "primary".
|
|
193
|
-
* All elements after the first will be rendered as "secondary".
|
|
194
|
-
* But you may change the color of 1-st action to red with 'critial' key
|
|
195
|
-
* Not more than 3 action buttons can be provided
|
|
196
|
-
* Or 2 action buttons and 1 Label for them
|
|
197
|
-
*
|
|
198
|
-
* Each object in the list should have a `title`, an `event` and
|
|
199
|
-
* (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
|
|
200
|
-
*
|
|
201
|
-
* `title`: Button's text.
|
|
202
|
-
*
|
|
203
|
-
* `event`: Event triggered when clicking the Button.
|
|
204
|
-
*
|
|
205
|
-
* `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
|
|
206
|
-
*
|
|
207
|
-
* ```
|
|
208
|
-
* [{
|
|
209
|
-
* title: 'Primary',2
|
|
210
|
-
* event: () => { ... },
|
|
211
|
-
* icon: FourPeopleIcon
|
|
212
|
-
* }, {
|
|
213
|
-
* title: 'Secondary',
|
|
214
|
-
* event: () => { ... }
|
|
215
|
-
* }]
|
|
216
|
-
* ```
|
|
217
|
-
*/
|
|
218
|
-
actions: {
|
|
219
|
-
type: Array,
|
|
220
|
-
required: !0
|
|
221
|
-
},
|
|
222
|
-
/**
|
|
223
|
-
* Text label that is displayed left to the action buttons
|
|
224
|
-
*/
|
|
225
|
-
actionsLabel: {
|
|
226
|
-
type: String,
|
|
227
|
-
default: null
|
|
228
|
-
},
|
|
229
|
-
/**
|
|
230
|
-
* If passed - sets first button color to red
|
|
231
|
-
*/
|
|
232
|
-
destructiveActions: {
|
|
233
|
-
type: Boolean,
|
|
234
|
-
default: !1
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
setup(e) {
|
|
238
|
-
const t = e, { actions: o, destructiveActions: n } = E(t), l = u(() => {
|
|
239
|
-
const a = o.value.length < 3 ? o.value : o.value.slice(0, o.value.length - 1);
|
|
240
|
-
return a[0].critical = n.value, {
|
|
241
|
-
leftAligned: o.value.length === 3 ? [
|
|
242
|
-
{
|
|
243
|
-
...o.value[o.value.length - 1],
|
|
244
|
-
variant: B.SECONDARY
|
|
245
|
-
}
|
|
246
|
-
] : null,
|
|
247
|
-
rightAligned: [...a]
|
|
248
|
-
};
|
|
249
|
-
});
|
|
250
|
-
return D(() => {
|
|
251
|
-
if (t.actions && t.actions.length > 3)
|
|
252
|
-
throw new Error("Not more than 3 action buttons may be provided to Bento Modal default variant");
|
|
253
|
-
if (t.actionsLabel && t.actions && t.actions.length > 2)
|
|
254
|
-
throw new Error(
|
|
255
|
-
"Not more than 2 action buttons may be provided with actions label to Bento Modal default variant"
|
|
256
|
-
);
|
|
257
|
-
}), { __sfc: !0, props: t, actions: o, destructiveActions: n, alignedActions: l, BentoTypography: w, BentoTypographyElement: k, BentoTypographyVariant: x, BentoButtonActions: R, BentoButtonActionsLayout: I };
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
var st = function() {
|
|
261
|
-
var t = this, o = t._self._c, n = t._self._setupProxy;
|
|
262
|
-
return o("div", { staticClass: "b-footer-actions" }, [t.actionsLabel ? o(n.BentoTypography, { attrs: { el: n.BentoTypographyElement.SPAN, variant: n.BentoTypographyVariant.BODY, stronger: "" } }, [t._v(" " + t._s(t.actionsLabel) + " ")]) : t._e(), n.alignedActions.leftAligned ? o(n.BentoButtonActions, { attrs: { actions: n.alignedActions.leftAligned, layout: n.BentoButtonActionsLayout.BUTTONS_START } }) : t._e(), o(n.BentoButtonActions, { attrs: { actions: n.alignedActions.rightAligned, layout: n.BentoButtonActionsLayout.BUTTONS_END } })], 1);
|
|
263
|
-
}, it = [], rt = /* @__PURE__ */ A(
|
|
264
|
-
lt,
|
|
265
|
-
st,
|
|
266
|
-
it,
|
|
267
|
-
!1,
|
|
268
|
-
null,
|
|
269
|
-
"aa6e74fc",
|
|
270
|
-
null,
|
|
271
|
-
null
|
|
272
|
-
);
|
|
273
|
-
const ut = rt.exports, ct = h({
|
|
162
|
+
const T = tt.exports, et = S({
|
|
274
163
|
name: "bento-modal-default",
|
|
275
|
-
components: { BaseModal:
|
|
164
|
+
components: { BaseModal: T, FooterActions: j },
|
|
276
165
|
props: {
|
|
277
166
|
/**
|
|
278
167
|
* Adds a cross icon on the right side of the alert
|
|
@@ -331,7 +220,7 @@ const ut = rt.exports, ct = h({
|
|
|
331
220
|
*/
|
|
332
221
|
columnsSize: {
|
|
333
222
|
type: String,
|
|
334
|
-
default:
|
|
223
|
+
default: m.SMALLER
|
|
335
224
|
},
|
|
336
225
|
/**
|
|
337
226
|
* List of actions that will be used to render the buttons.
|
|
@@ -387,24 +276,24 @@ const ut = rt.exports, ct = h({
|
|
|
387
276
|
default: !1
|
|
388
277
|
}
|
|
389
278
|
},
|
|
390
|
-
emits: [
|
|
279
|
+
emits: [i.CLOSE_MODAL],
|
|
391
280
|
setup(e, { slots: t, emit: o }) {
|
|
392
|
-
const
|
|
393
|
-
o(
|
|
281
|
+
const a = O(t), d = () => {
|
|
282
|
+
o(i.CLOSE_MODAL);
|
|
394
283
|
};
|
|
395
284
|
return D(() => {
|
|
396
|
-
if (!(
|
|
285
|
+
if (!(a("content") || a("content-col-1") && a("content-col-2")))
|
|
397
286
|
throw new Error("Bento Modal default variant requires content slot or column slots");
|
|
398
287
|
}), {
|
|
399
288
|
// Methods
|
|
400
|
-
onCloseModal:
|
|
401
|
-
hasSlot:
|
|
289
|
+
onCloseModal: d,
|
|
290
|
+
hasSlot: a
|
|
402
291
|
};
|
|
403
292
|
}
|
|
404
293
|
});
|
|
405
|
-
var
|
|
294
|
+
var ot = function() {
|
|
406
295
|
var t = this, o = t._self._c;
|
|
407
|
-
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() {
|
|
296
|
+
return t._self._setupProxy, o("base-modal", t._b({ 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() {
|
|
408
297
|
return [t._t("default")];
|
|
409
298
|
}, proxy: !0 } : null, { key: "content-col-1", fn: function() {
|
|
410
299
|
return [t._t("content-col-1")];
|
|
@@ -416,25 +305,25 @@ var dt = function() {
|
|
|
416
305
|
return [t._t("actions", function() {
|
|
417
306
|
return [o("footer-actions", { attrs: { actions: t.actions, "actions-label": t.actionsLabel, "destructive-actions": t.destructiveActions } })];
|
|
418
307
|
})];
|
|
419
|
-
}, proxy: !0 } : null], null, !0) });
|
|
420
|
-
},
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
308
|
+
}, proxy: !0 } : null], null, !0) }, "base-modal", t.$attrs, !1));
|
|
309
|
+
}, nt = [], at = /* @__PURE__ */ A(
|
|
310
|
+
et,
|
|
311
|
+
ot,
|
|
312
|
+
nt,
|
|
424
313
|
!1,
|
|
425
314
|
null,
|
|
426
315
|
null,
|
|
427
316
|
null,
|
|
428
317
|
null
|
|
429
318
|
);
|
|
430
|
-
const
|
|
319
|
+
const lt = at.exports, st = {
|
|
431
320
|
"en-US": {
|
|
432
321
|
okButtonText: "OK"
|
|
433
322
|
}
|
|
434
|
-
},
|
|
435
|
-
i18n: { messages:
|
|
323
|
+
}, it = S({
|
|
324
|
+
i18n: { messages: st },
|
|
436
325
|
name: "bento-modal-dialog",
|
|
437
|
-
components: { BaseModal:
|
|
326
|
+
components: { BaseModal: T, BentoButtonActions: Y },
|
|
438
327
|
props: {
|
|
439
328
|
/**
|
|
440
329
|
* Controls the modal's state from the outside. Set it to true to open the modal
|
|
@@ -504,88 +393,88 @@ const pt = mt.exports, _t = {
|
|
|
504
393
|
default: !1
|
|
505
394
|
}
|
|
506
395
|
},
|
|
507
|
-
emits: [
|
|
396
|
+
emits: [i.CLOSE_MODAL],
|
|
508
397
|
setup(e, { slots: t, emit: o }) {
|
|
509
|
-
const { t:
|
|
510
|
-
o(
|
|
511
|
-
},
|
|
512
|
-
|
|
513
|
-
},
|
|
398
|
+
const { t: a } = w(), d = O(t), { actions: n, dialogType: l } = I(e), v = () => {
|
|
399
|
+
o(i.CLOSE_MODAL);
|
|
400
|
+
}, y = () => {
|
|
401
|
+
v();
|
|
402
|
+
}, p = s(() => [
|
|
514
403
|
{
|
|
515
|
-
title:
|
|
516
|
-
event:
|
|
517
|
-
variant:
|
|
404
|
+
title: a("okButtonText"),
|
|
405
|
+
event: y,
|
|
406
|
+
variant: L.SECONDARY
|
|
518
407
|
}
|
|
519
|
-
]),
|
|
520
|
-
var
|
|
521
|
-
const
|
|
408
|
+
]), b = s(() => {
|
|
409
|
+
var C;
|
|
410
|
+
const r = {
|
|
522
411
|
title: "Cancel",
|
|
523
|
-
event:
|
|
524
|
-
},
|
|
525
|
-
return
|
|
526
|
-
}),
|
|
527
|
-
[`b-modal-dialog--${
|
|
412
|
+
event: y
|
|
413
|
+
}, u = (C = n == null ? void 0 : n.value) == null ? void 0 : C[0];
|
|
414
|
+
return l.value === c.DESTRUCTIVE ? u.critical = !0 : l.value === c.INFO && (u.variant = L.SECONDARY), [u, r];
|
|
415
|
+
}), g = s(() => ({
|
|
416
|
+
[`b-modal-dialog--${l.value}`]: l.value
|
|
528
417
|
}));
|
|
529
418
|
return D(() => {
|
|
530
|
-
var
|
|
531
|
-
if (!
|
|
419
|
+
var r, u;
|
|
420
|
+
if (!d("default") || !e.content)
|
|
532
421
|
throw new Error("Bento Modal Dialog requires header title and content");
|
|
533
|
-
if (((
|
|
422
|
+
if (((r = n == null ? void 0 : n.value) == null ? void 0 : r.length) > 1)
|
|
534
423
|
throw new Error("Not more than 1 action button may be provided to Modal Dialog");
|
|
535
|
-
if (
|
|
424
|
+
if (l.value !== c.ACKNOWLEDGEMENT && !(n != null && n.value))
|
|
536
425
|
throw new Error(
|
|
537
426
|
"Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button"
|
|
538
427
|
);
|
|
539
|
-
if (
|
|
428
|
+
if (l.value === c.ACKNOWLEDGEMENT && ((u = n == null ? void 0 : n.value) != null && u.length))
|
|
540
429
|
throw new Error("Acknowledgement Modal Dialog does not accept action buttons");
|
|
541
430
|
}), {
|
|
542
431
|
// Values
|
|
543
|
-
dialogActions:
|
|
544
|
-
acknowledgementDialogActions:
|
|
432
|
+
dialogActions: b,
|
|
433
|
+
acknowledgementDialogActions: p,
|
|
545
434
|
// Methods
|
|
546
|
-
onCloseModal:
|
|
547
|
-
onCloseActionButton:
|
|
435
|
+
onCloseModal: v,
|
|
436
|
+
onCloseActionButton: y,
|
|
548
437
|
// Styles
|
|
549
|
-
modalDialogConditionalClasses:
|
|
438
|
+
modalDialogConditionalClasses: g,
|
|
550
439
|
// Enums
|
|
551
|
-
BentoModalRole:
|
|
552
|
-
BentoModalSize:
|
|
553
|
-
BentoButtonVariant:
|
|
554
|
-
BentoModalDialogType:
|
|
555
|
-
BentoButtonActionsLayout:
|
|
440
|
+
BentoModalRole: h,
|
|
441
|
+
BentoModalSize: _,
|
|
442
|
+
BentoButtonVariant: L,
|
|
443
|
+
BentoModalDialogType: c,
|
|
444
|
+
BentoButtonActionsLayout: H
|
|
556
445
|
};
|
|
557
446
|
}
|
|
558
447
|
});
|
|
559
|
-
var
|
|
448
|
+
var rt = function() {
|
|
560
449
|
var t = this, o = t._self._c;
|
|
561
|
-
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() {
|
|
450
|
+
return t._self._setupProxy, o("base-modal", t._b({ 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() {
|
|
562
451
|
return [t._t("default")];
|
|
563
452
|
}, proxy: !0 }, { key: "content", fn: function() {
|
|
564
453
|
return [t._v(" " + t._s(t.content) + " ")];
|
|
565
454
|
}, proxy: !0 }, { key: "actions", fn: function() {
|
|
566
455
|
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 } })];
|
|
567
|
-
}, proxy: !0 }], null, !0) });
|
|
568
|
-
},
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
456
|
+
}, proxy: !0 }], null, !0) }, "base-modal", t.$attrs, !1));
|
|
457
|
+
}, ut = [], ct = /* @__PURE__ */ A(
|
|
458
|
+
it,
|
|
459
|
+
rt,
|
|
460
|
+
ut,
|
|
572
461
|
!1,
|
|
573
462
|
null,
|
|
574
463
|
null,
|
|
575
464
|
null,
|
|
576
465
|
null
|
|
577
466
|
);
|
|
578
|
-
const
|
|
467
|
+
const dt = ct.exports, mt = S({
|
|
579
468
|
name: "bento-modal",
|
|
580
|
-
components: { BentoModalDefault:
|
|
469
|
+
components: { BentoModalDefault: lt, BentoModalDialog: dt },
|
|
581
470
|
props: {
|
|
582
471
|
/**
|
|
583
472
|
* Choose between default or dialog versions of modal
|
|
584
473
|
*/
|
|
585
474
|
variant: {
|
|
586
475
|
type: String,
|
|
587
|
-
default:
|
|
588
|
-
validator: (e) => Object.values(
|
|
476
|
+
default: B.DEFAULT,
|
|
477
|
+
validator: (e) => Object.values(B).includes(e)
|
|
589
478
|
},
|
|
590
479
|
// Shared Modal Default and Modal Default props
|
|
591
480
|
/**
|
|
@@ -651,8 +540,8 @@ const Ct = gt.exports, Bt = h({
|
|
|
651
540
|
*/
|
|
652
541
|
size: {
|
|
653
542
|
type: String,
|
|
654
|
-
default:
|
|
655
|
-
validator: (e) => Object.values(
|
|
543
|
+
default: _.SMALL,
|
|
544
|
+
validator: (e) => Object.values(_).includes(e)
|
|
656
545
|
},
|
|
657
546
|
/**
|
|
658
547
|
* If provided, manages the padding of the whole modal container
|
|
@@ -673,8 +562,8 @@ const Ct = gt.exports, Bt = h({
|
|
|
673
562
|
*/
|
|
674
563
|
columnsSize: {
|
|
675
564
|
type: String,
|
|
676
|
-
default:
|
|
677
|
-
validator: (e) => Object.values(
|
|
565
|
+
default: m.SMALLER,
|
|
566
|
+
validator: (e) => Object.values(m).includes(e)
|
|
678
567
|
},
|
|
679
568
|
/**
|
|
680
569
|
* Text label that is displayed left to the action buttons
|
|
@@ -696,8 +585,8 @@ const Ct = gt.exports, Bt = h({
|
|
|
696
585
|
*/
|
|
697
586
|
dialogType: {
|
|
698
587
|
type: String,
|
|
699
|
-
default:
|
|
700
|
-
validator: (e) => Object.values(
|
|
588
|
+
default: c.CONFIRMATION,
|
|
589
|
+
validator: (e) => Object.values(c).includes(e)
|
|
701
590
|
},
|
|
702
591
|
/**
|
|
703
592
|
* Text that will be displayed in the content section of Modal
|
|
@@ -707,47 +596,37 @@ const Ct = gt.exports, Bt = h({
|
|
|
707
596
|
default: null
|
|
708
597
|
}
|
|
709
598
|
},
|
|
710
|
-
emits: [
|
|
599
|
+
emits: [i.CLOSE_MODAL],
|
|
711
600
|
setup(e, { slots: t, emit: o }) {
|
|
712
|
-
const
|
|
713
|
-
variant
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
withColumnLayout: r
|
|
724
|
-
} = E(e), p = u(
|
|
725
|
-
() => n.value === S.DEFAULT ? {
|
|
726
|
-
hideCloseButton: l.value,
|
|
727
|
-
size: a.value,
|
|
728
|
-
customPadding: g.value,
|
|
729
|
-
actionsLabel: C.value,
|
|
730
|
-
destructiveActions: c.value,
|
|
731
|
-
isDismissible: s.value ?? !0,
|
|
732
|
-
overflowVisible: i.value,
|
|
733
|
-
withColumnLayout: r.value
|
|
601
|
+
const a = M(), d = s(
|
|
602
|
+
() => e.variant === B.DEFAULT ? {
|
|
603
|
+
hideCloseButton: e.hideCloseButton,
|
|
604
|
+
size: e.size,
|
|
605
|
+
customPadding: e.customPadding,
|
|
606
|
+
actionsLabel: e.actionsLabel,
|
|
607
|
+
destructiveActions: e.destructiveActions,
|
|
608
|
+
isDismissible: e.isDismissible ?? !0,
|
|
609
|
+
overflowVisible: e.overflowVisible,
|
|
610
|
+
withColumnLayout: e.withColumnLayout,
|
|
611
|
+
...a
|
|
734
612
|
} : {
|
|
735
|
-
dialogType:
|
|
736
|
-
content:
|
|
737
|
-
isDismissible:
|
|
738
|
-
overflowVisible:
|
|
613
|
+
dialogType: e.dialogType,
|
|
614
|
+
content: e.content,
|
|
615
|
+
isDismissible: e.isDismissible ?? !1,
|
|
616
|
+
overflowVisible: e.overflowVisible,
|
|
617
|
+
...a
|
|
739
618
|
}
|
|
740
619
|
);
|
|
741
620
|
return {
|
|
742
621
|
onCloseModal: () => {
|
|
743
|
-
o(
|
|
622
|
+
o(i.CLOSE_MODAL);
|
|
744
623
|
},
|
|
745
|
-
customProps:
|
|
746
|
-
hasSlot:
|
|
624
|
+
customProps: d,
|
|
625
|
+
hasSlot: O(t)
|
|
747
626
|
};
|
|
748
627
|
}
|
|
749
628
|
});
|
|
750
|
-
var
|
|
629
|
+
var ft = function() {
|
|
751
630
|
var t = this, o = t._self._c;
|
|
752
631
|
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() {
|
|
753
632
|
return [t._t("default")];
|
|
@@ -758,24 +637,24 @@ var ht = function() {
|
|
|
758
637
|
}, proxy: !0 } : null, t.hasSlot("content") ? { key: "content", fn: function() {
|
|
759
638
|
return [t._t("content")];
|
|
760
639
|
}, proxy: !0 } : null], null, !0) }, "component", t.customProps, !1));
|
|
761
|
-
},
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
640
|
+
}, _t = [], yt = /* @__PURE__ */ A(
|
|
641
|
+
mt,
|
|
642
|
+
ft,
|
|
643
|
+
_t,
|
|
765
644
|
!1,
|
|
766
645
|
null,
|
|
767
646
|
null,
|
|
768
647
|
null,
|
|
769
648
|
null
|
|
770
649
|
);
|
|
771
|
-
const
|
|
650
|
+
const Dt = yt.exports;
|
|
772
651
|
export {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
652
|
+
Dt as BentoModal,
|
|
653
|
+
m as BentoModalColumnLayoutVariant,
|
|
654
|
+
c as BentoModalDialogType,
|
|
655
|
+
i as BentoModalEvent,
|
|
656
|
+
h as BentoModalRole,
|
|
657
|
+
_ as BentoModalSize,
|
|
658
|
+
B as BentoModalVariant
|
|
780
659
|
};
|
|
781
660
|
//# sourceMappingURL=modal.js.map
|