@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/focus-trap.js
CHANGED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { defineComponent as d, useSlots as b, computed as i, provide as A, toRef as $, openBlock as c, createBlock as v, resolveDynamicComponent as F, unref as t, withCtx as u, renderSlot as l, createCommentVNode as L, createElementBlock as p, createElementVNode as g, createVNode as B, onMounted as N, ref as S, normalizeClass as E } from "vue";
|
|
2
|
+
import { BentoAlert as T, BentoAlertTypeOption as I, BentoAlertVariant as k } from "./alert.js";
|
|
3
|
+
import { u as C } from "./chunks/use-has-slot.068222e6.js";
|
|
4
|
+
import { F as G } from "./chunks/form-layout.types.a7a1438d.js";
|
|
5
|
+
import { _ as m } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
6
|
+
import { B as y, a as h, b as O } from "./chunks/index.222d29b0.js";
|
|
7
|
+
import "./assets/index29.css";
|
|
8
|
+
const V = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "b-form-layout__actions-container"
|
|
11
|
+
}, P = { class: "b-form-layout__actions" }, R = { class: "b-form-layout__actions" }, q = {}, w = /* @__PURE__ */ d({
|
|
12
|
+
...q,
|
|
13
|
+
__name: "form-layout",
|
|
14
|
+
props: {
|
|
15
|
+
/**
|
|
16
|
+
* Renders the form layout as an HTML `form`
|
|
17
|
+
*/
|
|
18
|
+
form: { type: Boolean, default: !1 },
|
|
19
|
+
/**
|
|
20
|
+
* Sets the state of the form and its fields to
|
|
21
|
+
* a read only status.
|
|
22
|
+
*/
|
|
23
|
+
loading: { type: Boolean, default: !1 }
|
|
24
|
+
},
|
|
25
|
+
setup(e) {
|
|
26
|
+
const o = e, r = b(), n = C(r), s = i(() => o.form ? "form" : "div"), _ = i(() => n("actions-left") || n("actions-right"));
|
|
27
|
+
return A(G, $(o, "loading")), (a, f) => (c(), v(F(t(s)), {
|
|
28
|
+
class: "b-form-layout",
|
|
29
|
+
role: "form"
|
|
30
|
+
}, {
|
|
31
|
+
default: u(() => [
|
|
32
|
+
t(n)("error-message") ? (c(), v(t(T), {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "b-form-layout__error-message",
|
|
35
|
+
type: t(I).CRITICAL
|
|
36
|
+
}, {
|
|
37
|
+
description: u(() => [
|
|
38
|
+
l(a.$slots, "error-message", {}, void 0, !0)
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 8, ["type"])) : L("", !0),
|
|
42
|
+
l(a.$slots, "default", {}, void 0, !0),
|
|
43
|
+
t(_) ? (c(), p("div", V, [
|
|
44
|
+
g("div", P, [
|
|
45
|
+
l(a.$slots, "actions-left", {}, void 0, !0)
|
|
46
|
+
]),
|
|
47
|
+
g("div", R, [
|
|
48
|
+
l(a.$slots, "actions-right", {}, void 0, !0)
|
|
49
|
+
])
|
|
50
|
+
])) : L("", !0)
|
|
51
|
+
]),
|
|
52
|
+
_: 3
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const tt = /* @__PURE__ */ m(w, [["__scopeId", "data-v-faf51cac"]]), x = { class: "b-form-layout-field-tip" }, D = {}, M = /* @__PURE__ */ d({
|
|
57
|
+
...D,
|
|
58
|
+
__name: "form-layout-field-tip",
|
|
59
|
+
setup(e) {
|
|
60
|
+
return (o, r) => (c(), p("div", x, [
|
|
61
|
+
l(o.$slots, "default", {}, void 0, !0),
|
|
62
|
+
B(t(T), {
|
|
63
|
+
variant: t(k).TIP,
|
|
64
|
+
type: t(I).WARNING
|
|
65
|
+
}, {
|
|
66
|
+
description: u(() => [
|
|
67
|
+
l(o.$slots, "message", {}, void 0, !0)
|
|
68
|
+
]),
|
|
69
|
+
_: 3
|
|
70
|
+
}, 8, ["variant", "type"])
|
|
71
|
+
]));
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
const ot = /* @__PURE__ */ m(M, [["__scopeId", "data-v-9031784f"]]), Y = (e, o) => {
|
|
75
|
+
const r = (s) => {
|
|
76
|
+
var _;
|
|
77
|
+
return (_ = s.split) == null ? void 0 : _.call(s, "-").map((a) => parseInt(a, 10));
|
|
78
|
+
}, n = i(() => r(e.value));
|
|
79
|
+
N(() => {
|
|
80
|
+
const s = o.value.classList[0];
|
|
81
|
+
o.value.querySelectorAll(`.${s} > *`).forEach((a, f) => {
|
|
82
|
+
a.classList.add(`${s}--${n.value[f] || "100"}`);
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}, j = {}, z = /* @__PURE__ */ d({
|
|
86
|
+
...j,
|
|
87
|
+
__name: "form-layout-group",
|
|
88
|
+
props: {
|
|
89
|
+
/**
|
|
90
|
+
* The layout of the pair group of components.
|
|
91
|
+
* This will render the components within the width of the proportions.
|
|
92
|
+
* Only two colums are available.
|
|
93
|
+
*
|
|
94
|
+
* If only one value is entered, then it will assume there's only one child in the group.
|
|
95
|
+
* If two values are entered, the first value will be use for the first child and the second
|
|
96
|
+
* value for the second child.
|
|
97
|
+
*
|
|
98
|
+
* If the value entered is not listed in the example
|
|
99
|
+
* list below it will use 100% by default.
|
|
100
|
+
* @example
|
|
101
|
+
* '50-50'
|
|
102
|
+
* '25-75'
|
|
103
|
+
* '75-25'
|
|
104
|
+
* '33-66'
|
|
105
|
+
* '66-33'
|
|
106
|
+
* '25'
|
|
107
|
+
* '33'
|
|
108
|
+
* '50'
|
|
109
|
+
* '100'
|
|
110
|
+
*/
|
|
111
|
+
layout: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: "100"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
setup(e) {
|
|
117
|
+
const o = e, r = S(null);
|
|
118
|
+
return Y($(o, "layout"), r), (n, s) => (c(), p("div", {
|
|
119
|
+
ref_key: "formLayoutGroup",
|
|
120
|
+
ref: r,
|
|
121
|
+
class: "b-form-layout-group"
|
|
122
|
+
}, [
|
|
123
|
+
l(n.$slots, "default", {}, void 0, !0)
|
|
124
|
+
], 512));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const et = /* @__PURE__ */ m(z, [["__scopeId", "data-v-a76530eb"]]), H = {}, J = /* @__PURE__ */ d({
|
|
128
|
+
...H,
|
|
129
|
+
__name: "form-layout-title",
|
|
130
|
+
props: {
|
|
131
|
+
/**
|
|
132
|
+
* Defines if the Form Layout title is
|
|
133
|
+
* a "section" or a "subsection".
|
|
134
|
+
* Default is "section" (false). Turn into "true" for "subsection"
|
|
135
|
+
*/
|
|
136
|
+
subsection: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: !1
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* Sets the HTML DOM element.
|
|
142
|
+
* @values h1, h2, h3, h4, h5, h6, div, p, span
|
|
143
|
+
*/
|
|
144
|
+
el: {
|
|
145
|
+
type: y.props.el.type,
|
|
146
|
+
required: !0,
|
|
147
|
+
validator: (e) => Object.values(h).includes(e)
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
setup(e) {
|
|
151
|
+
const o = e, r = b(), n = i(() => !o.subsection), s = C(r), _ = i(() => ({
|
|
152
|
+
"b-form-layout-title--subsection": o.subsection
|
|
153
|
+
}));
|
|
154
|
+
return (a, f) => (c(), p("div", {
|
|
155
|
+
class: E(["b-form-layout-title", t(_)])
|
|
156
|
+
}, [
|
|
157
|
+
B(t(y), {
|
|
158
|
+
el: e.el,
|
|
159
|
+
variant: t(O).TITLE,
|
|
160
|
+
medium: t(n)
|
|
161
|
+
}, {
|
|
162
|
+
default: u(() => [
|
|
163
|
+
l(a.$slots, "default", {}, void 0, !0)
|
|
164
|
+
]),
|
|
165
|
+
_: 3
|
|
166
|
+
}, 8, ["el", "variant", "medium"]),
|
|
167
|
+
t(s)("description") ? (c(), v(t(y), {
|
|
168
|
+
key: 0,
|
|
169
|
+
class: "b-form-layout-title__description",
|
|
170
|
+
el: t(h).SPAN,
|
|
171
|
+
wide: ""
|
|
172
|
+
}, {
|
|
173
|
+
default: u(() => [
|
|
174
|
+
l(a.$slots, "description", {}, void 0, !0)
|
|
175
|
+
]),
|
|
176
|
+
_: 3
|
|
177
|
+
}, 8, ["el"])) : L("", !0)
|
|
178
|
+
], 2));
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
const st = /* @__PURE__ */ m(J, [["__scopeId", "data-v-80175605"]]);
|
|
182
|
+
export {
|
|
183
|
+
tt as BentoFormLayout,
|
|
184
|
+
ot as BentoFormLayoutFieldTip,
|
|
185
|
+
et as BentoFormLayoutGroup,
|
|
186
|
+
st as BentoFormLayoutTitle
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=form-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-layout.js","sources":["../../vue2/src/components/form-layout/form-layout.vue","../../vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../../vue2/src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../../vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue","../../vue2/src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\">\n <bento-alert\n v-if=\"hasSlot('error-message')\"\n class=\"b-form-layout__error-message\"\n :type=\"BentoAlertTypeOption.CRITICAL\"\n >\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert, BentoAlertTypeOption } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert :variant=\"BentoAlertVariant.TIP\" :type=\"BentoAlertTypeOption.WARNING\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoAlert, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert';\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","import { computed, onMounted, Ref } from 'vue';\nimport { BentoLayoutGroupProportions } from '../form-layout-group.types';\n\n/**\n * Calculates the CSS classes based on the percentage\n * for each one of the layouts in format `##-##` or `##`.\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoLayoutGroupProportions>} layoutProp Layout string in the format `##` or `##-##`\n * @param {Ref<HTMLElement>} formLayoutGroupRef Reference to an HTML element of type BentoFormLayoutGroup\n */\nexport const useFormLayoutGroupPercentage = (\n layoutProp: Ref<BentoLayoutGroupProportions>,\n formLayoutGroupRef: Ref<HTMLElement>\n) => {\n // Split the `##-##` format into individual values [##, ##]\n const getLayoutValues = layout => layout.split?.('-').map(value => parseInt(value, 10));\n const layout = computed(() => getLayoutValues(layoutProp.value));\n\n onMounted(() => {\n // Apply class to every immediate child\n const layoutClassName = formLayoutGroupRef.value.classList[0];\n const immediateChildren = formLayoutGroupRef.value.querySelectorAll(`.${layoutClassName} > *`); // Get immediate children\n immediateChildren.forEach((child, index) => {\n child.classList.add(`${layoutClassName}--${layout.value[index] || '100'}`); // 100% default\n });\n });\n};\n","<template>\n <div ref=\"formLayoutGroup\" class=\"b-form-layout-group\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineProps, PropType, ref, toRef } from 'vue';\n import { useFormLayoutGroupPercentage } from './composable/use-form-layout-group-percentage';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n },\n });\n\n const formLayoutGroup = ref(null);\n useFormLayoutGroupPercentage(toRef(props, 'layout'), formLayoutGroup);\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" :variant=\"BentoTypographyVariant.TITLE\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-form-layout-title__description\"\n :el=\"BentoTypographyElement.SPAN\"\n wide\n >\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * An element of type @see BentoTypographyElement must always be provided\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection :el=\"BentoTypographyElement.H2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","__default__$2","useFormLayoutGroupPercentage","layoutProp","formLayoutGroupRef","getLayoutValues","layout2","_a","value","layout","onMounted","layoutClassName","child","index","__default__$1","formLayoutGroup","ref","__default__","isSection","conditionalClasses"],"mappings":";;;;;;;;;;qFA0FIA,IAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+GCbAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;qECzBSC,IAAA,CAAAC,GAAAC,MAAA;AAKT,QAAAC,IAAA,CAAAC,MAAA;;AAAA,YAAAC,IAAAD,EAAA,UAAA,gBAAAC,EAAA,KAAAD,GAAA,KAAA,IAAA,CAAAE,MAAA,SAAAA,GAAA,EAAA;AAAA,KACAC,IAAAd,EAAA,MAAAU,EAAAF,EAAA,KAAA,CAAA;AAEA,EAAAO,EAAA,MAAA;AAEI,UAAAC,IAAAP,EAAA,MAAA,UAAA,CAAA;AAEA,IADAA,EAAA,MAAA,iBAAA,IAAAO,OAAA,EACA,QAAA,CAAAC,GAAAC,MAAA;AACI,MAAAD,EAAA,UAAA,IAAA,GAAAD,MAAAF,EAAA,MAAAI,CAAA,KAAA,OAAA;AAAA,IAAyE,CAAA;AAAA,EAC5E,CAAA;AAET,GCoCIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzBAC,IAAAC,EAAA,IAAA;AACA,WAAAd,EAAAF,EAAAJ,GAAA,QAAA,GAAAmB,CAAA;;;;;;;;;qECoCAE,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDA3B,IAAAC,EAAA,GAyBA2B,IAAAvB,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACA6B,IAAAxB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/header.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as Y, computed as N, resolveComponent as v, openBlock as p, createElementBlock as R, createElementVNode as _, createVNode as k, mergeProps as V, withCtx as S, createTextVNode as E, toDisplayString as O, createBlock as M, createCommentVNode as T } from "vue";
|
|
2
2
|
import { BentoInfoIcon as G } from "./info-icon.js";
|
|
3
3
|
import { u as L } from "./chunks/use-has-slot.068222e6.js";
|
|
4
|
-
import { B as $, a as D, b as A } from "./chunks/index.
|
|
4
|
+
import { B as $, a as D, b as A } from "./chunks/index.222d29b0.js";
|
|
5
5
|
import { u as F } from "./chunks/i18n.6c402773.js";
|
|
6
6
|
import { c as h, a as j } from "./chunks/index.86453263.js";
|
|
7
7
|
import { r as c, t as i, e as b, g as B, d as q, f as z } from "./chunks/index.f55fdc32.js";
|
|
8
8
|
import { e as W } from "./chunks/index.fdf12170.js";
|
|
9
|
-
import { B as J } from "./chunks/button-actions.
|
|
9
|
+
import { B as J } from "./chunks/button-actions.54e28e75.js";
|
|
10
10
|
import { _ as K } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
11
|
-
import "./assets/
|
|
11
|
+
import "./assets/index16.css";
|
|
12
12
|
function Q(e, a) {
|
|
13
13
|
c(2, arguments);
|
|
14
14
|
var r = i(e), t = i(a), l = r.getFullYear() - t.getFullYear(), n = r.getMonth() - t.getMonth();
|