@adyen/bento-vue3 1.76.2 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +216 -33
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown-tag.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/payment-method.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/tag.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.COUx8Ne8.js} +2 -2
- package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.COUx8Ne8.js.map} +1 -1
- package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.SffuKyNj.js} +3 -3
- package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.SffuKyNj.js.map} +1 -1
- package/dist/chunks/{code-snippet.Bjf1ma1L.js → code-snippet.ByoBEM00.js} +2 -2
- package/dist/chunks/{code-snippet.Bjf1ma1L.js.map → code-snippet.ByoBEM00.js.map} +1 -1
- package/dist/chunks/{currency.CBZMwm21.js → currency.WmvQjX7l.js} +2 -2
- package/dist/chunks/{currency.CBZMwm21.js.map → currency.WmvQjX7l.js.map} +1 -1
- package/dist/chunks/{data-grid.VBEJO94f.js → data-grid.CMIG82Xt.js} +7 -7
- package/dist/chunks/{data-grid.VBEJO94f.js.map → data-grid.CMIG82Xt.js.map} +1 -1
- package/dist/chunks/date-picker.CsGq3iSK.js +244 -0
- package/dist/chunks/date-picker.CsGq3iSK.js.map +1 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js +5 -0
- package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -0
- package/dist/chunks/date-range-picker.C19CWG27.js +1149 -0
- package/dist/chunks/date-range-picker.C19CWG27.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.MkU0tMf1.js → dropdown-default-textbox._KEBXjKT.js} +88 -86
- package/dist/chunks/dropdown-default-textbox._KEBXjKT.js.map +1 -0
- package/dist/chunks/dropdown-tag.B90dpg8J.js +301 -0
- package/dist/chunks/dropdown-tag.B90dpg8J.js.map +1 -0
- package/dist/chunks/dropdown.DYDHM__3.js +833 -0
- package/dist/chunks/{dropdown.KStrJVoP.js.map → dropdown.DYDHM__3.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{file-uploader.By0MTfKk.js → file-uploader.BDXQ7Ccv.js} +416 -415
- package/dist/chunks/{file-uploader.By0MTfKk.js.map → file-uploader.BDXQ7Ccv.js.map} +1 -1
- package/dist/chunks/{filter-bar.JXmlFnHV.js → filter-bar.CmF92iAr.js} +303 -303
- package/dist/chunks/filter-bar.CmF92iAr.js.map +1 -0
- package/dist/chunks/form-field.BBqLu-vs.js +10 -0
- package/dist/chunks/form-field.BBqLu-vs.js.map +1 -0
- package/dist/chunks/get-slot-text.CQRAP2_q.js +12 -0
- package/dist/chunks/get-slot-text.CQRAP2_q.js.map +1 -0
- package/dist/chunks/{header-with-views.Dg2usaMY.js → header-with-views.xPfeOz0Y.js} +3 -3
- package/dist/chunks/{header-with-views.Dg2usaMY.js.map → header-with-views.xPfeOz0Y.js.map} +1 -1
- package/dist/chunks/{input-field-password.B6nJ7ygZ.js → input-field-password.BZBYVyAb.js} +3 -3
- package/dist/chunks/{input-field-password.B6nJ7ygZ.js.map → input-field-password.BZBYVyAb.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.D_UBAN2s.js → input-field-phone-number.a8Mw5PAW.js} +5 -5
- package/dist/chunks/{input-field-phone-number.D_UBAN2s.js.map → input-field-phone-number.a8Mw5PAW.js.map} +1 -1
- package/dist/chunks/{input-field.C29FCI4j.js → input-field.CYGGIK48.js} +48 -48
- package/dist/chunks/input-field.CYGGIK48.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.uHSB7MO6.js → listbox-option-tag.Cwe9Bn-R.js} +2 -2
- package/dist/chunks/{listbox-option-tag.uHSB7MO6.js.map → listbox-option-tag.Cwe9Bn-R.js.map} +1 -1
- package/dist/chunks/{pagination.BaBWNlIF.js → pagination.CYdGcyMA.js} +49 -49
- package/dist/chunks/pagination.CYdGcyMA.js.map +1 -0
- package/dist/chunks/{payment-method.CDnn1bjo.js → payment-method.D6PeTYWq.js} +45 -42
- package/dist/chunks/payment-method.D6PeTYWq.js.map +1 -0
- package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
- package/dist/chunks/{radio-group.DWNqrkZ3.js → radio-group.B_8R6vGx.js} +3 -3
- package/dist/chunks/{radio-group.DWNqrkZ3.js.map → radio-group.B_8R6vGx.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.Bh7KS617.js → rich-text-editor.B6Ftqv55.js} +2 -2
- package/dist/chunks/{rich-text-editor.Bh7KS617.js.map → rich-text-editor.B6Ftqv55.js.map} +1 -1
- package/dist/chunks/{search-bar.RS02IcLc.js → search-bar.D3Ri_RUK.js} +3 -3
- package/dist/chunks/{search-bar.RS02IcLc.js.map → search-bar.D3Ri_RUK.js.map} +1 -1
- package/dist/chunks/{secondary-nav.DXsgUTqk.js → secondary-nav.CAb20jWW.js} +24 -24
- package/dist/chunks/secondary-nav.CAb20jWW.js.map +1 -0
- package/dist/chunks/{summary-grid.types.ByQ4u19J.js → summary-grid.types.cE1fyLvC.js} +2 -2
- package/dist/chunks/{summary-grid.types.ByQ4u19J.js.map → summary-grid.types.cE1fyLvC.js.map} +1 -1
- package/dist/chunks/tag.CjaB9DxL.js +57 -0
- package/dist/chunks/tag.CjaB9DxL.js.map +1 -0
- package/dist/chunks/textarea.C_gnXj6b.js +254 -0
- package/dist/chunks/textarea.C_gnXj6b.js.map +1 -0
- package/dist/chunks/{timeline-item.DNjubXL2.js → timeline-item.rSY0Xce3.js} +48 -48
- package/dist/chunks/timeline-item.rSY0Xce3.js.map +1 -0
- package/dist/chunks/{toggle.Dd_NA8eH.js → toggle.BHCUjMpp.js} +2 -2
- package/dist/chunks/{toggle.Dd_NA8eH.js.map → toggle.BHCUjMpp.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +7 -6
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/index.js +246 -245
- package/dist/index.js.map +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/styles/bento-dark.css +4 -0
- package/dist/styles/bento-light.css +4 -0
- package/dist/styles/bento.css +4 -0
- package/dist/styles/legacy.css +4 -0
- package/dist/styles/styleguide.css +4 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -5
- package/dist/chunks/date-picker.OI-sQ232.js +0 -234
- package/dist/chunks/date-picker.OI-sQ232.js.map +0 -1
- package/dist/chunks/date-range-picker.D7IwIR5V.js +0 -1114
- package/dist/chunks/date-range-picker.D7IwIR5V.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.MkU0tMf1.js.map +0 -1
- package/dist/chunks/dropdown-tag.DFeoXIgH.js +0 -242
- package/dist/chunks/dropdown-tag.DFeoXIgH.js.map +0 -1
- package/dist/chunks/dropdown.KStrJVoP.js +0 -825
- package/dist/chunks/filter-bar.JXmlFnHV.js.map +0 -1
- package/dist/chunks/get-slot-text.DQlZEsId.js +0 -12
- package/dist/chunks/get-slot-text.DQlZEsId.js.map +0 -1
- package/dist/chunks/input-field.C29FCI4j.js.map +0 -1
- package/dist/chunks/pagination.BaBWNlIF.js.map +0 -1
- package/dist/chunks/payment-method.CDnn1bjo.js.map +0 -1
- package/dist/chunks/secondary-nav.DXsgUTqk.js.map +0 -1
- package/dist/chunks/tag.CEmpyuYX.js +0 -50
- package/dist/chunks/tag.CEmpyuYX.js.map +0 -1
- package/dist/chunks/textarea.C1jkfowf.js +0 -246
- package/dist/chunks/textarea.C1jkfowf.js.map +0 -1
- package/dist/chunks/timeline-item.DNjubXL2.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as he, useAttrs as Ee, useSlots as Te, ref as _, provide as Ne, inject as J, toRef as ke, computed as
|
|
2
|
-
import { a as Se, I as
|
|
3
|
-
import { p as
|
|
1
|
+
import { defineComponent as he, useAttrs as Ee, useSlots as Te, ref as _, provide as Ne, inject as J, toRef as ke, computed as d, toRefs as Ae, createBlock as u, openBlock as n, unref as a, normalizeClass as Le, withCtx as c, createCommentVNode as i, createElementVNode as P, createElementBlock as b, renderSlot as p, withModifiers as j, mergeProps as R, withKeys as ge, createTextVNode as z, toDisplayString as X, createVNode as Oe } from "vue";
|
|
2
|
+
import { a as Se, I as Pe, b as Re, B as Z } from "./dropdown.DYDHM__3.js";
|
|
3
|
+
import { p as I, d as G, B as h } from "./typography.yBEME_Gu.js";
|
|
4
4
|
import { g as E } from "./generate-uid.NJ8tVoha.js";
|
|
5
|
-
import { g as Q } from "./get-slot-text.
|
|
6
|
-
import { u as
|
|
5
|
+
import { g as Q } from "./get-slot-text.CQRAP2_q.js";
|
|
6
|
+
import { u as Ie } from "./aria-label.CaUURpnB.js";
|
|
7
7
|
import { u as Ce } from "./index.pdBj0KQU.js";
|
|
8
8
|
import { u as $e } from "./use-form-layout-loading.D3lALhtC.js";
|
|
9
9
|
import { u as Be } from "./use-has-slot.B7eQSabc.js";
|
|
@@ -48,43 +48,43 @@ const x = {
|
|
|
48
48
|
setup(t, { expose: ee, emit: oe }) {
|
|
49
49
|
const $ = Ee(), N = Te(), o = t, s = oe, { t: B } = Ce({ messages: x }), l = Be(N), M = _(null), O = _(null), U = E("input"), y = E("input-dropdown"), k = E("input-static-value"), V = E("input-description"), F = E("input-error"), S = _(!1);
|
|
50
50
|
Ne(Se, !0);
|
|
51
|
-
const H = J(
|
|
51
|
+
const H = J(Pe, _(void 0)), te = () => {
|
|
52
52
|
S.value = !0, s("focus");
|
|
53
53
|
}, ae = () => {
|
|
54
54
|
S.value = !1, s("blur");
|
|
55
|
-
}, { isReadOnly: m } = $e(ke(o, "readonly")), Y =
|
|
55
|
+
}, { isReadOnly: m } = $e(ke(o, "readonly")), Y = d(
|
|
56
56
|
() => {
|
|
57
57
|
var e;
|
|
58
58
|
return m.value || ((e = o.dropdown) == null ? void 0 : e.readonly);
|
|
59
59
|
}
|
|
60
|
-
), A =
|
|
60
|
+
), A = d(
|
|
61
61
|
() => o.variant === v.STATIC_VALUE && !!N.staticValue
|
|
62
|
-
),
|
|
62
|
+
), de = d(() => o.variant === v.DEFAULT), ie = d(() => o.variant === v.PAYMENT_METHOD), re = d(
|
|
63
63
|
() => A.value && o.staticValuePosition === f.START
|
|
64
|
-
), ne =
|
|
64
|
+
), ne = d(
|
|
65
65
|
() => A.value && o.staticValuePosition === f.END
|
|
66
|
-
), L =
|
|
66
|
+
), L = d(() => o.variant === v.DROPDOWN && !!o.dropdown), le = d(
|
|
67
67
|
() => L.value && o.dropdownPosition === f.START
|
|
68
|
-
), se =
|
|
68
|
+
), se = d(
|
|
69
69
|
() => L.value && o.dropdownPosition === f.END
|
|
70
|
-
), g =
|
|
70
|
+
), g = d(
|
|
71
71
|
() => !o.disabled && !m.value && (!!o.errorMessage || o.error)
|
|
72
|
-
), ue =
|
|
72
|
+
), ue = d(() => Q(N)("default") || o.label), pe = d(() => Q(N)("description") || o.description), fe = d(() => L.value === !0 && A.value === !0 ? `${k} ${y}` : L.value === !0 ? `${y}` : A.value === !0 ? `${k}` : null), ce = d(() => B("ariaLabelFallback")), be = d(
|
|
73
73
|
() => B("ariaLabelDropdownFallback", { inputLabel: q.value })
|
|
74
|
-
), ve = _($["aria-label"]), { ariaLabel: ye } = Ae(o), q =
|
|
74
|
+
), ve = _($["aria-label"]), { ariaLabel: ye } = Ae(o), q = Ie({
|
|
75
75
|
ariaLabel: ve.value,
|
|
76
76
|
// TODO: take this line away when the aria-label props is removed
|
|
77
77
|
label: ye,
|
|
78
78
|
defaultFallback: ue.value || ce
|
|
79
|
-
}), me =
|
|
79
|
+
}), me = d(
|
|
80
80
|
() => `${pe.value ? V : ""} ${g.value && o.errorMessage ? F : ""}`
|
|
81
|
-
), we =
|
|
81
|
+
), we = d(() => ({
|
|
82
82
|
[`b-input-field--${T.CONDENSED}`]: o.condensed,
|
|
83
83
|
[`b-input-field--${T.DISABLED}`]: o.disabled,
|
|
84
84
|
[`b-input-field--${T.READONLY}`]: m.value,
|
|
85
85
|
[`b-input-field--${T.ERROR}`]: g.value,
|
|
86
86
|
"b-input-field--slashed-zero": o.slashedZero
|
|
87
|
-
})), K =
|
|
87
|
+
})), K = d(() => ({
|
|
88
88
|
"aria-label": be.value,
|
|
89
89
|
...o.dropdown
|
|
90
90
|
})), De = (e) => {
|
|
@@ -101,12 +101,12 @@ const x = {
|
|
|
101
101
|
o.variant === "dropdown" ? O.value.focus() : w();
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
-
const _e = J(
|
|
105
|
-
return !Object.values(C).includes(o.type) && !_e && (o.type === "tel" ?
|
|
104
|
+
const _e = J(Re, "");
|
|
105
|
+
return !Object.values(C).includes(o.type) && !_e && (o.type === "tel" ? I(
|
|
106
106
|
`"bento-input-field" dropdown does not support the type '${o.type}', use "bento-input-field-phone-number" instead.`
|
|
107
|
-
) : o.type === "password" ?
|
|
107
|
+
) : o.type === "password" ? I(
|
|
108
108
|
`"bento-input-field" dropdown does not support the type '${o.type}', use "bento-input-field-password" instead.`
|
|
109
|
-
) :
|
|
109
|
+
) : I(`"bento-input-field" dropdown does not support the type '${o.type}'`)), o.error && G(
|
|
110
110
|
'BentoInputField "error" property',
|
|
111
111
|
`Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
|
|
112
112
|
Having the field as "undefined" will hide/remove the error.
|
|
@@ -142,28 +142,28 @@ const x = {
|
|
|
142
142
|
p(e.$slots, "default", {}, void 0, !0)
|
|
143
143
|
]),
|
|
144
144
|
_: 3
|
|
145
|
-
}, 8, ["for", "tooltip-text", "optional", "required", "label"])) :
|
|
146
|
-
|
|
145
|
+
}, 8, ["for", "tooltip-text", "optional", "required", "label"])) : i("", !0),
|
|
146
|
+
P("div", {
|
|
147
147
|
class: "b-input-field__input-box",
|
|
148
148
|
"data-testid": "input-box",
|
|
149
149
|
"aria-disabled": e.disabled,
|
|
150
150
|
onClick: w
|
|
151
151
|
}, [
|
|
152
|
-
|
|
152
|
+
de.value && (a(l)("defaultIconBefore") || a(l)("iconBefore")) ? (n(), b("span", {
|
|
153
153
|
key: 0,
|
|
154
154
|
"aria-hidden": e.ariaHidden ? "true" : void 0,
|
|
155
155
|
class: "b-input-field__icon-before"
|
|
156
156
|
}, [
|
|
157
|
-
a(l)("iconBefore") ? p(e.$slots, "iconBefore", { key: 0 }, void 0, !0) :
|
|
158
|
-
a(l)("defaultIconBefore") && !a(l)("iconBefore") ? p(e.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) :
|
|
159
|
-
], 8, Ye)) :
|
|
160
|
-
|
|
157
|
+
a(l)("iconBefore") ? p(e.$slots, "iconBefore", { key: 0 }, void 0, !0) : i("", !0),
|
|
158
|
+
a(l)("defaultIconBefore") && !a(l)("iconBefore") ? p(e.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : i("", !0)
|
|
159
|
+
], 8, Ye)) : i("", !0),
|
|
160
|
+
ie.value && a(l)("paymentMethod") ? (n(), b("span", {
|
|
161
161
|
key: 1,
|
|
162
162
|
"aria-hidden": e.ariaHidden ? "true" : void 0,
|
|
163
163
|
class: "b-input-field__payment-method"
|
|
164
164
|
}, [
|
|
165
165
|
p(e.$slots, "paymentMethod", {}, void 0, !0)
|
|
166
|
-
], 8, qe)) :
|
|
166
|
+
], 8, qe)) : i("", !0),
|
|
167
167
|
le.value ? (n(), b("div", {
|
|
168
168
|
key: 2,
|
|
169
169
|
id: a(y),
|
|
@@ -171,16 +171,16 @@ const x = {
|
|
|
171
171
|
onClick: r[0] || (r[0] = j(() => {
|
|
172
172
|
}, ["stop"]))
|
|
173
173
|
}, [
|
|
174
|
-
e.dropdown ? (n(), u(a(Z),
|
|
174
|
+
e.dropdown ? (n(), u(a(Z), R({
|
|
175
175
|
key: 0,
|
|
176
176
|
ref_key: "inputDropdownElement",
|
|
177
177
|
ref: O
|
|
178
178
|
}, K.value, {
|
|
179
179
|
disabled: e.disabled,
|
|
180
180
|
readonly: Y.value,
|
|
181
|
-
|
|
182
|
-
}), null, 16, ["disabled", "readonly"])) :
|
|
183
|
-
], 8, Ke)) :
|
|
181
|
+
"onUpdate:modelValue": W
|
|
182
|
+
}), null, 16, ["disabled", "readonly"])) : i("", !0)
|
|
183
|
+
], 8, Ke)) : i("", !0),
|
|
184
184
|
re.value ? (n(), u(a(h), {
|
|
185
185
|
key: 3,
|
|
186
186
|
id: a(k),
|
|
@@ -192,9 +192,9 @@ const x = {
|
|
|
192
192
|
p(e.$slots, "staticValue", {}, void 0, !0)
|
|
193
193
|
]),
|
|
194
194
|
_: 3
|
|
195
|
-
}, 8, ["id"])) :
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
}, 8, ["id"])) : i("", !0),
|
|
196
|
+
P("div", We, [
|
|
197
|
+
P("input", R({ id: a(U) }, a($), {
|
|
198
198
|
ref_key: "inputFieldElement",
|
|
199
199
|
ref: M,
|
|
200
200
|
class: "b-input-field__input",
|
|
@@ -227,7 +227,7 @@ const x = {
|
|
|
227
227
|
z(X(a(H)), 1)
|
|
228
228
|
]),
|
|
229
229
|
_: 1
|
|
230
|
-
})) :
|
|
230
|
+
})) : i("", !0)
|
|
231
231
|
]),
|
|
232
232
|
a(l)("iconAfter") ? (n(), b("span", {
|
|
233
233
|
key: 4,
|
|
@@ -236,7 +236,7 @@ const x = {
|
|
|
236
236
|
"data-testid": "input-text__icon-after"
|
|
237
237
|
}, [
|
|
238
238
|
p(e.$slots, "iconAfter", {}, void 0, !0)
|
|
239
|
-
], 8, je)) :
|
|
239
|
+
], 8, je)) : i("", !0),
|
|
240
240
|
ne.value ? (n(), u(a(h), {
|
|
241
241
|
key: 5,
|
|
242
242
|
id: a(k),
|
|
@@ -248,7 +248,7 @@ const x = {
|
|
|
248
248
|
p(e.$slots, "staticValue", {}, void 0, !0)
|
|
249
249
|
]),
|
|
250
250
|
_: 3
|
|
251
|
-
}, 8, ["id"])) :
|
|
251
|
+
}, 8, ["id"])) : i("", !0),
|
|
252
252
|
se.value ? (n(), b("div", {
|
|
253
253
|
key: 6,
|
|
254
254
|
id: a(y),
|
|
@@ -257,7 +257,7 @@ const x = {
|
|
|
257
257
|
onClick: r[5] || (r[5] = j(() => {
|
|
258
258
|
}, ["stop"]))
|
|
259
259
|
}, [
|
|
260
|
-
e.dropdown ? (n(), u(a(Z),
|
|
260
|
+
e.dropdown ? (n(), u(a(Z), R({
|
|
261
261
|
key: 0,
|
|
262
262
|
id: a(y),
|
|
263
263
|
ref_key: "inputDropdownElement",
|
|
@@ -265,16 +265,16 @@ const x = {
|
|
|
265
265
|
}, K.value, {
|
|
266
266
|
disabled: e.disabled,
|
|
267
267
|
readonly: Y.value,
|
|
268
|
-
|
|
269
|
-
}), null, 16, ["id", "disabled", "readonly"])) :
|
|
270
|
-
], 8, ze)) :
|
|
268
|
+
"onUpdate:modelValue": W
|
|
269
|
+
}), null, 16, ["id", "disabled", "readonly"])) : i("", !0)
|
|
270
|
+
], 8, ze)) : i("", !0)
|
|
271
271
|
], 8, He),
|
|
272
272
|
g.value && e.errorMessage ? (n(), u(a(Ue), {
|
|
273
273
|
key: 1,
|
|
274
274
|
id: a(F),
|
|
275
275
|
"error-message": e.errorMessage,
|
|
276
276
|
class: "b-input-field__error-message"
|
|
277
|
-
}, null, 8, ["id", "error-message"])) :
|
|
277
|
+
}, null, 8, ["id", "error-message"])) : i("", !0),
|
|
278
278
|
a(l)("description") || e.description ? (n(), b("span", {
|
|
279
279
|
key: 2,
|
|
280
280
|
id: a(V),
|
|
@@ -292,12 +292,12 @@ const x = {
|
|
|
292
292
|
]),
|
|
293
293
|
_: 3
|
|
294
294
|
})
|
|
295
|
-
], 8, Xe)) :
|
|
295
|
+
], 8, Xe)) : i("", !0)
|
|
296
296
|
]),
|
|
297
297
|
_: 3
|
|
298
298
|
}, 8, ["class"]));
|
|
299
299
|
}
|
|
300
|
-
}), po = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-
|
|
300
|
+
}), po = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-2fa2dded"]]);
|
|
301
301
|
export {
|
|
302
302
|
po as B,
|
|
303
303
|
v as a,
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
C as d,
|
|
307
307
|
Fe as e
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=input-field.
|
|
309
|
+
//# sourceMappingURL=input-field.CYGGIK48.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field.CYGGIK48.js","sources":["../../../vue2/src/components/input-field/input-field.types.ts","../../../vue2/src/components/input-field/input-field.vue"],"sourcesContent":["import { type BentoDropdownProps } from '../dropdown/dropdown.types';\nimport { type FormField } from '../../types/form-field';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = BentoDropdownProps;\nexport type BentoInputDropdownProps = {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n /**\n * List of available items\n */\n items: DropdownProps['items'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: DropdownProps['readonly'];\n /**\n * Selected value of the dropdown\n * @deprecated Use `model-value` instead.\n */\n value?: DropdownProps['value'];\n /**\n * Selected value of the dropdown\n */\n modelValue?: DropdownProps['modelValue'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps extends FormField {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Text that labels an the input element\n *\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `aria-label`: Text that labels the dropdown element\n * - `dynamicFiltering`: Enables dynamic filtering\n * - `items`: List of available items\n * - `readonly`: Sets the dropdown in read-only mode\n * - `value`: Selected value of the dropdown\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldValue;\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default') || label\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n :label=\"label\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n\n <!-- Hint at the end -->\n <bento-typography v-if=\"hint && isFocused && value\" el=\"span\" class=\"b-input-field__hint\">\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span\n v-if=\"hasSlot('description') || description\"\n :id=\"descriptionId\"\n class=\"b-input-field__description\"\n @click=\"focusInput\"\n >\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, type Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n type BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n type BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = withDefaults(defineProps<BentoInputFieldProps>(), {\n ariaHidden: true,\n ariaLabel: undefined,\n condensed: false,\n description: '',\n disabled: false,\n dropdown: undefined,\n dropdownPosition: BentoInputFieldElementPosition.START,\n error: false,\n errorMessage: null,\n label: '',\n optional: false,\n placeholder: '',\n required: false,\n readonly: false,\n slashedZero: false,\n staticValue: '',\n staticValuePosition: BentoInputFieldElementPosition.START,\n tooltipText: null,\n type: BentoInputFieldType.TEXT,\n value: undefined,\n variant: BentoInputFieldVariant.DEFAULT,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the Input Field's internal dropdown changes it's value. Contains every dropdown prop passed with the updated selected value as 'value'\n */\n (e: 'update:dropdown', updatedDropdownProps: BentoInputDropdownProps): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: 'change'): void;\n\n /**\n * Emitted when the Input Field's internal dropdown changes it's value\n */\n (e: 'dropdown-input', selectedValue: BentoListboxSelectedValue): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emitted when a key is pressed down\n */\n (e: 'keydown', event: KeyboardEvent): void;\n\n /**\n * Emitted when a key is pressed and lifted up\n */\n (e: 'keyup', event: KeyboardEvent): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: 'input', inputValue: string): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedLabel = computed(() => (getSlotText(slots)('default') as string) || props.label);\n const computedDescription = computed(() => (getSlotText(slots)('description') as string) || props.description);\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: computedLabel.value || computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${computedDescription.value ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emit('input', inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n focus,\n });\n\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","props","__props","emit","__emit","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","isDropdownReadOnly","computed","_a","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedLabel","getSlotText","computedDescription","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","__expose","inputFieldParentComponent","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GA0CAE,KAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,kBAAA,mBACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,UAAA,WARQA,IAAAD,MAAA,CAAA,CAAA;;;;;;sUCmZRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtRA,UAAAC,IAAAC,GAAA,GACAC,IAAAC,GAAA,GAEAC,IAAAC,GAwBAC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AAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as r, computed as i, resolveComponent as t, createElementBlock as s, openBlock as e, createElementVNode as l, createBlock as c, createCommentVNode as m, createVNode as _, withCtx as b, createTextVNode as d, toDisplayString as g } from "vue";
|
|
2
|
-
import { B as f } from "./tag.
|
|
2
|
+
import { B as f } from "./tag.CjaB9DxL.js";
|
|
3
3
|
import { B as u } from "./typography.yBEME_Gu.js";
|
|
4
4
|
import { _ as h } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
5
|
import "../assets/listbox-option-tag.css";
|
|
@@ -54,4 +54,4 @@ const O = /* @__PURE__ */ h(y, [["render", x], ["__scopeId", "data-v-f55ef3b1"]]
|
|
|
54
54
|
export {
|
|
55
55
|
O as L
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=listbox-option-tag.
|
|
57
|
+
//# sourceMappingURL=listbox-option-tag.Cwe9Bn-R.js.map
|
package/dist/chunks/{listbox-option-tag.uHSB7MO6.js.map → listbox-option-tag.Cwe9Bn-R.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-option-tag.
|
|
1
|
+
{"version":3,"file":"listbox-option-tag.Cwe9Bn-R.js","sources":["../../../vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue"],"sourcesContent":["<template>\n <span class=\"b-listbox-tag-option\">\n <span :aria-hidden=\"!!option.label\">\n <bento-tag class=\"b-listbox-tag-option__tag\" :label=\"option.value.toString()\" :variant=\"variant\" />\n </span>\n <bento-typography v-if=\"option.label\" el=\"span\" class=\"b-listbox-tag-option__label\">\n {{ option.label }}\n </bento-typography>\n </span>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import type { BentoListboxOptionItem } from '@/types/listbox';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n\n /**\n * A Tag Dropdown option item used in the Dropdown and Filter components.\n */\n export default defineComponent({\n name: 'listbox-tag-option',\n components: {\n BentoTag,\n BentoTypography,\n },\n props: {\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n },\n setup(props) {\n const variant = computed(() => props.option.data as BentoTagVariant);\n\n return {\n // Values\n variant,\n };\n },\n });\n</script>\n<style lang=\"scss\" scoped src=\"./listbox-option-tag.scss\" />\n"],"names":["_sfc_main","defineComponent","BentoTag","BentoTypography","props","computed","openBlock","createElementBlock","_hoisted_1","createElementVNode","_ctx","_hoisted_2","createTextVNode","toDisplayString","createCommentVNode"],"mappings":";;;;;AAmBI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA;AAAA,IACM,UAAAC;AAAA,IACR,iBAAAC;AAAA,EACA;AAAA,EACJ,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACO,QAAA;AAAA,MAKK,MAAA;AAAA,MACE,UAAA;AAAA,IACI;AAAA,EACd;AAAA,EACJ,MAAAC,GAAA;AAII,WAAA;AAAA;AAAA,MAAO,SAFPC,EAAA,MAAAD,EAAA,OAAA,IAAA;AAAA,IAII;AAAA,EACJ;AAER,CAAA;;;AAzCW,SAAAE,EAAA,GAAAC,EAAA,QAAAC,GAAA;AAAA,IAA2BC,EAAA,QAAA;AAAA;IACqE,GAAA;AAAA;QAAzB,OAAA;AAAA,QAAY,OAAAC,EAAA,OAAA,MAAA,SAAA;AAAA,QAHlG,SAAAA,EAAA;AAAA,MAAA,GAAA,MAAA,GAAA,CAAA,SAAA,SAAA,CAAA;AAAA,IAK4C,GAAA,GAAAC,CAAA;AAAA;MAAW,KAAA;AAAA,MAAM,IAAA;AAAA,MAL7D,OAAA;AAAA,IAAA,GAAA;AAAA;QAAAC,EAAAC,EAAAH,EAAA,OAAA,KAAA,GAAA,CAAA;AAAA,MAAA,CAAA;AAAA,MAAA,GAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
|