@adyen/bento-vue3 1.4.1 → 1.5.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 (220) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +28 -2
  10. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +455 -123
  11. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
  12. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
  13. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
  14. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
  15. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
  17. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
  18. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
  19. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
  20. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  21. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
  22. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
  23. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
  24. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
  25. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +14 -3
  26. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
  27. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
  28. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +122 -72
  29. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
  30. package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
  31. package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +35 -0
  32. package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
  33. package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
  34. package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
  35. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
  36. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +44 -0
  37. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +363 -82
  39. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  40. package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
  41. package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
  42. package/dist/accordion.js +3 -3
  43. package/dist/alert.js +4 -4
  44. package/dist/assets/base-button.css +1 -1
  45. package/dist/assets/base-modal.css +1 -1
  46. package/dist/assets/button.css +1 -1
  47. package/dist/assets/calendar.css +1 -1
  48. package/dist/assets/checkbox.css +1 -1
  49. package/dist/assets/dropdown-default-textbox.css +1 -1
  50. package/dist/assets/dropdown.css +1 -1
  51. package/dist/assets/index.css +1 -1
  52. package/dist/assets/index10.css +1 -1
  53. package/dist/assets/index11.css +1 -1
  54. package/dist/assets/index12.css +1 -1
  55. package/dist/assets/index13.css +1 -1
  56. package/dist/assets/index14.css +1 -1
  57. package/dist/assets/index15.css +1 -1
  58. package/dist/assets/index16.css +1 -1
  59. package/dist/assets/index17.css +1 -1
  60. package/dist/assets/index18.css +1 -1
  61. package/dist/assets/index19.css +1 -1
  62. package/dist/assets/index2.css +1 -1
  63. package/dist/assets/index20.css +1 -1
  64. package/dist/assets/index21.css +1 -1
  65. package/dist/assets/index22.css +1 -1
  66. package/dist/assets/index23.css +1 -1
  67. package/dist/assets/index24.css +1 -1
  68. package/dist/assets/index25.css +1 -1
  69. package/dist/assets/index26.css +1 -1
  70. package/dist/assets/index27.css +1 -1
  71. package/dist/assets/index28.css +1 -1
  72. package/dist/assets/index29.css +1 -1
  73. package/dist/assets/index3.css +1 -1
  74. package/dist/assets/index30.css +1 -1
  75. package/dist/assets/index31.css +1 -1
  76. package/dist/assets/index32.css +1 -1
  77. package/dist/assets/index33.css +1 -1
  78. package/dist/assets/index34.css +1 -1
  79. package/dist/assets/index35.css +1 -1
  80. package/dist/assets/index36.css +1 -1
  81. package/dist/assets/index37.css +1 -1
  82. package/dist/assets/index38.css +1 -1
  83. package/dist/assets/index39.css +1 -1
  84. package/dist/assets/index4.css +1 -1
  85. package/dist/assets/index40.css +1 -1
  86. package/dist/assets/index41.css +1 -1
  87. package/dist/assets/index42.css +1 -1
  88. package/dist/assets/index43.css +1 -1
  89. package/dist/assets/index44.css +1 -0
  90. package/dist/assets/index5.css +1 -1
  91. package/dist/assets/index6.css +1 -1
  92. package/dist/assets/index7.css +1 -1
  93. package/dist/assets/index8.css +1 -1
  94. package/dist/assets/index9.css +1 -1
  95. package/dist/assets/tooltip.css +1 -1
  96. package/dist/avatar-image.js +1 -1
  97. package/dist/badge.js +1 -1
  98. package/dist/button.js +5 -5
  99. package/dist/card.js +4 -4
  100. package/dist/checkbox.js +6 -6
  101. package/dist/chunks/base-button.9740f320.js +116 -0
  102. package/dist/chunks/base-button.9740f320.js.map +1 -0
  103. package/dist/chunks/base-modal.be77971f.js +296 -0
  104. package/dist/chunks/base-modal.be77971f.js.map +1 -0
  105. package/dist/chunks/{button.7d09c245.js → button.7072457f.js} +3 -3
  106. package/dist/chunks/{button.7d09c245.js.map → button.7072457f.js.map} +1 -1
  107. package/dist/chunks/{calendar.0e42130b.js → calendar.1e50c7d1.js} +5 -5
  108. package/dist/chunks/{calendar.0e42130b.js.map → calendar.1e50c7d1.js.map} +1 -1
  109. package/dist/chunks/{checkbox.17462cb0.js → checkbox.638bab98.js} +24 -24
  110. package/dist/chunks/{checkbox.17462cb0.js.map → checkbox.638bab98.js.map} +1 -1
  111. package/dist/chunks/{chevron-up.c03b58f8.js → chevron-up.9bf21068.js} +3 -3
  112. package/dist/chunks/{chevron-up.c03b58f8.js.map → chevron-up.9bf21068.js.map} +1 -1
  113. package/dist/chunks/{controls-group.0d6db9c0.js → controls-group.efcf4e8d.js} +2 -2
  114. package/dist/chunks/{controls-group.0d6db9c0.js.map → controls-group.efcf4e8d.js.map} +1 -1
  115. package/dist/chunks/{copy.c9a29be0.js → copy.527c3d76.js} +3 -3
  116. package/dist/chunks/{copy.c9a29be0.js.map → copy.527c3d76.js.map} +1 -1
  117. package/dist/chunks/debounce.b5ef6acf.js +10 -0
  118. package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
  119. package/dist/chunks/{dropdown-default-textbox.cd789a95.js → dropdown-default-textbox.a1789dc7.js} +19 -18
  120. package/dist/chunks/{dropdown-default-textbox.cd789a95.js.map → dropdown-default-textbox.a1789dc7.js.map} +1 -1
  121. package/dist/chunks/{dropdown.ff4f94a8.js → dropdown.22e51667.js} +9 -7
  122. package/dist/chunks/dropdown.22e51667.js.map +1 -0
  123. package/dist/chunks/{error-message.8c67a507.js → error-message.37b6c7aa.js} +2 -2
  124. package/dist/chunks/{error-message.8c67a507.js.map → error-message.37b6c7aa.js.map} +1 -1
  125. package/dist/chunks/{footer-actions.a587e374.js → footer-actions.5275203a.js} +3 -3
  126. package/dist/chunks/{footer-actions.a587e374.js.map → footer-actions.5275203a.js.map} +1 -1
  127. package/dist/chunks/{grid-layout.984317d7.js → grid-layout.c98e6bc7.js} +2 -2
  128. package/dist/chunks/{grid-layout.984317d7.js.map → grid-layout.c98e6bc7.js.map} +1 -1
  129. package/dist/chunks/{index.77c651df.js → index.32ed68b7.js} +2 -2
  130. package/dist/chunks/{index.77c651df.js.map → index.32ed68b7.js.map} +1 -1
  131. package/dist/chunks/{index.fdb0c13d.js → index.604da8e9.js} +3 -3
  132. package/dist/chunks/{index.fdb0c13d.js.map → index.604da8e9.js.map} +1 -1
  133. package/dist/chunks/{index.fd1cd23a.js → index.a57930ba.js} +197 -188
  134. package/dist/chunks/index.a57930ba.js.map +1 -0
  135. package/dist/chunks/{index.ee69b530.js → index.c22c4278.js} +6 -6
  136. package/dist/chunks/{index.ee69b530.js.map → index.c22c4278.js.map} +1 -1
  137. package/dist/chunks/{index.140bf28f.js → index.c62ea69f.js} +2 -2
  138. package/dist/chunks/{index.140bf28f.js.map → index.c62ea69f.js.map} +1 -1
  139. package/dist/chunks/{index.450b70d5.js → index.dd20095f.js} +3 -3
  140. package/dist/chunks/{index.450b70d5.js.map → index.dd20095f.js.map} +1 -1
  141. package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
  142. package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
  143. package/dist/chunks/{listbox-option-tag.ffe70226.js → listbox-option-tag.fa70334e.js} +3 -3
  144. package/dist/chunks/{listbox-option-tag.ffe70226.js.map → listbox-option-tag.fa70334e.js.map} +1 -1
  145. package/dist/chunks/{listbox.f535a736.js → listbox.4205c0de.js} +12 -11
  146. package/dist/chunks/{listbox.f535a736.js.map → listbox.4205c0de.js.map} +1 -1
  147. package/dist/chunks/{loading-button.bc6e3967.js → loading-button.41c15584.js} +2 -2
  148. package/dist/chunks/{loading-button.bc6e3967.js.map → loading-button.41c15584.js.map} +1 -1
  149. package/dist/chunks/{tooltip.973c86d3.js → tooltip.c8350cd0.js} +37 -36
  150. package/dist/chunks/{tooltip.973c86d3.js.map → tooltip.c8350cd0.js.map} +1 -1
  151. package/dist/chunks/use-has-slot.3daaffc6.js +17 -0
  152. package/dist/chunks/use-has-slot.3daaffc6.js.map +1 -0
  153. package/dist/code-snippet.js +469 -466
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +2 -2
  156. package/dist/currency.js +1 -1
  157. package/dist/data-grid.js +963 -834
  158. package/dist/data-grid.js.map +1 -1
  159. package/dist/date-picker.js +8 -8
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/date.js +1 -1
  162. package/dist/divider.js +1 -1
  163. package/dist/dropdown.js +4 -4
  164. package/dist/empty-state.js +21 -21
  165. package/dist/empty-state.js.map +1 -1
  166. package/dist/filter-bar.js +853 -784
  167. package/dist/filter-bar.js.map +1 -1
  168. package/dist/focus-trap.js +1 -1
  169. package/dist/form-layout.js +72 -51
  170. package/dist/form-layout.js.map +1 -1
  171. package/dist/header.js +190 -112
  172. package/dist/header.js.map +1 -1
  173. package/dist/image.js +3 -1
  174. package/dist/index.js +219 -211
  175. package/dist/index.js.map +1 -1
  176. package/dist/info-icon.js +2 -2
  177. package/dist/input-field.js +5 -5
  178. package/dist/internal.js +7 -7
  179. package/dist/link.js +2 -2
  180. package/dist/loading-indicator.js +1 -1
  181. package/dist/menu.js +114 -104
  182. package/dist/menu.js.map +1 -1
  183. package/dist/modal.js +33 -30
  184. package/dist/modal.js.map +1 -1
  185. package/dist/pagination.js +4 -4
  186. package/dist/payment-method.js +2 -2
  187. package/dist/popover.js +72 -61
  188. package/dist/popover.js.map +1 -1
  189. package/dist/popper-container.js +1238 -192
  190. package/dist/popper-container.js.map +1 -1
  191. package/dist/radio-group.js +5 -5
  192. package/dist/search-bar.js +3 -3
  193. package/dist/segmented-control.js +15 -15
  194. package/dist/segmented-control.js.map +1 -1
  195. package/dist/sidepanel.js +7 -7
  196. package/dist/sidepanel.js.map +1 -1
  197. package/dist/status.js +2 -2
  198. package/dist/stepper.js +276 -0
  199. package/dist/stepper.js.map +1 -0
  200. package/dist/structured-list.js +1 -1
  201. package/dist/summary-grid.js +5 -5
  202. package/dist/tabs.js +2 -2
  203. package/dist/tag.js +3 -3
  204. package/dist/textarea.js +4 -4
  205. package/dist/timeline.js +5 -5
  206. package/dist/toast.js +4 -4
  207. package/dist/toggle.js +12 -12
  208. package/dist/toggle.js.map +1 -1
  209. package/dist/typography.js +1 -1
  210. package/dist/web-types.json +1 -1
  211. package/package.json +3 -3
  212. package/dist/chunks/base-button.c4ac1ad1.js +0 -108
  213. package/dist/chunks/base-button.c4ac1ad1.js.map +0 -1
  214. package/dist/chunks/base-modal.db7a9829.js +0 -291
  215. package/dist/chunks/base-modal.db7a9829.js.map +0 -1
  216. package/dist/chunks/debounce.f8d92e44.js.map +0 -1
  217. package/dist/chunks/dropdown.ff4f94a8.js.map +0 -1
  218. package/dist/chunks/index.fd1cd23a.js.map +0 -1
  219. package/dist/chunks/use-has-slot.9fac7123.js +0 -16
  220. package/dist/chunks/use-has-slot.9fac7123.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { openBlock as o, createElementBlock as _, mergeProps as H, toDisplayString as Q, createCommentVNode as t, pushScopeId as W, popScopeId as X, createElementVNode as D, defineComponent as x, toRefs as M, computed as a, ref as ee, resolveComponent as v, normalizeClass as ae, createBlock as b, withCtx as R, renderSlot as T } from "vue";
2
- import { B as oe } from "./index.77c651df.js";
1
+ import { openBlock as o, createElementBlock as _, mergeProps as H, toDisplayString as Q, createCommentVNode as t, pushScopeId as W, popScopeId as X, createElementVNode as D, defineComponent as x, toRefs as M, computed as a, ref as ee, resolveComponent as k, normalizeClass as ae, createBlock as m, withCtx as R, renderSlot as T } from "vue";
2
+ import { B as oe } from "./index.32ed68b7.js";
3
3
  import { C as le } from "./checkmark-small.3e93a119.js";
4
4
  import { _ as F } from "./_plugin-vue_export-helper.dad06003.js";
5
- import { u as re } from "./use-has-slot.9fac7123.js";
5
+ import { u as re } from "./use-has-slot.3daaffc6.js";
6
6
  import { u as se } from "./use-default-slot-validator.1169c221.js";
7
7
  import { g as P } from "./unique-id.a2a2b458.js";
8
8
  import { g as I } from "./get-slot-text.bead058f.js";
9
9
  import { u as te } from "./i18n.6c402773.js";
10
10
  import { u as ne } from "./aria-label.ac9651a5.js";
11
- import { E as ie } from "./error-message.8c67a507.js";
11
+ import { E as ie } from "./error-message.37b6c7aa.js";
12
12
  import "../assets/checkbox.css";
13
13
  var d = /* @__PURE__ */ ((e) => (e.UNCHECKED = "unchecked", e.DISABLED = "disabled", e.ERROR = "error", e.READONLY = "readonly", e))(d || {}), n = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e.INPUT = "input", e))(n || {});
14
14
  let V = 0;
@@ -16,13 +16,13 @@ const de = {
16
16
  beforeCreate() {
17
17
  this.uuid = V.toString(), V += 1;
18
18
  }
19
- }, ce = (e) => (W("data-v-f5e2bac7"), e = e(), X(), e), ue = { key: 0 }, me = /* @__PURE__ */ ce(() => /* @__PURE__ */ D("path", {
19
+ }, ce = (e) => (W("data-v-f5e2bac7"), e = e(), X(), e), ue = { key: 0 }, be = /* @__PURE__ */ ce(() => /* @__PURE__ */ D("path", {
20
20
  fill: "#00112C",
21
21
  "fill-rule": "evenodd",
22
22
  d: "M4.25 8C4.25 7.58579 4.58579 7.25 5 7.25H11C11.4142 7.25 11.75 7.58579 11.75 8C11.75 8.41421 11.4142 8.75 11 8.75H5C4.58579 8.75 4.25 8.41421 4.25 8Z",
23
23
  "clip-rule": "evenodd"
24
24
  }, null, -1));
25
- function be(e, s, i, l, y, p) {
25
+ function me(e, s, i, l, y, p) {
26
26
  return o(), _("svg", H({ role: "img" }, e.$attrs, {
27
27
  xmlns: "http://www.w3.org/2000/svg",
28
28
  width: "16",
@@ -30,10 +30,10 @@ function be(e, s, i, l, y, p) {
30
30
  fill: "none"
31
31
  }), [
32
32
  e.$attrs["svg-title"] ? (o(), _("title", ue, Q(e.$attrs["svg-title"]), 1)) : t("", !0),
33
- me
33
+ be
34
34
  ], 16);
35
35
  }
36
- const pe = /* @__PURE__ */ F(de, [["render", be], ["__scopeId", "data-v-f5e2bac7"]]), O = {
36
+ const pe = /* @__PURE__ */ F(de, [["render", me], ["__scopeId", "data-v-f5e2bac7"]]), O = {
37
37
  "en-US": {
38
38
  ariaLabelFallback: "Checkbox"
39
39
  }
@@ -101,10 +101,10 @@ const pe = /* @__PURE__ */ F(de, [["render", be], ["__scopeId", "data-v-f5e2bac7
101
101
  setup(e, { attrs: s, emit: i, slots: l }) {
102
102
  const { t: y } = te({ messages: O }), p = P("description"), h = P("error"), f = re(l), { disabled: c, indeterminate: g, modelValue: r, readonly: C, value: S } = M(e), A = I(l)("default"), L = I(l)("description");
103
103
  se("bento-checkbox", l.default, l.description);
104
- const $ = a(() => Array.isArray(r.value)), k = a(() => $.value ? r.value.some((u) => u === S.value) : r.value), E = a(() => !k.value && g.value), w = a(
104
+ const $ = a(() => Array.isArray(r.value)), v = a(() => $.value ? r.value.some((u) => u === S.value) : r.value), E = a(() => !v.value && g.value), w = a(
105
105
  () => !e.disabled && !e.readonly && (e.hasError || !!e.errorMessage)
106
106
  ), B = a(() => !e.disabled && !e.readonly && !!e.errorMessage), Y = a(
107
- () => E.value ? "mixed" : `${!!k.value}`
107
+ () => E.value ? "mixed" : `${!!v.value}`
108
108
  ), K = a(
109
109
  () => `${B.value ? h : ""} ${A && L ? p : ""}`.trim() || null
110
110
  ), z = ee(s["aria-label"]), { ariaLabel: G } = M(e), Z = ne({
@@ -116,7 +116,7 @@ const pe = /* @__PURE__ */ F(de, [["render", be], ["__scopeId", "data-v-f5e2bac7
116
116
  [`b-checkbox--${d.DISABLED}`]: c.value,
117
117
  [`b-checkbox--${d.READONLY}`]: C.value
118
118
  })), J = a(() => ({
119
- [`b-checkbox__outline--${d.UNCHECKED}`]: !k.value && !E.value,
119
+ [`b-checkbox__outline--${d.UNCHECKED}`]: !v.value && !E.value,
120
120
  [`b-checkbox__outline--${d.ERROR}`]: w.value,
121
121
  [`b-checkbox__outline--${d.READONLY}`]: C.value
122
122
  }));
@@ -133,7 +133,7 @@ const pe = /* @__PURE__ */ F(de, [["render", be], ["__scopeId", "data-v-f5e2bac7
133
133
  defaultSlotValue: A,
134
134
  descriptionSlotValue: L,
135
135
  isCheckboxGroup: $,
136
- isChecked: k,
136
+ isChecked: v,
137
137
  isIndeterminate: E,
138
138
  shouldShowErrorMessage: B,
139
139
  // Methods
@@ -143,8 +143,8 @@ const pe = /* @__PURE__ */ F(de, [["render", be], ["__scopeId", "data-v-f5e2bac7
143
143
  return;
144
144
  const N = u.target.checked;
145
145
  if ($.value) {
146
- const m = [...r.value], U = m.indexOf(S.value);
147
- U === -1 ? m.push(S.value) : m.splice(U, 1), i(n.UPDATE, m), i(n.INPUT, m);
146
+ const b = [...r.value], U = b.indexOf(S.value);
147
+ U === -1 ? b.push(S.value) : b.splice(U, 1), i(n.UPDATE, b), i(n.INPUT, b);
148
148
  } else
149
149
  i(n.UPDATE, N), i(n.INPUT, N);
150
150
  },
@@ -154,22 +154,22 @@ const pe = /* @__PURE__ */ F(de, [["render", be], ["__scopeId", "data-v-f5e2bac7
154
154
  };
155
155
  }
156
156
  });
157
- const fe = { class: "b-checkbox__input-container" }, ke = ["aria-label", "aria-checked", "aria-describedby", "aria-invalid", "checked", "disabled", ".indeterminate", "value", "aria-readonly"], ve = {
157
+ const fe = { class: "b-checkbox__input-container" }, ve = ["aria-label", "aria-checked", "aria-describedby", "aria-invalid", "checked", "disabled", ".indeterminate", "value", "aria-readonly"], ke = {
158
158
  key: 0,
159
159
  class: "b-checkbox__text"
160
160
  };
161
161
  function _e(e, s, i, l, y, p) {
162
- const h = v("checkmark-small-icon"), f = v("minus-small-icon"), c = v("bento-typography"), g = v("error-message");
162
+ const h = k("checkmark-small-icon"), f = k("minus-small-icon"), c = k("bento-typography"), g = k("error-message");
163
163
  return o(), _("label", {
164
164
  class: ae(["b-checkbox", e.conditionalClass])
165
165
  }, [
166
166
  D("div", fe, [
167
- e.isChecked ? (o(), b(h, {
167
+ e.isChecked ? (o(), m(h, {
168
168
  key: 0,
169
169
  class: "b-checkbox__icon",
170
170
  "svg-title": "checked"
171
171
  })) : t("", !0),
172
- e.isIndeterminate ? (o(), b(f, {
172
+ e.isIndeterminate ? (o(), m(f, {
173
173
  key: 1,
174
174
  class: "b-checkbox__icon",
175
175
  "svg-title": "intermediate"
@@ -192,10 +192,10 @@ function _e(e, s, i, l, y, p) {
192
192
  "aria-readonly": e.readonly,
193
193
  onChange: s[0] || (s[0] = (...r) => e.onChange && e.onChange(...r)),
194
194
  onClick: s[1] || (s[1] = (...r) => e.onClick && e.onClick(...r))
195
- }), null, 16, ke)
195
+ }), null, 16, ve)
196
196
  ]),
197
- e.hasSlot("default") || e.shouldShowErrorMessage ? (o(), _("span", ve, [
198
- e.hasSlot("default") ? (o(), b(c, {
197
+ e.hasSlot("default") || e.shouldShowErrorMessage ? (o(), _("span", ke, [
198
+ e.hasSlot("default") ? (o(), m(c, {
199
199
  key: 0,
200
200
  class: "b-checkbox__label",
201
201
  el: "span",
@@ -206,7 +206,7 @@ function _e(e, s, i, l, y, p) {
206
206
  ]),
207
207
  _: 3
208
208
  })) : t("", !0),
209
- e.hasSlot("default") && e.hasSlot("description") ? (o(), b(c, {
209
+ e.hasSlot("default") && e.hasSlot("description") ? (o(), m(c, {
210
210
  key: 1,
211
211
  id: e.descriptionId,
212
212
  class: "b-checkbox__description",
@@ -218,7 +218,7 @@ function _e(e, s, i, l, y, p) {
218
218
  ]),
219
219
  _: 3
220
220
  }, 8, ["id"])) : t("", !0),
221
- e.shouldShowErrorMessage ? (o(), b(g, {
221
+ e.shouldShowErrorMessage ? (o(), m(g, {
222
222
  key: 2,
223
223
  id: e.errorId,
224
224
  "error-message": e.errorMessage
@@ -232,4 +232,4 @@ export {
232
232
  d as a,
233
233
  n as b
234
234
  };
235
- //# sourceMappingURL=checkbox.17462cb0.js.map
235
+ //# sourceMappingURL=checkbox.638bab98.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.17462cb0.js","sources":["../../../vue2/src/components/checkbox/checkbox.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/minus-small.vue","../../../vue2/src/components/checkbox/checkbox.vue"],"sourcesContent":["export type BentoMultiCheckboxType = Array<string | number>;\nexport type BentoCheckboxType = boolean | BentoMultiCheckboxType;\n\nexport enum BentoCheckboxState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M4.25 8C4.25 7.58579 4.58579 7.25 5 7.25H11C11.4142 7.25 11.75 7.58579 11.75 8C11.75 8.41421 11.4142 8.75 11 8.75H5C4.58579 8.75 4.25 8.41421 4.25 8Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\">\n <div class=\"b-checkbox__input-container\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <checkmark-small-icon v-if=\"isChecked\" class=\"b-checkbox__icon\" svg-title=\"checked\" />\n <minus-small-icon v-if=\"isIndeterminate\" class=\"b-checkbox__icon\" svg-title=\"intermediate\" />\n <input\n ref=\"input\"\n role=\"checkbox\"\n class=\"b-checkbox__outline\"\n type=\"checkbox\"\n v-bind=\"$attrs\"\n :aria-label=\"computedAriaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"isIndeterminate\"\n :value=\"value\"\n :class=\"conditionalClassOutline\"\n :aria-readonly=\"readonly\"\n @change=\"onChange\"\n @click=\"onClick\"\n />\n </div>\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTypography,\n ErrorMessage,\n CheckmarkSmallIcon,\n MinusSmallIcon,\n },\n model: { prop: 'modelValue' },\n props: {\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => !isChecked.value && indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n isIndeterminate.value ? 'mixed' : `${!!isChecked.value}`\n );\n\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\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: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : t('ariaLabelFallback'),\n });\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => shouldShowError.value);\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n const conditionalClassOutline = computed(() => ({\n [`b-checkbox__outline--${BentoCheckboxState.UNCHECKED}`]: !isChecked.value && !isIndeterminate.value,\n [`b-checkbox__outline--${BentoCheckboxState.ERROR}`]: shouldShowError.value,\n [`b-checkbox__outline--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n }\n };\n\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(BentoCheckboxEvent.UPDATE, newCheckedList);\n emit(BentoCheckboxEvent.INPUT, newCheckedList);\n } else {\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n }\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaChecked,\n ariaDescribedBy,\n ariaInvalid,\n computedAriaLabel,\n conditionalClass,\n conditionalClassOutline,\n defaultSlotValue,\n descriptionSlotValue,\n isCheckboxGroup,\n isChecked,\n isIndeterminate,\n shouldShowErrorMessage,\n\n // Methods\n hasSlot,\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxState","BentoCheckboxState2","BentoCheckboxEvent","BentoCheckboxEvent2","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","_sfc_main","defineComponent","messages","BentoTypography","ErrorMessage","CheckmarkSmall","MinusSmallIcon","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","ariaChecked","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","computedAriaLabel","useAriaLabel","ariaInvalid","conditionalClass","conditionalClassOutline","event","newValue","newCheckedList","index","createBlock","_component_checkmark_small_icon","createCommentVNode","_component_minus_small_icon","createElementVNode","_cache","args","_hoisted_3","_component_bento_typography","_component_error_message"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACLR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAA0J,aAAA;;;AAA5W,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,IAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;;;;GCkFtGG,KAAAC,EAAA;AA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U,GAAA,GAAA,CAAA,IAAA,CAAA,KAAAsD,EAAA,IAAA,EAAA;AAAA,MAAsEtD,EAAA,0BAAAH,EAAA,GAAAuD,EAAAS,GAAA;AAAA,QAAlC,KAAA;AAAA,QAAG,IAAA7D,EAAA;AAAA;;;;;;","x_google_ignoreList":[1]}
1
+ {"version":3,"file":"checkbox.638bab98.js","sources":["../../../vue2/src/components/checkbox/checkbox.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/minus-small.vue","../../../vue2/src/components/checkbox/checkbox.vue"],"sourcesContent":["export type BentoMultiCheckboxType = Array<string | number>;\nexport type BentoCheckboxType = boolean | BentoMultiCheckboxType;\n\nexport enum BentoCheckboxState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M4.25 8C4.25 7.58579 4.58579 7.25 5 7.25H11C11.4142 7.25 11.75 7.58579 11.75 8C11.75 8.41421 11.4142 8.75 11 8.75H5C4.58579 8.75 4.25 8.41421 4.25 8Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\">\n <div class=\"b-checkbox__input-container\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <checkmark-small-icon v-if=\"isChecked\" class=\"b-checkbox__icon\" svg-title=\"checked\" />\n <minus-small-icon v-if=\"isIndeterminate\" class=\"b-checkbox__icon\" svg-title=\"intermediate\" />\n <input\n ref=\"input\"\n role=\"checkbox\"\n class=\"b-checkbox__outline\"\n type=\"checkbox\"\n v-bind=\"$attrs\"\n :aria-label=\"computedAriaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"isIndeterminate\"\n :value=\"value\"\n :class=\"conditionalClassOutline\"\n :aria-readonly=\"readonly\"\n @change=\"onChange\"\n @click=\"onClick\"\n />\n </div>\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTypography,\n ErrorMessage,\n CheckmarkSmallIcon,\n MinusSmallIcon,\n },\n model: { prop: 'modelValue' },\n props: {\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => !isChecked.value && indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n isIndeterminate.value ? 'mixed' : `${!!isChecked.value}`\n );\n\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\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: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : t('ariaLabelFallback'),\n });\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => shouldShowError.value);\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n const conditionalClassOutline = computed(() => ({\n [`b-checkbox__outline--${BentoCheckboxState.UNCHECKED}`]: !isChecked.value && !isIndeterminate.value,\n [`b-checkbox__outline--${BentoCheckboxState.ERROR}`]: shouldShowError.value,\n [`b-checkbox__outline--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n }\n };\n\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(BentoCheckboxEvent.UPDATE, newCheckedList);\n emit(BentoCheckboxEvent.INPUT, newCheckedList);\n } else {\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n }\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaChecked,\n ariaDescribedBy,\n ariaInvalid,\n computedAriaLabel,\n conditionalClass,\n conditionalClassOutline,\n defaultSlotValue,\n descriptionSlotValue,\n isCheckboxGroup,\n isChecked,\n isIndeterminate,\n shouldShowErrorMessage,\n\n // Methods\n hasSlot,\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxState","BentoCheckboxState2","BentoCheckboxEvent","BentoCheckboxEvent2","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","_sfc_main","defineComponent","messages","BentoTypography","ErrorMessage","CheckmarkSmallIcon","MinusSmallIcon","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","ariaChecked","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","computedAriaLabel","useAriaLabel","ariaInvalid","conditionalClass","conditionalClassOutline","event","newValue","newCheckedList","index","createBlock","_component_checkmark_small_icon","createCommentVNode","_component_minus_small_icon","createElementVNode","_cache","args","_hoisted_3","_component_bento_typography","_component_error_message"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACLR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAA0J,aAAA;;;AAA5W,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,IAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;;;;GCkFtGG,KAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,MAAA,EAAA,UAAAC,EAAA;AAAA,EACW,YAAA;AAAA,IACL,iBAAAC;AAAA,IACR,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EACJ,OAAA,EAAA,MAAA,aAAA;AAAA,EAC4B,OAAA;AAAA;AAAA;AAAA;AAAA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48
  }
49
49
  const B = /* @__PURE__ */ p(I, [["render", k], ["__scopeId", "data-v-32f5f438"]]);
50
50
  export {
51
- B as C,
52
- x as a
51
+ x as C,
52
+ B as a
53
53
  };
54
- //# sourceMappingURL=chevron-up.c03b58f8.js.map
54
+ //# sourceMappingURL=chevron-up.9bf21068.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chevron-up.c03b58f8.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M2.46967 4.96967C2.76256 4.67678 3.23744 4.67678 3.53033 4.96967L8 9.43934L12.4697 4.96967C12.7626 4.67678 13.2374 4.67678 13.5303 4.96967C13.8232 5.26257 13.8232 5.73744 13.5303 6.03033L8.53033 11.0303C8.23744 11.3232 7.76256 11.3232 7.46967 11.0303L2.46967 6.03033C2.17678 5.73744 2.17678 5.26256 2.46967 4.96967Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M13.5303 11.0303C13.2374 11.3232 12.7626 11.3232 12.4697 11.0303L8 6.56066L3.53033 11.0303C3.23744 11.3232 2.76256 11.3232 2.46967 11.0303C2.17678 10.7374 2.17678 10.2626 2.46967 9.96967L7.46967 4.96967C7.76256 4.67678 8.23744 4.67678 8.53033 4.96967L13.5303 9.96967C13.8232 10.2626 13.8232 10.7374 13.5303 11.0303Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n"],"names":["uuid$1","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","uuid","_hoisted_1"],"mappings":";;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAgU,aAAA;;;AAAlhB,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;ACGtG,IAAAG,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAgU,aAAA;;;AAAlhB,SAAAN,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAM,GAAAF,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"chevron-up.9bf21068.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-down.vue","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/chevron-up.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M2.46967 4.96967C2.76256 4.67678 3.23744 4.67678 3.53033 4.96967L8 9.43934L12.4697 4.96967C12.7626 4.67678 13.2374 4.67678 13.5303 4.96967C13.8232 5.26257 13.8232 5.73744 13.5303 6.03033L8.53033 11.0303C8.23744 11.3232 7.76256 11.3232 7.46967 11.0303L2.46967 6.03033C2.17678 5.73744 2.17678 5.26256 2.46967 4.96967Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M13.5303 11.0303C13.2374 11.3232 12.7626 11.3232 12.4697 11.0303L8 6.56066L3.53033 11.0303C3.23744 11.3232 2.76256 11.3232 2.46967 11.0303C2.17678 10.7374 2.17678 10.2626 2.46967 9.96967L7.46967 4.96967C7.76256 4.67678 8.23744 4.67678 8.53033 4.96967L13.5303 9.96967C13.8232 10.2626 13.8232 10.7374 13.5303 11.0303Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n"],"names":["uuid$1","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","uuid","_hoisted_1"],"mappings":";;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAgU,aAAA;;;AAAlhB,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;ACGtG,IAAAG,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAgU,aAAA;;;AAAlhB,SAAAN,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAM,GAAAF,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;","x_google_ignoreList":[0,1]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, useAttrs as S, computed as u, openBlock as l, createElementBlock as p, normalizeClass as f, unref as t, createElementVNode as y, createVNode as C, withCtx as a, createTextVNode as n, toDisplayString as i, createBlock as d, createCommentVNode as r, renderSlot as k } from "vue";
2
- import { d as q, B as c } from "./index.77c651df.js";
2
+ import { d as q, B as c } from "./index.32ed68b7.js";
3
3
  import { BentoInfoIcon as v } from "../info-icon.js";
4
4
  import { u as L } from "./i18n.6c402773.js";
5
5
  import { _ as T } from "./_plugin-vue_export-helper.dad06003.js";
@@ -133,4 +133,4 @@ const $ = /* @__PURE__ */ T(I, [["__scopeId", "data-v-40e6d8cc"]]);
133
133
  export {
134
134
  $ as C
135
135
  };
136
- //# sourceMappingURL=controls-group.0d6db9c0.js.map
136
+ //# sourceMappingURL=controls-group.efcf4e8d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controls-group.0d6db9c0.js","sources":["../../../vue2/src/components/internal/controls-group/controls-group.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"b-controls-group\"\n :class=\"conditionalClasses\"\n :form=\"form\"\n :disabled=\"disabled\"\n :aria-describedby=\"ariaAttributes['aria-describedby']\"\n >\n <legend class=\"b-controls-group__label-container\" :class=\"legendConditionalClasses\">\n <div v-if=\"label\" class=\"b-controls-group__label\">\n <bento-typography el=\"span\" stronger>\n {{ label }}\n </bento-typography>\n\n <div>\n <bento-info-icon\n v-if=\"!!tooltipText\"\n class=\"b-controls-group__tooltip\"\n :tooltip-text=\"tooltipText\"\n />\n </div>\n <bento-typography v-if=\"optional\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('required') }})\n </bento-typography>\n </div>\n <bento-typography v-if=\"description\" class=\"b-controls-group__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </legend>\n <slot />\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * Sets all child controls of the <fieldset> as disabled.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The value of the id attribute of a <form> element the <fieldset> is to part of, even if it is not inside the form itself.\n */\n form: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n * The label is shown when `hideLabel` is set to `true` or if `description` is passed\n */\n label: { type: String, required: true },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n });\n\n const ariaAttributes = computed(() => ({\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n }));\n\n const conditionalClasses = computed(() => ({\n 'b-controls-group--disabled': props.disabled,\n }));\n\n const legendConditionalClasses = computed(() => {\n const isLabelAndDescriptionPresent = props.label && props.description;\n const shouldShowLabel = isLabelAndDescriptionPresent || props.hideLabel === false;\n\n return {\n 'b-controls-group__label-container--hidden': !shouldShowLabel,\n };\n });\n\n // eslint-disable-next-line eqeqeq -- Needs to show deprecate message when hideLabel is not set and no description available\n const hasNoPropsDefined = !props.description && props.hideLabel == undefined;\n if (hasNoPropsDefined) {\n deprecate(\n `The property \\`label\\` will always be rendered by default.`,\n `After version 2.0.0, the label will be shown by default.\n To continue hiding the label set \\`:hide-label=\"true\"\\`. Up until version 2.0.0, to display the label set \\`hide-label=\"false\"\\`.\n \\`label\\` will always be rendered when \\`description\\` is passed alongside with \\`label\\``,\n `2.0.0`\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A controls group components should be used whenever it is necessary to group a set of controls (i.e. radio buttons or checkboxes)\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * NOTE: This component should not be used by itself but more implemented by other exported components\n * @example\n * import { ControlsGroup, BentoCheckbox } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { ControlsGroup, RadioButton },\n * template: `\n * <controls-group\n * label=\"Your group label\"\n * description=\"Description\"\n * >\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * </radio-button>\n * <radio-button\n * value=\"inputRadio\"\n * >\n * Another label text\n * </radio-button>\n * </controls-group>\n * `\n * };\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./controls-group.scss\" />\n"],"names":["__default__","messages","t","useI18n","attrs","useAttrs","ariaAttributes","computed","_a","conditionalClasses","props","legendConditionalClasses","deprecate"],"mappings":";;;;;;;;;;;;;;GAyJIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9GA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,EAAA,GA6CAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAuC,qBAAAC,IAAAJ,EAAA,kBAAA,MAAA,gBAAAI,EAAA;AAAA,MACqB;AAAA,KAAA,GAG5DC,IAAAF,EAAA,OAAA;AAAA,MAA2C,8BAAAG,EAAA;AAAA,IACH,EAAA,GAGxCC,IAAAJ,EAAA,OAII;AAAA,MAAO,6CAAA,EAHPG,EAAA,SAAAA,EAAA,eACAA,EAAA,cAAA;AAAA,IAGkD,EAClD;AAKJ,WADA,CAAAA,EAAA,eAAAA,EAAA,aAAA,QAEIE;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"controls-group.efcf4e8d.js","sources":["../../../vue2/src/components/internal/controls-group/controls-group.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"b-controls-group\"\n :class=\"conditionalClasses\"\n :form=\"form\"\n :disabled=\"disabled\"\n :aria-describedby=\"ariaAttributes['aria-describedby']\"\n >\n <legend class=\"b-controls-group__label-container\" :class=\"legendConditionalClasses\">\n <div v-if=\"label\" class=\"b-controls-group__label\">\n <bento-typography el=\"span\" stronger>\n {{ label }}\n </bento-typography>\n\n <div>\n <bento-info-icon\n v-if=\"!!tooltipText\"\n class=\"b-controls-group__tooltip\"\n :tooltip-text=\"tooltipText\"\n />\n </div>\n <bento-typography v-if=\"optional\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-controls-group__label-requirement\" el=\"span\">\n ({{ t('required') }})\n </bento-typography>\n </div>\n <bento-typography v-if=\"description\" class=\"b-controls-group__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </legend>\n <slot />\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * Sets all child controls of the <fieldset> as disabled.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The value of the id attribute of a <form> element the <fieldset> is to part of, even if it is not inside the form itself.\n */\n form: { type: String, default: null },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n * The label is shown when `hideLabel` is set to `true` or if `description` is passed\n */\n label: { type: String, required: true },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n });\n\n const ariaAttributes = computed(() => ({\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n }));\n\n const conditionalClasses = computed(() => ({\n 'b-controls-group--disabled': props.disabled,\n }));\n\n const legendConditionalClasses = computed(() => {\n const isLabelAndDescriptionPresent = props.label && props.description;\n const shouldShowLabel = isLabelAndDescriptionPresent || props.hideLabel === false;\n\n return {\n 'b-controls-group__label-container--hidden': !shouldShowLabel,\n };\n });\n\n // eslint-disable-next-line eqeqeq -- Needs to show deprecate message when hideLabel is not set and no description available\n const hasNoPropsDefined = !props.description && props.hideLabel == undefined;\n if (hasNoPropsDefined) {\n deprecate(\n `The property \\`label\\` will always be rendered by default.`,\n `After version 2.0.0, the label will be shown by default.\n To continue hiding the label set \\`:hide-label=\"true\"\\`. Up until version 2.0.0, to display the label set \\`hide-label=\"false\"\\`.\n \\`label\\` will always be rendered when \\`description\\` is passed alongside with \\`label\\``,\n `2.0.0`\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A controls group components should be used whenever it is necessary to group a set of controls (i.e. radio buttons or checkboxes)\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * NOTE: This component should not be used by itself but more implemented by other exported components\n * @example\n * import { ControlsGroup, BentoCheckbox } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { ControlsGroup, RadioButton },\n * template: `\n * <controls-group\n * label=\"Your group label\"\n * description=\"Description\"\n * >\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * </radio-button>\n * <radio-button\n * value=\"inputRadio\"\n * >\n * Another label text\n * </radio-button>\n * </controls-group>\n * `\n * };\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./controls-group.scss\" />\n"],"names":["__default__","messages","t","useI18n","attrs","useAttrs","ariaAttributes","computed","_a","conditionalClasses","props","legendConditionalClasses","deprecate"],"mappings":";;;;;;;;;;;;;;GAyJIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA9GA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAAC,EAAA,GA6CAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAuC,qBAAAC,IAAAJ,EAAA,kBAAA,MAAA,gBAAAI,EAAA;AAAA,MACqB;AAAA,KAAA,GAG5DC,IAAAF,EAAA,OAAA;AAAA,MAA2C,8BAAAG,EAAA;AAAA,IACH,EAAA,GAGxCC,IAAAJ,EAAA,OAII;AAAA,MAAO,6CAAA,EAHPG,EAAA,SAAAA,EAAA,eACAA,EAAA,cAAA;AAAA,IAGkD,EAClD;AAKJ,WADA,CAAAA,EAAA,eAAAA,EAAA,aAAA,QAEIE;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { openBlock as n, createElementBlock as p, mergeProps as T, toDisplayString as m, createCommentVNode as g, pushScopeId as b, popScopeId as k, createElementVNode as h, defineComponent as w, ref as y, computed as V, resolveComponent as C, resolveDirective as R, withDirectives as v, renderSlot as I, createBlock as P, withCtx as S, createVNode as E } from "vue";
2
- import { a as H } from "./button.7d09c245.js";
2
+ import { a as H } from "./button.7072457f.js";
3
3
  import { PopperContainerPosition as D } from "../popper-container.js";
4
- import { b as F } from "./tooltip.973c86d3.js";
4
+ import { b as F } from "./tooltip.c8350cd0.js";
5
5
  import { u as O } from "./i18n.6c402773.js";
6
6
  import { _ as $ } from "./_plugin-vue_export-helper.dad06003.js";
7
7
  import "../assets/copy.css";
@@ -124,4 +124,4 @@ const Q = /* @__PURE__ */ $(G, [["render", Z], ["__scopeId", "data-v-65c935fd"]]
124
124
  export {
125
125
  Q as C
126
126
  };
127
- //# sourceMappingURL=copy.c9a29be0.js.map
127
+ //# sourceMappingURL=copy.527c3d76.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.c9a29be0.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../../vue2/src/components/internal/copy/copy.types.ts","../../../vue2/src/components/internal/copy/copy.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25V3.5C9.25 3.08579 8.91421 2.75 8.5 2.75H3.5C3.08579 2.75 2.75 3.08579 2.75 3.5V8.5C2.75 8.91421 3.08579 9.25 3.5 9.25H5.25V7.5C5.25 6.25736 6.25736 5.25 7.5 5.25H9.25ZM6.75 12.5C6.75 12.9142 7.08579 13.25 7.5 13.25H12.5C12.9142 13.25 13.25 12.9142 13.25 12.5V7.5C13.25 7.08579 12.9142 6.75 12.5 6.75H7.5C7.08579 6.75 6.75 7.08579 6.75 7.5V12.5Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","export enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n","<template>\n <div class=\"b-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n variant=\"tertiary\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"$t('copy')\" />\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ $t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n import { CopyTooltipState } from './copy.types';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch (e) {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","CopyTooltipState","CopyTooltipState2","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","computed","_directive_bento_tooltip_directive","resolveDirective","_cache","args","renderSlot","withDirectives","createBlock","_component_bento_button","withCtx","createVNode","_component_copy_icon"],"mappings":";;;;;;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARuK,MAAA;AAAA,EAAe,aAAA;AAAA,EAAoB,GAAA;AAAA,EAAmnB,aAAA;;;AAAr0B,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;;;;;;;ACF9F,IAAAG,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SAHQA,IAAAD,K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EAAA,yBAAA;;IAfyB,OAAA;AAAA,IAAc,cAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAvB,EAAA,aAAAA,EAAA,UAAA,GAAAuB,CAAA;AAAA,IACvB,YAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAvB,EAAA,aAAAA,EAAA,UAAA,GAAAuB,CAAA;AAAA,EAAQ,GAAA;AAAA;MAAiE,KAAA;AAAA;IAC/E,GAAA;AAAA,MAD6DC,EAAAxB,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAnB,CAAA,IAAA;AAAA;IAYvC,CAAA,IAAAyB,GAAA5B,EAAA,GAAA6B,EAAAC,GAAA;AAAA,MANO,KAAA;AAAA,MACjB,SAAA;AAAA;IAEkB,GAAA;AAAA,MACH,UAAAC,EAAA,MAAA;AAAA,QAAaC,EAAAC,GAAA;AAAA;;;;;;IAGD,CAAA;AAAA;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"copy.527c3d76.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../../vue2/src/components/internal/copy/copy.types.ts","../../../vue2/src/components/internal/copy/copy.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" fill-rule=\"evenodd\" d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25V3.5C9.25 3.08579 8.91421 2.75 8.5 2.75H3.5C3.08579 2.75 2.75 3.08579 2.75 3.5V8.5C2.75 8.91421 3.08579 9.25 3.5 9.25H5.25V7.5C5.25 6.25736 6.25736 5.25 7.5 5.25H9.25ZM6.75 12.5C6.75 12.9142 7.08579 13.25 7.5 13.25H12.5C12.9142 13.25 13.25 12.9142 13.25 12.5V7.5C13.25 7.08579 12.9142 6.75 12.5 6.75H7.5C7.08579 6.75 6.75 7.08579 6.75 7.5V12.5Z\" clip-rule=\"evenodd\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style scoped lang=\"scss\">\n svg {\n display: inline-flex;\n flex-shrink: 0;\n }\n \n svg,\n svg * {\n fill: currentcolor;\n }\n</style>\n","export enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n","<template>\n <div class=\"b-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n variant=\"tertiary\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"$t('copy')\" />\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ $t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n import { CopyTooltipState } from './copy.types';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch (e) {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","CopyTooltipState","CopyTooltipState2","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","computed","_directive_bento_tooltip_directive","resolveDirective","_cache","args","renderSlot","withDirectives","createBlock","_component_bento_button","withCtx","createVNode","_component_copy_icon"],"mappings":";;;;;;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8B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sourceMappingURL=debounce.b5ef6acf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.b5ef6acf.js","sources":["../../../vue2/src/utils/ts/debounce/debounce.ts"],"sourcesContent":["/**\n * The debounce() method is used to create a debounced function which\n * delays the given callback function until after the stated wait time\n * in milliseconds have passed since the last time this debounced function was called.\n *\n * @param {Function} callback - The function to debounce.\n * @param debounceTime - The number of milliseconds to delay.\n * @returns {Function} - Returns the new debounced function.\n */\nexport const debounce = <T extends (...args: any[]) => any>(callback: T, debounceTime = 300) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n const callable = (...args: any) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => callback(...args), debounceTime);\n };\n return <T>(<any>callable);\n};\n"],"names":["debounce","callback","debounceTime","timeoutId","args"],"mappings":"AASO,MAAMA,IAAW,CAAoCC,GAAaC,IAAe,QAAQ;AACxF,MAAAC;AAQY,SANC,IAAIC,MAAc;AAC/B,IAAID,KACA,aAAaA,CAAS,GAE1BA,IAAY,WAAW,MAAMF,EAAS,GAAGG,CAAI,GAAGF,CAAY;AAAA,EAAA;AAGpE;"}
@@ -1,12 +1,13 @@
1
- import { defineComponent as B, ref as Y, computed as y, resolveComponent as v, openBlock as l, createElementBlock as d, normalizeClass as h, withKeys as C, createVNode as g, withCtx as _, mergeProps as E, renderSlot as S, normalizeProps as L, createTextVNode as D, toDisplayString as I, Fragment as $, renderList as V, createElementVNode as k, guardReactiveProps as R, createCommentVNode as N, withModifiers as x, toHandlers as M, createSlots as W, withDirectives as A, vShow as P } from "vue";
1
+ import { defineComponent as B, ref as Y, computed as f, resolveComponent as v, openBlock as l, createElementBlock as d, normalizeClass as h, withKeys as C, createVNode as g, withCtx as _, mergeProps as E, renderSlot as S, normalizeProps as L, createTextVNode as D, toDisplayString as I, Fragment as $, renderList as V, createElementVNode as k, guardReactiveProps as R, createCommentVNode as N, withModifiers as x, toHandlers as M, createSlots as W, withDirectives as A, vShow as P } from "vue";
2
2
  import { g as q } from "./unique-id.a2a2b458.js";
3
- import { u as H } from "./use-has-slot.9fac7123.js";
4
- import { B as j } from "./index.77c651df.js";
5
- import { d as z, B as G } from "./debounce.f8d92e44.js";
3
+ import { u as H } from "./use-has-slot.3daaffc6.js";
4
+ import { B as j } from "./index.32ed68b7.js";
5
+ import { d as z } from "./debounce.b5ef6acf.js";
6
+ import { B as G } from "./keyboard-navigation.ca47dfa8.js";
6
7
  import { C as J } from "./cross-circle-fill.0feb37b3.js";
7
8
  import { _ as T } from "./_plugin-vue_export-helper.dad06003.js";
8
9
  import { s as O } from "./events.58c00e6d.js";
9
- import { a as Q, C as X } from "./chevron-up.c03b58f8.js";
10
+ import { C as Q, a as X } from "./chevron-up.9bf21068.js";
10
11
  import "../assets/dropdown-default-textbox.css";
11
12
  var u = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.READONLY = "readonly", e.HAS_ITEMS = "has-items", e.OPENED = "opened", e.ERROR = "error", e))(u || {}), o = /* @__PURE__ */ ((e) => (e.OPEN = "open", e.KEYDOWN = "keydown", e.CLOSE = "close", e.INPUT = "input", e.CLEAR = "clear", e))(o || {});
12
13
  const Z = B({
@@ -105,18 +106,18 @@ const Z = B({
105
106
  o.CLEAR,
106
107
  o.KEYDOWN
107
108
  ],
108
- setup(e, { emit: t, slots: s, attrs: f }) {
109
- const r = Y(null), m = q("textbox"), p = y(() => ({
109
+ setup(e, { emit: t, slots: s, attrs: y }) {
110
+ const r = Y(null), m = q("textbox"), p = f(() => ({
110
111
  [`b-dropdown-base-textbox--${u.DISABLED}`]: e.disabled,
111
112
  [`b-dropdown-base-textbox--${u.READONLY}`]: e.readonly,
112
113
  [`b-dropdown-base-textbox--${u.HAS_ITEMS}`]: !!e.additionalItemsSelected
113
- })), b = y(() => e.dynamicFiltering && !!e.value), a = y(
114
+ })), b = f(() => e.dynamicFiltering && !!e.value), a = f(
114
115
  () => {
115
116
  var i;
116
117
  return {
117
118
  "aria-haspopup": "listbox",
118
119
  "aria-controls": e.ariaControls,
119
- "aria-describedby": (i = f["aria-describedby"]) == null ? void 0 : i.toString(),
120
+ "aria-describedby": (i = y["aria-describedby"]) == null ? void 0 : i.toString(),
120
121
  "aria-expanded": e.ariaExpanded ? "true" : "false",
121
122
  "aria-labelledby": e.ariaLabelledby,
122
123
  "aria-label": e.ariaLabelledby ? null : e.ariaLabel,
@@ -132,7 +133,7 @@ const Z = B({
132
133
  t(o.CLEAR), t(o.INPUT, ""), r.value.focus();
133
134
  }, F = z((i) => {
134
135
  !e.readonly && !e.disabled ? t(o.INPUT, i.target.value) : (i.preventDefault(), i.stopPropagation());
135
- }, e.debounceTime), U = y(
136
+ }, e.debounceTime), U = f(
136
137
  () => e.multiple ? e.selectedValueItem : []
137
138
  );
138
139
  return {
@@ -167,7 +168,7 @@ const ee = ["id", "value", "disabled", "readonly"], oe = ["id"], te = {
167
168
  class: "b-dropdown-base-textbox__icon",
168
169
  "aria-hidden": "true"
169
170
  };
170
- function de(e, t, s, f, r, m) {
171
+ function de(e, t, s, y, r, m) {
171
172
  const p = v("cross-circle-fill-icon"), b = v("bento-typography");
172
173
  return l(), d("div", {
173
174
  class: h(e.$attrs.class),
@@ -338,12 +339,12 @@ const se = /* @__PURE__ */ T(Z, [["render", de], ["__scopeId", "data-v-2d370df8"
338
339
  multiple: { type: Boolean, default: !1 }
339
340
  },
340
341
  setup(e, { slots: t, emit: s }) {
341
- const f = y(() => ({
342
+ const y = f(() => ({
342
343
  [`b-dropdown-default-textbox--${u.ERROR}`]: !e.disabled && !e.readonly && e.isInvalid,
343
344
  [`b-dropdown-default-textbox--${u.DISABLED}`]: e.disabled,
344
345
  [`b-dropdown-default-textbox--${u.READONLY}`]: e.readonly,
345
346
  [`b-dropdown-default-textbox--${u.OPENED}`]: e.open
346
- })), r = y(() => e.open && !e.disabled && !e.readonly), m = (n) => {
347
+ })), r = f(() => e.open && !e.disabled && !e.readonly), m = (n) => {
347
348
  s(o.INPUT, n);
348
349
  }, p = (n) => {
349
350
  s(o.KEYDOWN, n);
@@ -364,7 +365,7 @@ const se = /* @__PURE__ */ T(Z, [["render", de], ["__scopeId", "data-v-2d370df8"
364
365
  // Enums
365
366
  DropdownBaseTextboxEvent: o,
366
367
  // Values
367
- conditionalClasses: f,
368
+ conditionalClasses: y,
368
369
  isDropdownOpen: r,
369
370
  slots: t,
370
371
  // Events
@@ -373,7 +374,7 @@ const se = /* @__PURE__ */ T(Z, [["render", de], ["__scopeId", "data-v-2d370df8"
373
374
  }
374
375
  });
375
376
  const ie = { class: "b-dropdown-default-textbox__chevron" };
376
- function ue(e, t, s, f, r, m) {
377
+ function ue(e, t, s, y, r, m) {
377
378
  const p = v("chevron-up-icon"), b = v("chevron-down-icon"), a = v("dropdown-base-textbox");
378
379
  return l(), d("div", {
379
380
  class: h(["b-dropdown-default-textbox", e.conditionalClasses]),
@@ -404,11 +405,11 @@ function ue(e, t, s, f, r, m) {
404
405
  ]), 1040, ["value"])
405
406
  ], 2);
406
407
  }
407
- const Ie = /* @__PURE__ */ T(re, [["render", ue], ["__scopeId", "data-v-d7ba386d"]]);
408
+ const Ee = /* @__PURE__ */ T(re, [["render", ue], ["__scopeId", "data-v-d7ba386d"]]);
408
409
  export {
409
410
  se as D,
410
411
  o as a,
411
412
  u as b,
412
- Ie as c
413
+ Ee as c
413
414
  };
414
- //# sourceMappingURL=dropdown-default-textbox.cd789a95.js.map
415
+ //# sourceMappingURL=dropdown-default-textbox.a1789dc7.js.map