@adyen/bento-vue2 1.45.0 → 1.47.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 (199) hide show
  1. package/dist/@types/index.d.ts +16740 -18774
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/calendar.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/date-picker.css +1 -1
  12. package/dist/assets/date-range-picker.css +1 -1
  13. package/dist/assets/dialog-page.css +1 -1
  14. package/dist/assets/divider.css +1 -1
  15. package/dist/assets/dropdown.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/input-field-password.css +1 -1
  18. package/dist/assets/input-field.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/menu.css +1 -1
  21. package/dist/assets/modal-fullscreen.css +1 -1
  22. package/dist/assets/popover.css +1 -1
  23. package/dist/assets/radio-group.css +1 -1
  24. package/dist/assets/radio-input.css +1 -1
  25. package/dist/assets/sidepanel.css +1 -1
  26. package/dist/assets/status.css +1 -1
  27. package/dist/assets/step.css +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/card.js +1 -1
  30. package/dist/checkbox.js +2 -2
  31. package/dist/chunks/{accordion-item.CzKttO4w.js → accordion-item.CTxrEQEW.js} +5 -5
  32. package/dist/chunks/{accordion-item.CzKttO4w.js.map → accordion-item.CTxrEQEW.js.map} +1 -1
  33. package/dist/chunks/{action-bar.BXemSuq4.js → action-bar.EcN2I7Az.js} +11 -11
  34. package/dist/chunks/{action-bar.BXemSuq4.js.map → action-bar.EcN2I7Az.js.map} +1 -1
  35. package/dist/chunks/{alert.CAIp-87f.js → alert.BRN8cpXl.js} +7 -7
  36. package/dist/chunks/{alert.CAIp-87f.js.map → alert.BRN8cpXl.js.map} +1 -1
  37. package/dist/chunks/{base-modal.4JSNBM4T.js → base-modal.BgTZ8iQ6.js} +5 -5
  38. package/dist/chunks/{base-modal.4JSNBM4T.js.map → base-modal.BgTZ8iQ6.js.map} +1 -1
  39. package/dist/chunks/{button-actions-with-menu.ieopdfI7.js → button-actions-with-menu.C8EjGVCT.js} +4 -4
  40. package/dist/chunks/{button-actions-with-menu.ieopdfI7.js.map → button-actions-with-menu.C8EjGVCT.js.map} +1 -1
  41. package/dist/chunks/{button-actions.CtFB6iRj.js → button-actions.BU173IFE.js} +5 -5
  42. package/dist/chunks/{button-actions.CtFB6iRj.js.map → button-actions.BU173IFE.js.map} +1 -1
  43. package/dist/chunks/{calendar.BouORZfb.js → calendar.DlOcbH6E.js} +161 -148
  44. package/dist/chunks/{calendar.BouORZfb.js.map → calendar.DlOcbH6E.js.map} +1 -1
  45. package/dist/chunks/{card.BabmUkTG.js → card.DoyCGJay.js} +10 -10
  46. package/dist/chunks/{card.BabmUkTG.js.map → card.DoyCGJay.js.map} +1 -1
  47. package/dist/chunks/{checkbox-group.DbLznnsa.js → checkbox-group.BQN9gjgH.js} +4 -4
  48. package/dist/chunks/{checkbox-group.DbLznnsa.js.map → checkbox-group.BQN9gjgH.js.map} +1 -1
  49. package/dist/chunks/{checkbox.fhQLs-NN.js → checkbox.O1CbmNdS.js} +22 -22
  50. package/dist/chunks/{checkbox.fhQLs-NN.js.map → checkbox.O1CbmNdS.js.map} +1 -1
  51. package/dist/chunks/{code-snippet.5iJcUZSo.js → code-snippet.BDBD85qD.js} +117 -87
  52. package/dist/chunks/code-snippet.BDBD85qD.js.map +1 -0
  53. package/dist/chunks/{codemirror.CXFEqvAi.js → codemirror.0fz2cWJS.js} +4970 -4661
  54. package/dist/chunks/codemirror.0fz2cWJS.js.map +1 -0
  55. package/dist/chunks/{controls-group.CnXzOQkX.js → controls-group.C3RDqB9H.js} +2 -2
  56. package/dist/chunks/{controls-group.CnXzOQkX.js.map → controls-group.C3RDqB9H.js.map} +1 -1
  57. package/dist/chunks/{copy.DN0tClPm.js → copy.BuMSGw23.js} +5 -5
  58. package/dist/chunks/{copy.DN0tClPm.js.map → copy.BuMSGw23.js.map} +1 -1
  59. package/dist/chunks/{country.Bft91V1L.js → country.2-ZtYkh7.js} +2 -2
  60. package/dist/chunks/{country.Bft91V1L.js.map → country.2-ZtYkh7.js.map} +1 -1
  61. package/dist/chunks/{country.types.pilf5B3F.js → country.types.CLjbulKL.js} +4114 -4114
  62. package/dist/chunks/{country.types.pilf5B3F.js.map → country.types.CLjbulKL.js.map} +1 -1
  63. package/dist/chunks/{dashboard-section.DYXZhtop.js → dashboard-section.COWO5SVw.js} +3 -3
  64. package/dist/chunks/{dashboard-section.DYXZhtop.js.map → dashboard-section.COWO5SVw.js.map} +1 -1
  65. package/dist/chunks/{dashed-underline.BvSZS1-m.js → dashed-underline.BEAEmTCb.js} +2 -2
  66. package/dist/chunks/{dashed-underline.BvSZS1-m.js.map → dashed-underline.BEAEmTCb.js.map} +1 -1
  67. package/dist/chunks/{data-grid-template.Du92TEFY.js → data-grid-template.vBl7u2cB.js} +2 -2
  68. package/dist/chunks/{data-grid-template.Du92TEFY.js.map → data-grid-template.vBl7u2cB.js.map} +1 -1
  69. package/dist/chunks/{data-grid.Kwtf1DMq.js → data-grid.DQ0578m9.js} +46 -46
  70. package/dist/chunks/{data-grid.Kwtf1DMq.js.map → data-grid.DQ0578m9.js.map} +1 -1
  71. package/dist/chunks/{date-picker.B7mTNghB.js → date-picker.Bym2OEd9.js} +47 -39
  72. package/dist/chunks/date-picker.Bym2OEd9.js.map +1 -0
  73. package/dist/chunks/{date-range-picker.DPLri9D-.js → date-range-picker.P2Q5FNB-.js} +310 -306
  74. package/dist/chunks/date-range-picker.P2Q5FNB-.js.map +1 -0
  75. package/dist/chunks/divider.Cc4JFWG_.js +35 -0
  76. package/dist/chunks/divider.Cc4JFWG_.js.map +1 -0
  77. package/dist/chunks/{dropdown-default-textbox.DBoSso4J.js → dropdown-default-textbox.CC9Z_RFG.js} +4 -4
  78. package/dist/chunks/{dropdown-default-textbox.DBoSso4J.js.map → dropdown-default-textbox.CC9Z_RFG.js.map} +1 -1
  79. package/dist/chunks/{dropdown-tag.XIlES6IT.js → dropdown-tag.CiCDvGyN.js} +4 -4
  80. package/dist/chunks/{dropdown-tag.XIlES6IT.js.map → dropdown-tag.CiCDvGyN.js.map} +1 -1
  81. package/dist/chunks/{dropdown.BqsoncJr.js → dropdown.hc9ZuuTt.js} +197 -193
  82. package/dist/chunks/dropdown.hc9ZuuTt.js.map +1 -0
  83. package/dist/chunks/{error-message.Ccc1sTTp.js → error-message.Da-p1QIA.js} +8 -8
  84. package/dist/chunks/{error-message.Ccc1sTTp.js.map → error-message.Da-p1QIA.js.map} +1 -1
  85. package/dist/chunks/{es6.jIyAPBgt.js → es6.BtaxuP0b.js} +7 -7
  86. package/dist/chunks/es6.BtaxuP0b.js.map +1 -0
  87. package/dist/chunks/file-uploader.DVyryYaq.js +1879 -0
  88. package/dist/chunks/file-uploader.DVyryYaq.js.map +1 -0
  89. package/dist/chunks/{filter-bar.DT_-lVmf.js → filter-bar.DzcNo5nF.js} +53 -53
  90. package/dist/chunks/{filter-bar.DT_-lVmf.js.map → filter-bar.DzcNo5nF.js.map} +1 -1
  91. package/dist/chunks/{footer-actions.D0uH9JWq.js → footer-actions.Cbe_YLjP.js} +2 -2
  92. package/dist/chunks/{footer-actions.D0uH9JWq.js.map → footer-actions.Cbe_YLjP.js.map} +1 -1
  93. package/dist/chunks/{form-layout-title.DN0jonFa.js → form-layout-title.Xdsi84v2.js} +2 -2
  94. package/dist/chunks/{form-layout-title.DN0jonFa.js.map → form-layout-title.Xdsi84v2.js.map} +1 -1
  95. package/dist/chunks/{header.BvZxtIOD.js → header.BIZTUAJE.js} +4 -4
  96. package/dist/chunks/{header.BvZxtIOD.js.map → header.BIZTUAJE.js.map} +1 -1
  97. package/dist/chunks/{info-icon-with-popover.DEjsASNU.js → info-icon-with-popover.Bly2e0uy.js} +5 -5
  98. package/dist/chunks/{info-icon-with-popover.DEjsASNU.js.map → info-icon-with-popover.Bly2e0uy.js.map} +1 -1
  99. package/dist/chunks/{input-field-password.HRDEb0jL.js → input-field-password.CosL-n__.js} +27 -27
  100. package/dist/chunks/{input-field-password.HRDEb0jL.js.map → input-field-password.CosL-n__.js.map} +1 -1
  101. package/dist/chunks/input-field.DgDFJbg7.js +231 -0
  102. package/dist/chunks/input-field.DgDFJbg7.js.map +1 -0
  103. package/dist/chunks/{inspector.types.2YEArjPi.js → inspector.types.8071wkf0.js} +5 -5
  104. package/dist/chunks/{inspector.types.2YEArjPi.js.map → inspector.types.8071wkf0.js.map} +1 -1
  105. package/dist/chunks/{menu.CLaN9Eys.js → menu.Dq7RlryT.js} +5 -5
  106. package/dist/chunks/{menu.CLaN9Eys.js.map → menu.Dq7RlryT.js.map} +1 -1
  107. package/dist/chunks/{modal-fullscreen.B-qr1Szh.js → modal-fullscreen.CfrgVR_K.js} +5 -5
  108. package/dist/chunks/{modal-fullscreen.B-qr1Szh.js.map → modal-fullscreen.CfrgVR_K.js.map} +1 -1
  109. package/dist/chunks/{modal.wU3uUJKq.js → modal.CuUUMIU_.js} +4 -4
  110. package/dist/chunks/{modal.wU3uUJKq.js.map → modal.CuUUMIU_.js.map} +1 -1
  111. package/dist/chunks/{pagination.BM3FhtxJ.js → pagination.QF1EEUfX.js} +45 -45
  112. package/dist/chunks/{pagination.BM3FhtxJ.js.map → pagination.QF1EEUfX.js.map} +1 -1
  113. package/dist/chunks/{popover.DsUymZWJ.js → popover.nev0GndY.js} +2 -2
  114. package/dist/chunks/{popover.DsUymZWJ.js.map → popover.nev0GndY.js.map} +1 -1
  115. package/dist/chunks/radio-group.D1q0VKvv.js +229 -0
  116. package/dist/chunks/radio-group.D1q0VKvv.js.map +1 -0
  117. package/dist/chunks/{radio-input.C1DZbkcT.js → radio-input.uJAhxKRs.js} +29 -25
  118. package/dist/chunks/{radio-input.C1DZbkcT.js.map → radio-input.uJAhxKRs.js.map} +1 -1
  119. package/dist/chunks/{search-bar.rubkdbcD.js → search-bar.fmMx-zRN.js} +7 -7
  120. package/dist/chunks/{search-bar.rubkdbcD.js.map → search-bar.fmMx-zRN.js.map} +1 -1
  121. package/dist/chunks/{secondary-nav.DKSjc5bn.js → secondary-nav.ldVrzGbB.js} +7 -7
  122. package/dist/chunks/{secondary-nav.DKSjc5bn.js.map → secondary-nav.ldVrzGbB.js.map} +1 -1
  123. package/dist/chunks/{selection-card-group.iYyZ9yX4.js → selection-card-group.CdkrhyZV.js} +11 -11
  124. package/dist/chunks/{selection-card-group.iYyZ9yX4.js.map → selection-card-group.CdkrhyZV.js.map} +1 -1
  125. package/dist/chunks/{sidepanel.CQnLpV8A.js → sidepanel.D-KuHnwI.js} +5 -5
  126. package/dist/chunks/{sidepanel.CQnLpV8A.js.map → sidepanel.D-KuHnwI.js.map} +1 -1
  127. package/dist/chunks/{status.types.Cv6hHRMu.js → status.types.Ce018tQy.js} +18 -17
  128. package/dist/chunks/status.types.Ce018tQy.js.map +1 -0
  129. package/dist/chunks/{structured-list-item.BhBbmkbw.js → structured-list-item.Dk8Z-FPn.js} +5 -5
  130. package/dist/chunks/{structured-list-item.BhBbmkbw.js.map → structured-list-item.Dk8Z-FPn.js.map} +1 -1
  131. package/dist/chunks/{summary-grid-item-custom.CicAOBVQ.js → summary-grid-item-custom.atXX3GY9.js} +2 -2
  132. package/dist/chunks/{summary-grid-item-custom.CicAOBVQ.js.map → summary-grid-item-custom.atXX3GY9.js.map} +1 -1
  133. package/dist/chunks/{textarea.Cf21WMwL.js → textarea.BVzGn3zO.js} +2 -2
  134. package/dist/chunks/{textarea.Cf21WMwL.js.map → textarea.BVzGn3zO.js.map} +1 -1
  135. package/dist/chunks/{timeline-item.Cu5b-Mqj.js → timeline-item.D_YNHlRi.js} +13 -13
  136. package/dist/chunks/{timeline-item.Cu5b-Mqj.js.map → timeline-item.D_YNHlRi.js.map} +1 -1
  137. package/dist/chunks/{tutorial.w2ZqeOh1.js → tutorial.cQXPvqV4.js} +10 -10
  138. package/dist/chunks/{tutorial.w2ZqeOh1.js.map → tutorial.cQXPvqV4.js.map} +1 -1
  139. package/dist/chunks/{use-cached-selected-values.impKjAIS.js → use-cached-selected-values.BGlHmPhX.js} +10 -10
  140. package/dist/chunks/{use-cached-selected-values.impKjAIS.js.map → use-cached-selected-values.BGlHmPhX.js.map} +1 -1
  141. package/dist/chunks/{use-country-items.DPBbl1KK.js → use-country-items.eWARMT6I.js} +2 -2
  142. package/dist/chunks/{use-country-items.DPBbl1KK.js.map → use-country-items.eWARMT6I.js.map} +1 -1
  143. package/dist/code-snippet.js +1 -1
  144. package/dist/country.js +2 -2
  145. package/dist/dashboard-template.js +1 -1
  146. package/dist/dashed-underline.js +1 -1
  147. package/dist/data-grid-template.js +1 -1
  148. package/dist/data-grid.js +1 -1
  149. package/dist/date-picker.js +2 -2
  150. package/dist/date-range-picker.js +2 -2
  151. package/dist/divider.js +1 -1
  152. package/dist/dropdown.js +4 -4
  153. package/dist/file-uploader.js +1 -1
  154. package/dist/filter-bar.js +1 -1
  155. package/dist/form-layout.js +1 -1
  156. package/dist/header.js +1 -1
  157. package/dist/index.js +47 -47
  158. package/dist/input-field-password.js +1 -1
  159. package/dist/input-field.js +1 -1
  160. package/dist/inspector.js +1 -1
  161. package/dist/internal.js +8 -8
  162. package/dist/menu.js +1 -1
  163. package/dist/modal-fullscreen.js +1 -1
  164. package/dist/modal.js +2 -2
  165. package/dist/pagination.js +1 -1
  166. package/dist/popover.js +1 -1
  167. package/dist/radio-group.js +2 -2
  168. package/dist/search-bar.js +2 -2
  169. package/dist/secondary-nav.js +1 -1
  170. package/dist/selection-card.js +1 -1
  171. package/dist/sidepanel.js +1 -1
  172. package/dist/status.js +1 -1
  173. package/dist/structured-list.js +1 -1
  174. package/dist/styles/bento-dark.css +2 -0
  175. package/dist/styles/bento-light.css +2 -0
  176. package/dist/styles/bento.css +2 -0
  177. package/dist/styles/legacy.css +7 -5
  178. package/dist/styles/styleguide.css +2 -0
  179. package/dist/summary-grid.js +1 -1
  180. package/dist/textarea.js +1 -1
  181. package/dist/timeline.js +1 -1
  182. package/dist/tutorial.js +1 -1
  183. package/dist/web-types.json +42 -3
  184. package/package.json +12 -7
  185. package/dist/chunks/code-snippet.5iJcUZSo.js.map +0 -1
  186. package/dist/chunks/codemirror.CXFEqvAi.js.map +0 -1
  187. package/dist/chunks/date-picker.B7mTNghB.js.map +0 -1
  188. package/dist/chunks/date-range-picker.DPLri9D-.js.map +0 -1
  189. package/dist/chunks/divider.BZfeYmB9.js +0 -30
  190. package/dist/chunks/divider.BZfeYmB9.js.map +0 -1
  191. package/dist/chunks/dropdown.BqsoncJr.js.map +0 -1
  192. package/dist/chunks/es6.jIyAPBgt.js.map +0 -1
  193. package/dist/chunks/file-uploader.C6kcnhqp.js +0 -729
  194. package/dist/chunks/file-uploader.C6kcnhqp.js.map +0 -1
  195. package/dist/chunks/input-field.D6N2kt7s.js +0 -228
  196. package/dist/chunks/input-field.D6N2kt7s.js.map +0 -1
  197. package/dist/chunks/radio-group.DMob8x2J.js +0 -219
  198. package/dist/chunks/radio-group.DMob8x2J.js.map +0 -1
  199. package/dist/chunks/status.types.Cv6hHRMu.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-picker.P2Q5FNB-.js","sources":["../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isEqual/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/startOfSecond/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/isSameSecond/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setHours/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setMinutes/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/setSeconds/index.js","../../src/components/date-range-picker/utils/date-text-to-start-of-day.ts","../../src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.ts","../../src/components/date-range-picker/composables/use-granularity-memory.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.ts","../../src/utils/ts/time-input.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue","../../src/components/date-range-picker/composables/use-date-range-picker-calendar-text.ts","../../src/components/date-range-picker/date-range-picker.types.ts","../../src/components/date-range-picker/date-range-picker.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfSecond\n * @category Second Helpers\n * @summary Return the start of a second for the given date.\n *\n * @description\n * Return the start of a second for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a second\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a second for 1 December 2014 22:15:45.400:\n * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.000\n */\n\nexport default function startOfSecond(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setMilliseconds(0);\n return date;\n}","import startOfSecond from \"../startOfSecond/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameSecond\n * @category Second Helpers\n * @summary Are the given dates in the same second (and hour and day)?\n *\n * @description\n * Are the given dates in the same second (and hour and day)?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same second (and hour and day)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second?\n * var result = isSameSecond(\n * new Date(2014, 8, 4, 6, 30, 15),\n * new Date(2014, 8, 4, 6, 30, 15, 500)\n * )\n * //=> true\n * \n * @example\n * // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second?\n * var result = isSameSecond(\n * new Date(2014, 8, 4, 6, 0, 15),\n * new Date(2014, 8, 4, 6, 1, 15)\n * )\n * //=> false\n * \n * @example\n * // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second?\n * var result = isSameSecond(\n * new Date(2014, 8, 4, 6, 0, 15),\n * new Date(2014, 8, 5, 6, 0, 15)\n * )\n * //=> false\n */\n\nexport default function isSameSecond(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft);\n var dateRightStartOfSecond = startOfSecond(dirtyDateRight);\n return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var hours = toInteger(dirtyHours);\n date.setHours(hours);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\nexport default function setMinutes(dirtyDate, dirtyMinutes) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var minutes = toInteger(dirtyMinutes);\n date.setMinutes(minutes);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\n\nexport default function setSeconds(dirtyDate, dirtySeconds) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var seconds = toInteger(dirtySeconds);\n date.setSeconds(seconds);\n return date;\n}","import startOfDay from 'date-fns/startOfDay';\n\n/**\n * Parses an ISO date string and returns a Date set to the\n * start of that calendar day (00:00:00) in the system’s local time zone.\n *\n * Uses the numeric Date constructor `new Date(year, monthIndex, day)`\n * which interprets its arguments as local time.\n *\n * @param dateText - A date in `YYYY-MM-DD` format.\n * @returns A `Date` at the local start of the specified day.\n */\nexport function parseDateTextToStartOfDay(dateText?: string) {\n if (dateText == null) {\n return startOfDay(new Date());\n }\n\n const [year, month, day] = dateText.split('-').map(s => parseInt(s, 10));\n return new Date(year, month - 1, day);\n}\n","import addDays from 'date-fns/addDays';\nimport addMonths from 'date-fns/addMonths';\nimport endOfDay from 'date-fns/endOfDay';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport isSameDay from 'date-fns/isSameDay';\nimport startOfDay from 'date-fns/startOfDay';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport subDays from 'date-fns/subDays';\nimport subMonths from 'date-fns/subMonths';\n\nimport type { CalendarGranularityConfig } from '../../../calendar.types';\nimport type { UseGranularMinMaxDate } from './granular-min-max-date.types';\n\n/**\n * Provides utility function to set calendar min/max dates based on the granularity selected.\n * @param props Configured min/max dates, and the day the week starts on.\n * @returns Function to calculate calendar limits.\n */\nexport const useGranularMinMaxDate: UseGranularMinMaxDate = ({\n firstDayOfWeek,\n min: minimumDate,\n max: maximumDate,\n}) => {\n const getGranularCalendarLimits = (granularity: CalendarGranularityConfig) => {\n let min = startOfDay(minimumDate);\n let max = endOfDay(maximumDate);\n\n if (granularity?.type === 'weekly') {\n if (granularity.earliest) {\n min = startOfDay(granularity.earliest);\n } else {\n const startOfMin = startOfWeek(min, { weekStartsOn: firstDayOfWeek });\n\n // If the minimum is in the middle of a week, set to the end (only allow full weeks)\n if (!isSameDay(min, startOfMin)) {\n min = startOfDay(addDays(endOfWeek(min, { weekStartsOn: firstDayOfWeek }), 1));\n }\n }\n\n if (granularity.latest) {\n max = endOfDay(granularity.latest);\n } else {\n const endOfMax = endOfWeek(max, { weekStartsOn: firstDayOfWeek });\n\n // If the maximum is in the middle of a week, set to the end of last week (only allow full weeks)\n if (!isSameDay(max, endOfMax)) {\n max = endOfDay(subDays(startOfWeek(max, { weekStartsOn: firstDayOfWeek }), 1));\n }\n }\n }\n\n if (granularity?.type === 'monthly') {\n if (granularity.earliest) {\n min = startOfDay(granularity.earliest);\n } else {\n const startOfMin = startOfMonth(min);\n\n // If the minimum is in the middle of a month, set to the start of next month (only allow full month)\n if (!isSameDay(min, startOfMin)) {\n min = startOfMonth(addMonths(min, 1));\n }\n }\n\n if (granularity.latest) {\n max = endOfDay(granularity.latest);\n } else {\n const endOfMax = endOfMonth(max);\n\n // If the maximum is in the middle of a month, set to the end of last month (only allow full months)\n if (!isSameDay(max, endOfMax)) {\n max = endOfMonth(subMonths(max, 1));\n }\n }\n }\n\n return { min, max };\n };\n\n return { getGranularCalendarLimits };\n};\n","import { reactive } from 'vue';\n\nimport type { CalendarGranularityType } from '../../internal/calendar/calendar.types';\nimport type { UseGranularityMemory } from './use-granularity-memory.types';\n\n/**\n * Provides utility property and functions to store date ranges based on granularity.\n * This is used to revert back to the previously selected range when users switch between granularities\n * @returns Saved date ranges per granularity, and functions to save/reset ranges.\n */\nexport const useGranularityMemory: UseGranularityMemory = () => {\n const savedRanges = reactive<{\n daily: { startDate: Date; endDate: Date } | null;\n weekly: { startDate: Date; endDate: Date } | null;\n monthly: { startDate: Date; endDate: Date } | null;\n }>({\n daily: null,\n weekly: null,\n monthly: null,\n });\n\n const saveRange = (type: CalendarGranularityType, range: { startDate: Date; endDate: Date }) => {\n savedRanges[type] = range;\n };\n\n const resetSavedRanges = () => {\n savedRanges.daily = null;\n savedRanges.weekly = null;\n savedRanges.monthly = null;\n };\n\n return {\n savedRanges,\n\n saveRange,\n resetSavedRanges,\n };\n};\n","import { CalendarGranularityType } from '@/internal';\n\nexport interface DateRangePickerCalendarFormData {\n startDate: string;\n endDate: string;\n startTime?: string;\n endTime?: string;\n granularity?: CalendarGranularityType;\n}\n\nexport enum DateRangePickerCalendarEvent {\n CUSTOM_RANGE = 'custom-range',\n INPUT = 'input',\n ERROR = 'error',\n FORM_DATE = 'form-date',\n START_DATE_SELECTED = 'start-date-selected',\n}\n\nexport interface DateRangePickerCalendarRangeSelectorItem {\n label: string;\n value: string;\n data: {\n startDate: Date;\n endDate: Date;\n granularity?: CalendarGranularityType;\n };\n}\n\nexport type DateRangePickerCalendarRangeSelectorItems = Array<DateRangePickerCalendarRangeSelectorItem>;\n","const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart } = event.target as HTMLInputElement;\n\n const isValidKey = validDigitRegex.test(event.key) || event.key === 'Backspace';\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n\n if (!isValidKey && !isValidColon) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <div class=\"b-date-range-picker-calendar\">\n <!-- Form -->\n <div class=\"b-date-range-picker-calendar__form-container\">\n <div class=\"b-date-range-picker-calendar__form\">\n <template v-if=\"hasSlot('title')\">\n <slot name=\"title\" />\n </template>\n\n <bento-dropdown\n v-if=\"quickSelectRanges\"\n :aria-label=\"t('customRange')\"\n :items=\"quickSelectRangeDefaultItems\"\n :value=\"selectedRangeSelectorValue\"\n @input=\"onRangeSelectorInput\"\n />\n\n <bento-segmented-control\n v-if=\"granularities\"\n :items=\"granularityItems\"\n :model-value=\"internalRangeDate.granularity\"\n full-width\n @update:model-value=\"onGranularityInput\"\n >\n </bento-segmented-control>\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n From\n </bento-typography>\n <div :class=\"formInputWrapperConditionalClasses\">\n <bento-input-field\n :aria-label=\"t('dateFrom')\"\n :value=\"dateTextInput.startDate\"\n :error=\"startDateError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onStartDateInput\"\n @keydown=\"onDateInputKeyDown\"\n >\n <template #description>YYYY-MM-DD</template>\n </bento-input-field>\n\n <bento-input-field\n v-if=\"allowTimeInput\"\n :aria-label=\"t('timeFrom')\"\n :value=\"dateTextInput.startTime\"\n :error=\"startTimeError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onStartTimeInput\"\n @keydown=\"onTimeInputKeyDown\"\n >\n <template #description>HH:MM:SS</template>\n </bento-input-field>\n </div>\n </div>\n\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n To\n </bento-typography>\n <div :class=\"formInputWrapperConditionalClasses\">\n <bento-input-field\n class=\"b-date-range-picker-calendar__form-input\"\n :aria-label=\"t('dateTo')\"\n :value=\"dateTextInput.endDate\"\n :error=\"endDateError\"\n @input=\"onEndDateInput\"\n @keydown=\"onDateInputKeyDown\"\n >\n <template #description>YYYY-MM-DD</template>\n </bento-input-field>\n\n <bento-input-field\n v-if=\"allowTimeInput\"\n :aria-label=\"t('timeTo')\"\n :value=\"dateTextInput.endTime\"\n :error=\"endTimeError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onEndTimeInput\"\n @keydown=\"onTimeInputKeyDown\"\n >\n <template #description>HH:MM:SS</template>\n </bento-input-field>\n </div>\n </div>\n </div>\n\n <div v-if=\"hasSlot('actions')\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <!-- Calendar -->\n <div class=\"b-date-range-picker-calendar__calendars-container\">\n <calendar\n :value=\"value\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :min=\"computedMinMax.min\"\n :max=\"computedMinMax.max\"\n :number-of-months=\"numberOfMonths\"\n :show-end-date-on-open=\"showEndDateOnOpen\"\n :granularity=\"selectedGranularity\"\n is-range\n @input=\"onDateInput\"\n @start-date-selected=\"onStartDateSelected\"\n @end-date-selected=\"onEndDateSelected\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, reactive, ref, toRaw } from 'vue';\n import { Calendar, CalendarGranularityType } from '@/internal';\n import { BentoTypography } from '@/components/typography';\n import { BentoInputField } from '@/components/input-field';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoSegmentedControl, type BentoSegmentedControlItem } from '@/components/segmented-control';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import { useI18n } from '@/utils/ts/i18n';\n import { parseDateTextToStartOfDay } from '../../utils/date-text-to-start-of-day';\n import { debounce } from '@/utils/ts/debounce';\n import { useHasSlot } from '@/composables';\n import { useGranularityAdjustments } from '@/components/internal/calendar/composables/use-granularity-adjustments';\n import { useGranularMinMaxDate } from '@/components/internal/calendar/components/calendar-month/composables/granular-min-max-date';\n import { useGranularityMemory } from '../../composables/use-granularity-memory';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import {\n DateRangePickerCalendarEvent,\n DateRangePickerCalendarFormData,\n DateRangePickerCalendarRangeSelectorItems,\n } from './date-range-picker-calendar.types';\n import type {\n BentoDateRangePickerGranularityConfig,\n BentoDateRangePickerValue,\n } from '../../date-range-picker.types';\n import { DateFormat } from '@/types';\n import { formatTimeInputValue, validateTimeInput } from '@/utils/ts/time-input';\n import endOfDay from 'date-fns/endOfDay';\n import format from 'date-fns/format';\n import isSameSecond from 'date-fns/isSameSecond';\n import isSameDay from 'date-fns/isSameDay';\n import setHours from 'date-fns/setHours';\n import setMinutes from 'date-fns/setMinutes';\n import setSeconds from 'date-fns/setSeconds';\n import startOfDay from 'date-fns/startOfDay';\n import messages from './messages.json';\n\n const FORM_INPUT_DEBOUNCE_TIME = 300;\n const RANGE_SELECTOR_CUSTOM_RANGE_KEY = 'customRange';\n const DEFAULT_GRANULARITY = 'daily';\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Calendar for range dates. Contains the logic to handle the range forms.\n *\n * @example\n * import DatePickerCalendarRange from './date-range-picker-calendar.vue';\n *\n * export default {\n * components: { DatePickerCalendarRange },\n * template: `\n * <date-range-picker-calendar\n * :value=\"{startDate: new Date(), endDate: new Date() }\"\n * :first-day-of-week=\"BentoDatePickerFirstDayOfWeek.MONDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :number-of-months=\"2\"\n * @input=\"({ startDate, endDate }) => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'date-range-picker-calendar',\n components: {\n BentoDropdown,\n BentoInputField,\n BentoSegmentedControl,\n BentoTypography,\n Calendar,\n },\n props: {\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\n /**\n * Ranges form persistance data\n */\n dateFormData: {\n type: Object as PropType<DateRangePickerCalendarFormData>,\n default: () => ({ startDate: undefined, endDate: undefined, startTime: undefined, endTime: undefined }),\n },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities: {\n type: Array as PropType<Array<BentoDateRangePickerGranularityConfig>>,\n default: null,\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: Calendar.props.maxRange,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: Calendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: Calendar.props.max,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: Calendar.props.numberOfMonths,\n\n /**\n * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.\n */\n showEndDateOnOpen: { type: Boolean, default: false },\n\n /**\n * Enables the custom range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Selected date\n */\n value: { type: Object as PropType<BentoDateRangePickerValue>, default: undefined },\n },\n emits: [\n DateRangePickerCalendarEvent.CUSTOM_RANGE,\n DateRangePickerCalendarEvent.INPUT,\n DateRangePickerCalendarEvent.ERROR,\n DateRangePickerCalendarEvent.FORM_DATE,\n DateRangePickerCalendarEvent.START_DATE_SELECTED,\n ],\n setup(props, { emit, slots }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = getDateLocale();\n const internalRangeDate = reactive({\n startDate: (props.value as BentoDateRangePickerValue)?.startDate,\n endDate: (props.value as BentoDateRangePickerValue)?.endDate,\n ...(props.granularities\n ? {\n granularity: (props.value as BentoDateRangePickerValue)?.granularity || DEFAULT_GRANULARITY,\n }\n : {}),\n });\n const selectedRangeSelectorValue = computed(\n () =>\n props?.quickSelectRanges?.find(({ data }) => {\n if (props.allowTimeInput) {\n return (\n isSameSecond(data.startDate, internalRangeDate.startDate) &&\n isSameSecond(data.endDate, internalRangeDate.endDate)\n );\n }\n return (\n isSameDay(data.startDate, internalRangeDate.startDate) &&\n isSameDay(data.endDate, internalRangeDate.endDate)\n );\n })?.value ?? RANGE_SELECTOR_CUSTOM_RANGE_KEY\n );\n const formInputWrapperConditionalClasses = computed(() => ({\n 'b-date-range-picker-calendar__form-input-wrapper': props.allowTimeInput,\n }));\n const quickSelectRangeDefaultItems = computed(() => [\n { label: t('customRange'), value: RANGE_SELECTOR_CUSTOM_RANGE_KEY },\n ...(props.quickSelectRanges ? props.quickSelectRanges : []),\n ]);\n\n const selectedGranularity = computed(\n () => props.granularities?.find(({ type }) => type === internalRangeDate.granularity) || null\n );\n\n const granularityItems = computed<Array<BentoSegmentedControlItem>>(\n () =>\n props.granularities?.map(({ type, disabled }) => ({\n label: t(type),\n value: type,\n disabled,\n })) ?? []\n );\n\n const { getGranularCalendarLimits } = useGranularMinMaxDate(props);\n\n const computedMinMax = computed(() =>\n props.granularities\n ? getGranularCalendarLimits(selectedGranularity.value)\n : { min: startOfDay(props.min), max: endOfDay(props.max) }\n );\n\n const {\n adjustDateForMonthly,\n adjustDateForWeekly,\n adjustStartDateInputForWeekly,\n adjustEndDateInputForWeekly,\n adjustStartDateInputForMonthly,\n adjustEndDateInputForMonthly,\n } = useGranularityAdjustments(props.firstDayOfWeek);\n const { savedRanges, saveRange, resetSavedRanges } = useGranularityMemory();\n\n /**\n * Format date to a string value in format yyyy-MM-dd\n * @param {Date} dateToFormat Date to be formatted\n */\n const formatDate = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n return format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n });\n };\n\n const formatTime = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n\n return format(dateToFormat, DateFormat.HOUR_MINUTE_SECONDS, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n });\n };\n\n // Form error flags\n const startDateError = ref(false);\n const endDateError = ref(false);\n const startTimeError = ref(false);\n const endTimeError = ref(false);\n\n // Form input text used in range variant\n const dateTextInput = reactive({\n startDate: props.dateFormData.startDate,\n endDate: props.dateFormData.endDate,\n startTime: props.dateFormData.startTime,\n endTime: props.dateFormData.endTime,\n });\n\n // Validate time\n const isValidTime = (timeText: string) => {\n // HH:MM:SS regex\n const timeRegex = /^(?:[01]\\d|2[01234]):(?:[012345]\\d):(?:[012345]\\d)$/;\n return timeRegex.test(timeText);\n };\n\n const setTimeInDate = (date: Date, time: string) => {\n if (!time || !isValidTime(time)) {\n return date;\n }\n\n let dateWithTime = new Date(date);\n\n const [hours, minutes, seconds] = time.split(':');\n dateWithTime = setHours(dateWithTime, parseInt(hours, 10));\n dateWithTime = setMinutes(dateWithTime, parseInt(minutes, 10));\n dateWithTime = setSeconds(dateWithTime, parseInt(seconds, 10));\n return dateWithTime;\n };\n\n const onDateInput = (selectedRange: BentoDateRangePickerValue) => {\n internalRangeDate.startDate = setTimeInDate(selectedRange.startDate, dateTextInput.startTime);\n internalRangeDate.endDate = setTimeInDate(selectedRange.endDate, dateTextInput.endTime);\n\n if (props.granularities) {\n // Reset saved ranges on input\n resetSavedRanges();\n }\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n };\n\n const isValidDate = (dateText: string) => {\n // Is date selectable\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n // YYYY-MM-DD regex\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n // Date matches text regex\n return dateRegex.test(dateText) && isDateEnabled(new Date(dateText));\n };\n\n /**\n * When mounted, set the input error states to true if the values are not valid\n */\n onMounted(() => {\n if (props.dateFormData.startDate && !isValidDate(props.dateFormData.startDate)) {\n startDateError.value = true;\n } else {\n startDateError.value = false;\n startTimeError.value = false;\n }\n\n if (props.dateFormData.endDate && !isValidDate(props.dateFormData.endDate)) {\n endDateError.value = true;\n } else {\n endDateError.value = false;\n endTimeError.value = false;\n }\n });\n\n const onStartDateSelected = (newStartDate: Date) => {\n dateTextInput.startDate = formatDate(newStartDate);\n if (!dateTextInput.startTime) {\n // Set the time to the beginning of the day\n dateTextInput.startTime = formatTime(newStartDate);\n } else if (startTimeError.value) {\n // Set the form time if it was previously set\n dateTextInput.startTime = props.dateFormData?.startTime;\n }\n\n // Reset errors\n startDateError.value = false;\n startTimeError.value = false;\n\n emit(DateRangePickerCalendarEvent.START_DATE_SELECTED, newStartDate);\n };\n\n const onEndDateSelected = (newEndDate: Date) => {\n dateTextInput.endDate = formatDate(newEndDate);\n if (!dateTextInput.endTime) {\n // Set the time to the end of the day\n dateTextInput.endTime = formatTime(endOfDay(newEndDate));\n } else if (endTimeError.value) {\n // Set the form time if it was previously set\n dateTextInput.endTime = props.dateFormData?.endTime;\n }\n\n // Reset errors\n endDateError.value = false;\n endTimeError.value = false;\n };\n\n const getDate = (keyName: keyof BentoDateRangePickerValue) => {\n const dateProp = (props.value as BentoDateRangePickerValue)[keyName];\n if (dateProp) {\n return dateProp;\n }\n\n if (props.dateFormData[keyName] && isValidDate(props.dateFormData[keyName])) {\n return new Date(props.dateFormData[keyName]);\n }\n\n return undefined;\n };\n\n const validateStartDate = debounce((startDateText: string) => {\n // Checks for YYYY-MM-DD format\n if (isValidDate(startDateText)) {\n let dateText = startDateText;\n\n startDateError.value = false;\n\n switch (selectedGranularity.value?.type) {\n case 'weekly':\n dateText = adjustStartDateInputForWeekly(\n startDateText,\n formatDate,\n computedMinMax.value.min,\n computedMinMax.value.max\n );\n dateTextInput.startDate = dateText;\n break;\n case 'monthly':\n dateText = adjustStartDateInputForMonthly(\n startDateText,\n formatDate,\n computedMinMax.value.min,\n computedMinMax.value.max\n );\n dateTextInput.startDate = dateText;\n break;\n case 'daily':\n default:\n break;\n }\n\n // Format date string to Date object\n const startDate = parseDateTextToStartOfDay(dateText);\n internalRangeDate.startDate = setTimeInDate(startDate, dateTextInput.startTime);\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate,\n endDate,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n } else {\n // Indicate form error\n startDateError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n }, FORM_INPUT_DEBOUNCE_TIME);\n\n const onStartDateInput = (startDateText: string) => {\n // Set the date as string when input through the form\n dateTextInput.startDate = formatDateInputValue(startDateText);\n validateStartDate(dateTextInput.startDate);\n };\n\n const validateEndDate = debounce((endDateText: string) => {\n // Checks for YYYY-MM-DD format\n if (isValidDate(endDateText)) {\n let dateText = endDateText;\n\n endDateError.value = false;\n\n switch (selectedGranularity.value?.type) {\n case 'weekly':\n dateText = adjustEndDateInputForWeekly(\n endDateText,\n formatDate,\n computedMinMax.value.min,\n computedMinMax.value.max\n );\n dateTextInput.endDate = dateText;\n break;\n case 'monthly':\n dateText = adjustEndDateInputForMonthly(\n endDateText,\n formatDate,\n computedMinMax.value.min,\n computedMinMax.value.max\n );\n dateTextInput.endDate = dateText;\n break;\n case 'daily':\n default:\n break;\n }\n\n const endDate = parseDateTextToStartOfDay(dateText);\n internalRangeDate.endDate = setTimeInDate(endDate, dateTextInput.endTime);\n\n const startDate = getDate('startDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate,\n endDate,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n } else {\n // Indicate form error\n endDateError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n }, FORM_INPUT_DEBOUNCE_TIME);\n\n const onEndDateInput = (endDateText: string) => {\n // Set the date as string when input through the form\n dateTextInput.endDate = formatDateInputValue(endDateText);\n validateEndDate(dateTextInput.endDate);\n };\n\n const onDateInputKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateStartTime = debounce((startTimeText: string) => {\n if (isValidTime(startTimeText)) {\n startTimeError.value = false;\n internalRangeDate.startDate = setTimeInDate(internalRangeDate.startDate, startTimeText);\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: new Date(internalRangeDate.startDate),\n endDate,\n startTime: startTimeText,\n endTime: props.dateFormData.endTime,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n } else {\n // Indicate form error\n startTimeError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n });\n\n const validateEndTime = debounce((endTimeText: string) => {\n if (isValidTime(endTimeText)) {\n endTimeError.value = false;\n internalRangeDate.endDate = setTimeInDate(internalRangeDate.endDate, endTimeText);\n\n const startDate = getDate('startDate');\n internalRangeDate.startDate = setTimeInDate(new Date(startDate), props.dateFormData.startTime);\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: setTimeInDate(new Date(startDate), props.dateFormData.startTime),\n endDate: new Date(internalRangeDate.endDate),\n startTime: props.dateFormData.startTime,\n endTime: endTimeText,\n });\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n } else {\n // Indicate form error\n endTimeError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n });\n\n const onStartTimeInput = (startTimeText: string) => {\n dateTextInput.startTime = formatTimeInputValue(startTimeText);\n validateStartTime(dateTextInput.startTime);\n };\n\n const onEndTimeInput = (endDateText: string) => {\n dateTextInput.endTime = formatTimeInputValue(endDateText);\n validateEndTime(dateTextInput.endTime);\n };\n\n const onTimeInputKeyDown = (event: KeyboardEvent) => {\n validateTimeInput(event);\n };\n\n const setInternalRange = (startDate: Date, endDate: Date, granularity?: CalendarGranularityType) => {\n internalRangeDate.startDate = startDate;\n internalRangeDate.endDate = endDate;\n\n if (granularity) {\n internalRangeDate.granularity = granularity;\n }\n };\n\n const onRangeSelectorInput = (newCustomRangeValue: string) => {\n const foundResult = props.quickSelectRanges?.find(({ value }) => value === newCustomRangeValue);\n if (foundResult) {\n resetSavedRanges();\n const date = foundResult.data;\n\n dateTextInput.startDate = formatDate(date.startDate);\n dateTextInput.endDate = formatDate(date.endDate);\n\n setInternalRange(date.startDate, date.endDate);\n\n if (props.granularities) {\n internalRangeDate.granularity = date.granularity || DEFAULT_GRANULARITY;\n }\n if (!dateTextInput.startTime) {\n dateTextInput.startTime = formatTime(endOfDay(date.startDate));\n }\n if (!dateTextInput.endTime) {\n dateTextInput.endTime = formatTime(endOfDay(date.endDate));\n }\n emit(DateRangePickerCalendarEvent.CUSTOM_RANGE, { ...foundResult.data, range: foundResult.value });\n }\n };\n\n const onGranularityInput = (value: CalendarGranularityType) => {\n const previousValue = internalRangeDate.granularity;\n\n internalRangeDate.granularity = value;\n\n // Save previously selected range\n if (previousValue) {\n saveRange(previousValue, structuredClone(toRaw(internalRangeDate)));\n }\n\n if (internalRangeDate.startDate && internalRangeDate.endDate) {\n // Adjust date range based on new granularity\n switch (value) {\n case 'monthly': {\n if (savedRanges.monthly) {\n setInternalRange(savedRanges.monthly.startDate, savedRanges.monthly.endDate, value);\n break;\n }\n\n const { startDate, endDate } = adjustDateForMonthly(\n internalRangeDate.startDate,\n internalRangeDate.endDate,\n computedMinMax.value.min,\n computedMinMax.value.max\n );\n setInternalRange(startDate, endDate, value);\n break;\n }\n case 'weekly': {\n if (savedRanges.weekly) {\n setInternalRange(savedRanges.weekly.startDate, savedRanges.weekly.endDate, value);\n break;\n }\n\n const { startDate, endDate } = adjustDateForWeekly(\n internalRangeDate.startDate,\n internalRangeDate.endDate,\n computedMinMax.value.min,\n computedMinMax.value.max\n );\n setInternalRange(startDate, endDate, value);\n break;\n }\n case 'daily':\n if (savedRanges.daily) {\n setInternalRange(savedRanges.daily.startDate, savedRanges.daily.endDate, value);\n }\n break;\n default:\n break;\n }\n\n dateTextInput.startDate = formatDate(internalRangeDate.startDate);\n dateTextInput.endDate = formatDate(internalRangeDate.endDate);\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n }\n };\n\n return {\n // Values\n internalRangeDate,\n dateTextInput,\n endDateError,\n endTimeError,\n granularityItems,\n selectedGranularity,\n computedMinMax,\n selectedRangeSelectorValue,\n startDateError,\n startTimeError,\n quickSelectRangeDefaultItems,\n formInputWrapperConditionalClasses,\n\n // Methods\n hasSlot: useHasSlot(slots),\n t,\n\n // Events\n onDateInput,\n onDateInputKeyDown,\n onEndDateInput,\n onEndDateSelected,\n onEndTimeInput,\n onGranularityInput,\n onRangeSelectorInput,\n onStartDateInput,\n onStartDateSelected,\n onStartTimeInput,\n onTimeInputKeyDown,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker-calendar.scss\" />\n","import { computed, reactive } from 'vue';\nimport { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { parseDateTextToStartOfDay } from '../utils/date-text-to-start-of-day';\nimport { UseDateDisplayText } from './use-date-range-picker-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport { CalendarRangeDateValue } from '@/internal';\nimport { DateRangePickerCalendarFormData } from '../components/date-range-picker-calendar/date-range-picker-calendar.types';\nimport format from 'date-fns/format';\nimport isEqual from 'date-fns/isEqual';\n\nexport const useDateRangePickerCalendarText: UseDateDisplayText<CalendarRangeDateValue> = ({\n datePickerValue,\n isDateIncorrect,\n quickSelectRanges,\n}) => {\n const { locale, t } = useI18n();\n const locales = getDateLocale();\n\n const isValidDate = date => !!date && !isNaN(date.getTime());\n\n const formatDate = (date: Date, dateFormat: DateFormat) =>\n isValidDate(date)\n ? format(date, dateFormat, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n })\n : undefined;\n\n // Handle the form input text\n const textInputDisplayValue = reactive<DateRangePickerCalendarFormData>({\n startDate: formatDate(datePickerValue.value?.startDate, DateFormat.NUMERIC_DATE_YEAR_FIRST),\n endDate: formatDate(datePickerValue.value?.endDate, DateFormat.NUMERIC_DATE_YEAR_FIRST),\n startTime: formatDate(datePickerValue.value?.startDate, DateFormat.HOUR_MINUTE_SECONDS),\n endTime: formatDate(datePickerValue.value?.endDate, DateFormat.HOUR_MINUTE_SECONDS),\n });\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return `${textInputDisplayValue.startDate || ''} - ${textInputDisplayValue.endDate || ''}`;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value || (!datePickerValue.value.startDate && !datePickerValue.value.endDate)) {\n return t('selectDateRange') as string;\n }\n\n if (quickSelectRanges.value?.length) {\n const customRangeSelected = quickSelectRanges.value.find(\n ({ data }) =>\n isEqual(data?.startDate, datePickerValue.value?.startDate) &&\n isEqual(data?.endDate, datePickerValue.value?.endDate)\n );\n if (customRangeSelected) {\n return customRangeSelected.label;\n }\n }\n\n const { startDate, endDate } = textInputDisplayValue;\n return `${formatDate(parseDateTextToStartOfDay(startDate), DateFormat.FULL_DATE_MONTH_FIRST)} - ${formatDate(\n parseDateTextToStartOfDay(endDate),\n DateFormat.FULL_DATE_MONTH_FIRST\n )}`;\n });\n\n const formatTextInputDisplayValue = () => '';\n\n return {\n // Values\n dateDisplayValue,\n textInputDisplayValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","export { CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n CalendarRangeDateValue as BentoDateRangePickerValue,\n CalendarGranularityConfig as BentoDateRangePickerGranularityConfig,\n} from '@/internal';\n\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"closeDateRangePicker\" class=\"b-date-range-picker\">\n <!-- Label -->\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div @keydown.enter=\"onEnterPressedOverInput\">\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDateRangePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :is-invalid=\"!!errorMessage || shouldDisplayError\"\n :open=\"isDateRangePickerOpen\"\n :display-value=\"displayedDateValue\"\n :readonly=\"isReadOnly\"\n @open=\"openDateRangePicker\"\n @clear=\"clearDateRangePickerValue\"\n @close=\"closeDateRangePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"shouldDisplayError\"\n :id=\"dateErrorId\"\n :error-message=\"t('provideDateInAFormat')\"\n class=\"b-date-range-picker__error-message\"\n />\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-range-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n :id=\"descriptionId\"\n class=\"b-date-range-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-range-picker__container\"\n :open=\"isDateRangePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n position=\"bottom-start\"\n without-space\n fit-content\n >\n <date-range-picker-calendar\n :allow-time-input=\"allowTimeInput\"\n :quick-select-ranges=\"quickSelectRanges\"\n :value=\"value\"\n :first-day-of-week=\"firstDayOfWeek\"\n :granularities=\"granularities\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :min=\"min\"\n :max=\"max\"\n :number-of-months=\"numberOfMonths\"\n :show-end-date-on-open=\"showEndDateOnOpen\"\n :date-form-data=\"displayedTextInputValue\"\n @custom-range=\"onRangeSelectorInput\"\n @input=\"onDateRangePickerInput\"\n @error=\"onDateRangePickerError\"\n @form-date=\"onDateRangePickerFormDateInputUpdate\"\n >\n <template v-if=\"hasActions\" #actions>\n <bento-divider />\n\n <div class=\"b-date-range-picker__footer\">\n <bento-button-actions\n :actions=\"rangePickerButtonActions\"\n :layout=\"BentoButtonActionsLayout.SPACE_BETWEEN\"\n />\n </div>\n </template>\n </date-range-picker-calendar>\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, toRaw, toRef, watch } from 'vue';\n\n // Components\n import { BentoButtonActions, BentoButtonActionsLayout } from '@/components/button';\n import { BentoDivider } from '@/components/divider';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { DateRangePickerCalendar } from './components/date-range-picker-calendar';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import format from 'date-fns/format';\n\n // Composables\n import { useDateRangePickerCalendarText } from './composables/use-date-range-picker-calendar-text';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n // Directives\n import { BentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { BentoDateRangePickerEvent, BentoDateRangePickerValue } from './date-range-picker.types';\n import { DateFormat } from '@/types';\n import {\n DateRangePickerCalendarFormData,\n DateRangePickerCalendarRangeSelectorItems,\n } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\n import { deprecate } from '@/utils/ts/deprecate';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Date range picker selector.\n *\n * @example\n * import { BentoDateRangePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateRangePicker },\n * template: `\n * <bento-date-range-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-range-picker',\n components: {\n BentoButtonActions,\n BentoDivider,\n BentoTypography,\n BentoPopover,\n DateRangePickerCalendar,\n DropdownInputDefault,\n ErrorMessage,\n FieldLabel,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: DateRangePickerCalendar.props.firstDayOfWeek,\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities: DateRangePickerCalendar.props.granularities,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: DateRangePickerCalendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n */\n showEndDateOnOpen: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\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 * Enables the range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: DateRangePickerCalendar.props.maxRange,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: DateRangePickerCalendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: DateRangePickerCalendar.props.max,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: DateRangePickerCalendar.props.numberOfMonths,\n\n /**\n * Selected date\n */\n value: DateRangePickerCalendar.props.value,\n\n /**\n * Enables the date picker selection to persist until it is explicitly applied.\n * Displays a set of buttons: Apply and Cancel.\n *\n * @deprecated This will be the default behaviour in v2.0.0.\n */\n hasActions: { type: Boolean, default: false },\n },\n emits: [BentoDateRangePickerEvent.INPUT],\n setup(props, { emit }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = getDateLocale();\n const datePickerContainerId = generateUid('bento-date-range-picker-container');\n const labelId = generateUid('bento-date-range-picker-label');\n const descriptionId = generateUid('bento-date-range-picker-description');\n const errorId = generateUid('bento-date-range-picker-error');\n const dateErrorId = generateUid('bento-date-range-picker-date-error');\n const popoverAriaLabel = computed(\n () => props.label || t('dateRangePicker', { name: datePickerContainerId })\n );\n\n const isDateIncorrect = ref(false);\n const inputContainerRef = ref(null);\n const isDateRangePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n () => {\n // Close date picker popover if it's opened when it's disabled\n if (props.disabled && isDateRangePickerOpen.value) {\n isDateRangePickerOpen.value = false;\n }\n }\n );\n\n const shouldDisplayError = computed(() => {\n if (props.hasActions) {\n return !isApplyDisabled.value && isDateIncorrect.value;\n }\n\n return isDateIncorrect.value;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-range-picker__description--error': !!props.errorMessage || shouldDisplayError.value,\n }));\n\n const { dateDisplayValue, textInputDisplayValue, formatTextInputDisplayValue } =\n useDateRangePickerCalendarText({\n datePickerValue: toRef(props, 'value'),\n isDateIncorrect,\n quickSelectRanges: toRef(props, 'quickSelectRanges'),\n });\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n isDateIncorrect.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const closeDateRangePicker = () => {\n isDateRangePickerOpen.value = false;\n };\n\n const openDateRangePicker = () => {\n isDateRangePickerOpen.value = true;\n formatTextInputDisplayValue();\n };\n\n /*\n * Used when `hasActions` is set to true\n */\n const localDateDisplayValue = ref(dateDisplayValue.value);\n const localTextInputDisplayValue = ref<DateRangePickerCalendarFormData>(\n // textInputDisplayValue is a reactive object\n structuredClone(toRaw(textInputDisplayValue))\n );\n const selectedDate = ref<BentoDateRangePickerValue>(props.value);\n const isApplyDisabled = ref(true);\n\n const displayedTextInputValue = computed(() =>\n props.hasActions ? localTextInputDisplayValue.value : textInputDisplayValue\n );\n\n const displayedDateValue = computed(() =>\n props.hasActions ? localDateDisplayValue.value : dateDisplayValue.value\n );\n\n onMounted(() => {\n if (!props.hasActions) {\n deprecate(\n 'BentoDateRangePicker \"hasActions\" property',\n `Set the BentoDateRangePicker \"hasActions\" property true which will display the \"Apply\" and \"Cancel\" buttons.\n This will be the default behavior in the v2 and \"hasActions\" will be removed.`,\n '2.0.0'\n );\n }\n });\n\n const rangePickerButtonActions = computed(() => [\n {\n title: t('apply'),\n event: () => {\n localDateDisplayValue.value = dateDisplayValue.value;\n localTextInputDisplayValue.value = structuredClone(toRaw(textInputDisplayValue));\n\n emit(BentoDateRangePickerEvent.INPUT, selectedDate.value);\n closeDateRangePicker();\n\n isApplyDisabled.value = true;\n },\n disabled: isApplyDisabled.value,\n },\n {\n title: t('cancel'),\n event: closeDateRangePicker,\n },\n ]);\n\n watch(selectedDate, date => {\n // skip emit until Apply button is clicked\n if (props.hasActions) {\n isApplyDisabled.value = isDateIncorrect.value;\n\n return;\n }\n\n emit(BentoDateRangePickerEvent.INPUT, date);\n });\n\n const onDateRangePickerInput = (selectedRange: BentoDateRangePickerValue) => {\n // Reset the errors when the date is correct\n isDateIncorrect.value = false;\n\n const formatDate = (date: Date, dateFormat: DateFormat) =>\n date\n ? format(date, dateFormat, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n })\n : undefined;\n\n textInputDisplayValue.startDate = formatDate(\n selectedRange.startDate,\n DateFormat.NUMERIC_DATE_YEAR_FIRST\n );\n textInputDisplayValue.endDate = formatDate(selectedRange.endDate, DateFormat.NUMERIC_DATE_YEAR_FIRST);\n textInputDisplayValue.startTime = formatDate(selectedRange.startDate, DateFormat.HOUR_MINUTE_SECONDS);\n textInputDisplayValue.endTime = formatDate(selectedRange.endDate, DateFormat.HOUR_MINUTE_SECONDS);\n\n selectedDate.value = selectedRange;\n };\n\n const clearDateRangePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n }\n\n selectedDate.value = null;\n };\n\n const onEnterPressedOverInput = () => {\n // Close the date picker if the date is correct\n if (!isDateIncorrect.value) {\n isDateRangePickerOpen.value = false;\n }\n };\n\n const onDateRangePickerFormDateInputUpdate = (dateFormDate: DateRangePickerCalendarFormData) => {\n isDateIncorrect.value = false;\n\n if (dateFormDate.startTime) {\n textInputDisplayValue.startTime = dateFormDate.startTime;\n }\n\n if (dateFormDate.endTime) {\n textInputDisplayValue.endTime = dateFormDate.endTime;\n }\n };\n\n const onDateRangePickerError = dateTextInput => {\n isDateIncorrect.value = true;\n textInputDisplayValue.startDate = dateTextInput.startDate;\n textInputDisplayValue.endDate = dateTextInput.endDate;\n\n // Remove current date range selection\n selectedDate.value = { startDate: null, endDate: null };\n };\n\n const onRangeSelectorInput = (quickSelectRanges?: BentoDateRangePickerValue) => {\n if (quickSelectRanges) {\n const formatDate = (date: Date) =>\n format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n });\n textInputDisplayValue.startDate = formatDate(quickSelectRanges.startDate);\n textInputDisplayValue.endDate = formatDate(quickSelectRanges.endDate);\n\n selectedDate.value = quickSelectRanges;\n }\n };\n\n return {\n // Refs\n inputContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n displayedTextInputValue,\n displayedDateValue,\n isDateIncorrect,\n isDateRangePickerOpen,\n isReadOnly,\n labelId,\n descriptionId,\n dateErrorId,\n errorId,\n popoverAriaLabel,\n shouldDisplayError,\n ariaDescribedBy,\n textInputDisplayValue,\n rangePickerButtonActions,\n BentoButtonActionsLayout,\n\n // Events\n closeDateRangePicker,\n clearDateRangePickerValue,\n openDateRangePicker,\n onRangeSelectorInput,\n onEnterPressedOverInput,\n onDateRangePickerInput,\n onDateRangePickerError,\n onDateRangePickerFormDateInputUpdate,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker.scss\" />\n"],"names":["isEqual","dirtyLeftDate","dirtyRightDate","requiredArgs","dateLeft","toDate","dateRight","startOfSecond","dirtyDate","date","isSameSecond","dirtyDateLeft","dirtyDateRight","dateLeftStartOfSecond","dateRightStartOfSecond","setHours","dirtyHours","hours","toInteger","setMinutes","dirtyMinutes","minutes","setSeconds","dirtySeconds","seconds","parseDateTextToStartOfDay","dateText","startOfDay","year","month","day","s","useGranularMinMaxDate","firstDayOfWeek","minimumDate","maximumDate","granularity","min","max","endOfDay","startOfMin","startOfWeek","isSameDay","addDays","endOfWeek","endOfMax","subDays","startOfMonth","addMonths","endOfMonth","subMonths","useGranularityMemory","savedRanges","reactive","type","range","DateRangePickerCalendarEvent","DateRangePickerCalendarEvent2","validDigitRegex","hourRegex","minuteRegex","validateTimeInput","event","selectionStart","isValidKey","isValidColon","formatTimeInputValue","value","formattedValue","secondToLastDigit","lastDigit","FORM_INPUT_DEBOUNCE_TIME","RANGE_SELECTOR_CUSTOM_RANGE_KEY","DEFAULT_GRANULARITY","_sfc_main$1","defineComponent","messages$1","BentoDropdown","BentoInputField","BentoSegmentedControl","BentoTypography","Calendar","props","emit","slots","locale","t","useI18n","locales","getDateLocale","internalRangeDate","_a","_b","_c","selectedRangeSelectorValue","computed","data","formInputWrapperConditionalClasses","quickSelectRangeDefaultItems","selectedGranularity","granularityItems","disabled","getGranularCalendarLimits","computedMinMax","adjustDateForMonthly","adjustDateForWeekly","adjustStartDateInputForWeekly","adjustEndDateInputForWeekly","adjustStartDateInputForMonthly","adjustEndDateInputForMonthly","useGranularityAdjustments","saveRange","resetSavedRanges","formatDate","dateToFormat","format","DateFormat","formatTime","startDateError","ref","endDateError","startTimeError","endTimeError","dateTextInput","isValidTime","timeText","setTimeInDate","time","dateWithTime","onDateInput","selectedRange","isValidDate","isDateEnabled","onMounted","onStartDateSelected","newStartDate","onEndDateSelected","newEndDate","getDate","keyName","dateProp","validateStartDate","debounce","startDateText","startDate","endDate","onStartDateInput","formatDateInputValue","validateEndDate","endDateText","onEndDateInput","onDateInputKeyDown","validateDateInput","validateStartTime","startTimeText","validateEndTime","endTimeText","onStartTimeInput","onEndTimeInput","onTimeInputKeyDown","setInternalRange","onRangeSelectorInput","newCustomRangeValue","foundResult","onGranularityInput","previousValue","toRaw","useHasSlot","useDateRangePickerCalendarText","datePickerValue","isDateIncorrect","quickSelectRanges","dateFormat","textInputDisplayValue","_d","customRangeSelected","BentoDateRangePickerEvent","BentoDateRangePickerEvent2","_sfc_main","messages","BentoButtonActions","BentoDivider","BentoPopover","DateRangePickerCalendar","DropdownInputDefault","ErrorMessage","FieldLabel","BentoClickOutsideDirective","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","inputContainerRef","isDateRangePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","shouldDisplayError","isApplyDisabled","descriptionConditionalClasses","dateDisplayValue","ariaDescribedBy","closeDateRangePicker","openDateRangePicker","localDateDisplayValue","localTextInputDisplayValue","selectedDate","displayedTextInputValue","displayedDateValue","deprecate","rangePickerButtonActions","BentoButtonActionsLayout","dateFormDate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4Be,SAAAA,GAAAC,GAAAC,GAAA;AACf,EAAAC,EAAA,GAAA,SAAA;AACA,MAAAC,IAAAC,EAAAJ,CAAA,GACAK,IAAAD,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A;AAAA,MA+BA,yBArEA,MAAA;AAEA,QAAAD,EAAA,UACA0B,EAAA,QAAA;AAAA,MACA;AAAA,MAkEA,wBApGA,CAAAlE,MAAA;AAEA,QAAAwC,EAAA,QAAA;AAEA,cAAAzD,IAAA,CAAAxG,GAAAmK,OAAAnK,IAAA0G,EAAA1G,GAAAmK,IAAA;AAAA,UAEA,QAAApF,EAAAH,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAG,EAAA;AAAA,QACA,CAAA,IAAA;AAIA,QAAAqF,EAAA,YAAA5D;AAAA,UAAAiB,EAAA;AAAA,UACAd,EAAA;AAAA,QACA,GAEAyD,EAAA,UAAA5D,EAAAiB,EAAA,SAAAd,EAAA,uBAAA,GACAyD,EAAA,YAAA5D,EAAAiB,EAAA,WAAAd,EAAA,mBAAA,GACAyD,EAAA,UAAA5D,EAAAiB,EAAA,SAAAd,EAAA,mBAAA,GAEA8F,EAAA,QAAAhF;AAAA,MAAA;AAAA,MAkFA,wBApDA,CAAAP,MAAA;AACA,QAAA+C,EAAA,QAAA,IACAG,EAAA,YAAAlD,EAAA,WACAkD,EAAA,UAAAlD,EAAA,SAGAuF,EAAA,QAAA,EAAA,WAAA,MAAA,SAAA,KAAA;AAAA,MAAA;AAAA,MA+CA,sCAjEA,CAAAM,MAAA;AACA,QAAA9C,EAAA,QAAA,IAEA8C,EAAA,cACA3C,EAAA,YAAA2C,EAAA,YAGAA,EAAA,YACA3C,EAAA,UAAA2C,EAAA;AAAA,MACA;AAAA;AAAA,MAyDA,GAAAlI;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5]}
@@ -0,0 +1,35 @@
1
+ import { defineComponent as o, inject as l, ref as _, computed as a } from "vue";
2
+ import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
3
+ import "../assets/divider.css";
4
+ const d = Symbol("divider inverse style injection key");
5
+ var i = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(i || {});
6
+ const v = {}, p = /* @__PURE__ */ o({
7
+ ...v,
8
+ __name: "divider",
9
+ props: {
10
+ variant: { default: i.HORIZONTAL }
11
+ },
12
+ setup(e) {
13
+ const s = e, r = l(d, _(!1)), t = a(() => s.variant === i.VERTICAL), n = a(() => ({
14
+ "b-divider--inverse": r.value
15
+ }));
16
+ return { __sfc: !0, props: s, isInverseColorSet: r, isVerticalVariant: t, conditionalClasses: n };
17
+ }
18
+ });
19
+ var u = function() {
20
+ var s = this, r = s._self._c, t = s._self._setupProxy;
21
+ return r("div", { staticClass: "b-divider" }, [t.isVerticalVariant ? r("div", { staticClass: "b-divider__rule b-divider__rule--vertical", class: t.conditionalClasses, attrs: { role: "separator", "aria-orientation": "vertical" } }) : r("hr", { staticClass: "b-divider__rule b-divider__rule--horizontal", class: t.conditionalClasses })]);
22
+ }, f = [], m = /* @__PURE__ */ c(
23
+ p,
24
+ u,
25
+ f,
26
+ !1,
27
+ null,
28
+ "3b663a0b"
29
+ );
30
+ const b = m.exports;
31
+ export {
32
+ b as B,
33
+ d as D
34
+ };
35
+ //# sourceMappingURL=divider.Cc4JFWG_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.Cc4JFWG_.js","sources":["../../src/components/divider/divider.keys.ts","../../src/components/divider/divider.types.ts","../../src/components/divider/divider.vue"],"sourcesContent":["export const DIVIDER_INVERSE_INJECTION_KEY = Symbol('divider inverse style injection key');\n","/**\n * Private types\n */\nexport enum BentoDividerVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\n/**\n * Public types\n */\nexport interface BentoDividerProps {\n /**\n * Renders the divider in a horizontal or vertical variant\n */\n variant?: `${BentoDividerVariant}`;\n}\n","<template>\n <div class=\"b-divider\">\n <div\n v-if=\"isVerticalVariant\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n class=\"b-divider__rule b-divider__rule--vertical\"\n :class=\"conditionalClasses\"\n ></div>\n <hr v-else class=\"b-divider__rule b-divider__rule--horizontal\" :class=\"conditionalClasses\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue';\n import { DIVIDER_INVERSE_INJECTION_KEY } from './divider.keys';\n import { BentoDividerProps, BentoDividerVariant } from './divider.types';\n\n const props = defineProps({\n variant: { default: BentoDividerVariant.HORIZONTAL }\n});\n\n const isInverseColorSet = inject(DIVIDER_INVERSE_INJECTION_KEY, ref(false));\n\n const isVerticalVariant = computed(() => props.variant === BentoDividerVariant.VERTICAL);\n\n const conditionalClasses = computed(() => ({\n 'b-divider--inverse': isInverseColorSet.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Divider component is a thin line that helps separate content and group them visually into sections.\n *\n * @example\n * import { BentoDivider } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDivider },\n * template: `<bento-divider />`\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./divider.scss\" />\n"],"names":["DIVIDER_INVERSE_INJECTION_KEY","BentoDividerVariant","BentoDividerVariant2","__default__","isInverseColorSet","inject","ref","isVerticalVariant","computed","props","conditionalClasses"],"mappings":";;;AAAa,MAAAA,IAAA,OAAA,qCAAA;ACGD,IAAAC,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACyCR,MAAAE,IAAA,CAAA;;;;;;;iBAtBAC,IAAAC,EAAAL,GAAAM,EAAA,EAAA,CAAA,GAEAC,IAAAC,EAAA,MAAAC,EAAA,YAAAR,EAAA,QAAA,GAEAS,IAAAF,EAAA,OAAA;AAAA,MAA2C,sBAAAJ,EAAA;AAAA,IACC,EAAA;;;;;;;;;;;;;;;;"}
@@ -15,11 +15,11 @@ const j = {
15
15
  "en-US": {
16
16
  clearSearch: "Clear search"
17
17
  },
18
- "pt-BR": {
19
- clearSearch: "Limpar busca"
20
- },
21
18
  "ja-JP": {
22
19
  clearSearch: "検索をクリア"
20
+ },
21
+ "pt-BR": {
22
+ clearSearch: "Limpar busca"
23
23
  }
24
24
  }, H = m({
25
25
  i18n: { messages: j },
@@ -345,4 +345,4 @@ export {
345
345
  s as b,
346
346
  X as c
347
347
  };
348
- //# sourceMappingURL=dropdown-default-textbox.DBoSso4J.js.map
348
+ //# sourceMappingURL=dropdown-default-textbox.CC9Z_RFG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-default-textbox.DBoSso4J.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <slot v-if=\"shouldShowSingleSelectSlot\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowInput","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCuEAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAA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ACoB,CAAA3C,EAAA,IAAA,GAAA+C;AAAA,MACD,CAAA/C,EAAA,KAAA,GAAAiD;AAAA,MACC,CAAAjD,EAAA,KAAA,GAAAkD;AAAA,MACA,CAAAlD,EAAA,OAAA,GAAA6C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-default-textbox.CC9Z_RFG.js","sources":["../../src/components/dropdown/dropdown.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.ts","../../src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue","../../src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue"],"sourcesContent":["/**\n * @deprecated Do not use. Only 'default' size should be used.\n */\nexport enum BentoDropdownSize {\n DEFAULT = 'DropdownInputDefault',\n SMALL = 'DropdownInputSmall',\n}\n\nexport {\n /**\n * @deprecated since version 2.0. Use the string literal instead.\n */\n BentoListboxLazyLoadType as BentoDropdownLazyLoadType,\n BentoListboxEvent as BentoDropdownEvent,\n} from '@/types';\n\nexport type { BentoListboxSearchOptions as BentoDropdownSearchOptions } from '@/types';\nexport type { BentoListboxEmptyStateProps as BentoDropdownEmptyStateProps } from '@/types';\nexport type { BentoListboxVirtulisationOptions as BentoDropdownVirtulisationOptions } from '@/types';\n","import { PropType } from 'vue';\nimport { Booleanish } from '@/types';\n\n// TODO: Change this to script setup + Typescript interface\nexport const DropdownBaseTextboxProps = {\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n};\n\nexport enum DropdownBaseTextboxState {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n HAS_ITEMS = 'has-items',\n OPENED = 'opened',\n ERROR = 'error',\n}\n\nexport enum DropdownBaseTextboxEvent {\n OPEN = 'dropdown-base-open',\n KEYDOWN = 'dropdown-base-keydown',\n CLOSE = 'dropdown-base-close',\n INPUT = 'dropdown-base-input',\n CLEAR = 'dropdown-base-clear',\n}\n\nexport default DropdownBaseTextboxProps;\n","<template>\n <div\n :class=\"$attrs.class\"\n data-testid=\"textbox-wrapper\"\n @click=\"onToggleDropdown\"\n @keydown.escape=\"onCloseDropdown\"\n >\n <bento-typography\n class=\"b-dropdown-base-textbox\"\n :class=\"conditionalClasses\"\n el=\"div\"\n data-testid=\"base-textbox\"\n >\n <input\n v-if=\"shouldShowInput\"\n v-bind=\"ariaAttributes\"\n :id=\"textboxId\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n role=\"combobox\"\n type=\"text\"\n aria-autocomplete=\"list\"\n size=\"1\"\n :value=\"open ? value : displayValue\"\n :disabled=\"disabled ? true : null\"\n :readonly=\"readonly\"\n @keydown=\"$emit(DropdownBaseTextboxEvent.KEYDOWN, $event)\"\n @keydown.enter=\"onToggleDropdown\"\n @input=\"onInputEvent\"\n />\n <div\n v-else\n :id=\"textboxId\"\n v-bind=\"ariaAttributes\"\n ref=\"textbox\"\n class=\"b-dropdown-base-textbox__input\"\n :class=\"comboboxConditionalClasses\"\n role=\"combobox\"\n :tabindex=\"0\"\n >\n <slot v-if=\"shouldShowSingleSelectSlot\" v-bind=\"selectedValueItem\">\n {{ displayValue }}\n </slot>\n <template v-else-if=\"shouldShowMultipleSlot\">\n <div class=\"b-dropdown-base-textbox__input-multiple-selected\">\n <div v-for=\"singleItem of selectedValueItems\" :key=\"singleItem.value\">\n <div class=\"b-dropdown-base-textbox__input-selected-element\">\n <slot v-bind=\"singleItem\">\n {{ displayValue }}\n </slot>\n </div>\n </div>\n </div>\n </template>\n <template v-else>{{ displayValue }}</template>\n </div>\n <span v-if=\"additionalItemsSelected\" class=\"b-dropdown-base-textbox__additional-items\">\n {{ additionalItemsSelected }}\n </span>\n <span v-if=\"hasSlot('icon') && !isFiltering\" class=\"b-dropdown-base-textbox__icon\" aria-hidden=\"true\">\n <slot name=\"icon\"></slot>\n </span>\n <span\n v-if=\"isFiltering\"\n class=\"b-dropdown-base-textbox__clear-search\"\n tabindex=\"0\"\n data-testid=\"clear-search-button\"\n @click.stop=\"onClearSearch\"\n @keydown.enter.stop=\"onClearSearch\"\n @keyup.space=\"onClearSearch\"\n >\n <cross-circle-fill-small-icon v-if=\"size === BentoDropdownSize.SMALL\" :svg-title=\"t('clearSearch')\" />\n <cross-circle-fill-icon v-else :svg-title=\"t('clearSearch')\" />\n </span>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { BentoTypography } from '@/components/typography';\n import { debounce } from '@/utils/ts/debounce';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { DropdownBaseTextboxEvent, DropdownBaseTextboxState } from './dropdown-base-textbox.types';\n import CrossCircleFillIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n import { BentoDropdownSize } from '@/components/dropdown/dropdown.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * If the combobox DOM element should be an `input` element.\n */\n alwaysComboboxIsInput: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: { type: String, required: true },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: { type: String, default: null },\n\n /**\n * Custom debounce time for the user type event.\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox.\n */\n dynamicFiltering: { type: Boolean, default: false },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * Dropdown size\n */\n size: {\n type: String as PropType<BentoDropdownSize | `${BentoDropdownSize}`>,\n default: null,\n },\n });\n\n const emit = defineEmits([]);\n\n const textbox = ref(null);\n const textboxId = generateUid('textbox');\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-base-textbox--${DropdownBaseTextboxState.HAS_ITEMS}`]: !!props.additionalItemsSelected,\n }));\n\n const comboboxConditionalClasses = computed(() => ({\n [`b-dropdown-base-textbox__input--dynamic-filtering`]: props.dynamicFiltering,\n }));\n\n const isFiltering = computed(() => props.dynamicFiltering && !!props.value && props.open);\n\n const ariaAttributes = computed(\n () =>\n ({\n 'aria-haspopup': 'listbox',\n 'aria-controls': props.ariaControls,\n 'aria-describedby': attrs['aria-describedby']?.toString() as string,\n 'aria-expanded': props.ariaExpanded ? 'true' : 'false',\n 'aria-labelledby': props.ariaLabelledby,\n 'aria-label': props.ariaLabelledby ? null : props.ariaLabel,\n 'aria-invalid': props.isInvalid,\n 'aria-disabled': props.disabled ? true : null,\n } as HTMLAttributes)\n );\n // Cast selectedValueItem if it is an array of selected items\n const selectedValueItems = computed(() =>\n props.multiple ? (props.selectedValueItem as BentoListboxOptionItem[]) : []\n );\n\n const shouldShowInput = computed(() => props.dynamicFiltering && (props.open || props.alwaysComboboxIsInput));\n const shouldShowSingleSelectSlot = computed(() => props.selectedValueItem && !props.multiple);\n const shouldShowMultipleSlot = computed(\n () =>\n props.multiple &&\n props.selectedValueItem &&\n selectedValueItems.value.length > 0 &&\n props.showSlotContentInMultiple\n );\n\n watch(\n () => shouldShowInput.value,\n () => {\n if (shouldShowInput.value && !props.alwaysComboboxIsInput) {\n nextTick(() => {\n textbox.value.focus();\n });\n }\n }\n );\n\n const onOpenDropdown = () => {\n if (!props.disabled && !props.readonly) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.OPEN);\n }\n };\n\n const onCloseDropdown = () => {\n if (props.open) {\n textbox.value.focus();\n emit(DropdownBaseTextboxEvent.CLOSE);\n }\n };\n\n const onToggleDropdown = (event: Event) => {\n const isDynamicFilteringInputClickEvent = props.open && (event.target as HTMLDivElement).tagName === 'INPUT';\n if (isDynamicFilteringInputClickEvent) {\n /**\n * When there's a click even on the input during filtering\n * and the popover is open, do not toggle the popover.\n * Allow for click events inside the input field\n */\n return null;\n }\n\n return props.open ? onCloseDropdown() : onOpenDropdown();\n };\n\n const onClearSearch = () => {\n emit(DropdownBaseTextboxEvent.CLEAR);\n emit(DropdownBaseTextboxEvent.INPUT, '');\n textbox.value.focus();\n };\n const onInputEvent = debounce<(event: Event) => void>((event: Event) => {\n if (!props.readonly && !props.disabled) {\n emit(DropdownBaseTextboxEvent.INPUT, (event.target as HTMLInputElement).value);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }, props.debounceTime);\n\n const focus = () => {\n textbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Only for internal use, implements the logic of the textbox element to be implemented in the combobox.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'dropdown-base-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-base-textbox.scss\" />\n","<template>\n <div class=\"b-dropdown-default-textbox\" :class=\"conditionalClasses\" data-testid=\"default-textbox\">\n <dropdown-base-textbox\n ref=\"baseTextbox\"\n v-bind=\"{ ...$attrs, ...$props }\"\n class=\"b-dropdown-default-textbox__textbox\"\n :value=\"value\"\n v-on=\"listeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n <template #icon>\n <div class=\"b-dropdown-default-textbox__chevron\">\n <chevron-up-icon v-show=\"isDropdownOpen\" svg-title=\"opened\" />\n <chevron-down-icon v-show=\"!isDropdownOpen\" svg-title=\"closed\" />\n </div>\n </template>\n </dropdown-base-textbox>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, defineComponent, PropType, ref, useSlots } from 'vue';\n import DropdownBaseTextbox from '@/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue';\n import { BentoListboxOptionItem, Booleanish } from '@/types';\n import { stopEventPropagation } from '@/utils/ts/events';\n import {\n DropdownBaseTextboxEvent,\n DropdownBaseTextboxState,\n } from '../dropdown-base-textbox/dropdown-base-textbox.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n const emit = defineEmits([\"clear\", \"close\", \"input\", \"keydown\", \"open\"]);\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * The number of additional items that have been selected in the dropdown.\n */\n additionalItemsSelected: { type: [Number, String] as PropType<number | string>, default: 0 },\n\n /**\n * Sets the aria-controls attribute on the textbox. This should correspond to the popover's id that the textbox triggers.\n */\n ariaControls: {\n type: String,\n required: true,\n },\n\n /**\n * Indicates whether the content the textbox triggers is visible or not. Needs to be set accordingly when the textbox is used and changed every time the popover is shown/hidden.\n */\n ariaExpanded: {\n type: [String, Boolean] as PropType<Booleanish>,\n required: true,\n },\n\n /**\n * If no label element is used then the aria-label is be set should be set.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Corresponds to the label's id that labels the textbox element.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Renders the dropdown with a condensed style.\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime: { type: Number, default: 300 },\n\n /**\n * Disables any textbox functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Selected option's label\n */\n displayValue: { type: String, default: null },\n\n /**\n * Sets the possibility to type into the textbox\n */\n dynamicFiltering: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Marks the textbox as invalid, rendering an error state\n */\n isInvalid: { type: Boolean, default: false },\n\n /**\n * Indicates if the dropdown is open so that\n * the respective event can be emitted\n */\n open: { type: Boolean, default: false },\n\n /**\n * Sets the dropdown to readonly state\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * The selected value's list box item.\n */\n selectedValueItem: {\n type: [Object, Array] as PropType<BentoListboxOptionItem | BentoListboxOptionItem[]>,\n default: undefined,\n },\n\n /**\n * Toggles whether to use the slot content select items shown in the textbox in multiple mode.\n */\n showSlotContentInMultiple: { type: Boolean, default: false },\n\n /**\n * The input value\n */\n value: { type: String, default: '' },\n\n /*\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n });\n\n const baseTextbox = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.ERROR}`]:\n !props.disabled && !props.readonly && props.isInvalid,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.DISABLED}`]: props.disabled,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.READONLY}`]: props.readonly,\n [`b-dropdown-default-textbox--${DropdownBaseTextboxState.OPENED}`]: props.open,\n 'b-dropdown-default-textbox--condensed': props.condensed,\n }));\n\n const isDropdownOpen = computed(() => props.open && !props.disabled && !props.readonly);\n\n const onInput = (newInput: string) => {\n emit('input', newInput);\n };\n const onKeyDown = (e: KeyboardEvent) => {\n emit('keydown', e);\n };\n const openDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('open');\n };\n const closeDropdown = (e: Event) => {\n stopEventPropagation(e);\n emit('close');\n };\n const clearValue = (e: Event) => {\n stopEventPropagation(e);\n emit('clear');\n };\n\n const listeners = {\n [DropdownBaseTextboxEvent.INPUT]: onInput,\n [DropdownBaseTextboxEvent.OPEN]: openDropdown,\n [DropdownBaseTextboxEvent.CLOSE]: closeDropdown,\n [DropdownBaseTextboxEvent.CLEAR]: clearValue,\n [DropdownBaseTextboxEvent.KEYDOWN]: onKeyDown,\n };\n\n const focus = () => {\n baseTextbox.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * For internal use only, textbox component used in the dropdown component.\n */\n export default defineComponent({\n name: 'dropdown-default-textbox',\n inheritAttrs: false,\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-default-textbox.scss\" />\n"],"names":["BentoDropdownSize","BentoDropdownSize2","DropdownBaseTextboxState","DropdownBaseTextboxState2","DropdownBaseTextboxEvent","DropdownBaseTextboxEvent2","__default__$1","defineComponent","messages","t","useI18n","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","textbox","ref","textboxId","generateUid","conditionalClasses","computed","props","comboboxConditionalClasses","isFiltering","ariaAttributes","_a","selectedValueItems","shouldShowInput","shouldShowSingleSelectSlot","shouldShowMultipleSlot","watch","nextTick","onOpenDropdown","emit","onCloseDropdown","onToggleDropdown","event","onClearSearch","onInputEvent","debounce","focus","expose","__default__","baseTextbox","isDropdownOpen","onInput","newInput","onKeyDown","e","openDropdown","stopEventPropagation","closeDropdown","clearValue","listeners"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,wBACAA,EAAA,QAAA,sBAFQA,IAAAD,KAAA,CAAA,CAAA,GCuEAE,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SALQA,IAAA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A;AAAA,MAAkB,CAAAnD,EAAA,KAAA,GAAA2C;AAAA,MACoB,CAAA3C,EAAA,IAAA,GAAA+C;AAAA,MACD,CAAA/C,EAAA,KAAA,GAAAiD;AAAA,MACC,CAAAjD,EAAA,KAAA,GAAAkD;AAAA,MACA,CAAAlD,EAAA,OAAA,GAAA6C;AAAA,IACE,GAGxCP,IAAA,MAAA;AACI,MAAAG,EAAA,MAAA,MAAA;AAAA,IAAwB;AAG5B,WAAAF,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as a, computed as i, toRefs as m } from "vue";
2
2
  import { B as v } from "./avatar.BgwjpLQO.js";
3
- import { B as p } from "./dropdown.BqsoncJr.js";
3
+ import { B as p } from "./dropdown.hc9ZuuTt.js";
4
4
  import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import { d as y, B as b } from "./typography.J1v_SPG3.js";
6
- import { u as w } from "./use-country-items.DPBbl1KK.js";
7
- import { B as d } from "./country.types.pilf5B3F.js";
6
+ import { u as w } from "./use-country-items.eWARMT6I.js";
7
+ import { B as d } from "./country.types.CLjbulKL.js";
8
8
  import { L as f } from "./listbox-option-tag.Co0ycEdQ.js";
9
9
  import { B as $ } from "./payment-method.UaERFtej.js";
10
10
  import "../assets/dropdown-tag.css";
@@ -212,4 +212,4 @@ export {
212
212
  nt as d,
213
213
  st as e
214
214
  };
215
- //# sourceMappingURL=dropdown-tag.XIlES6IT.js.map
215
+ //# sourceMappingURL=dropdown-tag.CiCDvGyN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-tag.XIlES6IT.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option.\n * * @property {string,number} value.value - Value of the option.\n * * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('Ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'Ideal' },\n * { label: 'Option 2', value: 'Visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @input=\"onInput\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n * * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;AAkEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;sBCQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCsCAkB,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAmB,IAAAhB,EAAA,MAAA;;AAAA,cAAAiB,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,IAAA,CAAA,EAAA,OAAAd,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-tag.CiCDvGyN.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option.\n * * @property {string,number} value.value - Value of the option.\n * * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('Ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'Ideal' },\n * { label: 'Option 2', value: 'Visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @input=\"onInput\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n * * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;AAkEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,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