@adyen/bento-vue3 1.74.0 → 1.76.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.
Files changed (138) hide show
  1. package/dist/@types/index.d.ts +1660 -614
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/calendar.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid-template.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-picker.css +1 -1
  11. package/dist/assets/date-range-picker.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown-tag.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header-meta.css +1 -1
  17. package/dist/assets/input-field-password.css +1 -1
  18. package/dist/assets/input-field.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/selection-card-group.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/timeline-item.css +1 -1
  24. package/dist/assets/use-cached-selected-values.css +1 -1
  25. package/dist/checkbox.js +2 -2
  26. package/dist/chunks/calendar.Tm7Cvpwu.js +2001 -0
  27. package/dist/chunks/calendar.Tm7Cvpwu.js.map +1 -0
  28. package/dist/chunks/{checkbox-group.8ebmaHsA.js → checkbox-group.8J29fVna.js} +2 -2
  29. package/dist/chunks/{checkbox-group.8ebmaHsA.js.map → checkbox-group.8J29fVna.js.map} +1 -1
  30. package/dist/chunks/{checkbox.BI0dqARY.js → checkbox.CfNYUty6.js} +18 -18
  31. package/dist/chunks/{checkbox.BI0dqARY.js.map → checkbox.CfNYUty6.js.map} +1 -1
  32. package/dist/chunks/{code-snippet.CO78Nfj0.js → code-snippet.EeIcRV20.js} +2 -2
  33. package/dist/chunks/{code-snippet.CO78Nfj0.js.map → code-snippet.EeIcRV20.js.map} +1 -1
  34. package/dist/chunks/constructNow.CHWWeLPc.js +8 -0
  35. package/dist/chunks/constructNow.CHWWeLPc.js.map +1 -0
  36. package/dist/chunks/{dashboard-section.CVttsom5.js → dashboard-section.Cqi0PWeJ.js} +2 -2
  37. package/dist/chunks/{dashboard-section.CVttsom5.js.map → dashboard-section.Cqi0PWeJ.js.map} +1 -1
  38. package/dist/chunks/{data-grid-template.CFt1NV_4.js → data-grid-template.D7kB3S1u.js} +2 -2
  39. package/dist/chunks/{data-grid-template.CFt1NV_4.js.map → data-grid-template.D7kB3S1u.js.map} +1 -1
  40. package/dist/chunks/data-grid.DJIxBwCa.js +4143 -0
  41. package/dist/chunks/data-grid.DJIxBwCa.js.map +1 -0
  42. package/dist/chunks/{date-picker.DSkvT_CA.js → date-picker.CobmiKaJ.js} +16 -16
  43. package/dist/chunks/date-picker.CobmiKaJ.js.map +1 -0
  44. package/dist/chunks/date-range-picker.B6UKl1_N.js +1114 -0
  45. package/dist/chunks/date-range-picker.B6UKl1_N.js.map +1 -0
  46. package/dist/chunks/{get-date-locale.CAyOIbcp.js → differenceInMonths.C8FyCrav.js} +580 -364
  47. package/dist/chunks/differenceInMonths.C8FyCrav.js.map +1 -0
  48. package/dist/chunks/dropdown-tag.CMjilUQb.js +242 -0
  49. package/dist/chunks/dropdown-tag.CMjilUQb.js.map +1 -0
  50. package/dist/chunks/{dropdown.bLsoTZbw.js → dropdown.DG_EnV8g.js} +18 -18
  51. package/dist/chunks/{dropdown.bLsoTZbw.js.map → dropdown.DG_EnV8g.js.map} +1 -1
  52. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  53. package/dist/chunks/{filter-bar.nX73NKNC.js → filter-bar.dmC284Po.js} +737 -710
  54. package/dist/chunks/filter-bar.dmC284Po.js.map +1 -0
  55. package/dist/chunks/getRoundingMethod.C3eaeGLR.js +10 -0
  56. package/dist/chunks/getRoundingMethod.C3eaeGLR.js.map +1 -0
  57. package/dist/chunks/{index.BrH1t1iu.js → getTimezoneOffsetInMilliseconds.BW7U6PxE.js} +254 -177
  58. package/dist/chunks/getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map +1 -0
  59. package/dist/chunks/header-meta.BE6QfUNi.js +221 -0
  60. package/dist/chunks/header-meta.BE6QfUNi.js.map +1 -0
  61. package/dist/chunks/{header-with-views.BLW817ZC.js → header-with-views.BZ16v5-m.js} +4 -4
  62. package/dist/chunks/{header-with-views.BLW817ZC.js.map → header-with-views.BZ16v5-m.js.map} +1 -1
  63. package/dist/chunks/{header.DARVAeE9.js → header.3It50Clh.js} +2 -2
  64. package/dist/chunks/{header.DARVAeE9.js.map → header.3It50Clh.js.map} +1 -1
  65. package/dist/chunks/{input-field-password.BtM3-txc.js → input-field-password.BVnZWBAV.js} +185 -167
  66. package/dist/chunks/input-field-password.BVnZWBAV.js.map +1 -0
  67. package/dist/chunks/{input-field-phone-number.oaNB69nM.js → input-field-phone-number.CWhPGQ1U.js} +3 -3
  68. package/dist/chunks/{input-field-phone-number.oaNB69nM.js.map → input-field-phone-number.CWhPGQ1U.js.map} +1 -1
  69. package/dist/chunks/{input-field.D_tADgPG.js → input-field.A-dEZZfC.js} +124 -119
  70. package/dist/chunks/input-field.A-dEZZfC.js.map +1 -0
  71. package/dist/chunks/{pagination.D1Gdo5to.js → pagination.B4qBK4pM.js} +2 -2
  72. package/dist/chunks/{pagination.D1Gdo5to.js.map → pagination.B4qBK4pM.js.map} +1 -1
  73. package/dist/chunks/radio-group.DWNqrkZ3.js.map +1 -1
  74. package/dist/chunks/{rich-text-editor.BK9AivIm.js → rich-text-editor.BA6_k4Vv.js} +354 -352
  75. package/dist/chunks/{rich-text-editor.BK9AivIm.js.map → rich-text-editor.BA6_k4Vv.js.map} +1 -1
  76. package/dist/chunks/{search-bar.BD_R-vgA.js → search-bar.dZ7UCMxb.js} +3 -3
  77. package/dist/chunks/{search-bar.BD_R-vgA.js.map → search-bar.dZ7UCMxb.js.map} +1 -1
  78. package/dist/chunks/{secondary-nav.Du2PL7Ok.js → secondary-nav.CE082cQ_.js} +2 -2
  79. package/dist/chunks/{secondary-nav.Du2PL7Ok.js.map → secondary-nav.CE082cQ_.js.map} +1 -1
  80. package/dist/chunks/selection-card-group.NnTbPQjj.js +412 -0
  81. package/dist/chunks/{selection-card-group._RgLiMyQ.js.map → selection-card-group.NnTbPQjj.js.map} +1 -1
  82. package/dist/chunks/textarea.C1jkfowf.js.map +1 -1
  83. package/dist/chunks/timeline-item.DNjubXL2.js +556 -0
  84. package/dist/chunks/timeline-item.DNjubXL2.js.map +1 -0
  85. package/dist/chunks/{use-cached-selected-values.C32tjNKy.js → use-cached-selected-values.8MdrR9wt.js} +501 -467
  86. package/dist/chunks/use-cached-selected-values.8MdrR9wt.js.map +1 -0
  87. package/dist/code-snippet.js +1 -1
  88. package/dist/dashboard-template.js +1 -1
  89. package/dist/data-grid-template.js +1 -1
  90. package/dist/data-grid.js +1 -1
  91. package/dist/date-picker.js +2 -2
  92. package/dist/date-range-picker.js +2 -2
  93. package/dist/dropdown.js +3 -3
  94. package/dist/filter-bar.js +1 -1
  95. package/dist/header-with-views.js +1 -1
  96. package/dist/header.js +1 -1
  97. package/dist/index.js +24 -24
  98. package/dist/input-field-password.js +1 -1
  99. package/dist/input-field-phone-number.js +1 -1
  100. package/dist/input-field.js +1 -1
  101. package/dist/internal.js +3 -3
  102. package/dist/pagination.js +1 -1
  103. package/dist/rich-text-editor.js +1 -1
  104. package/dist/search-bar.js +2 -2
  105. package/dist/secondary-nav.js +1 -1
  106. package/dist/selection-card.js +1 -1
  107. package/dist/styles/bento-dark.css +7 -5
  108. package/dist/styles/bento-light.css +7 -5
  109. package/dist/styles/bento.css +7 -5
  110. package/dist/styles/legacy.css +7 -5
  111. package/dist/styles/styleguide.css +7 -5
  112. package/dist/timeline.js +1 -1
  113. package/dist/web-types.json +1 -1
  114. package/package.json +8 -23
  115. package/dist/chunks/_commonjsHelpers.C6fGbg64.js +0 -7
  116. package/dist/chunks/_commonjsHelpers.C6fGbg64.js.map +0 -1
  117. package/dist/chunks/calendar.Cqjyxc69.js +0 -2223
  118. package/dist/chunks/calendar.Cqjyxc69.js.map +0 -1
  119. package/dist/chunks/data-grid.BjPdbx50.js +0 -4071
  120. package/dist/chunks/data-grid.BjPdbx50.js.map +0 -1
  121. package/dist/chunks/date-picker.DSkvT_CA.js.map +0 -1
  122. package/dist/chunks/date-range-picker.cmg75lC-.js +0 -1117
  123. package/dist/chunks/date-range-picker.cmg75lC-.js.map +0 -1
  124. package/dist/chunks/dropdown-tag.DvQQIJsw.js +0 -308
  125. package/dist/chunks/dropdown-tag.DvQQIJsw.js.map +0 -1
  126. package/dist/chunks/filter-bar.nX73NKNC.js.map +0 -1
  127. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +0 -1
  128. package/dist/chunks/header-meta.C4iaUsfq.js +0 -236
  129. package/dist/chunks/header-meta.C4iaUsfq.js.map +0 -1
  130. package/dist/chunks/index.BrH1t1iu.js.map +0 -1
  131. package/dist/chunks/index.BxBB1rsx.js +0 -15
  132. package/dist/chunks/index.BxBB1rsx.js.map +0 -1
  133. package/dist/chunks/input-field-password.BtM3-txc.js.map +0 -1
  134. package/dist/chunks/input-field.D_tADgPG.js.map +0 -1
  135. package/dist/chunks/selection-card-group._RgLiMyQ.js +0 -474
  136. package/dist/chunks/timeline-item.C8PA_w7m.js +0 -568
  137. package/dist/chunks/timeline-item.C8PA_w7m.js.map +0 -1
  138. package/dist/chunks/use-cached-selected-values.C32tjNKy.js.map +0 -1
@@ -1,116 +1,118 @@
1
- import { defineComponent as ye, useAttrs as me, useSlots as we, ref as D, provide as _e, inject as J, toRef as De, computed as d, toRefs as he, createBlock as u, openBlock as n, unref as a, normalizeClass as Ee, withCtx as c, createCommentVNode as i, createElementVNode as I, createElementBlock as b, renderSlot as p, withModifiers as j, mergeProps as P, withKeys as Te, createTextVNode as Ne, toDisplayString as ke, createVNode as Ae } from "vue";
2
- import { a as ge, I as Le, b as Oe, B as z } from "./dropdown.bLsoTZbw.js";
3
- import { p as R, d as X, B as h } from "./typography.yBEME_Gu.js";
1
+ import { defineComponent as he, useAttrs as Ee, useSlots as Te, ref as D, provide as Ne, inject as z, toRef as ke, computed as i, toRefs as Ae, createBlock as u, openBlock as n, unref as a, normalizeClass as Le, withCtx as c, createCommentVNode as d, createElementVNode as I, createElementBlock as b, renderSlot as p, withModifiers as X, mergeProps as P, withKeys as ge, createTextVNode as Z, toDisplayString as G, createVNode as Oe } from "vue";
2
+ import { a as Se, I as Ie, b as Pe, B as Q } from "./dropdown.DG_EnV8g.js";
3
+ import { p as R, d as x, B as h } from "./typography.yBEME_Gu.js";
4
4
  import { g as E } from "./generate-uid.NJ8tVoha.js";
5
- import { g as Se } from "./get-slot-text.DQlZEsId.js";
6
- import { u as Ie } from "./aria-label.CaUURpnB.js";
7
- import { u as Pe } from "./index.pdBj0KQU.js";
8
- import { u as Re } from "./use-form-layout-loading.D3lALhtC.js";
9
- import { u as Ce } from "./use-has-slot.B7eQSabc.js";
10
- import { F as $e, E as Be } from "./field-label.C97CrBI_.js";
11
- import { _ as Me } from "./_plugin-vue_export-helper.CHgC5LLL.js";
5
+ import { g as ee } from "./get-slot-text.DQlZEsId.js";
6
+ import { u as Re } from "./aria-label.CaUURpnB.js";
7
+ import { u as Ce } from "./index.pdBj0KQU.js";
8
+ import { u as $e } from "./use-form-layout-loading.D3lALhtC.js";
9
+ import { u as Be } from "./use-has-slot.B7eQSabc.js";
10
+ import { F as Me, E as Ue } from "./field-label.C97CrBI_.js";
11
+ import { _ as Ve } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
12
  import "../assets/input-field.css";
13
- var v = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.PAYMENT_METHOD = "payment-method", t.STATIC_VALUE = "static-value", t.DROPDOWN = "dropdown", t))(v || {}), f = /* @__PURE__ */ ((t) => (t.START = "start", t.END = "end", t))(f || {}), T = /* @__PURE__ */ ((t) => (t.CONDENSED = "condensed", t.DISABLED = "disabled", t.READONLY = "readonly", t.ERROR = "error", t))(T || {}), C = /* @__PURE__ */ ((t) => (t.SEARCH = "search", t.TEXT = "text", t.NUMBER = "number", t))(C || {}), Ue = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.ESCAPE_PRESSED = "escape-pressed", t.UPDATE_DROPDOWN = "update:dropdown", t.DROPDOWN_INPUT = "dropdown-input", t.FOCUS = "focus", t.CHANGE = "change", t.BLUR = "blur", t.KEYDOWN = "keydown", t))(Ue || {});
14
- const Z = {
13
+ var v = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.PAYMENT_METHOD = "payment-method", t.STATIC_VALUE = "static-value", t.DROPDOWN = "dropdown", t))(v || {}), f = /* @__PURE__ */ ((t) => (t.START = "start", t.END = "end", t))(f || {}), T = /* @__PURE__ */ ((t) => (t.CONDENSED = "condensed", t.DISABLED = "disabled", t.READONLY = "readonly", t.ERROR = "error", t))(T || {}), C = /* @__PURE__ */ ((t) => (t.SEARCH = "search", t.TEXT = "text", t.NUMBER = "number", t))(C || {}), Fe = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.ESCAPE_PRESSED = "escape-pressed", t.UPDATE_DROPDOWN = "update:dropdown", t.DROPDOWN_INPUT = "dropdown-input", t.FOCUS = "focus", t.CHANGE = "change", t.BLUR = "blur", t.KEYDOWN = "keydown", t))(Fe || {});
14
+ const oe = {
15
15
  "en-US": {
16
16
  ariaLabelDropdownFallback: "{inputLabel} Dropdown",
17
17
  ariaLabelFallback: "Input field"
18
18
  }
19
- }, Ve = ["aria-disabled"], Fe = ["aria-hidden"], He = ["aria-hidden"], Ye = ["id"], qe = { class: "b-input-field__input-container" }, Ke = ["id", "aria-label", "aria-describedby", "aria-owns", "aria-invalid", "placeholder", "required", "type", "value", "disabled", "readonly"], We = ["aria-hidden"], Je = ["id"], je = ["id"], ze = {
20
- i18n: { messages: Z }
21
- }, Xe = /* @__PURE__ */ ye({
22
- ...ze,
19
+ }, He = ["aria-disabled"], Ye = ["aria-hidden"], qe = ["aria-hidden"], Ke = ["id"], We = { class: "b-input-field__input-container" }, Je = ["id", "aria-label", "aria-describedby", "aria-owns", "aria-invalid", "placeholder", "required", "type", "value", "disabled", "readonly"], je = ["aria-hidden"], ze = ["id"], Xe = ["id"], Ze = {
20
+ i18n: { messages: oe }
21
+ }, Ge = /* @__PURE__ */ he({
22
+ ...Ze,
23
23
  __name: "input-field",
24
24
  props: {
25
25
  ariaHidden: { type: Boolean, default: !0 },
26
26
  ariaLabel: { default: void 0 },
27
27
  condensed: { type: Boolean, default: !1 },
28
- disabled: { type: Boolean, default: !1 },
29
28
  dropdown: { default: void 0 },
30
29
  dropdownPosition: { default: f.START },
31
30
  error: { type: Boolean, default: !1 },
32
- errorMessage: { default: null },
33
- optional: { type: Boolean, default: !1 },
34
- placeholder: { default: "" },
35
- required: { type: Boolean, default: !1 },
36
- readonly: { type: Boolean, default: !1 },
37
31
  slashedZero: { type: Boolean, default: !1 },
38
32
  staticValue: { default: "" },
39
33
  staticValuePosition: { default: f.START },
40
- tooltipText: { default: null },
41
34
  type: { default: C.TEXT },
42
35
  value: { default: void 0 },
43
- variant: { default: v.DEFAULT }
36
+ variant: { default: v.DEFAULT },
37
+ description: { default: "" },
38
+ disabled: { type: Boolean, default: !1 },
39
+ errorMessage: { default: null },
40
+ label: { default: "" },
41
+ optional: { type: Boolean, default: !1 },
42
+ placeholder: { default: "" },
43
+ readonly: { type: Boolean, default: !1 },
44
+ required: { type: Boolean, default: !1 },
45
+ tooltipText: { default: null }
44
46
  },
45
47
  emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "keyup", "input"],
46
- setup(t, { expose: G, emit: Q }) {
47
- const $ = me(), L = we(), o = t, s = Q, { t: B } = Pe({ messages: Z }), l = Ce(L), M = D(null), O = D(null), U = E("input"), y = E("input-dropdown"), N = E("input-static-value"), V = E("input-description"), F = E("input-error"), S = D(!1);
48
- _e(ge, !0);
49
- const H = J(Le, D(void 0)), x = () => {
50
- S.value = !0, s("focus");
51
- }, ee = () => {
52
- S.value = !1, s("blur");
53
- }, { isReadOnly: m } = Re(De(o, "readonly")), Y = d(
48
+ setup(t, { expose: te, emit: ae }) {
49
+ const $ = Ee(), N = Te(), o = t, l = ae, { t: B } = Ce({ messages: oe }), s = Be(N), M = D(null), O = D(null), U = E("input"), y = E("input-dropdown"), k = E("input-static-value"), V = E("input-description"), F = E("input-error"), S = D(!1);
50
+ Ne(Se, !0);
51
+ const H = z(Ie, D(void 0)), ie = () => {
52
+ S.value = !0, l("focus");
53
+ }, de = () => {
54
+ S.value = !1, l("blur");
55
+ }, { isReadOnly: m } = $e(ke(o, "readonly")), Y = i(
54
56
  () => {
55
57
  var e;
56
58
  return m.value || ((e = o.dropdown) == null ? void 0 : e.readonly);
57
59
  }
58
- ), k = d(
59
- () => o.variant === v.STATIC_VALUE && !!L.staticValue
60
- ), te = d(() => o.variant === v.DEFAULT), oe = d(() => o.variant === v.PAYMENT_METHOD), ae = d(
61
- () => k.value && o.staticValuePosition === f.START
62
- ), de = d(
63
- () => k.value && o.staticValuePosition === f.END
64
- ), A = d(() => o.variant === v.DROPDOWN && !!o.dropdown), ie = d(
65
- () => A.value && o.dropdownPosition === f.START
66
- ), re = d(
67
- () => A.value && o.dropdownPosition === f.END
68
- ), g = d(
60
+ ), A = i(
61
+ () => o.variant === v.STATIC_VALUE && !!N.staticValue
62
+ ), re = i(() => o.variant === v.DEFAULT), ne = i(() => o.variant === v.PAYMENT_METHOD), le = i(
63
+ () => A.value && o.staticValuePosition === f.START
64
+ ), se = i(
65
+ () => A.value && o.staticValuePosition === f.END
66
+ ), L = i(() => o.variant === v.DROPDOWN && !!o.dropdown), ue = i(
67
+ () => L.value && o.dropdownPosition === f.START
68
+ ), pe = i(
69
+ () => L.value && o.dropdownPosition === f.END
70
+ ), g = i(
69
71
  () => !o.disabled && !m.value && (!!o.errorMessage || o.error)
70
- ), ne = d(() => A.value === !0 && k.value === !0 ? `${N} ${y}` : A.value === !0 ? `${y}` : k.value === !0 ? `${N}` : null), le = d(() => B("ariaLabelFallback")), se = d(
71
- () => B("ariaLabelDropdownFallback", { inputLabel: q.value })
72
- ), ue = D($["aria-label"]), { ariaLabel: pe } = he(o), q = Ie({
73
- ariaLabel: ue.value,
72
+ ), q = i(() => ee(N)("default") || o.label), K = i(() => ee(N)("description") || o.description), fe = i(() => L.value === !0 && A.value === !0 ? `${k} ${y}` : L.value === !0 ? `${y}` : A.value === !0 ? `${k}` : null), ce = i(() => B("ariaLabelFallback")), be = i(
73
+ () => B("ariaLabelDropdownFallback", { inputLabel: W.value })
74
+ ), ve = D($["aria-label"]), { ariaLabel: ye } = Ae(o), W = Re({
75
+ ariaLabel: ve.value,
74
76
  // TODO: take this line away when the aria-label props is removed
75
- label: pe,
76
- defaultFallback: l("default") ? Se(L)("default") : le
77
- }), fe = d(
78
- () => `${l("description") ? V : ""} ${g.value && o.errorMessage ? F : ""}`
79
- ), ce = d(() => ({
77
+ label: ye,
78
+ defaultFallback: q.value || ce
79
+ }), me = i(
80
+ () => `${K.value ? V : ""} ${g.value && o.errorMessage ? F : ""}`
81
+ ), we = i(() => ({
80
82
  [`b-input-field--${T.CONDENSED}`]: o.condensed,
81
83
  [`b-input-field--${T.DISABLED}`]: o.disabled,
82
84
  [`b-input-field--${T.READONLY}`]: m.value,
83
85
  [`b-input-field--${T.ERROR}`]: g.value,
84
86
  "b-input-field--slashed-zero": o.slashedZero
85
- })), K = d(() => ({
86
- "aria-label": se.value,
87
+ })), J = i(() => ({
88
+ "aria-label": be.value,
87
89
  ...o.dropdown
88
- })), be = (e) => {
90
+ })), _e = (e) => {
89
91
  const r = e.target.value;
90
- !o.disabled && !m.value && s("input", r);
91
- }, W = (e) => {
92
- s("dropdown-input", e), s("update:dropdown", { ...o == null ? void 0 : o.dropdown, value: e });
92
+ !o.disabled && !m.value && l("input", r);
93
+ }, j = (e) => {
94
+ l("dropdown-input", e), l("update:dropdown", { ...o == null ? void 0 : o.dropdown, value: e });
93
95
  }, w = () => {
94
96
  M.value.focus();
95
97
  };
96
- G({
98
+ te({
97
99
  focusInput: w,
98
100
  focus: () => {
99
101
  o.variant === "dropdown" ? O.value.focus() : w();
100
102
  }
101
103
  });
102
- const ve = J(Oe, "");
103
- return !Object.values(C).includes(o.type) && !ve && (o.type === "tel" ? R(
104
+ const De = z(Pe, "");
105
+ return !Object.values(C).includes(o.type) && !De && (o.type === "tel" ? R(
104
106
  `"bento-input-field" dropdown does not support the type '${o.type}', use "bento-input-field-phone-number" instead.`
105
107
  ) : o.type === "password" ? R(
106
108
  `"bento-input-field" dropdown does not support the type '${o.type}', use "bento-input-field-password" instead.`
107
- ) : R(`"bento-input-field" dropdown does not support the type '${o.type}'`)), o.error && X(
109
+ ) : R(`"bento-input-field" dropdown does not support the type '${o.type}'`)), o.error && x(
108
110
  'BentoInputField "error" property',
109
111
  `Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
110
112
  Having the field as "undefined" will hide/remove the error.
111
113
  <bento-dropdown errorMessage="Error message text" />`,
112
114
  "2.0.0"
113
- ), l("defaultIconBefore") && X(
115
+ ), s("defaultIconBefore") && x(
114
116
  'BentoInputField "defaultIconBefore" slot',
115
117
  `Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
116
118
  <bento-input-field>
@@ -120,67 +122,68 @@ const Z = {
120
122
  </bento-input-field>`,
121
123
  "2.0.0"
122
124
  ), (e, r) => (n(), u(a(h), {
123
- class: Ee(["b-input-field", ce.value]),
125
+ class: Le(["b-input-field", we.value]),
124
126
  "data-testid": "input-text-container",
125
127
  el: "div",
126
128
  variant: "body"
127
129
  }, {
128
130
  default: c(() => [
129
- a(l)("default") ? (n(), u(a($e), {
131
+ q.value ? (n(), u(a(Me), {
130
132
  key: 0,
131
133
  for: a(U),
132
134
  "data-testid": "input-field-label",
133
135
  "tooltip-text": e.tooltipText,
134
136
  optional: e.optional,
135
137
  required: e.required,
138
+ label: e.label,
136
139
  onClick: w
137
140
  }, {
138
141
  default: c(() => [
139
142
  p(e.$slots, "default", {}, void 0, !0)
140
143
  ]),
141
144
  _: 3
142
- }, 8, ["for", "tooltip-text", "optional", "required"])) : i("", !0),
145
+ }, 8, ["for", "tooltip-text", "optional", "required", "label"])) : d("", !0),
143
146
  I("div", {
144
147
  class: "b-input-field__input-box",
145
148
  "data-testid": "input-box",
146
149
  "aria-disabled": e.disabled,
147
150
  onClick: w
148
151
  }, [
149
- te.value && (a(l)("defaultIconBefore") || a(l)("iconBefore")) ? (n(), b("span", {
152
+ re.value && (a(s)("defaultIconBefore") || a(s)("iconBefore")) ? (n(), b("span", {
150
153
  key: 0,
151
154
  "aria-hidden": e.ariaHidden ? "true" : void 0,
152
155
  class: "b-input-field__icon-before"
153
156
  }, [
154
- a(l)("iconBefore") ? p(e.$slots, "iconBefore", { key: 0 }, void 0, !0) : i("", !0),
155
- a(l)("defaultIconBefore") && !a(l)("iconBefore") ? p(e.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : i("", !0)
156
- ], 8, Fe)) : i("", !0),
157
- oe.value && a(l)("paymentMethod") ? (n(), b("span", {
157
+ a(s)("iconBefore") ? p(e.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
158
+ a(s)("defaultIconBefore") && !a(s)("iconBefore") ? p(e.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
159
+ ], 8, Ye)) : d("", !0),
160
+ ne.value && a(s)("paymentMethod") ? (n(), b("span", {
158
161
  key: 1,
159
162
  "aria-hidden": e.ariaHidden ? "true" : void 0,
160
163
  class: "b-input-field__payment-method"
161
164
  }, [
162
165
  p(e.$slots, "paymentMethod", {}, void 0, !0)
163
- ], 8, He)) : i("", !0),
164
- ie.value ? (n(), b("div", {
166
+ ], 8, qe)) : d("", !0),
167
+ ue.value ? (n(), b("div", {
165
168
  key: 2,
166
169
  id: a(y),
167
170
  class: "b-input-field__dropdown b-input-field__dropdown--start",
168
- onClick: r[0] || (r[0] = j(() => {
171
+ onClick: r[0] || (r[0] = X(() => {
169
172
  }, ["stop"]))
170
173
  }, [
171
- e.dropdown ? (n(), u(a(z), P({
174
+ e.dropdown ? (n(), u(a(Q), P({
172
175
  key: 0,
173
176
  ref_key: "inputDropdownElement",
174
177
  ref: O
175
- }, K.value, {
178
+ }, J.value, {
176
179
  disabled: e.disabled,
177
180
  readonly: Y.value,
178
- onInput: W
179
- }), null, 16, ["disabled", "readonly"])) : i("", !0)
180
- ], 8, Ye)) : i("", !0),
181
- ae.value ? (n(), u(a(h), {
181
+ onInput: j
182
+ }), null, 16, ["disabled", "readonly"])) : d("", !0)
183
+ ], 8, Ke)) : d("", !0),
184
+ le.value ? (n(), u(a(h), {
182
185
  key: 3,
183
- id: a(N),
186
+ id: a(k),
184
187
  class: "b-input-field__static-value b-input-field__static-value--start",
185
188
  el: "span",
186
189
  variant: "body"
@@ -189,15 +192,15 @@ const Z = {
189
192
  p(e.$slots, "staticValue", {}, void 0, !0)
190
193
  ]),
191
194
  _: 3
192
- }, 8, ["id"])) : i("", !0),
193
- I("div", qe, [
195
+ }, 8, ["id"])) : d("", !0),
196
+ I("div", We, [
194
197
  I("input", P({ id: a(U) }, a($), {
195
198
  ref_key: "inputFieldElement",
196
199
  ref: M,
197
200
  class: "b-input-field__input",
198
- "aria-label": a(q),
199
- "aria-describedby": fe.value,
200
- "aria-owns": ne.value,
201
+ "aria-label": a(W),
202
+ "aria-describedby": me.value,
203
+ "aria-owns": fe.value,
201
204
  "aria-invalid": g.value,
202
205
  placeholder: e.placeholder,
203
206
  required: e.required,
@@ -205,38 +208,38 @@ const Z = {
205
208
  value: e.value,
206
209
  disabled: e.disabled,
207
210
  readonly: a(m),
208
- onInput: be,
209
- onChange: r[1] || (r[1] = (_) => s("change")),
210
- onFocus: x,
211
- onBlur: ee,
211
+ onInput: _e,
212
+ onChange: r[1] || (r[1] = (_) => l("change")),
213
+ onFocus: ie,
214
+ onBlur: de,
212
215
  onKeydown: [
213
- r[2] || (r[2] = (_) => s("keydown", _)),
214
- r[4] || (r[4] = Te((_) => s("escape-pressed"), ["esc"]))
216
+ r[2] || (r[2] = (_) => l("keydown", _)),
217
+ r[4] || (r[4] = ge((_) => l("escape-pressed"), ["esc"]))
215
218
  ],
216
- onKeyup: r[3] || (r[3] = (_) => s("keyup", _))
217
- }), null, 16, Ke),
219
+ onKeyup: r[3] || (r[3] = (_) => l("keyup", _))
220
+ }), null, 16, Je),
218
221
  a(H) && S.value && e.value ? (n(), u(a(h), {
219
222
  key: 0,
220
223
  el: "span",
221
224
  class: "b-input-field__hint"
222
225
  }, {
223
226
  default: c(() => [
224
- Ne(ke(a(H)), 1)
227
+ Z(G(a(H)), 1)
225
228
  ]),
226
229
  _: 1
227
- })) : i("", !0)
230
+ })) : d("", !0)
228
231
  ]),
229
- a(l)("iconAfter") ? (n(), b("span", {
232
+ a(s)("iconAfter") ? (n(), b("span", {
230
233
  key: 4,
231
234
  "aria-hidden": e.ariaHidden ? "true" : void 0,
232
235
  class: "b-input-field__icon-after",
233
236
  "data-testid": "input-text__icon-after"
234
237
  }, [
235
238
  p(e.$slots, "iconAfter", {}, void 0, !0)
236
- ], 8, We)) : i("", !0),
237
- de.value ? (n(), u(a(h), {
239
+ ], 8, je)) : d("", !0),
240
+ se.value ? (n(), u(a(h), {
238
241
  key: 5,
239
- id: a(N),
242
+ id: a(k),
240
243
  class: "b-input-field__static-value b-input-field__static-value--end",
241
244
  el: "span",
242
245
  variant: "body"
@@ -245,60 +248,62 @@ const Z = {
245
248
  p(e.$slots, "staticValue", {}, void 0, !0)
246
249
  ]),
247
250
  _: 3
248
- }, 8, ["id"])) : i("", !0),
249
- re.value ? (n(), b("div", {
251
+ }, 8, ["id"])) : d("", !0),
252
+ pe.value ? (n(), b("div", {
250
253
  key: 6,
251
254
  id: a(y),
252
255
  "data-testid": "input-field-dropdown-container-end",
253
256
  class: "b-input-field__dropdown b-input-field__dropdown--end",
254
- onClick: r[5] || (r[5] = j(() => {
257
+ onClick: r[5] || (r[5] = X(() => {
255
258
  }, ["stop"]))
256
259
  }, [
257
- e.dropdown ? (n(), u(a(z), P({
260
+ e.dropdown ? (n(), u(a(Q), P({
258
261
  key: 0,
259
262
  id: a(y),
260
263
  ref_key: "inputDropdownElement",
261
264
  ref: O
262
- }, K.value, {
265
+ }, J.value, {
263
266
  disabled: e.disabled,
264
267
  readonly: Y.value,
265
- onInput: W
266
- }), null, 16, ["id", "disabled", "readonly"])) : i("", !0)
267
- ], 8, Je)) : i("", !0)
268
- ], 8, Ve),
269
- g.value && e.errorMessage ? (n(), u(a(Be), {
268
+ onInput: j
269
+ }), null, 16, ["id", "disabled", "readonly"])) : d("", !0)
270
+ ], 8, ze)) : d("", !0)
271
+ ], 8, He),
272
+ g.value && e.errorMessage ? (n(), u(a(Ue), {
270
273
  key: 1,
271
274
  id: a(F),
272
275
  "error-message": e.errorMessage,
273
276
  class: "b-input-field__error-message"
274
- }, null, 8, ["id", "error-message"])) : i("", !0),
275
- a(l)("description") ? (n(), b("span", {
277
+ }, null, 8, ["id", "error-message"])) : d("", !0),
278
+ K.value ? (n(), b("span", {
276
279
  key: 2,
277
280
  id: a(V),
278
281
  class: "b-input-field__description",
279
282
  onClick: w
280
283
  }, [
281
- Ae(a(h), {
284
+ Oe(a(h), {
282
285
  el: "span",
283
286
  variant: "body"
284
287
  }, {
285
288
  default: c(() => [
286
- p(e.$slots, "description", { id: "description" }, void 0, !0)
289
+ p(e.$slots, "description", { id: "description" }, () => [
290
+ Z(G(e.description), 1)
291
+ ], !0)
287
292
  ]),
288
293
  _: 3
289
294
  })
290
- ], 8, je)) : i("", !0)
295
+ ], 8, Xe)) : d("", !0)
291
296
  ]),
292
297
  _: 3
293
298
  }, 8, ["class"]));
294
299
  }
295
- }), lt = /* @__PURE__ */ Me(Xe, [["__scopeId", "data-v-760b18d1"]]);
300
+ }), po = /* @__PURE__ */ Ve(Ge, [["__scopeId", "data-v-22a1a159"]]);
296
301
  export {
297
- lt as B,
302
+ po as B,
298
303
  v as a,
299
304
  f as b,
300
305
  T as c,
301
306
  C as d,
302
- Ue as e
307
+ Fe as e
303
308
  };
304
- //# sourceMappingURL=input-field.D_tADgPG.js.map
309
+ //# sourceMappingURL=input-field.A-dEZZfC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-field.A-dEZZfC.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 */\n value?: DropdownProps['value'];\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=\"computedLabel\"\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 @input=\"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 @input=\"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 v-if=\"computedDescription\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\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,GAqCAE,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,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtRA,UAAAC,IAAAC,GAAA,GACAC,IAAAC,GAAA,G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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as B, computed as P, createElementBlock as v, openBlock as r, createVNode as d, unref as e, withCtx as m, createBlock as C, resolveDynamicComponent as Z, mergeProps as L, createSlots as H, createTextVNode as O, toDisplayString as $, createCommentVNode as N, createElementVNode as c, useSlots as J, useAttrs as K, ref as q, toRefs as G, normalizeClass as Q, renderSlot as X } from "vue";
2
2
  import { B as w } from "./typography.yBEME_Gu.js";
3
- import { B as D } from "./dropdown.bLsoTZbw.js";
3
+ import { B as D } from "./dropdown.DG_EnV8g.js";
4
4
  import { g as E } from "./generate-uid.NJ8tVoha.js";
5
5
  import { u as k, g as x, a as M } from "./index.pdBj0KQU.js";
6
6
  import { _ } from "./_plugin-vue_export-helper.CHgC5LLL.js";
@@ -458,4 +458,4 @@ const Le = /* @__PURE__ */ _(Te, [["render", $e]]), U = {
458
458
  export {
459
459
  Ke as B
460
460
  };
461
- //# sourceMappingURL=pagination.D1Gdo5to.js.map
461
+ //# sourceMappingURL=pagination.B4qBK4pM.js.map