@adyen/bento-vue3 1.23.0 → 1.25.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 (275) hide show
  1. package/dist/@types/packages/vue2/src/components/alert/alert.types.d.ts +3 -0
  2. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +46 -54
  3. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +38 -48
  4. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +86 -174
  5. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  6. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
  7. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.keys.d.ts +1 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +8 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.vue.d.ts +6 -3
  10. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue.d.ts +6 -2
  11. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -0
  12. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +5 -5
  14. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +2 -2
  15. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +2 -2
  16. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
  17. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
  18. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/use-dropdown-options-listbox.d.ts +13 -7
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +14 -14
  20. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
  21. package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +2 -2
  22. package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +3 -24
  23. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +5 -5
  24. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +1 -1
  25. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -1
  26. package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/index.d.ts +1 -0
  27. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/index.d.ts +2 -0
  28. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue.d.ts +148 -0
  29. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue.d.ts +150 -0
  30. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +28 -27
  31. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +21 -9
  32. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +1 -1
  33. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  34. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.types.d.ts +1 -0
  35. package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +1 -1
  36. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +3 -3
  37. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +25 -20
  38. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +1 -2
  39. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +45 -9
  40. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +10 -9
  41. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +2 -2
  42. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +15 -15
  43. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +1 -1
  44. package/dist/@types/packages/vue2/src/components/menu/components/menu-item-list/menu-item-list.vue.d.ts +3 -2
  45. package/dist/@types/packages/vue2/src/components/menu/components/menu-list-container/menu-list-container.vue.d.ts +8 -1
  46. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +3 -1
  47. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -3
  48. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
  49. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +3 -3
  50. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
  51. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +2 -2
  52. package/dist/@types/packages/vue2/src/components/selection-card/components/selection-card-group/selection-card-group.vue.d.ts +3 -3
  53. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
  54. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +3 -3
  55. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +3 -3
  56. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +3 -3
  57. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +2 -2
  58. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +7 -40
  59. package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.types.d.ts +5 -0
  60. package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue.d.ts +7 -0
  61. package/dist/@types/packages/vue2/src/components/toast/index.d.ts +0 -1
  62. package/dist/@types/packages/vue2/src/components/toast/toast.vue.d.ts +1 -29
  63. package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +1 -1
  64. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +195 -55
  65. package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +71 -85
  66. package/dist/@types/packages/vue2/src/composables/index.d.ts +1 -0
  67. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/index.d.ts +2 -0
  68. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/install.d.ts +6 -0
  69. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/toast-stack.d.ts +7 -0
  70. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.d.ts +2 -0
  71. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.types.d.ts +23 -0
  72. package/dist/@types/packages/vue2/src/composables/use-click-outside/index.d.ts +1 -0
  73. package/dist/@types/packages/vue2/src/index.d.ts +2 -0
  74. package/dist/@types/packages/vue2/src/utils/ts/storybook.d.ts +10 -0
  75. package/dist/accordion.js +2 -2
  76. package/dist/action-bar.js +6 -6
  77. package/dist/alert.js +150 -154
  78. package/dist/alert.js.map +1 -1
  79. package/dist/assets/base-modal.css +1 -1
  80. package/dist/assets/dialog-page.css +1 -1
  81. package/dist/assets/dropdown.css +1 -1
  82. package/dist/assets/grid-layout.css +1 -1
  83. package/dist/assets/index10.css +1 -1
  84. package/dist/assets/index11.css +1 -1
  85. package/dist/assets/index12.css +1 -1
  86. package/dist/assets/index13.css +1 -1
  87. package/dist/assets/index14.css +1 -1
  88. package/dist/assets/index15.css +1 -1
  89. package/dist/assets/index16.css +1 -1
  90. package/dist/assets/index17.css +1 -1
  91. package/dist/assets/index18.css +1 -1
  92. package/dist/assets/index19.css +1 -1
  93. package/dist/assets/index2.css +1 -1
  94. package/dist/assets/index20.css +1 -1
  95. package/dist/assets/index21.css +1 -1
  96. package/dist/assets/index22.css +1 -1
  97. package/dist/assets/index23.css +1 -1
  98. package/dist/assets/index24.css +1 -1
  99. package/dist/assets/index25.css +1 -1
  100. package/dist/assets/index26.css +1 -1
  101. package/dist/assets/index27.css +1 -1
  102. package/dist/assets/index28.css +1 -1
  103. package/dist/assets/index29.css +1 -1
  104. package/dist/assets/index3.css +1 -1
  105. package/dist/assets/index30.css +1 -1
  106. package/dist/assets/index31.css +1 -1
  107. package/dist/assets/index32.css +1 -1
  108. package/dist/assets/index33.css +1 -1
  109. package/dist/assets/index34.css +1 -1
  110. package/dist/assets/index35.css +1 -1
  111. package/dist/assets/index36.css +1 -1
  112. package/dist/assets/index37.css +1 -1
  113. package/dist/assets/index38.css +1 -1
  114. package/dist/assets/index39.css +1 -1
  115. package/dist/assets/index4.css +1 -1
  116. package/dist/assets/index40.css +1 -1
  117. package/dist/assets/index41.css +1 -1
  118. package/dist/assets/index42.css +1 -1
  119. package/dist/assets/index43.css +1 -1
  120. package/dist/assets/index44.css +1 -1
  121. package/dist/assets/index45.css +1 -1
  122. package/dist/assets/index46.css +1 -1
  123. package/dist/assets/index47.css +1 -1
  124. package/dist/assets/index48.css +1 -1
  125. package/dist/assets/index5.css +1 -1
  126. package/dist/assets/index6.css +1 -1
  127. package/dist/assets/index7.css +1 -1
  128. package/dist/assets/index8.css +1 -1
  129. package/dist/assets/index9.css +1 -1
  130. package/dist/assets/{listbox.css → use-cached-selected-values.css} +1 -1
  131. package/dist/avatar-image.js +1 -1
  132. package/dist/button.js +5 -5
  133. package/dist/card.js +168 -267
  134. package/dist/card.js.map +1 -1
  135. package/dist/checkbox.js +5 -5
  136. package/dist/chunks/{base-button.13df4e44.js → base-button.6be8b60e.js} +2 -2
  137. package/dist/chunks/{base-button.13df4e44.js.map → base-button.6be8b60e.js.map} +1 -1
  138. package/dist/chunks/{base-modal.30bce990.js → base-modal.310c4790.js} +6 -6
  139. package/dist/chunks/{base-modal.30bce990.js.map → base-modal.310c4790.js.map} +1 -1
  140. package/dist/chunks/{button-actions-with-menu.a5d2bb13.js → button-actions-with-menu.a007b034.js} +4 -4
  141. package/dist/chunks/{button-actions-with-menu.a5d2bb13.js.map → button-actions-with-menu.a007b034.js.map} +1 -1
  142. package/dist/chunks/{button-actions.ec3c649c.js → button-actions.adc0a2fe.js} +3 -3
  143. package/dist/chunks/{button-actions.ec3c649c.js.map → button-actions.adc0a2fe.js.map} +1 -1
  144. package/dist/chunks/{button.e965bf53.js → button.de5589fa.js} +3 -3
  145. package/dist/chunks/{button.e965bf53.js.map → button.de5589fa.js.map} +1 -1
  146. package/dist/chunks/{calendar.52fe4032.js → calendar.73f5b904.js} +4 -4
  147. package/dist/chunks/{calendar.52fe4032.js.map → calendar.73f5b904.js.map} +1 -1
  148. package/dist/chunks/{checkbox.1442f41a.js → checkbox.4c96cc23.js} +3 -3
  149. package/dist/chunks/{checkbox.1442f41a.js.map → checkbox.4c96cc23.js.map} +1 -1
  150. package/dist/chunks/{controls-group.1f29b602.js → controls-group.37a67734.js} +3 -3
  151. package/dist/chunks/{controls-group.1f29b602.js.map → controls-group.37a67734.js.map} +1 -1
  152. package/dist/chunks/{copy.d052f444.js → copy.43de2653.js} +4 -4
  153. package/dist/chunks/{copy.d052f444.js.map → copy.43de2653.js.map} +1 -1
  154. package/dist/chunks/dialog-page.cd8c7fff.js +173 -0
  155. package/dist/chunks/dialog-page.cd8c7fff.js.map +1 -0
  156. package/dist/chunks/{dropdown-default-textbox.e0ca5afb.js → dropdown-default-textbox.424e0eb6.js} +2 -2
  157. package/dist/chunks/{dropdown-default-textbox.e0ca5afb.js.map → dropdown-default-textbox.424e0eb6.js.map} +1 -1
  158. package/dist/chunks/{dropdown.257691c0.js → dropdown.57b2ea6f.js} +295 -317
  159. package/dist/chunks/dropdown.57b2ea6f.js.map +1 -0
  160. package/dist/chunks/{error-message.56247bcc.js → error-message.4bd22112.js} +2 -2
  161. package/dist/chunks/{error-message.56247bcc.js.map → error-message.4bd22112.js.map} +1 -1
  162. package/dist/chunks/{fixed-scroller.47546775.js → fixed-scroller.5b93a6a6.js} +2 -2
  163. package/dist/chunks/{fixed-scroller.47546775.js.map → fixed-scroller.5b93a6a6.js.map} +1 -1
  164. package/dist/chunks/{footer-actions.3c2dbf43.js → footer-actions.c401ec50.js} +4 -4
  165. package/dist/chunks/{footer-actions.3c2dbf43.js.map → footer-actions.c401ec50.js.map} +1 -1
  166. package/dist/chunks/index.11b6dd35.js +74 -0
  167. package/dist/chunks/index.11b6dd35.js.map +1 -0
  168. package/dist/chunks/{index.4fb57ba0.js → index.38752f78.js} +6 -6
  169. package/dist/chunks/{index.4fb57ba0.js.map → index.38752f78.js.map} +1 -1
  170. package/dist/chunks/index.73ac0db6.js +62 -0
  171. package/dist/chunks/index.73ac0db6.js.map +1 -0
  172. package/dist/chunks/{index.824101bb.js → index.8682bd04.js} +2 -2
  173. package/dist/chunks/{index.824101bb.js.map → index.8682bd04.js.map} +1 -1
  174. package/dist/chunks/{index.10c69f39.js → index.8b10ee32.js} +212 -191
  175. package/dist/chunks/index.8b10ee32.js.map +1 -0
  176. package/dist/chunks/{index.f800b267.js → index.98bbaed9.js} +2 -2
  177. package/dist/chunks/{index.f800b267.js.map → index.98bbaed9.js.map} +1 -1
  178. package/dist/chunks/{index.bf4a116b.js → index.aa83aa48.js} +3 -3
  179. package/dist/chunks/{index.bf4a116b.js.map → index.aa83aa48.js.map} +1 -1
  180. package/dist/chunks/{index.08d813e2.js → index.bab8811d.js} +6 -6
  181. package/dist/chunks/{index.08d813e2.js.map → index.bab8811d.js.map} +1 -1
  182. package/dist/chunks/{index.44f2aca7.js → index.ea65003b.js} +2 -2
  183. package/dist/chunks/{index.44f2aca7.js.map → index.ea65003b.js.map} +1 -1
  184. package/dist/chunks/{index.9aaed799.js → index.f71015d8.js} +3 -3
  185. package/dist/chunks/{index.9aaed799.js.map → index.f71015d8.js.map} +1 -1
  186. package/dist/chunks/{index.56c13d2c.js → index.faec0854.js} +15 -15
  187. package/dist/chunks/{index.56c13d2c.js.map → index.faec0854.js.map} +1 -1
  188. package/dist/chunks/{listbox-option-tag.4de1659c.js → listbox-option-tag.d1a3b340.js} +3 -3
  189. package/dist/chunks/{listbox-option-tag.4de1659c.js.map → listbox-option-tag.d1a3b340.js.map} +1 -1
  190. package/dist/chunks/{loading-button.6e15f27f.js → loading-button.2db95771.js} +2 -2
  191. package/dist/chunks/{loading-button.6e15f27f.js.map → loading-button.2db95771.js.map} +1 -1
  192. package/dist/chunks/{payment-method.df1b62db.js → payment-method.26fa5509.js} +2 -2
  193. package/dist/chunks/{payment-method.df1b62db.js.map → payment-method.26fa5509.js.map} +1 -1
  194. package/dist/chunks/{tooltip.066fd8f7.js → tooltip.e29f7d7e.js} +3 -3
  195. package/dist/chunks/{tooltip.066fd8f7.js.map → tooltip.e29f7d7e.js.map} +1 -1
  196. package/dist/chunks/use-bento-toast-controller.98ca249a.js +50 -0
  197. package/dist/chunks/use-bento-toast-controller.98ca249a.js.map +1 -0
  198. package/dist/chunks/use-cached-selected-values.a9b0fb3d.js +1537 -0
  199. package/dist/chunks/use-cached-selected-values.a9b0fb3d.js.map +1 -0
  200. package/dist/code-snippet.js +7 -7
  201. package/dist/code-snippet.js.map +1 -1
  202. package/dist/country.js +2 -2
  203. package/dist/currency.js +1 -1
  204. package/dist/data-grid-template.js +1 -1
  205. package/dist/data-grid.js +1207 -1169
  206. package/dist/data-grid.js.map +1 -1
  207. package/dist/date-picker.js +19 -19
  208. package/dist/date-picker.js.map +1 -1
  209. package/dist/date-range-picker.js +2 -2
  210. package/dist/date.js +1 -1
  211. package/dist/divider.js +1 -1
  212. package/dist/dropdown.js +7 -7
  213. package/dist/empty-state.js +3 -3
  214. package/dist/filter-bar.js +1260 -1112
  215. package/dist/filter-bar.js.map +1 -1
  216. package/dist/focus-trap.js +1 -1
  217. package/dist/form-layout.js +2 -2
  218. package/dist/header.js +4 -4
  219. package/dist/index.js +259 -274
  220. package/dist/index.js.map +1 -1
  221. package/dist/info-icon.js +3 -3
  222. package/dist/input-field.js +100 -93
  223. package/dist/input-field.js.map +1 -1
  224. package/dist/internal.js +31 -78
  225. package/dist/internal.js.map +1 -1
  226. package/dist/link.js +1 -1
  227. package/dist/loading-indicator.js +1 -1
  228. package/dist/menu.js +1 -1
  229. package/dist/modal-fullscreen.js +6 -6
  230. package/dist/modal.js +6 -6
  231. package/dist/pagination.js +4 -4
  232. package/dist/payment-method.js +1 -1
  233. package/dist/popover.js +1 -1
  234. package/dist/popper-container.js +1 -1
  235. package/dist/radio-group.js +112 -112
  236. package/dist/radio-group.js.map +1 -1
  237. package/dist/search-bar.js +2 -2
  238. package/dist/secondary-nav.js +2 -2
  239. package/dist/segmented-control.js +3 -3
  240. package/dist/selection-card.js +4 -4
  241. package/dist/sidepanel.js +64 -62
  242. package/dist/sidepanel.js.map +1 -1
  243. package/dist/status.js +2 -2
  244. package/dist/stepper.js +3 -3
  245. package/dist/structured-list.js +1 -1
  246. package/dist/summary-grid.js +3 -3
  247. package/dist/tabs.js +3 -3
  248. package/dist/tag.js +3 -3
  249. package/dist/textarea.js +4 -4
  250. package/dist/timeline.js +7 -7
  251. package/dist/toast.js +185 -154
  252. package/dist/toast.js.map +1 -1
  253. package/dist/toggle.js +2 -2
  254. package/dist/tutorial.js +6 -6
  255. package/dist/typography.js +1 -1
  256. package/dist/web-types.json +1 -1
  257. package/package.json +7 -3
  258. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/index.d.ts +0 -2
  259. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.types.d.ts +0 -9
  260. package/dist/@types/packages/vue2/src/plugins/toastController.d.ts +0 -12
  261. package/dist/@types/packages/vue2/src/utils/ts/toastController.d.ts +0 -2
  262. package/dist/chunks/dialog-page.d505c5ec.js +0 -172
  263. package/dist/chunks/dialog-page.d505c5ec.js.map +0 -1
  264. package/dist/chunks/dropdown.257691c0.js.map +0 -1
  265. package/dist/chunks/index.0e01e0b2.js +0 -101
  266. package/dist/chunks/index.0e01e0b2.js.map +0 -1
  267. package/dist/chunks/index.10c69f39.js.map +0 -1
  268. package/dist/chunks/index.99c63a74.js +0 -125
  269. package/dist/chunks/index.99c63a74.js.map +0 -1
  270. package/dist/chunks/info-filled.a6f9d7d0.js +0 -44
  271. package/dist/chunks/info-filled.a6f9d7d0.js.map +0 -1
  272. package/dist/chunks/listbox.eb436d06.js +0 -1466
  273. package/dist/chunks/listbox.eb436d06.js.map +0 -1
  274. package/dist/chunks/toastController.0b01d2e8.js +0 -9
  275. package/dist/chunks/toastController.0b01d2e8.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../vue2/src/composables/use-form-validate/use-form.ts","../../vue2/src/plugins/toastController.ts","../../vue2/src/install.ts"],"sourcesContent":["import { Ref, ref, shallowRef } from 'vue';\nimport * as z from 'zod';\nimport type { ZodSchema } from 'zod';\nimport { ErrorBag, UseForm } from './use-form.types';\n\n/**\n * Composable that tansforms a Zod schema into a Typed Schema that can be used alongside with {@see useForm}.\n *\n * This is meant to simulate the behavior of {@link @vee-validate/zod} {@see https://vee-validate.logaretm.com/v4/integrations/zod-schema-validation}.\n * Function that transform Zod’s schemas into something that can be understood by vee-validate\n *\n * @param {T extends ZodSchema} formSchema Zod schema to be transformed into a `vee-validate` schema\n * @returns {UseForm<T>} schema Schema transformed\n */\nexport function toTypedSchema<T extends ZodSchema>(formSchema: T) {\n return formSchema;\n}\n\n/**\n * Finds and returns the initial values of each of the values defined in the schema so that they\n * can be transformed into a reactive element.\n * @param {ZodSchema} schema Zod validation schema containing the definitions of each value to be used in the form\n * @returns Object with the items defined in the schema and their (default) values\n *\n * @example\n * const validationSchema = toTypedSchema(\n * z.object({\n * name: z\n * .string()\n * .min(3, { message: 'Name is required' })\n * .startsWith('Jane')\n * .max(4, { message: 'Name cannot be longer than 4 characters' })\n * .default('Joe'),\n * })\n * );\n * getInitialFormValues(validationSchema)\n *\n * Will return:\n *\n * {\n * name: 'Joe'\n * }\n *\n */\nfunction getInitialFormValues<T extends ZodSchema>(schema: T): z.infer<typeof schema> {\n if (!!z && schema instanceof z.ZodObject) {\n return Object.fromEntries(\n Object.entries(schema.shape).map(([key, value]) => {\n if (!!z && value instanceof z.ZodDefault) {\n // eslint-disable-next-line no-underscore-dangle\n return [key, value._def.defaultValue()];\n }\n\n if (!!z && value instanceof z.ZodObject) {\n return [key, getInitialFormValues(value)];\n }\n\n return [key, undefined];\n })\n ) as z.infer<typeof schema>;\n }\n\n return undefined;\n}\n\n/**\n * Composable that facilitates validating form data for Vue2 & Vue3 implementations with FormLayout\n * to ease the migration to Vue3.\n *\n * For Vue3 implementations use Vee-Validate.\n *\n * This provides a simplified version of Vee-Validate v4 implemented with Zod to validate a form schema.\n * It returns reactive values that can be used directly in form input elements with 'v-model' alongside\n * with functions to \"reset\" the data (sets values to default value) and a function to execute the\n * successful form validation process (through a callback).\n *\n * @param {UseForm<T>} props Form configuration object\n * @param {T extends ZodSchema} props.validationSchema Zod typed validation schema\n * @returns {Object} response - Composable with reactive form values and errors, and functions to handle the reactive data\n * @returns {Ref<ErrorBag<T>>} response.errorBag Object with all the form values and an array of each one of the errors (if any) per value\n * @returns {Ref<T>} response.errors Object with all the form values and the first error found for that field (if any)\n * @returns {Ref<T>} response.values Object with all the form values and their current value\n * @returns {() => void} response.handleReset Resets the form values to default (initial values) when it gets called\n * @returns {(callback: (values: T) => void) => () => void} response.submitForm Validates the data set in {response.values} and sets errors (if found) inside {response.errors} and {response.errorBag}.\n * When the validation is successful it calls the callback so the submit process can continue\n *\n * @example\n * const validationSchema = toTypedSchema(\n * z.object({\n * name: z\n * .string()\n * .min(3, { message: 'Name is required' })\n * .startsWith('Jane')\n * .max(4, { message: 'Name cannot be longer than 4 characters' })\n * .default('Joe'),\n * })\n * );\n *\n * const { values, errors, errorBag, submitForm, handleReset } = useForm({\n * validationSchema\n * });\n * const handleSubmit = submitForm(() => {\n * // Send data to API here\n * })\n *\n */\nexport function useForm<T extends ZodSchema>({ validationSchema }: UseForm<T>) {\n const errors = shallowRef<z.infer<typeof validationSchema>>({});\n\n const errorBag: Ref<ErrorBag<z.infer<typeof validationSchema>>> = ref({});\n const values = ref(getInitialFormValues(validationSchema));\n\n const cleanErrors = () => {\n errors.value = {};\n errorBag.value = {};\n };\n\n const resetForm = () => {\n cleanErrors();\n values.value = getInitialFormValues<T>(validationSchema);\n };\n\n const submitForm = submitted => () => {\n cleanErrors();\n\n // Run validations on the form data through the schema\n const validSchema = validationSchema.safeParse(values.value);\n\n // Update errors\n if (!validSchema.success) {\n errorBag.value = (validSchema as z.SafeParseError<T>).error.flatten().fieldErrors;\n errors.value = Object.entries(errorBag.value).reduce((acc, [key, value]) => {\n // eslint-disable-next-line prefer-destructuring\n acc[key] = value[0];\n return acc;\n }, {});\n } else {\n submitted(values.value);\n }\n };\n\n return {\n // Values\n errorBag,\n errors,\n values,\n\n // Methods\n handleReset: () => resetForm(),\n submitForm,\n };\n}\n","import { reactive } from 'vue';\nimport { generateUid } from '@/utils/ts/unique-id';\nimport { BentoToastItem } from '@/components/toast/components/toast-item';\n\n/* eslint-disable no-underscore-dangle */\nexport default class ToastController {\n get state(): { queue: Array<BentoToastItem> } {\n return this._state;\n }\n\n private _state: { queue: Array<BentoToastItem> };\n\n constructor() {\n this._state = reactive({ queue: [] });\n }\n\n private dismissToast(toast: BentoToastItem): void {\n this._state.queue.splice(this._state.queue.indexOf(toast), 1);\n }\n\n public addToast(params: BentoToastItem) {\n const id = generateUid('toast');\n const toast = {\n ...params,\n id,\n dismiss: () => this.dismissToast(toast),\n };\n\n // new messages always appear in front\n this._state.queue.push(toast);\n\n // return API to manipulate toast\n return {\n dismiss: () => this.dismissToast(toast),\n };\n }\n}\n/* eslint-enable no-underscore-dangle */\n","import type { PluginObject } from 'vue';\nimport { isVue2 } from 'vue-demi';\nimport ToastController from './plugins/toastController';\n\nexport enum BentoTheme {\n LEGACY = 'b-legacy-theme',\n STYLEGUIDE = 'b-styleguide-theme',\n BENTO = '',\n}\n\ninterface BentoVuePlugin {\n theme: BentoTheme;\n withToast: boolean;\n}\n\nconst setTheme = (theme: BentoTheme) => {\n document.body.classList.add(theme);\n};\n\nconst plugin: PluginObject<BentoVuePlugin> = {\n install: async (Vue, options: { theme: BentoTheme; withToast: boolean; withUtilityClasses: boolean }) => {\n if (options?.withToast) {\n if (isVue2) {\n // Adds a new property to the Vue instance\n // eslint-disable-next-line no-param-reassign\n (Vue as any).prototype.$bentoToastController = new ToastController();\n } else {\n // eslint-disable-next-line no-param-reassign\n (Vue as any).config.globalProperties.$bentoToastController = new ToastController();\n }\n }\n // Make sure to put all awaited CSS imports below this point and not above!\n if (options?.theme === BentoTheme.LEGACY) {\n setTheme(BentoTheme.LEGACY);\n await import('@adyen/bento-design-tokens/dist/css/bento/variables-legacy.css');\n } else if (options?.theme === BentoTheme.STYLEGUIDE) {\n setTheme(BentoTheme.STYLEGUIDE);\n await import('@adyen/bento-design-tokens/dist/css/bento/variables-styleguide.css');\n } else {\n await import('@adyen/bento-design-tokens/dist/css/bento/variables.css');\n }\n\n if (options?.withUtilityClasses) {\n await import('@adyen/bento-design-tokens/dist/css/bento/utility.css');\n }\n },\n};\n\nexport default plugin;\n"],"names":["toTypedSchema","formSchema","getInitialFormValues","schema","z","key","value","useForm","validationSchema","errors","shallowRef","errorBag","ref","values","cleanErrors","resetForm","validSchema","submitted","acc","ToastController","__publicField","reactive","toast","params","id","generateUid","setTheme","theme","plugin","Vue","options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,SAASA,EAAmCC,GAAe;AACvD,SAAAA;AACX;AA4BA,SAASC,EAA0CC,GAAmC;AAClF,MAAMC,KAAKD,aAAkBC,EAAE;AAC3B,WAAO,OAAO;AAAA,MACV,OAAO,QAAQD,EAAO,KAAK,EAAE,IAAI,CAAC,CAACE,GAAKC,CAAK,MACnCF,KAAKE,aAAiBF,EAAE,aAEnB,CAACC,GAAKC,EAAM,KAAK,aAAc,CAAA,IAGpCF,KAAKE,aAAiBF,EAAE,YACnB,CAACC,GAAKH,EAAqBI,CAAK,CAAC,IAGrC,CAACD,GAAK,MAAS,CACzB;AAAA,IAAA;AAKb;AA2CgB,SAAAE,EAA6B,EAAE,kBAAAC,KAAgC;AACrE,QAAAC,IAASC,EAA6C,CAAA,CAAE,GAExDC,IAA4DC,EAAI,CAAA,CAAE,GAClEC,IAASD,EAAIV,EAAqBM,CAAgB,CAAC,GAEnDM,IAAc,MAAM;AACtB,IAAAL,EAAO,QAAQ,IACfE,EAAS,QAAQ;EAAC,GAGhBI,IAAY,MAAM;AACR,IAAAD,KACLD,EAAA,QAAQX,EAAwBM,CAAgB;AAAA,EAAA;AAsBpD,SAAA;AAAA;AAAA,IAEH,UAAAG;AAAA,IACA,QAAAF;AAAA,IACA,QAAAI;AAAA;AAAA,IAGA,aAAa,MAAME,EAAU;AAAA,IAC7B,YA3Be,OAAa,MAAM;AACtB,MAAAD;AAGZ,YAAME,IAAcR,EAAiB,UAAUK,EAAO,KAAK;AAGvD,MAACG,EAAY,UAQbC,EAAUJ,EAAO,KAAK,KAPtBF,EAAS,QAASK,EAAoC,MAAM,QAAA,EAAU,aACtEP,EAAO,QAAQ,OAAO,QAAQE,EAAS,KAAK,EAAE,OAAO,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
+ {"version":3,"file":"index.js","sources":["../../vue2/src/composables/use-form-validate/use-form.ts","../../vue2/src/composables/use-bento-toast-controller/install.ts","../../vue2/src/install.ts"],"sourcesContent":["import { Ref, ref, shallowRef } from 'vue';\nimport * as z from 'zod';\nimport type { ZodSchema } from 'zod';\nimport { ErrorBag, UseForm } from './use-form.types';\n\n/**\n * Composable that tansforms a Zod schema into a Typed Schema that can be used alongside with {@see useForm}.\n *\n * This is meant to simulate the behavior of {@link @vee-validate/zod} {@see https://vee-validate.logaretm.com/v4/integrations/zod-schema-validation}.\n * Function that transform Zod’s schemas into something that can be understood by vee-validate\n *\n * @param {T extends ZodSchema} formSchema Zod schema to be transformed into a `vee-validate` schema\n * @returns {UseForm<T>} schema Schema transformed\n */\nexport function toTypedSchema<T extends ZodSchema>(formSchema: T) {\n return formSchema;\n}\n\n/**\n * Finds and returns the initial values of each of the values defined in the schema so that they\n * can be transformed into a reactive element.\n * @param {ZodSchema} schema Zod validation schema containing the definitions of each value to be used in the form\n * @returns Object with the items defined in the schema and their (default) values\n *\n * @example\n * const validationSchema = toTypedSchema(\n * z.object({\n * name: z\n * .string()\n * .min(3, { message: 'Name is required' })\n * .startsWith('Jane')\n * .max(4, { message: 'Name cannot be longer than 4 characters' })\n * .default('Joe'),\n * })\n * );\n * getInitialFormValues(validationSchema)\n *\n * Will return:\n *\n * {\n * name: 'Joe'\n * }\n *\n */\nfunction getInitialFormValues<T extends ZodSchema>(schema: T): z.infer<typeof schema> {\n if (!!z && schema instanceof z.ZodObject) {\n return Object.fromEntries(\n Object.entries(schema.shape).map(([key, value]) => {\n if (!!z && value instanceof z.ZodDefault) {\n // eslint-disable-next-line no-underscore-dangle\n return [key, value._def.defaultValue()];\n }\n\n if (!!z && value instanceof z.ZodObject) {\n return [key, getInitialFormValues(value)];\n }\n\n return [key, undefined];\n })\n ) as z.infer<typeof schema>;\n }\n\n return undefined;\n}\n\n/**\n * Constructs a path with dot paths for arrays to use brackets to be compatible with vee-validate path syntax\n * @param issue List of nested path elements\n * @returns Path with dots\n */\nfunction normalizeFormPath(issue: z.ZodIssue) {\n return issue.path.join('.');\n}\n\n/**\n * Composable that facilitates validating form data for Vue2 & Vue3 implementations with FormLayout\n * to ease the migration to Vue3.\n *\n * For Vue3 implementations use Vee-Validate.\n *\n * This provides a simplified version of Vee-Validate v4 implemented with Zod to validate a form schema.\n * It returns reactive values that can be used directly in form input elements with 'v-model' alongside\n * with functions to \"reset\" the data (sets values to default value) and a function to execute the\n * successful form validation process (through a callback).\n *\n * @param {UseForm<T>} props Form configuration object\n * @param {T extends ZodSchema} props.validationSchema Zod typed validation schema\n * @returns {Object} response - Composable with reactive form values and errors, and functions to handle the reactive data\n * @returns {Ref<ErrorBag<T>>} response.errorBag Object with all the form values and an array of each one of the errors (if any) per value\n * @returns {Ref<T>} response.errors Object with all the form values and the first error found for that field (if any)\n * @returns {Ref<T>} response.values Object with all the form values and their current value\n * @returns {() => void} response.handleReset Resets the form values to default (initial values) when it gets called\n * @returns {(callback: (values: T) => void) => () => void} response.submitForm Validates the data set in {response.values} and sets errors (if found) inside {response.errors} and {response.errorBag}.\n * When the validation is successful it calls the callback so the submit process can continue\n *\n * @example\n * const validationSchema = toTypedSchema(\n * z.object({\n * name: z\n * .string()\n * .min(3, { message: 'Name is required' })\n * .startsWith('Jane')\n * .max(4, { message: 'Name cannot be longer than 4 characters' })\n * .default('Joe'),\n * })\n * );\n *\n * const { values, errors, errorBag, submitForm, handleReset } = useForm({\n * validationSchema\n * });\n * const handleSubmit = submitForm(() => {\n * // Send data to API here\n * })\n *\n */\nexport function useForm<T extends ZodSchema>({ validationSchema }: UseForm<T>) {\n // Errors per field\n const errors = shallowRef<z.infer<typeof validationSchema>>({});\n // All errors per field\n const errorBag: Ref<ErrorBag<z.infer<typeof validationSchema>>> = ref({});\n const values = ref(getInitialFormValues(validationSchema));\n\n const cleanErrors = () => {\n errors.value = {};\n errorBag.value = {};\n };\n\n const resetForm = () => {\n cleanErrors();\n values.value = getInitialFormValues<T>(validationSchema);\n };\n\n const submitForm = submitted => () => {\n cleanErrors();\n\n // Run validations on the form data through the schema\n const validSchema = validationSchema.safeParse(values.value);\n\n // Update errors\n if (!validSchema.success) {\n (validSchema as z.SafeParseError<T>).error.issues.forEach(error => {\n const path = normalizeFormPath(error);\n\n // Add the first ocurrance of a fild error to the \"errors\" object\n if (!errors.value[path]) {\n errors.value[path] = error.message;\n }\n\n // Add each error to the \"errorBag\" per field array\n if (!errorBag.value[path]) {\n errorBag.value[path] = [error.message];\n } else {\n errorBag.value[path].push(error.message);\n }\n });\n } else {\n submitted(values.value);\n }\n };\n\n return {\n // Values\n errorBag,\n errors,\n values,\n\n // Methods\n handleReset: () => resetForm(),\n submitForm,\n };\n}\n","import { type App, isVue2, type Vue2 } from 'vue-demi';\nimport { createToastStack, toastStackInjectionKey } from './toast-stack';\n\n/**\n * This function is used to create and register global reactive state necessary fro the Toasts to operate.\n * @param {Vue} Vue A context application to register global state with.\n */\nexport default Vue => {\n if (isVue2) {\n // Add toast stack as a global property as there is no \"app.provide\" functionality in Vue2\n // eslint-disable-next-line no-param-reassign -- this is an official way of setting up instance properties on Vue\n (Vue as typeof Vue2).prototype[toastStackInjectionKey] = createToastStack();\n } else {\n (Vue as App).provide(toastStackInjectionKey, createToastStack());\n }\n};\n","import type { PluginObject } from 'vue';\nimport installToast from './composables/use-bento-toast-controller/install';\n\nexport enum BentoTheme {\n LEGACY = 'b-legacy-theme',\n STYLEGUIDE = 'b-styleguide-theme',\n BENTO = '',\n}\n\ninterface BentoVuePlugin {\n theme: BentoTheme;\n withToast: boolean;\n}\n\nconst setTheme = (theme: BentoTheme) => {\n document.body.classList.add(theme);\n};\n\nconst plugin: PluginObject<BentoVuePlugin> = {\n install: async (Vue, options: { theme: BentoTheme; withToast: boolean; withUtilityClasses: boolean }) => {\n if (options?.withToast) {\n installToast(Vue);\n }\n // Make sure to put all awaited CSS imports below this point and not above!\n if (options?.theme === BentoTheme.LEGACY) {\n setTheme(BentoTheme.LEGACY);\n await import('@adyen/bento-design-tokens/dist/css/bento/variables-legacy.css');\n } else if (options?.theme === BentoTheme.STYLEGUIDE) {\n setTheme(BentoTheme.STYLEGUIDE);\n await import('@adyen/bento-design-tokens/dist/css/bento/variables-styleguide.css');\n } else {\n await import('@adyen/bento-design-tokens/dist/css/bento/variables.css');\n }\n\n if (options?.withUtilityClasses) {\n await import('@adyen/bento-design-tokens/dist/css/bento/utility.css');\n }\n },\n};\n\nexport default plugin;\n"],"names":["toTypedSchema","formSchema","getInitialFormValues","schema","z","key","value","normalizeFormPath","issue","useForm","validationSchema","errors","shallowRef","errorBag","ref","values","cleanErrors","resetForm","validSchema","submitted","error","path","installToast","Vue","toastStackInjectionKey","createToastStack","setTheme","theme","plugin","options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,SAASA,EAAmCC,GAAe;AACvD,SAAAA;AACX;AA4BA,SAASC,EAA0CC,GAAmC;AAClF,MAAMC,KAAKD,aAAkBC,EAAE;AAC3B,WAAO,OAAO;AAAA,MACV,OAAO,QAAQD,EAAO,KAAK,EAAE,IAAI,CAAC,CAACE,GAAKC,CAAK,MACnCF,KAAKE,aAAiBF,EAAE,aAEnB,CAACC,GAAKC,EAAM,KAAK,aAAc,CAAA,IAGpCF,KAAKE,aAAiBF,EAAE,YACnB,CAACC,GAAKH,EAAqBI,CAAK,CAAC,IAGrC,CAACD,GAAK,MAAS,CACzB;AAAA,IAAA;AAKb;AAOA,SAASE,EAAkBC,GAAmB;AACnC,SAAAA,EAAM,KAAK,KAAK,GAAG;AAC9B;AA2CgB,SAAAC,EAA6B,EAAE,kBAAAC,KAAgC;AAErE,QAAAC,IAASC,EAA6C,CAAA,CAAE,GAExDC,IAA4DC,EAAI,CAAA,CAAE,GAClEC,IAASD,EAAIZ,EAAqBQ,CAAgB,CAAC,GAEnDM,IAAc,MAAM;AACtB,IAAAL,EAAO,QA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AAM,OAAO,4DAAuD;AAAA,EAE5E;AACJ;"}
package/dist/info-icon.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as n, resolveComponent as r, resolveDirective as s, withDirectives as c, openBlock as p, createElementBlock as l, createVNode as a } from "vue";
2
- import { c as t } from "./chunks/index.9aaed799.js";
3
- import { b as _ } from "./chunks/tooltip.066fd8f7.js";
2
+ import { c as t } from "./chunks/index.f71015d8.js";
3
+ import { b as _ } from "./chunks/tooltip.e29f7d7e.js";
4
4
  import { I as d } from "./chunks/info.550f9511.js";
5
5
  import { _ as f } from "./chunks/_plugin-vue_export-helper.dad06003.js";
6
- import "./assets/index42.css";
6
+ import "./assets/index16.css";
7
7
  const m = n({
8
8
  name: "bento-info-icon",
9
9
  components: { InfoIcon: d },
@@ -1,24 +1,24 @@
1
- import { defineComponent as oe, useAttrs as de, useSlots as ie, ref as I, provide as re, toRef as ne, computed as l, toRefs as le, openBlock as r, createBlock as p, unref as t, normalizeClass as se, withCtx as w, renderSlot as c, createCommentVNode as d, createElementVNode as M, createElementBlock as y, withModifiers as U, mergeProps as N, withKeys as ue, createVNode as ce } from "vue";
2
- import { I as pe, B as V } from "./chunks/dropdown.257691c0.js";
3
- import { d as H, B as _ } from "./chunks/index.99c63a74.js";
4
- import { g as D } from "./chunks/unique-id.a2a2b458.js";
5
- import { g as fe } from "./chunks/get-slot-text.bead058f.js";
6
- import { u as be } from "./chunks/aria-label.ac9651a5.js";
7
- import { u as ye } from "./chunks/i18n.f7e6533e.js";
8
- import { u as ve } from "./chunks/use-form-layout-loading.d03e5d48.js";
9
- import { u as me } from "./chunks/use-has-slot.4d98bf29.js";
10
- import { F as we, E as De } from "./chunks/error-message.56247bcc.js";
1
+ import { defineComponent as de, useAttrs as ie, useSlots as re, ref as I, provide as ne, toRef as le, computed as l, toRefs as se, openBlock as r, createBlock as c, unref as t, normalizeClass as ue, withCtx as w, renderSlot as p, createCommentVNode as d, createElementVNode as M, createElementBlock as y, withModifiers as U, mergeProps as N, withKeys as pe, createVNode as ce } from "vue";
2
+ import { I as fe, B as V } from "./chunks/dropdown.57b2ea6f.js";
3
+ import { p as H, d as F, B as _ } from "./chunks/index.11b6dd35.js";
4
+ import { g } from "./chunks/unique-id.a2a2b458.js";
5
+ import { g as be } from "./chunks/get-slot-text.bead058f.js";
6
+ import { u as ye } from "./chunks/aria-label.ac9651a5.js";
7
+ import { u as ve } from "./chunks/i18n.f7e6533e.js";
8
+ import { u as me } from "./chunks/use-form-layout-loading.d03e5d48.js";
9
+ import { u as we } from "./chunks/use-has-slot.4d98bf29.js";
10
+ import { F as ge, E as De } from "./chunks/error-message.4bd22112.js";
11
11
  import { _ as he } from "./chunks/_plugin-vue_export-helper.dad06003.js";
12
- import "./assets/index35.css";
13
- var f = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.PAYMENT_METHOD = "payment-method", e.STATIC_VALUE = "static-value", e.DROPDOWN = "dropdown", e))(f || {}), s = /* @__PURE__ */ ((e) => (e.START = "start", e.END = "end", e))(s || {}), h = /* @__PURE__ */ ((e) => (e.CONDENSED = "condensed", e.DISABLED = "disabled", e.READONLY = "readonly", e.ERROR = "error", e))(h || {}), O = /* @__PURE__ */ ((e) => (e.SEARCH = "search", e.TEXT = "text", e.NUMBER = "number", e))(O || {}), Ee = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.ESCAPE_PRESSED = "escape-pressed", e.UPDATE_DROPDOWN = "update:dropdown", e.DROPDOWN_INPUT = "dropdown-input", e.FOCUS = "focus", e.CHANGE = "change", e.BLUR = "blur", e.KEYDOWN = "keydown", e))(Ee || {});
12
+ import "./assets/index39.css";
13
+ var f = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.PAYMENT_METHOD = "payment-method", e.STATIC_VALUE = "static-value", e.DROPDOWN = "dropdown", e))(f || {}), s = /* @__PURE__ */ ((e) => (e.START = "start", e.END = "end", e))(s || {}), D = /* @__PURE__ */ ((e) => (e.CONDENSED = "condensed", e.DISABLED = "disabled", e.READONLY = "readonly", e.ERROR = "error", e))(D || {}), O = /* @__PURE__ */ ((e) => (e.SEARCH = "search", e.TEXT = "text", e.NUMBER = "number", e))(O || {}), Ee = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.ESCAPE_PRESSED = "escape-pressed", e.UPDATE_DROPDOWN = "update:dropdown", e.DROPDOWN_INPUT = "dropdown-input", e.FOCUS = "focus", e.CHANGE = "change", e.BLUR = "blur", e.KEYDOWN = "keydown", e))(Ee || {});
14
14
  const x = {
15
15
  "en-US": {
16
16
  ariaLabelFallback: "Input field"
17
17
  }
18
- }, ge = ["aria-disabled"], Se = ["aria-hidden"], Ae = ["aria-hidden"], Te = ["id"], _e = ["id", "aria-label", "aria-describedby", "aria-owns", "aria-invalid", "placeholder", "type", "value", "disabled", "readonly"], ke = ["aria-hidden"], Ne = ["id"], Oe = ["id"], Re = {
18
+ }, Se = ["aria-disabled"], Ae = ["aria-hidden"], Te = ["aria-hidden"], _e = ["id"], ke = ["id", "aria-label", "aria-describedby", "aria-owns", "aria-invalid", "placeholder", "type", "value", "disabled", "readonly"], Ne = ["aria-hidden"], Oe = ["id"], Re = ["id"], $e = {
19
19
  i18n: { messages: x }
20
- }, Le = /* @__PURE__ */ oe({
21
- ...Re,
20
+ }, Le = /* @__PURE__ */ de({
21
+ ...$e,
22
22
  __name: "input-field",
23
23
  props: {
24
24
  /**
@@ -42,7 +42,11 @@ const x = {
42
42
  disabled: { type: Boolean, default: !1 },
43
43
  /**
44
44
  * Dropdown props for the small selectable dropdown menu.
45
- * @see BentoDropdown
45
+ * Properties supported:
46
+ *
47
+ * - `value`: Selected value of the dropdown
48
+ * - `items`: List of available items
49
+ *
46
50
  */
47
51
  dropdown: {
48
52
  type: Object,
@@ -101,11 +105,13 @@ const x = {
101
105
  tooltipText: { type: String, default: null },
102
106
  /**
103
107
  * A string specifying the type of control to render.
108
+ * All `input` types are available but only `search`, `text` and `number` are fully supported.
109
+ *
110
+ * If `type` is `search`, use `bento-search-bar` instead.
104
111
  */
105
112
  type: {
106
113
  type: String,
107
- default: O.TEXT,
108
- validator: (e) => Object.values(O).includes(e)
114
+ default: O.TEXT
109
115
  },
110
116
  /**
111
117
  * Text displayed as the value of the input-field
@@ -121,49 +127,49 @@ const x = {
121
127
  }
122
128
  },
123
129
  emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "input"],
124
- setup(e, { expose: F, emit: u }) {
125
- const a = e, R = de(), k = ie(), { t: Y } = ye({ messages: x }), n = me(k), L = I(null), $ = D("input"), v = D("input-dropdown"), E = D("input-static-value"), B = D("input-description"), P = D("input-error");
126
- re(pe, !0);
127
- const { isReadOnly: b } = ve(ne(a, "readonly")), g = l(
128
- () => a.variant === f.STATIC_VALUE && !!k.staticValue
129
- ), j = l(() => a.variant === f.DEFAULT), W = l(() => a.variant === f.PAYMENT_METHOD), q = l(
130
- () => g.value && a.staticValuePosition === s.START
131
- ), K = l(
132
- () => g.value && a.staticValuePosition === s.END
133
- ), S = l(() => a.variant === f.DROPDOWN && !!a.dropdown), X = l(
134
- () => S.value && a.dropdownPosition === s.START
135
- ), z = l(
136
- () => S.value && a.dropdownPosition === s.END
130
+ setup(e, { expose: W, emit: u }) {
131
+ const o = e, R = ie(), k = re(), { t: Y } = ve({ messages: x }), n = we(k), $ = I(null), L = g("input"), v = g("input-dropdown"), h = g("input-static-value"), B = g("input-description"), P = g("input-error");
132
+ ne(fe, !0);
133
+ const { isReadOnly: b } = me(le(o, "readonly")), E = l(
134
+ () => o.variant === f.STATIC_VALUE && !!k.staticValue
135
+ ), j = l(() => o.variant === f.DEFAULT), q = l(() => o.variant === f.PAYMENT_METHOD), K = l(
136
+ () => E.value && o.staticValuePosition === s.START
137
+ ), X = l(
138
+ () => E.value && o.staticValuePosition === s.END
139
+ ), S = l(() => o.variant === f.DROPDOWN && !!o.dropdown), z = l(
140
+ () => S.value && o.dropdownPosition === s.START
141
+ ), G = l(
142
+ () => S.value && o.dropdownPosition === s.END
137
143
  ), A = l(
138
- () => !a.disabled && !b.value && (!!a.errorMessage || a.error)
139
- ), G = l(() => S.value === !0 && g.value === !0 ? `${E} ${v}` : S.value === !0 ? `${v}` : g.value === !0 ? `${E}` : null), J = I(R["aria-label"]), { ariaLabel: Q } = le(a), Z = be({
140
- ariaLabel: J.value,
144
+ () => !o.disabled && !b.value && (!!o.errorMessage || o.error)
145
+ ), J = l(() => S.value === !0 && E.value === !0 ? `${h} ${v}` : S.value === !0 ? `${v}` : E.value === !0 ? `${h}` : null), Q = I(R["aria-label"]), { ariaLabel: Z } = se(o), ee = ye({
146
+ ariaLabel: Q.value,
141
147
  // TODO: take this line away when the aria-label props is removed
142
- label: Q,
143
- defaultFallback: n("default") ? fe(k)("default") : Y("ariaLabelFallback")
144
- }), ee = l(
145
- () => `${n("description") ? B : ""} ${A.value && a.errorMessage ? P : ""}`
146
- ), te = l(() => ({
147
- [`b-input-field--${h.CONDENSED}`]: a.condensed,
148
- [`b-input-field--${h.DISABLED}`]: a.disabled,
149
- [`b-input-field--${h.READONLY}`]: b.value,
150
- [`b-input-field--${h.ERROR}`]: A.value
148
+ label: Z,
149
+ defaultFallback: n("default") ? be(k)("default") : Y("ariaLabelFallback")
150
+ }), te = l(
151
+ () => `${n("description") ? B : ""} ${A.value && o.errorMessage ? P : ""}`
152
+ ), oe = l(() => ({
153
+ [`b-input-field--${D.CONDENSED}`]: o.condensed,
154
+ [`b-input-field--${D.DISABLED}`]: o.disabled,
155
+ [`b-input-field--${D.READONLY}`]: b.value,
156
+ [`b-input-field--${D.ERROR}`]: A.value
151
157
  })), ae = (i) => {
152
- !a.disabled && !b.value && u("input", i.target.value);
158
+ !o.disabled && !b.value && u("input", i.target.value);
153
159
  }, C = (i) => {
154
- u("dropdown-input", i), u("update:dropdown", { ...a == null ? void 0 : a.dropdown, value: i });
160
+ u("dropdown-input", i), u("update:dropdown", { ...o == null ? void 0 : o.dropdown, value: i });
155
161
  }, T = () => {
156
- L.value.focus();
162
+ $.value.focus();
157
163
  };
158
- return F({
164
+ return W({
159
165
  focusInput: T
160
- }), a.error && H(
166
+ }), o.dropdown && o.dropdown.dynamicFiltering && H('"bento-input-field" dropdown does not support "dynamicFiltering"'), Object.values(O).includes(o.type) || H(`"bento-input-field" dropdown does not support the type ${o.type}`), o.error && F(
161
167
  'BentoInputField "error" property',
162
168
  `Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
163
169
  Having the field as "undefined" will hide/remove the error.
164
170
  <bento-dropdown errorMessage="Error message text" />`,
165
171
  "2.0.0"
166
- ), n("defaultIconBefore") && H(
172
+ ), n("defaultIconBefore") && F(
167
173
  'BentoInputField "defaultIconBefore" slot',
168
174
  `Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
169
175
  <bento-input-field>
@@ -172,16 +178,16 @@ const x = {
172
178
  </template>
173
179
  </bento-input-field>`,
174
180
  "2.0.0"
175
- ), (i, o) => (r(), p(t(_), {
176
- class: se(["b-input-field", t(te)]),
181
+ ), (i, a) => (r(), c(t(_), {
182
+ class: ue(["b-input-field", t(oe)]),
177
183
  "data-testid": "input-text-container",
178
184
  el: "div",
179
185
  variant: "body"
180
186
  }, {
181
187
  default: w(() => [
182
- t(n)("default") ? (r(), p(t(we), {
188
+ t(n)("default") ? (r(), c(t(ge), {
183
189
  key: 0,
184
- for: t($),
190
+ for: t(L),
185
191
  "data-testid": "input-field-label",
186
192
  "tooltip-text": e.tooltipText,
187
193
  optional: e.optional,
@@ -189,7 +195,7 @@ const x = {
189
195
  onClick: T
190
196
  }, {
191
197
  default: w(() => [
192
- c(i.$slots, "default", {}, void 0, !0)
198
+ p(i.$slots, "default", {}, void 0, !0)
193
199
  ]),
194
200
  _: 3
195
201
  }, 8, ["for", "tooltip-text", "optional", "required"])) : d("", !0),
@@ -204,48 +210,48 @@ const x = {
204
210
  "aria-hidden": e.ariaHidden ? "true" : void 0,
205
211
  class: "b-input-field__icon-before"
206
212
  }, [
207
- t(n)("iconBefore") ? c(i.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
208
- t(n)("defaultIconBefore") && !t(n)("iconBefore") ? c(i.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
209
- ], 8, Se)) : d("", !0),
210
- t(W) && t(n)("paymentMethod") ? (r(), y("span", {
213
+ t(n)("iconBefore") ? p(i.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
214
+ t(n)("defaultIconBefore") && !t(n)("iconBefore") ? p(i.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
215
+ ], 8, Ae)) : d("", !0),
216
+ t(q) && t(n)("paymentMethod") ? (r(), y("span", {
211
217
  key: 1,
212
218
  "aria-hidden": e.ariaHidden ? "true" : void 0,
213
219
  class: "b-input-field__payment-method"
214
220
  }, [
215
- c(i.$slots, "paymentMethod", {}, void 0, !0)
216
- ], 8, Ae)) : d("", !0),
217
- t(X) ? (r(), y("div", {
221
+ p(i.$slots, "paymentMethod", {}, void 0, !0)
222
+ ], 8, Te)) : d("", !0),
223
+ t(z) ? (r(), y("div", {
218
224
  key: 2,
219
225
  id: t(v),
220
226
  class: "b-input-field__dropdown b-input-field__dropdown--start",
221
- onClick: o[0] || (o[0] = U(() => {
227
+ onClick: a[0] || (a[0] = U(() => {
222
228
  }, ["stop"]))
223
229
  }, [
224
- e.dropdown ? (r(), p(t(V), N({ key: 0 }, e.dropdown, {
230
+ e.dropdown ? (r(), c(t(V), N({ key: 0 }, e.dropdown, {
225
231
  disabled: e.disabled,
226
232
  readonly: t(b),
227
233
  onInput: C
228
234
  }), null, 16, ["disabled", "readonly"])) : d("", !0)
229
- ], 8, Te)) : d("", !0),
230
- t(q) ? (r(), p(t(_), {
235
+ ], 8, _e)) : d("", !0),
236
+ t(K) ? (r(), c(t(_), {
231
237
  key: 3,
232
- id: t(E),
238
+ id: t(h),
233
239
  class: "b-input-field__static-value b-input-field__static-value--start",
234
240
  el: "span",
235
241
  variant: "body"
236
242
  }, {
237
243
  default: w(() => [
238
- c(i.$slots, "staticValue", {}, void 0, !0)
244
+ p(i.$slots, "staticValue", {}, void 0, !0)
239
245
  ]),
240
246
  _: 3
241
247
  }, 8, ["id"])) : d("", !0),
242
- M("input", N({ id: t($) }, t(R), {
248
+ M("input", N({ id: t(L) }, t(R), {
243
249
  ref_key: "inputFieldElement",
244
- ref: L,
250
+ ref: $,
245
251
  class: "b-input-field__input",
246
- "aria-label": t(Z),
247
- "aria-describedby": t(ee),
248
- "aria-owns": t(G),
252
+ "aria-label": t(ee),
253
+ "aria-describedby": t(te),
254
+ "aria-owns": t(J),
249
255
  "aria-invalid": t(A),
250
256
  placeholder: e.placeholder,
251
257
  type: e.type,
@@ -253,53 +259,54 @@ const x = {
253
259
  disabled: e.disabled,
254
260
  readonly: t(b),
255
261
  onInput: ae,
256
- onChange: o[1] || (o[1] = (m) => u("change")),
257
- onFocus: o[2] || (o[2] = (m) => u("focus")),
258
- onBlur: o[3] || (o[3] = (m) => u("blur")),
262
+ onChange: a[1] || (a[1] = (m) => u("change")),
263
+ onFocus: a[2] || (a[2] = (m) => u("focus")),
264
+ onBlur: a[3] || (a[3] = (m) => u("blur")),
259
265
  onKeydown: [
260
- o[4] || (o[4] = (m) => u("keydown", m)),
261
- o[5] || (o[5] = ue((m) => u("escape-pressed"), ["esc"]))
266
+ a[4] || (a[4] = (m) => u("keydown", m)),
267
+ a[5] || (a[5] = pe((m) => u("escape-pressed"), ["esc"]))
262
268
  ]
263
- }), null, 16, _e),
269
+ }), null, 16, ke),
264
270
  t(n)("iconAfter") ? (r(), y("span", {
265
271
  key: 4,
266
272
  "aria-hidden": e.ariaHidden ? "true" : void 0,
267
273
  class: "b-input-field__icon-after",
268
274
  "data-testid": "input-text__icon-after"
269
275
  }, [
270
- c(i.$slots, "iconAfter", {}, void 0, !0)
271
- ], 8, ke)) : d("", !0),
272
- t(K) ? (r(), p(t(_), {
276
+ p(i.$slots, "iconAfter", {}, void 0, !0)
277
+ ], 8, Ne)) : d("", !0),
278
+ t(X) ? (r(), c(t(_), {
273
279
  key: 5,
274
- id: t(E),
280
+ id: t(h),
275
281
  class: "b-input-field__static-value b-input-field__static-value--end",
276
282
  el: "span",
277
283
  variant: "body"
278
284
  }, {
279
285
  default: w(() => [
280
- c(i.$slots, "staticValue", {}, void 0, !0)
286
+ p(i.$slots, "staticValue", {}, void 0, !0)
281
287
  ]),
282
288
  _: 3
283
289
  }, 8, ["id"])) : d("", !0),
284
- t(z) ? (r(), y("div", {
290
+ t(G) ? (r(), y("div", {
285
291
  key: 6,
286
292
  id: t(v),
287
293
  "data-testid": "input-field-dropdown-container-end",
288
294
  class: "b-input-field__dropdown b-input-field__dropdown--end",
289
- onClick: o[6] || (o[6] = U(() => {
295
+ onClick: a[6] || (a[6] = U(() => {
290
296
  }, ["stop"]))
291
297
  }, [
292
- e.dropdown ? (r(), p(t(V), N({
298
+ e.dropdown ? (r(), c(t(V), N({
293
299
  key: 0,
294
300
  id: t(v)
295
301
  }, e.dropdown, {
302
+ "dynamic-filtering": !1,
296
303
  disabled: e.disabled,
297
304
  readonly: t(b),
298
305
  onInput: C
299
306
  }), null, 16, ["id", "disabled", "readonly"])) : d("", !0)
300
- ], 8, Ne)) : d("", !0)
301
- ], 8, ge),
302
- t(A) && e.errorMessage ? (r(), p(t(De), {
307
+ ], 8, Oe)) : d("", !0)
308
+ ], 8, Se),
309
+ t(A) && e.errorMessage ? (r(), c(t(De), {
303
310
  key: 1,
304
311
  id: t(P),
305
312
  "error-message": e.errorMessage,
@@ -316,22 +323,22 @@ const x = {
316
323
  variant: "body"
317
324
  }, {
318
325
  default: w(() => [
319
- c(i.$slots, "description", { id: "description" }, void 0, !0)
326
+ p(i.$slots, "description", { id: "description" }, void 0, !0)
320
327
  ]),
321
328
  _: 3
322
329
  })
323
- ], 8, Oe)) : d("", !0)
330
+ ], 8, Re)) : d("", !0)
324
331
  ]),
325
332
  _: 3
326
333
  }, 8, ["class"]));
327
334
  }
328
335
  });
329
- const Ye = /* @__PURE__ */ he(Le, [["__scopeId", "data-v-920cc0ec"]]);
336
+ const Ye = /* @__PURE__ */ he(Le, [["__scopeId", "data-v-ce16f226"]]);
330
337
  export {
331
338
  Ye as BentoInputField,
332
339
  s as BentoInputFieldElementPosition,
333
340
  Ee as BentoInputFieldEvent,
334
- h as BentoInputFieldStateClass,
341
+ D as BentoInputFieldStateClass,
335
342
  O as BentoInputFieldType,
336
343
  f as BentoInputFieldVariant
337
344
  };
@@ -1 +1 @@
1
- {"version":3,"file":"input-field.js","sources":["../../vue2/src/components/input-field/input-field.types.ts","../../vue2/src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\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 = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n items: DropdownProps['items'];\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","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\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 v-bind=\"dropdown\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\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\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 :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @keydown=\"emit('keydown', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\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 v-bind=\"dropdown\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\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=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, 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 '@/utils/ts/unique-id';\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\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoListboxSelectedValue } from '@/types';\n\n import messages from './messages.json';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden: { type: Boolean, default: true },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Reduces height of the input\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * @see BentoDropdown\n */\n dropdown: {\n type: Object as PropType<BentoInputDropdownProps>,\n default: undefined,\n },\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue: { type: String, default: '' },\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * A string specifying the type of control to render.\n */\n type: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}`>,\n default: BentoInputFieldType.TEXT,\n validator: (value: BentoInputFieldType) => Object.values(BentoInputFieldType).includes(value),\n },\n\n /**\n * Text displayed as the value of the input-field\n */\n value: { type: [String, Number] as PropType<BentoInputFieldValue>, default: undefined },\n\n /**\n * Describes the different variants for the input element\n */\n variant: {\n type: String as PropType<BentoInputFieldVariant | `${BentoInputFieldVariant}`>,\n default: BentoInputFieldVariant.DEFAULT,\n validator: (value: BentoInputFieldVariant) => Object.values(BentoInputFieldVariant).includes(value),\n },\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\n */\n (e: 'keydown', 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 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\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\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\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 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 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') ? (getSlotText(slots)('default') as string) : t('ariaLabelFallback'),\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? 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 }));\n\n const onInput = (event: Event) => {\n if (!props.disabled && !isReadOnly.value) {\n emit('input', (event.target as HTMLInputElement).value);\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 // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\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","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","isReadOnly","useFormLayoutFieldLoading","toRef","props","shouldShowStaticValue","computed","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","onInput","event","emit","onDropdownInput","selectedValue","focusInput","expose","deprecate"],"mappings":";;;;;;;;;;;;AAKY,IAAAA,IAAA,kBA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AAA,MAAAiB,EAAA,SAAAV,EAAA,eAAAN,IAAA;AAAA,IAGsC,GAItEyB,KAAAjB,EAAA,OAAA;AAAA,MAAqD,CAAA,kBAAA/B,EAAA,WAAA,GAAA6B,EAAA;AAAA,MACgB,CAAA,kBAAA7B,EAAA,UAAA,GAAA6B,EAAA;AAAA,MACD,CAAA,kBAAA7B,EAAA,UAAA,GAAA0B,EAAA;AAAA,MACK,CAAA,kBAAA1B,EAAA,OAAA,GAAAuC,EAAA;AAAA,IACE,EAAA,GAG3EU,KAAA,CAAAC,MAAA;AACI,MAAA,CAAArB,EAAA,YAAA,CAAAH,EAAA,SACIyB,EAAA,SAAAD,EAAA,OAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,kBAAAE,CAAA,GACAF,EAAA,mBAAA,EAAA,GAAAtB,KAAA,gBAAAA,EAAA,UAAA,OAAAwB,EAAA,CAAA;AAAA,IAAoE,GAGxEC,IAAA,MAAA;AACI,MAAAtC,EAAA,MAAA,MAAA;AAAA,IAA8B;AAIlC,WAAAuC,EAAA;AAAA,MAAa,YAAAD;AAAA,IACT,CAAA,GAMJzB,EAAA,SACI2B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR1C,EAAA,mBAAA,KACI0C;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"input-field.js","sources":["../../vue2/src/components/input-field/input-field.types.ts","../../vue2/src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\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 = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n items: DropdownProps['items'];\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","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\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 v-bind=\"dropdown\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\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\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 :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @keydown=\"emit('keydown', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\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 v-bind=\"dropdown\"\n :dynamic-filtering=\"false\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\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=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, 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 '@/utils/ts/unique-id';\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 { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoListboxSelectedValue } from '@/types';\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 = defineProps({\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden: { type: Boolean, default: true },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Reduces height of the input\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `value`: Selected value of the dropdown\n * - `items`: List of available items\n *\n */\n dropdown: {\n type: Object as PropType<BentoInputDropdownProps>,\n default: undefined,\n },\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue: { type: String, default: '' },\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\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: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type']>,\n default: BentoInputFieldType.TEXT,\n },\n\n /**\n * Text displayed as the value of the input-field\n */\n value: { type: [String, Number] as PropType<BentoInputFieldValue>, default: undefined },\n\n /**\n * Describes the different variants for the input element\n */\n variant: {\n type: String as PropType<BentoInputFieldVariant | `${BentoInputFieldVariant}`>,\n default: BentoInputFieldVariant.DEFAULT,\n validator: (value: BentoInputFieldVariant) => Object.values(BentoInputFieldVariant).includes(value),\n },\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\n */\n (e: 'keydown', 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 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\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\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\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 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 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') ? (getSlotText(slots)('default') as string) : t('ariaLabelFallback'),\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? 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 }));\n\n const onInput = (event: Event) => {\n if (!props.disabled && !isReadOnly.value) {\n emit('input', (event.target as HTMLInputElement).value);\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 // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n });\n\n // Unsupported warnings\n if (props.dropdown && (props.dropdown as InstanceType<typeof BentoDropdown>['$props']).dynamicFiltering) {\n printDevelopmentWarning('\"bento-input-field\" dropdown does not support \"dynamicFiltering\"');\n }\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType)) {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type ${props.type}`);\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","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","isReadOnly","useFormLayoutFieldLoading","toRef","props","shouldShowStaticValue","computed","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","onInput","event","emit","onDropdownInput","selectedValue","focusInput","expose","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAA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