@adyen/bento-vue3 1.22.0 → 1.24.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 (251) hide show
  1. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +38 -48
  2. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +25 -20
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +9 -5
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.vue.d.ts +15 -0
  5. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.types.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +18 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
  9. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +2 -1
  10. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/index.d.ts +2 -0
  11. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.d.ts +53 -0
  12. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.types.d.ts +12 -0
  13. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config-settings.d.ts +2 -99
  14. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config.settings.types.d.ts +7 -0
  15. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-resizer.d.ts +47 -1
  16. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +48 -8
  17. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +1 -1
  18. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +48 -24
  19. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
  21. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +10 -2
  22. 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
  23. package/dist/@types/packages/vue2/src/components/menu/menu.types.d.ts +1 -1
  24. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
  25. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -3
  26. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
  27. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +3 -3
  28. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
  29. package/dist/@types/packages/vue2/src/components/stepper/composables/index.d.ts +2 -0
  30. package/dist/@types/packages/vue2/src/components/stepper/composables/use-step-register/use-step-register.d.ts +11 -0
  31. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +1 -0
  32. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
  33. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +3 -3
  34. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +3 -3
  35. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +3 -3
  36. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +7 -40
  37. package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.types.d.ts +5 -0
  38. package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue.d.ts +7 -0
  39. package/dist/@types/packages/vue2/src/components/toast/index.d.ts +0 -1
  40. package/dist/@types/packages/vue2/src/components/toast/toast.vue.d.ts +1 -29
  41. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +195 -55
  42. package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +71 -85
  43. package/dist/@types/packages/vue2/src/composables/index.d.ts +1 -0
  44. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/index.d.ts +2 -0
  45. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/install.d.ts +6 -0
  46. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/toast-stack.d.ts +7 -0
  47. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.d.ts +2 -0
  48. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.types.d.ts +23 -0
  49. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  50. package/dist/@types/packages/vue2/src/utils/ts/storybook.d.ts +10 -0
  51. package/dist/accordion.js +2 -2
  52. package/dist/action-bar.js +6 -6
  53. package/dist/alert.js +113 -77
  54. package/dist/alert.js.map +1 -1
  55. package/dist/assets/base-modal.css +1 -1
  56. package/dist/assets/button.css +1 -1
  57. package/dist/assets/dialog-page.css +1 -1
  58. package/dist/assets/grid-layout.css +1 -1
  59. package/dist/assets/index.css +1 -1
  60. package/dist/assets/index10.css +1 -1
  61. package/dist/assets/index11.css +1 -1
  62. package/dist/assets/index12.css +1 -1
  63. package/dist/assets/index13.css +1 -1
  64. package/dist/assets/index14.css +1 -1
  65. package/dist/assets/index15.css +1 -1
  66. package/dist/assets/index16.css +1 -1
  67. package/dist/assets/index17.css +1 -1
  68. package/dist/assets/index18.css +1 -1
  69. package/dist/assets/index19.css +1 -1
  70. package/dist/assets/index2.css +1 -1
  71. package/dist/assets/index20.css +1 -1
  72. package/dist/assets/index21.css +1 -1
  73. package/dist/assets/index22.css +1 -1
  74. package/dist/assets/index23.css +1 -1
  75. package/dist/assets/index24.css +1 -1
  76. package/dist/assets/index25.css +1 -1
  77. package/dist/assets/index26.css +1 -1
  78. package/dist/assets/index27.css +1 -1
  79. package/dist/assets/index28.css +1 -1
  80. package/dist/assets/index29.css +1 -1
  81. package/dist/assets/index3.css +1 -1
  82. package/dist/assets/index30.css +1 -1
  83. package/dist/assets/index31.css +1 -1
  84. package/dist/assets/index32.css +1 -1
  85. package/dist/assets/index33.css +1 -1
  86. package/dist/assets/index34.css +1 -1
  87. package/dist/assets/index35.css +1 -1
  88. package/dist/assets/index36.css +1 -1
  89. package/dist/assets/index37.css +1 -1
  90. package/dist/assets/index38.css +1 -1
  91. package/dist/assets/index39.css +1 -1
  92. package/dist/assets/index4.css +1 -1
  93. package/dist/assets/index40.css +1 -1
  94. package/dist/assets/index41.css +1 -1
  95. package/dist/assets/index42.css +1 -1
  96. package/dist/assets/index43.css +1 -1
  97. package/dist/assets/index44.css +1 -1
  98. package/dist/assets/index45.css +1 -1
  99. package/dist/assets/index46.css +1 -1
  100. package/dist/assets/index47.css +1 -1
  101. package/dist/assets/index48.css +1 -1
  102. package/dist/assets/index5.css +1 -1
  103. package/dist/assets/index6.css +1 -1
  104. package/dist/assets/index7.css +1 -1
  105. package/dist/assets/index8.css +1 -1
  106. package/dist/assets/index9.css +1 -1
  107. package/dist/avatar-image.js +1 -1
  108. package/dist/badge.js +1 -1
  109. package/dist/button.js +5 -5
  110. package/dist/card.js +3 -3
  111. package/dist/checkbox.js +5 -5
  112. package/dist/chunks/{base-button.86be8130.js → base-button.ab9c947e.js} +2 -2
  113. package/dist/chunks/{base-button.86be8130.js.map → base-button.ab9c947e.js.map} +1 -1
  114. package/dist/chunks/{base-modal.01333c00.js → base-modal.28b5ff83.js} +6 -6
  115. package/dist/chunks/{base-modal.01333c00.js.map → base-modal.28b5ff83.js.map} +1 -1
  116. package/dist/chunks/{button-actions-with-menu.df95130d.js → button-actions-with-menu.305991e5.js} +4 -4
  117. package/dist/chunks/{button-actions-with-menu.df95130d.js.map → button-actions-with-menu.305991e5.js.map} +1 -1
  118. package/dist/chunks/{button-actions.bcc9dcc7.js → button-actions.ea025810.js} +3 -3
  119. package/dist/chunks/{button-actions.bcc9dcc7.js.map → button-actions.ea025810.js.map} +1 -1
  120. package/dist/chunks/{button.a378e7ab.js → button.ce5d1f5e.js} +3 -3
  121. package/dist/chunks/{button.a378e7ab.js.map → button.ce5d1f5e.js.map} +1 -1
  122. package/dist/chunks/{calendar.891a60a9.js → calendar.24a492f1.js} +4 -4
  123. package/dist/chunks/{calendar.891a60a9.js.map → calendar.24a492f1.js.map} +1 -1
  124. package/dist/chunks/{checkbox.9753e9d6.js → checkbox.d0f897e0.js} +3 -3
  125. package/dist/chunks/{checkbox.9753e9d6.js.map → checkbox.d0f897e0.js.map} +1 -1
  126. package/dist/chunks/{controls-group.84981503.js → controls-group.2b31233c.js} +3 -3
  127. package/dist/chunks/{controls-group.84981503.js.map → controls-group.2b31233c.js.map} +1 -1
  128. package/dist/chunks/{copy.86eb5d86.js → copy.9003ed59.js} +4 -4
  129. package/dist/chunks/{copy.86eb5d86.js.map → copy.9003ed59.js.map} +1 -1
  130. package/dist/chunks/{dialog-page.ce02932b.js → dialog-page.2c07d294.js} +3 -3
  131. package/dist/chunks/{dialog-page.ce02932b.js.map → dialog-page.2c07d294.js.map} +1 -1
  132. package/dist/chunks/{dropdown-default-textbox.91ad6585.js → dropdown-default-textbox.311443a8.js} +136 -116
  133. package/dist/chunks/dropdown-default-textbox.311443a8.js.map +1 -0
  134. package/dist/chunks/{dropdown.6c010045.js → dropdown.170b43c4.js} +14 -15
  135. package/dist/chunks/{dropdown.6c010045.js.map → dropdown.170b43c4.js.map} +1 -1
  136. package/dist/chunks/{error-message.498811e4.js → error-message.4678cbdc.js} +2 -2
  137. package/dist/chunks/{error-message.498811e4.js.map → error-message.4678cbdc.js.map} +1 -1
  138. package/dist/chunks/{fixed-scroller.51b63488.js → fixed-scroller.f09618f2.js} +2 -2
  139. package/dist/chunks/{fixed-scroller.51b63488.js.map → fixed-scroller.f09618f2.js.map} +1 -1
  140. package/dist/chunks/{footer-actions.573307ed.js → footer-actions.2efe610e.js} +4 -4
  141. package/dist/chunks/{footer-actions.573307ed.js.map → footer-actions.2efe610e.js.map} +1 -1
  142. package/dist/chunks/{index.da4cb1b8.js → index.0d513625.js} +16 -17
  143. package/dist/chunks/{index.da4cb1b8.js.map → index.0d513625.js.map} +1 -1
  144. package/dist/chunks/{index.c4f8460d.js → index.1b1646bf.js} +187 -187
  145. package/dist/chunks/index.1b1646bf.js.map +1 -0
  146. package/dist/chunks/{index.037ae52f.js → index.44f2aca7.js} +2 -2
  147. package/dist/chunks/{index.037ae52f.js.map → index.44f2aca7.js.map} +1 -1
  148. package/dist/chunks/index.51fe0fc2.js +74 -0
  149. package/dist/chunks/index.51fe0fc2.js.map +1 -0
  150. package/dist/chunks/{index.9c423f37.js → index.6987f880.js} +6 -6
  151. package/dist/chunks/{index.9c423f37.js.map → index.6987f880.js.map} +1 -1
  152. package/dist/chunks/{index.9d65b72a.js → index.70c91b3b.js} +2 -2
  153. package/dist/chunks/{index.9d65b72a.js.map → index.70c91b3b.js.map} +1 -1
  154. package/dist/chunks/{index.fb0e9e1a.js → index.920cc1ee.js} +6 -6
  155. package/dist/chunks/{index.fb0e9e1a.js.map → index.920cc1ee.js.map} +1 -1
  156. package/dist/chunks/{index.e2793c20.js → index.b3cb905c.js} +3 -3
  157. package/dist/chunks/{index.e2793c20.js.map → index.b3cb905c.js.map} +1 -1
  158. package/dist/chunks/{index.030fb327.js → index.b772214b.js} +20 -19
  159. package/dist/chunks/index.b772214b.js.map +1 -0
  160. package/dist/chunks/{index.d6a0cf32.js → index.c41d1bbb.js} +2 -2
  161. package/dist/chunks/{index.d6a0cf32.js.map → index.c41d1bbb.js.map} +1 -1
  162. package/dist/chunks/index.c5b58864.js +62 -0
  163. package/dist/chunks/index.c5b58864.js.map +1 -0
  164. package/dist/chunks/{listbox-option-tag.abedc9e0.js → listbox-option-tag.bf77e0c4.js} +3 -3
  165. package/dist/chunks/{listbox-option-tag.abedc9e0.js.map → listbox-option-tag.bf77e0c4.js.map} +1 -1
  166. package/dist/chunks/{listbox.8ce17729.js → listbox.b6a1aea2.js} +5 -5
  167. package/dist/chunks/{listbox.8ce17729.js.map → listbox.b6a1aea2.js.map} +1 -1
  168. package/dist/chunks/{loading-button.5f58f1cf.js → loading-button.cdc193c6.js} +2 -2
  169. package/dist/chunks/{loading-button.5f58f1cf.js.map → loading-button.cdc193c6.js.map} +1 -1
  170. package/dist/chunks/{payment-method.313f2635.js → payment-method.ea1788f7.js} +2 -2
  171. package/dist/chunks/{payment-method.313f2635.js.map → payment-method.ea1788f7.js.map} +1 -1
  172. package/dist/chunks/{tooltip.a70c9e69.js → tooltip.10210728.js} +3 -3
  173. package/dist/chunks/{tooltip.a70c9e69.js.map → tooltip.10210728.js.map} +1 -1
  174. package/dist/chunks/use-bento-toast-controller.3275a505.js +50 -0
  175. package/dist/chunks/use-bento-toast-controller.3275a505.js.map +1 -0
  176. package/dist/chunks/use-click-outside.941d1600.js +14 -0
  177. package/dist/chunks/use-click-outside.941d1600.js.map +1 -0
  178. package/dist/code-snippet.js +7 -7
  179. package/dist/code-snippet.js.map +1 -1
  180. package/dist/country.js +2 -2
  181. package/dist/currency.js +1 -1
  182. package/dist/data-grid-template.js +1 -1
  183. package/dist/data-grid.js +1211 -1108
  184. package/dist/data-grid.js.map +1 -1
  185. package/dist/date-picker.js +21 -22
  186. package/dist/date-picker.js.map +1 -1
  187. package/dist/date-range-picker.js +2 -2
  188. package/dist/date.js +1 -1
  189. package/dist/divider.js +1 -1
  190. package/dist/dropdown.js +7 -7
  191. package/dist/empty-state.js +3 -3
  192. package/dist/filter-bar.js +587 -598
  193. package/dist/filter-bar.js.map +1 -1
  194. package/dist/focus-trap.js +1 -1
  195. package/dist/form-layout.js +2 -2
  196. package/dist/header.js +4 -4
  197. package/dist/index.js +248 -271
  198. package/dist/index.js.map +1 -1
  199. package/dist/info-icon.js +3 -3
  200. package/dist/input-field.js +85 -80
  201. package/dist/input-field.js.map +1 -1
  202. package/dist/internal.js +8 -8
  203. package/dist/link.js +1 -1
  204. package/dist/loading-indicator.js +1 -1
  205. package/dist/menu.js +1 -1
  206. package/dist/modal-fullscreen.js +6 -6
  207. package/dist/modal.js +6 -6
  208. package/dist/pagination.js +4 -4
  209. package/dist/payment-method.js +1 -1
  210. package/dist/popover.js +1 -1
  211. package/dist/popper-container.js +1 -1
  212. package/dist/radio-group.js +4 -4
  213. package/dist/search-bar.js +2 -2
  214. package/dist/secondary-nav.js +2 -2
  215. package/dist/segmented-control.js +3 -3
  216. package/dist/selection-card.js +4 -4
  217. package/dist/sidepanel.js +6 -6
  218. package/dist/status.js +2 -2
  219. package/dist/stepper.js +152 -141
  220. package/dist/stepper.js.map +1 -1
  221. package/dist/structured-list.js +1 -1
  222. package/dist/summary-grid.js +3 -3
  223. package/dist/tabs.js +3 -3
  224. package/dist/tag.js +3 -3
  225. package/dist/textarea.js +4 -4
  226. package/dist/timeline.js +7 -7
  227. package/dist/toast.js +185 -154
  228. package/dist/toast.js.map +1 -1
  229. package/dist/toggle.js +2 -2
  230. package/dist/tutorial.js +6 -6
  231. package/dist/typography.js +1 -1
  232. package/dist/web-types.json +1 -1
  233. package/package.json +2 -2
  234. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/index.d.ts +0 -2
  235. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.types.d.ts +0 -9
  236. package/dist/@types/packages/vue2/src/plugins/toastController.d.ts +0 -12
  237. package/dist/@types/packages/vue2/src/utils/ts/toastController.d.ts +0 -2
  238. package/dist/chunks/directive.0408e565.js +0 -23
  239. package/dist/chunks/directive.0408e565.js.map +0 -1
  240. package/dist/chunks/dropdown-default-textbox.91ad6585.js.map +0 -1
  241. package/dist/chunks/index.030fb327.js.map +0 -1
  242. package/dist/chunks/index.19dab2ef.js +0 -101
  243. package/dist/chunks/index.19dab2ef.js.map +0 -1
  244. package/dist/chunks/index.6e7e9ac6.js +0 -125
  245. package/dist/chunks/index.6e7e9ac6.js.map +0 -1
  246. package/dist/chunks/index.c4f8460d.js.map +0 -1
  247. package/dist/chunks/info-filled.a6f9d7d0.js +0 -44
  248. package/dist/chunks/info-filled.a6f9d7d0.js.map +0 -1
  249. package/dist/chunks/toastController.0b01d2e8.js +0 -9
  250. package/dist/chunks/toastController.0b01d2e8.js.map +0 -1
  251. /package/dist/@types/packages/vue2/src/components/stepper/composables/{useKeyboardNavigation/useKeyboardNavigation.d.ts → use-keyboard-navigation/use-keyboard-navigation.d.ts} +0 -0
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;AA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AAO,KAAK;AAAA,EAChB;AAAA,EAQQ,aAAaC,GAA6B;AACzC,SAAA,OAAO,MAAM,OAAO,KAAK,OAAO,MAAM,QAAQA,CAAK,GAAG,CAAC;AAAA,EAChE;AAAA,EAEO,SAASC,GAAwB;AAC9B,UAAAC,IAAKC,EAAY,OAAO,GACxBH,IAAQ;AAAA,MACV,GAAGC;AAAA,MACH,IAAAC;AAAA,MACA,SAAS,MAAM,KAAK,aAAaF,CAAK;AAAA,IAAA;AAIrC,gBAAA,OAAO,MAAM,KAAKA,CAAK,GAGrB;AAAA,MACH,SAAS,MAAM,KAAK,aAAaA,CAAK;AAAA,IAAA;AAAA,EAE9C;AACJ;ACrBA,MAAMI,IAAW,CAACC,MAAsB;AAC3B,WAAA,KAAK,UAAU,IAAIA,CAAK;AACrC,GAEMC,IAAuC;AAAA,EACzC,SAAS,OAAOC,GAAKC,MAAoF;AACrG,IAAIA,KAAA,QAAAA,EAAS,cAOJD,EAAY,OAAO,iBAAiB,wBAAwB,IAAIV,EAAgB,KAIrFW,KAAA,gBAAAA,EAAS,WAAU,oBACnBJ;AAAA,MAAS;AAAA;AAAA,IAAiB,GAC1B,MAAM,OAAO,qEAAgE,MACtEI,KAAA,gBAAAA,EAAS,WAAU,wBAC1BJ;AAAA,MAAS;AAAA;AAAA,IAAqB,GAC9B,MAAM,OAAO,yEAAoE,KAEjF,MAAM,OAAO,8DAAyD,GAGtEI,KAAA,QAAAA,EAAS,sBACT,MAAM,OAAO,4DAAuD;AAAA,EAE5E;AACJ;"}
1
+ {"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 * 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 { 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","useForm","validationSchema","errors","shallowRef","errorBag","ref","values","cleanErrors","resetForm","validSchema","submitted","acc","installToast","Vue","toastStackInjectionKey","createToastStack","setTheme","theme","plugin","options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAA;AAMb,EAAAA,EAAY,QAAQC,GAAwBC,EAAkB,CAAA;AAEvE,GCDMC,IAAW,CAACC,MAAsB;AAC3B,WAAA,KAAK,UAAU,IAAIA,CAAK;AACrC,GAEMC,IAAuC;AAAA,EACzC,SAAS,OAAOL,GAAKM,MAAoF;AACrG,IAAIA,KAAA,QAAAA,EAAS,aACTP,EAAaC,CAAG,IAGhBM,KAAA,gBAAAA,EAAS,WAAU,oBACnBH;AAAA,MAAS;AAAA;AAAA,IAAiB,GAC1B,MAAM,OAAO,qEAAgE,MACtEG,KAAA,gBAAAA,EAAS,WAAU,wBAC1BH;AAAA,MAAS;AAAA;AAAA,IAAqB,GAC9B,MAAM,OAAO,yEAAoE,KAEjF,MAAM,OAAO,8DAAyD,GAGtEG,KAAA,QAAAA,EAAS,sBACT,MAAM,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.e2793c20.js";
3
- import { b as _ } from "./chunks/tooltip.a70c9e69.js";
2
+ import { c as t } from "./chunks/index.b3cb905c.js";
3
+ import { b as _ } from "./chunks/tooltip.10210728.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/index17.css";
6
+ import "./assets/index39.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.6c010045.js";
3
- import { d as H, B as _ } from "./chunks/index.6e7e9ac6.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.498811e4.js";
1
+ import { defineComponent as ae, 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 c, unref as t, normalizeClass as se, withCtx as w, renderSlot as p, createCommentVNode as d, createElementVNode as M, createElementBlock as y, withModifiers as U, mergeProps as N, withKeys as ue, createVNode as pe } from "vue";
2
+ import { I as ce, B as V } from "./chunks/dropdown.170b43c4.js";
3
+ import { p as fe, d as H, B as _ } from "./chunks/index.51fe0fc2.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.4678cbdc.js";
11
11
  import { _ as he } from "./chunks/_plugin-vue_export-helper.dad06003.js";
12
- import "./assets/index29.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 || {});
14
- const x = {
12
+ import "./assets/index33.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
+ const F = {
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 = {
19
- i18n: { messages: x }
20
- }, Le = /* @__PURE__ */ oe({
21
- ...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"], Le = {
19
+ i18n: { messages: F }
20
+ }, $e = /* @__PURE__ */ ae({
21
+ ...Le,
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,
@@ -121,43 +125,43 @@ const x = {
121
125
  }
122
126
  },
123
127
  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
128
+ setup(e, { expose: x, emit: u }) {
129
+ const o = e, R = de(), k = ie(), { t: W } = ve({ messages: F }), n = we(k), L = I(null), $ = g("input"), v = g("input-dropdown"), h = g("input-static-value"), B = g("input-description"), P = g("input-error");
130
+ re(ce, !0);
131
+ const { isReadOnly: b } = me(ne(o, "readonly")), E = l(
132
+ () => o.variant === f.STATIC_VALUE && !!k.staticValue
133
+ ), Y = l(() => o.variant === f.DEFAULT), j = l(() => o.variant === f.PAYMENT_METHOD), q = l(
134
+ () => E.value && o.staticValuePosition === s.START
131
135
  ), 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
136
+ () => E.value && o.staticValuePosition === s.END
137
+ ), S = l(() => o.variant === f.DROPDOWN && !!o.dropdown), X = l(
138
+ () => S.value && o.dropdownPosition === s.START
135
139
  ), z = l(
136
- () => S.value && a.dropdownPosition === s.END
140
+ () => S.value && o.dropdownPosition === s.END
137
141
  ), 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({
142
+ () => !o.disabled && !b.value && (!!o.errorMessage || o.error)
143
+ ), G = l(() => S.value === !0 && E.value === !0 ? `${h} ${v}` : S.value === !0 ? `${v}` : E.value === !0 ? `${h}` : null), J = I(R["aria-label"]), { ariaLabel: Q } = le(o), Z = ye({
140
144
  ariaLabel: J.value,
141
145
  // TODO: take this line away when the aria-label props is removed
142
146
  label: Q,
143
- defaultFallback: n("default") ? fe(k)("default") : Y("ariaLabelFallback")
147
+ defaultFallback: n("default") ? be(k)("default") : W("ariaLabelFallback")
144
148
  }), ee = l(
145
- () => `${n("description") ? B : ""} ${A.value && a.errorMessage ? P : ""}`
149
+ () => `${n("description") ? B : ""} ${A.value && o.errorMessage ? P : ""}`
146
150
  ), 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
151
- })), ae = (i) => {
152
- !a.disabled && !b.value && u("input", i.target.value);
151
+ [`b-input-field--${D.CONDENSED}`]: o.condensed,
152
+ [`b-input-field--${D.DISABLED}`]: o.disabled,
153
+ [`b-input-field--${D.READONLY}`]: b.value,
154
+ [`b-input-field--${D.ERROR}`]: A.value
155
+ })), oe = (i) => {
156
+ !o.disabled && !b.value && u("input", i.target.value);
153
157
  }, C = (i) => {
154
- u("dropdown-input", i), u("update:dropdown", { ...a == null ? void 0 : a.dropdown, value: i });
158
+ u("dropdown-input", i), u("update:dropdown", { ...o == null ? void 0 : o.dropdown, value: i });
155
159
  }, T = () => {
156
160
  L.value.focus();
157
161
  };
158
- return F({
162
+ return x({
159
163
  focusInput: T
160
- }), a.error && H(
164
+ }), o.dropdown && o.dropdown.dynamicFiltering && fe('"bento-input-field" dropdown does not support "dynamicFiltering"'), o.error && H(
161
165
  'BentoInputField "error" property',
162
166
  `Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
163
167
  Having the field as "undefined" will hide/remove the error.
@@ -172,14 +176,14 @@ const x = {
172
176
  </template>
173
177
  </bento-input-field>`,
174
178
  "2.0.0"
175
- ), (i, o) => (r(), p(t(_), {
179
+ ), (i, a) => (r(), c(t(_), {
176
180
  class: se(["b-input-field", t(te)]),
177
181
  "data-testid": "input-text-container",
178
182
  el: "div",
179
183
  variant: "body"
180
184
  }, {
181
185
  default: w(() => [
182
- t(n)("default") ? (r(), p(t(we), {
186
+ t(n)("default") ? (r(), c(t(ge), {
183
187
  key: 0,
184
188
  for: t($),
185
189
  "data-testid": "input-field-label",
@@ -189,7 +193,7 @@ const x = {
189
193
  onClick: T
190
194
  }, {
191
195
  default: w(() => [
192
- c(i.$slots, "default", {}, void 0, !0)
196
+ p(i.$slots, "default", {}, void 0, !0)
193
197
  ]),
194
198
  _: 3
195
199
  }, 8, ["for", "tooltip-text", "optional", "required"])) : d("", !0),
@@ -199,43 +203,43 @@ const x = {
199
203
  "aria-disabled": e.disabled,
200
204
  onClick: T
201
205
  }, [
202
- t(j) && (t(n)("defaultIconBefore") || t(n)("iconBefore")) ? (r(), y("span", {
206
+ t(Y) && (t(n)("defaultIconBefore") || t(n)("iconBefore")) ? (r(), y("span", {
203
207
  key: 0,
204
208
  "aria-hidden": e.ariaHidden ? "true" : void 0,
205
209
  class: "b-input-field__icon-before"
206
210
  }, [
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", {
211
+ t(n)("iconBefore") ? p(i.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
212
+ t(n)("defaultIconBefore") && !t(n)("iconBefore") ? p(i.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
213
+ ], 8, Ae)) : d("", !0),
214
+ t(j) && t(n)("paymentMethod") ? (r(), y("span", {
211
215
  key: 1,
212
216
  "aria-hidden": e.ariaHidden ? "true" : void 0,
213
217
  class: "b-input-field__payment-method"
214
218
  }, [
215
- c(i.$slots, "paymentMethod", {}, void 0, !0)
216
- ], 8, Ae)) : d("", !0),
219
+ p(i.$slots, "paymentMethod", {}, void 0, !0)
220
+ ], 8, Te)) : d("", !0),
217
221
  t(X) ? (r(), y("div", {
218
222
  key: 2,
219
223
  id: t(v),
220
224
  class: "b-input-field__dropdown b-input-field__dropdown--start",
221
- onClick: o[0] || (o[0] = U(() => {
225
+ onClick: a[0] || (a[0] = U(() => {
222
226
  }, ["stop"]))
223
227
  }, [
224
- e.dropdown ? (r(), p(t(V), N({ key: 0 }, e.dropdown, {
228
+ e.dropdown ? (r(), c(t(V), N({ key: 0 }, e.dropdown, {
225
229
  disabled: e.disabled,
226
230
  readonly: t(b),
227
231
  onInput: C
228
232
  }), null, 16, ["disabled", "readonly"])) : d("", !0)
229
- ], 8, Te)) : d("", !0),
230
- t(q) ? (r(), p(t(_), {
233
+ ], 8, _e)) : d("", !0),
234
+ t(q) ? (r(), c(t(_), {
231
235
  key: 3,
232
- id: t(E),
236
+ id: t(h),
233
237
  class: "b-input-field__static-value b-input-field__static-value--start",
234
238
  el: "span",
235
239
  variant: "body"
236
240
  }, {
237
241
  default: w(() => [
238
- c(i.$slots, "staticValue", {}, void 0, !0)
242
+ p(i.$slots, "staticValue", {}, void 0, !0)
239
243
  ]),
240
244
  _: 3
241
245
  }, 8, ["id"])) : d("", !0),
@@ -252,32 +256,32 @@ const x = {
252
256
  value: e.value,
253
257
  disabled: e.disabled,
254
258
  readonly: t(b),
255
- 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")),
259
+ onInput: oe,
260
+ onChange: a[1] || (a[1] = (m) => u("change")),
261
+ onFocus: a[2] || (a[2] = (m) => u("focus")),
262
+ onBlur: a[3] || (a[3] = (m) => u("blur")),
259
263
  onKeydown: [
260
- o[4] || (o[4] = (m) => u("keydown", m)),
261
- o[5] || (o[5] = ue((m) => u("escape-pressed"), ["esc"]))
264
+ a[4] || (a[4] = (m) => u("keydown", m)),
265
+ a[5] || (a[5] = ue((m) => u("escape-pressed"), ["esc"]))
262
266
  ]
263
- }), null, 16, _e),
267
+ }), null, 16, ke),
264
268
  t(n)("iconAfter") ? (r(), y("span", {
265
269
  key: 4,
266
270
  "aria-hidden": e.ariaHidden ? "true" : void 0,
267
271
  class: "b-input-field__icon-after",
268
272
  "data-testid": "input-text__icon-after"
269
273
  }, [
270
- c(i.$slots, "iconAfter", {}, void 0, !0)
271
- ], 8, ke)) : d("", !0),
272
- t(K) ? (r(), p(t(_), {
274
+ p(i.$slots, "iconAfter", {}, void 0, !0)
275
+ ], 8, Ne)) : d("", !0),
276
+ t(K) ? (r(), c(t(_), {
273
277
  key: 5,
274
- id: t(E),
278
+ id: t(h),
275
279
  class: "b-input-field__static-value b-input-field__static-value--end",
276
280
  el: "span",
277
281
  variant: "body"
278
282
  }, {
279
283
  default: w(() => [
280
- c(i.$slots, "staticValue", {}, void 0, !0)
284
+ p(i.$slots, "staticValue", {}, void 0, !0)
281
285
  ]),
282
286
  _: 3
283
287
  }, 8, ["id"])) : d("", !0),
@@ -286,20 +290,21 @@ const x = {
286
290
  id: t(v),
287
291
  "data-testid": "input-field-dropdown-container-end",
288
292
  class: "b-input-field__dropdown b-input-field__dropdown--end",
289
- onClick: o[6] || (o[6] = U(() => {
293
+ onClick: a[6] || (a[6] = U(() => {
290
294
  }, ["stop"]))
291
295
  }, [
292
- e.dropdown ? (r(), p(t(V), N({
296
+ e.dropdown ? (r(), c(t(V), N({
293
297
  key: 0,
294
298
  id: t(v)
295
299
  }, e.dropdown, {
300
+ "dynamic-filtering": !1,
296
301
  disabled: e.disabled,
297
302
  readonly: t(b),
298
303
  onInput: C
299
304
  }), null, 16, ["id", "disabled", "readonly"])) : d("", !0)
300
- ], 8, Ne)) : d("", !0)
301
- ], 8, ge),
302
- t(A) && e.errorMessage ? (r(), p(t(De), {
305
+ ], 8, Oe)) : d("", !0)
306
+ ], 8, Se),
307
+ t(A) && e.errorMessage ? (r(), c(t(De), {
303
308
  key: 1,
304
309
  id: t(P),
305
310
  "error-message": e.errorMessage,
@@ -311,27 +316,27 @@ const x = {
311
316
  class: "b-input-field__description",
312
317
  onClick: T
313
318
  }, [
314
- ce(t(_), {
319
+ pe(t(_), {
315
320
  el: "span",
316
321
  variant: "body"
317
322
  }, {
318
323
  default: w(() => [
319
- c(i.$slots, "description", { id: "description" }, void 0, !0)
324
+ p(i.$slots, "description", { id: "description" }, void 0, !0)
320
325
  ]),
321
326
  _: 3
322
327
  })
323
- ], 8, Oe)) : d("", !0)
328
+ ], 8, Re)) : d("", !0)
324
329
  ]),
325
330
  _: 3
326
331
  }, 8, ["class"]));
327
332
  }
328
333
  });
329
- const Ye = /* @__PURE__ */ he(Le, [["__scopeId", "data-v-920cc0ec"]]);
334
+ const Ye = /* @__PURE__ */ he($e, [["__scopeId", "data-v-bd3c2c37"]]);
330
335
  export {
331
336
  Ye as BentoInputField,
332
337
  s as BentoInputFieldElementPosition,
333
338
  Ee as BentoInputFieldEvent,
334
- h as BentoInputFieldStateClass,
339
+ D as BentoInputFieldStateClass,
335
340
  O as BentoInputFieldType,
336
341
  f as BentoInputFieldVariant
337
342
  };
@@ -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,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,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AAA,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 */\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 if (props.dropdown && (props.dropdown as InstanceType<typeof BentoDropdown>['$props']).dynamicFiltering) {\n printDevelopmentWarning('\"bento-input-field\" dropdown does not support \"dynamicFiltering\"');\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,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAA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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,GAGJzB,EAAA,YAAAA,EAAA,SAAA,oBACI2B,GAAA,kEAAA,GAMJ3B,EAAA,SACI4B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR3C,EAAA,mBAAA,KACI2C;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/internal.js CHANGED
@@ -1,12 +1,12 @@
1
- import { B as I, L } from "./chunks/listbox-option-tag.abedc9e0.js";
2
- import { C as y, a as A, b as S } from "./chunks/calendar.891a60a9.js";
3
- import { C as b, a as g } from "./chunks/copy.86eb5d86.js";
4
- import { C as T } from "./chunks/controls-group.84981503.js";
5
- import { B as D, b as F, a as N, D as P } from "./chunks/dialog-page.ce02932b.js";
6
- import { E as K, F as M } from "./chunks/error-message.498811e4.js";
7
- import { F as Y } from "./chunks/fixed-scroller.51b63488.js";
1
+ import { B as I, L } from "./chunks/listbox-option-tag.bf77e0c4.js";
2
+ import { C as y, a as A, b as S } from "./chunks/calendar.24a492f1.js";
3
+ import { C as b, a as g } from "./chunks/copy.9003ed59.js";
4
+ import { C as T } from "./chunks/controls-group.2b31233c.js";
5
+ import { B as D, b as F, a as N, D as P } from "./chunks/dialog-page.2c07d294.js";
6
+ import { E as K, F as M } from "./chunks/error-message.4678cbdc.js";
7
+ import { F as Y } from "./chunks/fixed-scroller.f09618f2.js";
8
8
  import { G as W, a as j } from "./chunks/grid-layout.c2fe3057.js";
9
- import { B as z, u as H } from "./chunks/listbox.8ce17729.js";
9
+ import { B as z, u as H } from "./chunks/listbox.b6a1aea2.js";
10
10
  import { ref as f, watch as v } from "vue";
11
11
  import { B as U } from "./chunks/teleport.afeb4c3b.js";
12
12
  const p = (l, e) => {
package/dist/link.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o, a as t } from "./chunks/index.030fb327.js";
1
+ import { B as o, a as t } from "./chunks/index.b772214b.js";
2
2
  export {
3
3
  o as BentoLink,
4
4
  t as BentoLinkVariant
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as t, onMounted as i, onUnmounted as l, computed as s, openBlock as d, createElementBlock as r, normalizeClass as c } from "vue";
2
2
  import { _ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
3
- import "./assets/index20.css";
3
+ import "./assets/index43.css";
4
4
  var e = /* @__PURE__ */ ((a) => (a.START = "loading-start", a.END = "loading-end", a))(e || {});
5
5
  const p = t({
6
6
  name: "bento-loading-indicator",
package/dist/menu.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o, a as t } from "./chunks/index.c4f8460d.js";
1
+ import { B as o, a as t } from "./chunks/index.1b1646bf.js";
2
2
  export {
3
3
  o as BentoMenu,
4
4
  t as BentoMenuEvent
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as L, useSlots as N, onMounted as R, openBlock as l, createBlock as r, unref as t, withCtx as o, createElementVNode as u, createTextVNode as B, toDisplayString as A, createCommentVNode as f, createElementBlock as w, renderSlot as _, pushScopeId as V, popScopeId as J, toRefs as U, ref as c, computed as Y, watch as z, nextTick as H, provide as I, normalizeClass as j, withKeys as q, withModifiers as Q, createSlots as W, createVNode as C } from "vue";
2
- import { a as X } from "./chunks/button.a378e7ab.js";
3
- import { B as Z } from "./chunks/index.037ae52f.js";
4
- import { B as k } from "./chunks/index.6e7e9ac6.js";
2
+ import { a as X } from "./chunks/button.ce5d1f5e.js";
3
+ import { B as Z } from "./chunks/index.44f2aca7.js";
4
+ import { B as k } from "./chunks/index.51fe0fc2.js";
5
5
  import { u as x } from "./chunks/use-has-slot.4d98bf29.js";
6
- import { D as ee, B as te, b as ae, a as le } from "./chunks/dialog-page.ce02932b.js";
7
- import { B as oe } from "./chunks/button-actions.bcc9dcc7.js";
6
+ import { D as ee, B as te, b as ae, a as le } from "./chunks/dialog-page.2c07d294.js";
7
+ import { B as oe } from "./chunks/button-actions.ea025810.js";
8
8
  import { _ as O } from "./chunks/_plugin-vue_export-helper.dad06003.js";
9
9
  import { C as se } from "./chunks/cross.26509efc.js";
10
10
  import { u as ne } from "./chunks/i18n.f7e6533e.js";
11
11
  import { g as ie } from "./chunks/unique-id.a2a2b458.js";
12
12
  import { M as ce } from "./chunks/modal-fullscreen.keys.b9f31632.js";
13
- import "./assets/index45.css";
13
+ import "./assets/index14.css";
14
14
  const re = (e) => (V("data-v-da0f0512"), e = e(), J(), e), ue = { class: "b-modal-fullscreen-page__header" }, de = { class: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title" }, fe = {
15
15
  key: 0,
16
16
  class: "b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot"
package/dist/modal.js CHANGED
@@ -1,12 +1,12 @@
1
- import { d as A, h as T, f as y, e as q, c as L, a as j, b as M } from "./chunks/base-modal.01333c00.js";
2
- import { g as me, B as fe } from "./chunks/base-modal.01333c00.js";
1
+ import { d as A, h as T, f as y, e as q, c as L, a as j, b as M } from "./chunks/base-modal.28b5ff83.js";
2
+ import { g as me, B as fe } from "./chunks/base-modal.28b5ff83.js";
3
3
  import { defineComponent as v, useSlots as w, onMounted as $, openBlock as B, createBlock as b, mergeProps as O, createSlots as z, unref as n, withCtx as l, renderSlot as c, createVNode as I, toRefs as U, ref as V, computed as S, createTextVNode as F, toDisplayString as G, useAttrs as K, watch as W, resolveDynamicComponent as Y } from "vue";
4
4
  import { u as D } from "./chunks/use-has-slot.4d98bf29.js";
5
- import { F as H } from "./chunks/footer-actions.573307ed.js";
6
- import { B as P } from "./chunks/button.a378e7ab.js";
5
+ import { F as H } from "./chunks/footer-actions.2efe610e.js";
6
+ import { B as P } from "./chunks/button.ce5d1f5e.js";
7
7
  import { u as J } from "./chunks/i18n.f7e6533e.js";
8
- import { B as k } from "./chunks/button-actions.bcc9dcc7.js";
9
- import { d as Q } from "./chunks/index.6e7e9ac6.js";
8
+ import { B as k } from "./chunks/button-actions.ea025810.js";
9
+ import { d as Q } from "./chunks/index.51fe0fc2.js";
10
10
  const X = v({
11
11
  name: "bento-modal-default"
12
12
  }), Z = /* @__PURE__ */ v({