@adyen/bento-vue2 1.57.0 → 1.58.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 (181) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +191 -52
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid-template.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-range-picker.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/filter-bar.css +1 -1
  14. package/dist/assets/input-field-password.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/menu.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/pagination.css +1 -1
  19. package/dist/assets/popover.css +1 -1
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/button.js +1 -1
  22. package/dist/card.js +1 -1
  23. package/dist/checkbox.js +2 -2
  24. package/dist/chunks/{action-bar.nUvnRVwP.js → action-bar.CErJh_wJ.js} +4 -4
  25. package/dist/chunks/{action-bar.nUvnRVwP.js.map → action-bar.CErJh_wJ.js.map} +1 -1
  26. package/dist/chunks/{base-modal.DdznUtgC.js → base-modal.D4x_tmYO.js} +2 -2
  27. package/dist/chunks/{base-modal.DdznUtgC.js.map → base-modal.D4x_tmYO.js.map} +1 -1
  28. package/dist/chunks/{button-actions-with-menu.CDLJMdJh.js → button-actions-with-menu.BHmj0Xvn.js} +4 -4
  29. package/dist/chunks/{button-actions-with-menu.CDLJMdJh.js.map → button-actions-with-menu.BHmj0Xvn.js.map} +1 -1
  30. package/dist/chunks/{button-actions.DUn_iPDm.js → button-actions.V0te_IrY.js} +2 -2
  31. package/dist/chunks/{button-actions.DUn_iPDm.js.map → button-actions.V0te_IrY.js.map} +1 -1
  32. package/dist/chunks/calendar.C7onA58P.js +1166 -0
  33. package/dist/chunks/calendar.C7onA58P.js.map +1 -0
  34. package/dist/chunks/{card.BYUqSnBy.js → card.CC4BEw-7.js} +2 -2
  35. package/dist/chunks/{card.BYUqSnBy.js.map → card.CC4BEw-7.js.map} +1 -1
  36. package/dist/chunks/{checkbox-group.HhNN-r-o.js → checkbox-group.Bev3ogYa.js} +4 -4
  37. package/dist/chunks/{checkbox-group.HhNN-r-o.js.map → checkbox-group.Bev3ogYa.js.map} +1 -1
  38. package/dist/chunks/{checkbox.CkaV8-b-.js → checkbox.DCIphKqu.js} +3 -3
  39. package/dist/chunks/{checkbox.CkaV8-b-.js.map → checkbox.DCIphKqu.js.map} +1 -1
  40. package/dist/chunks/{code-snippet.B1_T5Y4d.js → code-snippet.BjtPvt9m.js} +5 -5
  41. package/dist/chunks/{code-snippet.B1_T5Y4d.js.map → code-snippet.BjtPvt9m.js.map} +1 -1
  42. package/dist/chunks/{controls-group.CG5RvOSi.js → controls-group.CtpaKQIg.js} +2 -2
  43. package/dist/chunks/{controls-group.CG5RvOSi.js.map → controls-group.CtpaKQIg.js.map} +1 -1
  44. package/dist/chunks/{copy.MTsLLiC0.js → copy.BggvtZCO.js} +2 -2
  45. package/dist/chunks/{copy.MTsLLiC0.js.map → copy.BggvtZCO.js.map} +1 -1
  46. package/dist/chunks/{dashboard-section.DYk4LVm8.js → dashboard-section.D9LPEZ88.js} +2 -2
  47. package/dist/chunks/{dashboard-section.DYk4LVm8.js.map → dashboard-section.D9LPEZ88.js.map} +1 -1
  48. package/dist/chunks/{dashed-underline.lDp966e8.js → dashed-underline.DGRnOVkG.js} +3 -3
  49. package/dist/chunks/{dashed-underline.lDp966e8.js.map → dashed-underline.DGRnOVkG.js.map} +1 -1
  50. package/dist/chunks/{data-grid-template.Dcnw2_Du.js → data-grid-template.CwqfhYua.js} +2 -2
  51. package/dist/chunks/{data-grid-template.Dcnw2_Du.js.map → data-grid-template.CwqfhYua.js.map} +1 -1
  52. package/dist/chunks/{data-grid.BNgBYl3r.js → data-grid.Dl3xh62_.js} +1163 -1098
  53. package/dist/chunks/data-grid.Dl3xh62_.js.map +1 -0
  54. package/dist/chunks/{date-picker.S8ABQaHP.js → date-picker.DgF85qSC.js} +15 -15
  55. package/dist/chunks/{date-picker.S8ABQaHP.js.map → date-picker.DgF85qSC.js.map} +1 -1
  56. package/dist/chunks/date-range-picker.CAQY6v7g.js +967 -0
  57. package/dist/chunks/date-range-picker.CAQY6v7g.js.map +1 -0
  58. package/dist/chunks/{dropdown-tag.BiJvxp5n.js → dropdown-tag.Cn6lz_lG.js} +3 -3
  59. package/dist/chunks/{dropdown-tag.BiJvxp5n.js.map → dropdown-tag.Cn6lz_lG.js.map} +1 -1
  60. package/dist/chunks/{dropdown.Qc6K5BzU.js → dropdown.C01pOog2.js} +18 -18
  61. package/dist/chunks/{dropdown.Qc6K5BzU.js.map → dropdown.C01pOog2.js.map} +1 -1
  62. package/dist/chunks/{error-message.JskAm-Td.js → error-message.dQtl9mYG.js} +2 -2
  63. package/dist/chunks/{error-message.JskAm-Td.js.map → error-message.dQtl9mYG.js.map} +1 -1
  64. package/dist/chunks/{es6.BtaxuP0b.js → es6.BA9GH7QZ.js} +2 -2
  65. package/dist/chunks/{es6.BtaxuP0b.js.map → es6.BA9GH7QZ.js.map} +1 -1
  66. package/dist/chunks/{file-uploader.DhOTdtfm.js → file-uploader.D81zRKpY.js} +3 -3
  67. package/dist/chunks/{file-uploader.DhOTdtfm.js.map → file-uploader.D81zRKpY.js.map} +1 -1
  68. package/dist/chunks/{filter-bar.BFAsFxQo.js → filter-bar.CcsUi7Xg.js} +603 -575
  69. package/dist/chunks/filter-bar.CcsUi7Xg.js.map +1 -0
  70. package/dist/chunks/{footer-actions.CWOEDPKJ.js → footer-actions.Cn-793_Z.js} +2 -2
  71. package/dist/chunks/{footer-actions.CWOEDPKJ.js.map → footer-actions.Cn-793_Z.js.map} +1 -1
  72. package/dist/chunks/{header-with-views.CO2aEwi4.js → header-with-views.BTd57MWZ.js} +10 -10
  73. package/dist/chunks/{header-with-views.CO2aEwi4.js.map → header-with-views.BTd57MWZ.js.map} +1 -1
  74. package/dist/chunks/{header.byOrhnHk.js → header.Rr0lnNYz.js} +4 -4
  75. package/dist/chunks/{header.byOrhnHk.js.map → header.Rr0lnNYz.js.map} +1 -1
  76. package/dist/chunks/{info-icon-with-popover.Cfng_pMj.js → info-icon-with-popover.B9QgNl-S.js} +2 -2
  77. package/dist/chunks/{info-icon-with-popover.Cfng_pMj.js.map → info-icon-with-popover.B9QgNl-S.js.map} +1 -1
  78. package/dist/chunks/{info-icon.DgCYoVE3.js → info-icon.BL55W9hd.js} +2 -2
  79. package/dist/chunks/{info-icon.DgCYoVE3.js.map → info-icon.BL55W9hd.js.map} +1 -1
  80. package/dist/chunks/input-field-password.DMcXkdVE.js +251 -0
  81. package/dist/chunks/input-field-password.DMcXkdVE.js.map +1 -0
  82. package/dist/chunks/{input-field-phone-number.Bg9XyY_1.js → input-field-phone-number.Cfy_o9aE.js} +3 -3
  83. package/dist/chunks/{input-field-phone-number.Bg9XyY_1.js.map → input-field-phone-number.Cfy_o9aE.js.map} +1 -1
  84. package/dist/chunks/{input-field.DgUkNPXo.js → input-field.CP8Qui6G.js} +3 -3
  85. package/dist/chunks/{input-field.DgUkNPXo.js.map → input-field.CP8Qui6G.js.map} +1 -1
  86. package/dist/chunks/{listbox-option-tag.CBGk4m-_.js → listbox-option-tag.DDmqT1rs.js} +2 -2
  87. package/dist/chunks/{listbox-option-tag.CBGk4m-_.js.map → listbox-option-tag.DDmqT1rs.js.map} +1 -1
  88. package/dist/chunks/{menu.DZEDTBYV.js → menu.Dkesc658.js} +2 -2
  89. package/dist/chunks/{menu.DZEDTBYV.js.map → menu.Dkesc658.js.map} +1 -1
  90. package/dist/chunks/{modal-fullscreen.DRQ4V5tT.js → modal-fullscreen.D1pHbGYd.js} +2 -2
  91. package/dist/chunks/{modal-fullscreen.DRQ4V5tT.js.map → modal-fullscreen.D1pHbGYd.js.map} +1 -1
  92. package/dist/chunks/{modal.DDF63uBR.js → modal.bgya0ObK.js} +4 -4
  93. package/dist/chunks/{modal.DDF63uBR.js.map → modal.bgya0ObK.js.map} +1 -1
  94. package/dist/chunks/{pagination.1PxOrSA9.js → pagination.CaHPf-Ye.js} +82 -73
  95. package/dist/chunks/{pagination.1PxOrSA9.js.map → pagination.CaHPf-Ye.js.map} +1 -1
  96. package/dist/chunks/{popover.DXo3nXew.js → popover.CuOrBXcF.js} +2 -2
  97. package/dist/chunks/{popover.DXo3nXew.js.map → popover.CuOrBXcF.js.map} +1 -1
  98. package/dist/chunks/{radio-group.DtCgLBuL.js → radio-group.9jAj6AKb.js} +4 -4
  99. package/dist/chunks/{radio-group.DtCgLBuL.js.map → radio-group.9jAj6AKb.js.map} +1 -1
  100. package/dist/chunks/rich-text-editor.Ch-ETIRi.js +6203 -0
  101. package/dist/chunks/rich-text-editor.Ch-ETIRi.js.map +1 -0
  102. package/dist/chunks/{search-bar.-Lpxv9sU.js → search-bar.Cs60bUZc.js} +3 -3
  103. package/dist/chunks/{search-bar.-Lpxv9sU.js.map → search-bar.Cs60bUZc.js.map} +1 -1
  104. package/dist/chunks/{secondary-nav.DvTPsW8x.js → secondary-nav.i_Bb4wQF.js} +3 -3
  105. package/dist/chunks/{secondary-nav.DvTPsW8x.js.map → secondary-nav.i_Bb4wQF.js.map} +1 -1
  106. package/dist/chunks/{segmented-control.BQlmGv2x.js → segmented-control.BffWAGrf.js} +2 -2
  107. package/dist/chunks/{segmented-control.BQlmGv2x.js.map → segmented-control.BffWAGrf.js.map} +1 -1
  108. package/dist/chunks/{selection-card-group.BniN7KWU.js → selection-card-group.DTz7k_M7.js} +4 -4
  109. package/dist/chunks/{selection-card-group.BniN7KWU.js.map → selection-card-group.DTz7k_M7.js.map} +1 -1
  110. package/dist/chunks/{sidepanel.DfQaLZEA.js → sidepanel.DuTesKDW.js} +2 -2
  111. package/dist/chunks/{sidepanel.DfQaLZEA.js.map → sidepanel.DuTesKDW.js.map} +1 -1
  112. package/dist/chunks/{structured-list-item.xaedKywV.js → structured-list-item.-vyqAp4Y.js} +4 -4
  113. package/dist/chunks/{structured-list-item.xaedKywV.js.map → structured-list-item.-vyqAp4Y.js.map} +1 -1
  114. package/dist/chunks/{summary-grid.types.CNEeGgWh.js → summary-grid.types.fm_VmUVA.js} +5 -5
  115. package/dist/chunks/{summary-grid.types.CNEeGgWh.js.map → summary-grid.types.fm_VmUVA.js.map} +1 -1
  116. package/dist/chunks/{tag.C7kJJ5Ki.js → tag.DczYlfXd.js} +2 -2
  117. package/dist/chunks/{tag.C7kJJ5Ki.js.map → tag.DczYlfXd.js.map} +1 -1
  118. package/dist/chunks/{textarea.CdA36VsY.js → textarea.B7BgCn_l.js} +2 -2
  119. package/dist/chunks/{textarea.CdA36VsY.js.map → textarea.B7BgCn_l.js.map} +1 -1
  120. package/dist/chunks/{timeline-item.D87PFH_o.js → timeline-item.DdF6EN2w.js} +5 -5
  121. package/dist/chunks/{timeline-item.D87PFH_o.js.map → timeline-item.DdF6EN2w.js.map} +1 -1
  122. package/dist/chunks/{tooltip.8KbMqaXP.js → tooltip.Bm5S2goP.js} +65 -65
  123. package/dist/chunks/{tooltip.8KbMqaXP.js.map → tooltip.Bm5S2goP.js.map} +1 -1
  124. package/dist/chunks/{tutorial.D74hJVBb.js → tutorial.DIYd-V8c.js} +4 -4
  125. package/dist/chunks/{tutorial.D74hJVBb.js.map → tutorial.DIYd-V8c.js.map} +1 -1
  126. package/dist/chunks/{use-cached-selected-values.CSVs_E5A.js → use-cached-selected-values.BrkzIuaE.js} +3 -3
  127. package/dist/chunks/{use-cached-selected-values.CSVs_E5A.js.map → use-cached-selected-values.BrkzIuaE.js.map} +1 -1
  128. package/dist/code-snippet.js +1 -1
  129. package/dist/dashboard-template.js +1 -1
  130. package/dist/dashed-underline.js +1 -1
  131. package/dist/data-grid-template.js +1 -1
  132. package/dist/data-grid.js +1 -1
  133. package/dist/date-picker.js +2 -2
  134. package/dist/date-range-picker.js +2 -2
  135. package/dist/dropdown.js +3 -3
  136. package/dist/file-uploader.js +1 -1
  137. package/dist/filter-bar.js +1 -1
  138. package/dist/header-with-views.js +1 -1
  139. package/dist/header.js +1 -1
  140. package/dist/index.js +148 -146
  141. package/dist/index.js.map +1 -1
  142. package/dist/info-icon.js +1 -1
  143. package/dist/input-field-password.js +1 -1
  144. package/dist/input-field-phone-number.js +1 -1
  145. package/dist/input-field.js +1 -1
  146. package/dist/internal.js +10 -10
  147. package/dist/menu.js +1 -1
  148. package/dist/modal-fullscreen.js +1 -1
  149. package/dist/modal.js +2 -2
  150. package/dist/pagination.js +1 -1
  151. package/dist/popover.js +1 -1
  152. package/dist/radio-group.js +1 -1
  153. package/dist/rich-text-editor.js +2 -6200
  154. package/dist/rich-text-editor.js.map +1 -1
  155. package/dist/search-bar.js +2 -2
  156. package/dist/secondary-nav.js +1 -1
  157. package/dist/segmented-control.js +1 -1
  158. package/dist/selection-card.js +1 -1
  159. package/dist/sidepanel.js +1 -1
  160. package/dist/structured-list.js +1 -1
  161. package/dist/styles/bento-dark.css +15 -15
  162. package/dist/styles/bento-light.css +95 -95
  163. package/dist/styles/bento.css +95 -95
  164. package/dist/styles/legacy.css +96 -96
  165. package/dist/styles/styleguide.css +96 -96
  166. package/dist/styles/utility.css +64 -64
  167. package/dist/summary-grid.js +1 -1
  168. package/dist/tag.js +1 -1
  169. package/dist/textarea.js +1 -1
  170. package/dist/timeline.js +1 -1
  171. package/dist/tutorial.js +1 -1
  172. package/dist/web-types.json +53 -7
  173. package/package.json +5 -5
  174. package/dist/chunks/calendar.C0iatn5N.js +0 -1127
  175. package/dist/chunks/calendar.C0iatn5N.js.map +0 -1
  176. package/dist/chunks/data-grid.BNgBYl3r.js.map +0 -1
  177. package/dist/chunks/date-range-picker.CQNhNKK-.js +0 -906
  178. package/dist/chunks/date-range-picker.CQNhNKK-.js.map +0 -1
  179. package/dist/chunks/filter-bar.BFAsFxQo.js.map +0 -1
  180. package/dist/chunks/input-field-password.D6PVCLoF.js +0 -233
  181. package/dist/chunks/input-field-password.D6PVCLoF.js.map +0 -1
@@ -4,12 +4,12 @@ import { u as C } from "./use-has-slot.C9lQZ6nz.js";
4
4
  import { B as E, a as O, c as M } from "./typography.J1v_SPG3.js";
5
5
  import { u as P } from "./i18n.BQkEbtPM.js";
6
6
  import { r as m, t as d, l as B, a as T, g as A } from "./get-date-locale.BN8xEjY0.js";
7
- import { B as U } from "./button-actions-with-menu.CDLJMdJh.js";
7
+ import { B as U } from "./button-actions-with-menu.BHmj0Xvn.js";
8
8
  import { c as X } from "./index.DD7TppDb.js";
9
9
  import { d as w } from "./index.BDuTpjD8.js";
10
10
  import { c as R } from "./index.BxBB1rsx.js";
11
- import { I as p } from "./info-icon-with-popover.Cfng_pMj.js";
12
- import { d as H } from "./button-actions.DUn_iPDm.js";
11
+ import { I as p } from "./info-icon-with-popover.B9QgNl-S.js";
12
+ import { d as H } from "./button-actions.V0te_IrY.js";
13
13
  import { n as L } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
14
14
  import "../assets/header.css";
15
15
  function G(e, t) {
@@ -180,4 +180,4 @@ const pt = Z.exports;
180
180
  export {
181
181
  pt as B
182
182
  };
183
- //# sourceMappingURL=header.byOrhnHk.js.map
183
+ //# sourceMappingURL=header.Rr0lnNYz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.byOrhnHk.js","sources":["../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInSeconds/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/formatDistance/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/formatDistanceToNow/index.js","../../src/components/header/header.types.ts","../../src/components/header/header.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\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 later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\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 later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\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 * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import distanceInWords from \"../formatDistance/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\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 * - The function was renamed from `distanceInWordsToNow ` to `formatDistanceToNow`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n * ```\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistanceToNow(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return distanceInWords(dirtyDate, Date.now(), dirtyOptions);\n}","import { BentoLoadingButtonState } from '@/core/components/loading-button/loading-button.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoHeaderVariant {\n PAGE = 'page',\n COMPONENT = 'component',\n}\n\nexport interface BentoHeaderReloadButton {\n title: string;\n event?: (event: Event) => void;\n state?: `${BentoLoadingButtonState}`;\n}\n","<template>\n <header class=\"b-header\" :class=\"conditionalClasses\">\n <div class=\"b-header__wrapper\">\n <div class=\"b-header__title\">\n <div>\n <bento-typography v-bind=\"typography\" class=\"b-header__text\">{{ title }}</bento-typography>\n <info-icon-with-popover\n v-if=\"infoIconTooltipText || hasSlot('infoIconTooltipContent')\"\n class=\"b-header__tooltip\"\n :popover-text=\"infoIconTooltipText\"\n >\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #default\n ><slot name=\"infoIconTooltipContent\"\n /></template>\n </info-icon-with-popover>\n </div>\n <div v-if=\"lastUpdated\" class=\"b-header__timestamp-section\">\n <bento-typography class=\"b-header__timestamp\" el=\"div\">\n {{ timestamp }}\n </bento-typography>\n <bento-loading-button\n v-if=\"reloadButton\"\n variant=\"tertiary\"\n :state=\"reloadButton.state\"\n @click=\"reloadButton.event\"\n ><template #iconLeft><reload-icon aria-hidden=\"true\" /></template\n >{{ reloadButton.title }}</bento-loading-button\n >\n </div>\n </div>\n <button-actions-with-menu\n v-if=\"actions\"\n :actions=\"actions\"\n :displayed-actions=\"2\"\n class=\"b-header__actions\"\n />\n </div>\n </header>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ReloadIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import { InfoIconWithPopover } from '@/internal';\n import { BentoButtonActionsList, BentoLoadingButton } from '@/components/button';\n import { useHasSlot } from '@/composables';\n import { BentoHeaderReloadButton, BentoHeaderVariant } from './header.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import ButtonActionsWithMenu from '../internal/button-actions-with-menu/button-actions-with-menu.vue';\n\n import formatDistanceToNow from 'date-fns/formatDistanceToNow';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-header',\n components: {\n BentoTypography,\n ButtonActionsWithMenu,\n BentoLoadingButton,\n InfoIconWithPopover,\n ReloadIcon,\n },\n props: {\n /**\n * Array of BentoButtonActionsList to show to the right of the title\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: InfoIconWithPopover.props.popoverText.type, default: null },\n\n /**\n * Popover position of the info icon text.\n */\n infoIconPopoverPosition: {\n type: InfoIconWithPopover.props.popoverPosition.type,\n default: InfoIconWithPopover.props.popoverPosition.default,\n validator: InfoIconWithPopover.props.popoverPosition.validator,\n },\n\n /**\n * JavaScript \"Date\" object for when the content was last updated\n */\n lastUpdated: { type: [Date, Number], default: null },\n\n /**\n * Variant represents type of Header\n * @values page, component\n */\n variant: {\n type: String as PropType<BentoHeaderVariant | `${BentoHeaderVariant}`>,\n default: BentoHeaderVariant.PAGE,\n validator: (value: BentoHeaderVariant) => Object.values(BentoHeaderVariant).includes(value),\n },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * Reload button which shows next to the header's timestamp\n * {@see BentoHeaderReloadButton}\n */\n reloadButton: {\n type: Object as PropType<BentoHeaderReloadButton>,\n default: null,\n },\n },\n emits: ['reload'],\n setup(props, { slots }) {\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n // TODO to replace with dynamic import\n const locales = getDateLocale();\n\n const conditionalClasses = computed(() => ({\n 'b-header--component': props.variant === BentoHeaderVariant.COMPONENT,\n }));\n\n const typography = computed(() => ({\n el: props.variant === BentoHeaderVariant.PAGE ? BentoTypographyElement.H1 : BentoTypographyElement.H2,\n variant: BentoTypographyVariant.TITLE,\n medium: props.variant === BentoHeaderVariant.COMPONENT,\n large: props.variant === BentoHeaderVariant.PAGE,\n }));\n\n const timestamp = computed(() =>\n props.lastUpdated\n ? t('lastUpdated', {\n date: formatDistanceToNow(props.lastUpdated, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n }),\n })\n : null\n );\n return {\n hasSlot: useHasSlot(slots),\n conditionalClasses,\n timestamp,\n typography,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./header.scss\" />\n"],"names":["differenceInMilliseconds","dateLeft","dateRight","requiredArgs","toDate","roundingMap","value","defaultRoundingMethod","getRoundingMethod","method","differenceInSeconds","options","diff","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","formatDistance","dirtyDate","dirtyBaseDate","locale$1","locale","comparison","compareAsc","localizeOptions","cloneObject","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","hours","days","differenceInMonths","nearestMonth","monthsSinceStartOfYear","years","formatDistanceToNow","dirtyOptions","BentoHeaderVariant","BentoHeaderVariant2","_sfc_main","defineComponent","messages","BentoTypography","ButtonActionsWithMenu","BentoLoadingButton","InfoIconWithPopover","RefreshIcon","props","slots","t","useI18n","locales","getDateLocale","conditionalClasses","computed","typography","BentoTypographyElement","BentoTypographyVariant","timestamp","useHasSlot"],"mappings":";;;;;;;;;;;;;;AA6Be,SAAAA,EAAAC,GAAAC,GAAA;AACf,SAAAC,EAAA,GAAA,SAAA,GACAC,EAAAH,CAAA,EAAA,QAAA,IAAAG,EAAAF,CAAA,EAAA,QAAA;AACA;AChCA,IAAAG,IAAA;AAAA,EACA,MAAA,KAAA;AAAA,EACA,OAAA,KAAA;AAAA,EACA,OAAA,KAAA;AAAA,EACA,OAAA,SAAAC,GAAA;AACA,WAAAA,IAAA,IAAA,KAAA,KAAAA,CAAA,IAAA,KAAA,MAAAA,CAAA;AAAA,EACA;AAAA;AAEA,GACAC,IAAA;AACO,SAAAC,EAAAC,GAAA;AACP,SAAAJ,EAAAE,CAAA;AACA;ACoBe,SAAAG,EAAAT,GAAAC,GAAAS,GAAA;AACf,EAAAR,EAAA,GAAA,SAAA;AACA,MAAAS,IAAAZ,EAAAC,GAAAC,CAAA,IAAA;AACA,SAAAM,EAAA,EAAAI,CAAA;AACA;AC5BA,IAAAC,IAAA,MACAC,IAAA,MACAC,IAAA,OACAC,IAAA;AA8Ge,SAAAC,EAAAC,GAAAC,GAAA;AACf,MAAAR,IAAA,UAAA,SAAA,KAAA,UAAA,CAAA,MAAA,SAAA,UAAA,CAAA,IAAA,CAAA;AACA,EAAAR,EAAA,GAAA,SAAA;AACA,MAAAiB,IAAAT,EAAA,UAAAU;AAEA,MAAA,CAAAD,EAAA;AACA,UAAA,IAAA,WAAA,6CAAA;AAGA,MAAAE,IAAAC,EAAAL,GAAAC,CAAA;AAEA,MAAA,MAAAG,CAAA;AACA,UAAA,IAAA,WAAA,oBAAA;AAGA,MAAAE,IAAAC,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AAK;AAAA,MACA,YAAAH;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"header.Rr0lnNYz.js","sources":["../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/differenceInSeconds/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/formatDistance/index.js","../../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/formatDistanceToNow/index.js","../../src/components/header/header.types.ts","../../src/components/header/header.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\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 later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\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 later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\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 * - The function was renamed from `distanceInWords ` to `formatDistance`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * - The order of arguments is swapped to make the function\n * consistent with `differenceIn...` functions.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWords(\n * new Date(1986, 3, 4, 10, 32, 0),\n * new Date(1986, 3, 4, 11, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n *\n * // v2.0.0 onward\n *\n * formatDistance(\n * new Date(1986, 3, 4, 11, 32, 0),\n * new Date(1986, 3, 4, 10, 32, 0),\n * { addSuffix: true }\n * ) //=> 'in about 1 hour'\n * ```\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n requiredArgs(2, arguments);\n var locale = options.locale || defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = cloneObject(options);\n localizeOptions.addSuffix = Boolean(options.addSuffix);\n localizeOptions.comparison = comparison;\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', null, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import distanceInWords from \"../formatDistance/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatDistanceToNow\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n * @pure false\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\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 * - The function was renamed from `distanceInWordsToNow ` to `formatDistanceToNow`\n * to make its name consistent with `format` and `formatRelative`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * distanceInWordsToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n *\n * // v2.0.0 onward\n *\n * formatDistanceToNow(new Date(2014, 6, 2), { addSuffix: true })\n * //=> 'in 6 months'\n * ```\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = formatDistanceToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = formatDistanceToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = formatDistanceToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = formatDistanceToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistanceToNow(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n return distanceInWords(dirtyDate, Date.now(), dirtyOptions);\n}","import { BentoLoadingButtonState } from '@/core/components/loading-button/loading-button.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoHeaderVariant {\n PAGE = 'page',\n COMPONENT = 'component',\n}\n\nexport interface BentoHeaderReloadButton {\n title: string;\n event?: (event: Event) => void;\n state?: `${BentoLoadingButtonState}`;\n}\n","<template>\n <header class=\"b-header\" :class=\"conditionalClasses\">\n <div class=\"b-header__wrapper\">\n <div class=\"b-header__title\">\n <div>\n <bento-typography v-bind=\"typography\" class=\"b-header__text\">{{ title }}</bento-typography>\n <info-icon-with-popover\n v-if=\"infoIconTooltipText || hasSlot('infoIconTooltipContent')\"\n class=\"b-header__tooltip\"\n :popover-text=\"infoIconTooltipText\"\n >\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #default\n ><slot name=\"infoIconTooltipContent\"\n /></template>\n </info-icon-with-popover>\n </div>\n <div v-if=\"lastUpdated\" class=\"b-header__timestamp-section\">\n <bento-typography class=\"b-header__timestamp\" el=\"div\">\n {{ timestamp }}\n </bento-typography>\n <bento-loading-button\n v-if=\"reloadButton\"\n variant=\"tertiary\"\n :state=\"reloadButton.state\"\n @click=\"reloadButton.event\"\n ><template #iconLeft><reload-icon aria-hidden=\"true\" /></template\n >{{ reloadButton.title }}</bento-loading-button\n >\n </div>\n </div>\n <button-actions-with-menu\n v-if=\"actions\"\n :actions=\"actions\"\n :displayed-actions=\"2\"\n class=\"b-header__actions\"\n />\n </div>\n </header>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ReloadIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import { InfoIconWithPopover } from '@/internal';\n import { BentoButtonActionsList, BentoLoadingButton } from '@/components/button';\n import { useHasSlot } from '@/composables';\n import { BentoHeaderReloadButton, BentoHeaderVariant } from './header.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import ButtonActionsWithMenu from '../internal/button-actions-with-menu/button-actions-with-menu.vue';\n\n import formatDistanceToNow from 'date-fns/formatDistanceToNow';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-header',\n components: {\n BentoTypography,\n ButtonActionsWithMenu,\n BentoLoadingButton,\n InfoIconWithPopover,\n ReloadIcon,\n },\n props: {\n /**\n * Array of BentoButtonActionsList to show to the right of the title\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text showed in the info-icon tooltip on hover\n */\n infoIconTooltipText: { type: InfoIconWithPopover.props.popoverText.type, default: null },\n\n /**\n * Popover position of the info icon text.\n */\n infoIconPopoverPosition: {\n type: InfoIconWithPopover.props.popoverPosition.type,\n default: InfoIconWithPopover.props.popoverPosition.default,\n validator: InfoIconWithPopover.props.popoverPosition.validator,\n },\n\n /**\n * JavaScript \"Date\" object for when the content was last updated\n */\n lastUpdated: { type: [Date, Number], default: null },\n\n /**\n * Variant represents type of Header\n * @values page, component\n */\n variant: {\n type: String as PropType<BentoHeaderVariant | `${BentoHeaderVariant}`>,\n default: BentoHeaderVariant.PAGE,\n validator: (value: BentoHeaderVariant) => Object.values(BentoHeaderVariant).includes(value),\n },\n\n /**\n * Text used as a title\n */\n title: { type: String, required: true },\n\n /**\n * Reload button which shows next to the header's timestamp\n * {@see BentoHeaderReloadButton}\n */\n reloadButton: {\n type: Object as PropType<BentoHeaderReloadButton>,\n default: null,\n },\n },\n emits: ['reload'],\n setup(props, { slots }) {\n const { t, locale } = useI18n<{ message: MessageSchema }>({ messages });\n // TODO to replace with dynamic import\n const locales = getDateLocale();\n\n const conditionalClasses = computed(() => ({\n 'b-header--component': props.variant === BentoHeaderVariant.COMPONENT,\n }));\n\n const typography = computed(() => ({\n el: props.variant === BentoHeaderVariant.PAGE ? BentoTypographyElement.H1 : BentoTypographyElement.H2,\n variant: BentoTypographyVariant.TITLE,\n medium: props.variant === BentoHeaderVariant.COMPONENT,\n large: props.variant === BentoHeaderVariant.PAGE,\n }));\n\n const timestamp = computed(() =>\n props.lastUpdated\n ? t('lastUpdated', {\n date: formatDistanceToNow(props.lastUpdated, {\n locale: locales[locale.value.substring(0, 2)] || locales.enUS,\n }),\n })\n : null\n );\n return {\n hasSlot: useHasSlot(slots),\n conditionalClasses,\n timestamp,\n typography,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./header.scss\" />\n"],"names":["differenceInMilliseconds","dateLeft","dateRight","requiredArgs","toDate","roundingMap","value","defaultRoundingMethod","getRoundingMethod","method","differenceInSeconds","options","diff","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","formatDistance","dirtyDate","dirtyBaseDate","locale$1","locale","comparison","compareAsc","localizeOptions","cloneObject","seconds","offsetInSeconds","getTimezoneOffsetInMilliseconds","minutes","months","hours","days","differenceInMonths","nearestMonth","monthsSinceStartOfYear","years","formatDistanceToNow","dirtyOptions","BentoHeaderVariant","BentoHeaderVariant2","_sfc_main","defineComponent","messages","BentoTypography","ButtonActionsWithMenu","BentoLoadingButton","InfoIconWithPopover","RefreshIcon","props","slots","t","useI18n","locales","getDateLocale","conditionalClasses","computed","typography","BentoTypographyElement","BentoTypographyVariant","timestamp","useHasSlot"],"mappings":";;;;;;;;;;;;;;AA6Be,SAAAA,EAAAC,GAAAC,GAAA;AACf,SAAAC,EAAA,GAAA,SAAA,GACAC,EAAAH,CAAA,EAAA,QAAA,IAAAG,EAAAF,CAAA,EAAA,QAAA;AACA;AChCA,IAAAG,IAAA;AAAA,EACA,MAAA,KAAA;AAAA,EACA,OAAA,KAAA;AAAA,EACA,OAAA,KAAA;AAAA,EACA,OAAA,SAAAC,GAAA;AACA,WAAAA,IAAA,IAAA,KAAA,KAAAA,CAAA,IAAA,KAAA,MAAAA,CAAA;AAAA,EACA;AAAA;AAEA,GACAC,IAAA;AACO,SAAAC,EAAAC,GAAA;AACP,SAAAJ,EAAAE,CAAA;AACA;ACoBe,SAAAG,EAAAT,GAAAC,GAAAS,GAAA;AACf,EAAAR,EAAA,GAAA,SAAA;AACA,MAAAS,IAAAZ,EAAAC,GAAAC,CAAA,IAAA;AACA,SAAAM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A,KAAAA,EAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,QAAAV,EAAA,YAAAV,EAAA;AAAA,MACA,OAAAU,EAAA,YAAAV,EAAA;AAAA,IACA,EAAA,GAGAqB,IAAAJ;AAAA,MAAA,MAAAP,EAAA,cAAAE,EAAA,eAAA;AAAA,QAEA,MAAAd,EAAAY,EAAA,aAAA;AAAA,UACA,QAAAI,EAAAhC,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAgC,EAAA;AAAA,QACA,CAAA;AAAA,MACA,CAAA,IAAA;AAAA,IAEA;AAEA,WAAA;AAAA,MAAA,SAAAQ,EAAAX,CAAA;AAAA,MACA,oBAAAK;AAAA,MACA,WAAAK;AAAA,MACA,YAAAH;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as l, ref as s } from "vue";
2
- import { B as i } from "./popover.DXo3nXew.js";
2
+ import { B as i } from "./popover.CuOrBXcF.js";
3
3
  import { B as _ } from "./typography.J1v_SPG3.js";
4
4
  import { u as v } from "./i18n.BQkEbtPM.js";
5
5
  import { g as d } from "./generate-uid.NJ8tVoha.js";
@@ -68,4 +68,4 @@ const M = h.exports;
68
68
  export {
69
69
  M as I
70
70
  };
71
- //# sourceMappingURL=info-icon-with-popover.Cfng_pMj.js.map
71
+ //# sourceMappingURL=info-icon-with-popover.B9QgNl-S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"info-icon-with-popover.Cfng_pMj.js","sources":["../../src/components/internal/info-icon-with-popover/info-icon-with-popover.vue"],"sourcesContent":["<template>\n <div\n ref=\"infoIconRef\"\n class=\"b-info-icon-with-popover\"\n tabindex=\"0\"\n data-testid=\"info-icon-with-popover\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <info-icon\n ref=\"targetElement\"\n class=\"b-info-icon-with-popover__svg\"\n :aria-expanded=\"isOpen\"\n :aria-describedby=\"popoverId\"\n :svg-title=\"t('moreInformation')\"\n />\n <bento-popover\n v-if=\"targetElement\"\n :open=\"isOpen\"\n :target-element=\"targetElement\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <bento-typography>\n <slot>\n <div v-if=\"popoverText\">\n {{ popoverText }}\n </div>\n </slot>\n </bento-typography>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n defineProps({\n /**\n * Text showed in the popover on hover\n */\n popoverText: { type: String, default: null },\n\n /**\n * Position the popover should take if space is available\n */\n popoverPosition: {\n type: BentoPopover.props.position.type,\n default: BentoPopover.props.position.default,\n validator: BentoPopover.props.position.validator,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const infoIconRef = ref<HTMLDivElement>();\n const targetElement = ref(null);\n const popoverId = generateUid('bento-info-icon-with-popover');\n const isOpen = ref();\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (\n !infoIconRef.value ||\n !(e?.relatedTarget instanceof Element) ||\n !infoIconRef.value.contains(e.relatedTarget)\n ) {\n closePopover();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used whenever an info icon needs to be rendered with a popover instead of a tooltip.\n *\n * @example\n * import { BentoInfoIconWithPopover } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInfoIconWithPopover },\n * template: `\n * <info-icon-with-popover popover-text=\"Content can be passed as a string like\" :popover-position=\"position\">\n * Content can also be rendered as a slot\n * </info-icon-with-popover>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon-with-popover.scss\" />\n"],"names":["__default__","messages","useI18n","infoIconRef","ref","targetElement","popoverId","generateUid","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","e"],"mappings":";;;;;;;;;;;;;;;;;;GA6HIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;AA5DA,UAAA,EAAA,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAC,EAAA,8BAAA,GACAC,IAAAJ,EAAA,GACAK,IAAAL,EAAA,GAEAM,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAEJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAA,GAAA;AAEnB,MAAAC,EAAA,QAAAG;AAAA,IAAyB;4LAG7B,MAAA;AACI,MAAAF,EAAA;AAAA,IAAY,uBAOhB,CAAAG,MAAA;AACI,OAAA,CAAAV,EAAA,SAAA,GAAAU,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAV,EAAA,MAAA,SAAAU,EAAA,aAAA,MAKIF,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"info-icon-with-popover.B9QgNl-S.js","sources":["../../src/components/internal/info-icon-with-popover/info-icon-with-popover.vue"],"sourcesContent":["<template>\n <div\n ref=\"infoIconRef\"\n class=\"b-info-icon-with-popover\"\n tabindex=\"0\"\n data-testid=\"info-icon-with-popover\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <info-icon\n ref=\"targetElement\"\n class=\"b-info-icon-with-popover__svg\"\n :aria-expanded=\"isOpen\"\n :aria-describedby=\"popoverId\"\n :svg-title=\"t('moreInformation')\"\n />\n <bento-popover\n v-if=\"targetElement\"\n :open=\"isOpen\"\n :target-element=\"targetElement\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <bento-typography>\n <slot>\n <div v-if=\"popoverText\">\n {{ popoverText }}\n </div>\n </slot>\n </bento-typography>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { generateUid } from '@/core/utils/ts';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n defineProps({\n /**\n * Text showed in the popover on hover\n */\n popoverText: { type: String, default: null },\n\n /**\n * Position the popover should take if space is available\n */\n popoverPosition: {\n type: BentoPopover.props.position.type,\n default: BentoPopover.props.position.default,\n validator: BentoPopover.props.position.validator,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const infoIconRef = ref<HTMLDivElement>();\n const targetElement = ref(null);\n const popoverId = generateUid('bento-info-icon-with-popover');\n const isOpen = ref();\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (\n !infoIconRef.value ||\n !(e?.relatedTarget instanceof Element) ||\n !infoIconRef.value.contains(e.relatedTarget)\n ) {\n closePopover();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component to be used whenever an info icon needs to be rendered with a popover instead of a tooltip.\n *\n * @example\n * import { BentoInfoIconWithPopover } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInfoIconWithPopover },\n * template: `\n * <info-icon-with-popover popover-text=\"Content can be passed as a string like\" :popover-position=\"position\">\n * Content can also be rendered as a slot\n * </info-icon-with-popover>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon-with-popover.scss\" />\n"],"names":["__default__","messages","useI18n","infoIconRef","ref","targetElement","popoverId","generateUid","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","e"],"mappings":";;;;;;;;;;;;;;;;;;GA6HIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;AA5DA,UAAA,EAAA,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAC,EAAA,8BAAA,GACAC,IAAAJ,EAAA,GACAK,IAAAL,EAAA,GAEAM,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAEJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAA,GAAA;AAEnB,MAAAC,EAAA,QAAAG;AAAA,IAAyB;4LAG7B,MAAA;AACI,MAAAF,EAAA;AAAA,IAAY,uBAOhB,CAAAG,MAAA;AACI,OAAA,CAAAV,EAAA,SAAA,GAAAU,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAV,EAAA,MAAA,SAAAU,EAAA,aAAA,MAKIF,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as n } from "vue";
2
2
  import { d as i } from "./popper-container.1kHSxyxu.js";
3
3
  import { I as r } from "./info.4d_mJHvT.js";
4
- import { B as s } from "./tooltip.8KbMqaXP.js";
4
+ import { B as s } from "./tooltip.Bm5S2goP.js";
5
5
  import { n as a } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import "../assets/info-icon.css";
7
7
  const p = n({
@@ -38,4 +38,4 @@ const x = m.exports;
38
38
  export {
39
39
  x as B
40
40
  };
41
- //# sourceMappingURL=info-icon.DgCYoVE3.js.map
41
+ //# sourceMappingURL=info-icon.BL55W9hd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"info-icon.DgCYoVE3.js","sources":["../../src/components/info-icon/info-icon.vue"],"sourcesContent":["<template>\n <span v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\" :aria-label=\"tooltipText\" class=\"b-info-icon\">\n <info-icon :svg-title=\"tooltipText\" class=\"b-info-icon__svg\" />\n </span>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n\n /**\n * @example\n * import { BentoInfoIcon } from '@adyen/adl-vue-components';\n *\n * export default {\n * components: { BentoInfoIcon },\n * template: `\n * <bento-info-icon tooltip-text=\"Text on hover\" />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-info-icon',\n components: { InfoIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Text showed in the info-icon tooltip on hover\n */\n tooltipText: { type: String, required: true },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'auto'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition | `${PopperContainerPosition}`>,\n default: PopperContainerPosition.AUTO,\n validator: (value: PopperContainerPosition) => Object.values(PopperContainerPosition).includes(value),\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/info-icon/info-icon.scss\" />\n"],"names":["_sfc_main","defineComponent","InfoIcon","BentoTooltipDirective","PopperContainerPosition","value"],"mappings":";;;;;;AAuBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,UAAAC,EAAA;AAAA,EACA,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MAKA,MAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,OAAAD,CAAA,EAAA,SAAAC,CAAA;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"info-icon.BL55W9hd.js","sources":["../../src/components/info-icon/info-icon.vue"],"sourcesContent":["<template>\n <span v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\" :aria-label=\"tooltipText\" class=\"b-info-icon\">\n <info-icon :svg-title=\"tooltipText\" class=\"b-info-icon__svg\" />\n </span>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n\n /**\n * @example\n * import { BentoInfoIcon } from '@adyen/adl-vue-components';\n *\n * export default {\n * components: { BentoInfoIcon },\n * template: `\n * <bento-info-icon tooltip-text=\"Text on hover\" />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-info-icon',\n components: { InfoIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Text showed in the info-icon tooltip on hover\n */\n tooltipText: { type: String, required: true },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'auto'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition | `${PopperContainerPosition}`>,\n default: PopperContainerPosition.AUTO,\n validator: (value: PopperContainerPosition) => Object.values(PopperContainerPosition).includes(value),\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/info-icon/info-icon.scss\" />\n"],"names":["_sfc_main","defineComponent","InfoIcon","BentoTooltipDirective","PopperContainerPosition","value"],"mappings":";;;;;;AAuBA,MAAAA,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,UAAAC,EAAA;AAAA,EACA,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MAKA,MAAA;AAAA,MACA,SAAAC,EAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,OAAAD,CAAA,EAAA,SAAAC,CAAA;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
@@ -0,0 +1,251 @@
1
+ import { defineComponent as le, useAttrs as ne, ref as n, provide as re, computed as d, watch as U } from "vue";
2
+ import { B as de } from "./button.BuD-IsW5.js";
3
+ import { B as ce } from "./image.C2D2hKat.js";
4
+ import { B as ue } from "./input-field.CP8Qui6G.js";
5
+ import { B as pe } from "./popover.CuOrBXcF.js";
6
+ import { B as ve } from "./typography.J1v_SPG3.js";
7
+ import { C as fe } from "./checkmark-circle-fill.DZBl7CeY.js";
8
+ import { D as me } from "./dot.CnkXzRn3.js";
9
+ import { S as _e, H as he } from "./show.e4LEpZKG.js";
10
+ import { d as ge, w as Ce } from "./index.oJzeCMPe.js";
11
+ import { u as ke } from "./i18n.BQkEbtPM.js";
12
+ import { g as z } from "./generate-uid.NJ8tVoha.js";
13
+ import { b as we } from "./dropdown.C01pOog2.js";
14
+ import { T as Le } from "./tooltip.Bm5S2goP.js";
15
+ import { n as Re } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
16
+ import "../assets/input-field-password.css";
17
+ var k = /* @__PURE__ */ ((s) => (s.TEXT = "text", s.PASSWORD = "password", s))(k || {}), _ = /* @__PURE__ */ ((s) => (s.MIN_LENGTH = "minLength", s.REQUIRE_LOWERCASE = "requireLowercase", s.REQUIRE_NUMERIC = "requireNumeric", s.REQUIRE_SPECIAL_CHARACTER = "requireSpecialCharacter", s.REQUIRE_UPPERCASE = "requireUppercase", s))(_ || {});
18
+ const Ee = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='capslock'%3e%3cg%20id='Union'%3e%3cpath%20d='M13.75%205.63952L8%201.03952L2.25%205.63952V7.74999H4.75V11.75H11.25V7.74999H13.75V5.63952ZM6.25%206.24999H3.88809L8%202.96046L12.1119%206.24999H9.75V10.25H6.25V6.24999Z'%20fill='%2300112C'/%3e%3cpath%20d='M11.25%2014.75V13.25H4.75V14.75H11.25Z'%20fill='%2300112C'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
19
+ function w(s) {
20
+ return (s == null ? void 0 : s.toString()) ?? "";
21
+ }
22
+ function be(s, t = 12) {
23
+ return w(s).length >= t;
24
+ }
25
+ function ye(s) {
26
+ return /[a-z]/.test(w(s));
27
+ }
28
+ function Ie(s) {
29
+ return /[A-Z]/.test(w(s));
30
+ }
31
+ function Te(s) {
32
+ return /\d/.test(w(s));
33
+ }
34
+ function Pe(s) {
35
+ return /[^a-zA-Z0-9]/.test(w(s));
36
+ }
37
+ const Ve = {
38
+ "en-US": {
39
+ capsLockEnabled: "Caps lock on",
40
+ hidePassword: "Hide",
41
+ showPassword: "Show",
42
+ validationChecked: "Checked",
43
+ validationMinLength: "12 characters",
44
+ validationRequireLowercase: "1 lowercase (a-z)",
45
+ validationRequireNumeric: "1 numerical (0-9)",
46
+ validationRequireSpecialCharacter: "1 special character",
47
+ validationRequireUppercase: "1 uppercase (A-Z)",
48
+ validationSuggestion: "Avoid using currency symbols or accented letters.",
49
+ validationTitle: "Password must contain at least:",
50
+ validationUnchecked: "Unchecked",
51
+ validationValid: "Input is valid"
52
+ },
53
+ "ja-JP": {
54
+ capsLockEnabled: "Caps lockオン",
55
+ hidePassword: "非表示",
56
+ showPassword: "表示",
57
+ validationMinLength: "8字",
58
+ validationRequireLowercase: "小文字1字 (a-z)",
59
+ validationRequireNumeric: "数字1字 (0-9)",
60
+ validationRequireSpecialCharacter: "特殊文字1字",
61
+ validationRequireUppercase: "大文字1字 (A-Z)",
62
+ validationSuggestion: "通貨記号やアクセント付き文字は避けてください。",
63
+ validationTitle: "パスワードには少なくとも次のものを含める必要があります :"
64
+ },
65
+ "pt-BR": {
66
+ capsLockEnabled: "Caps lock ativado",
67
+ hidePassword: "Ocultar",
68
+ showPassword: "Exibir",
69
+ validationMinLength: "8 caracteres",
70
+ validationRequireLowercase: "1 minúscula (a-z)",
71
+ validationRequireNumeric: "1 numérico (0-9)",
72
+ validationRequireSpecialCharacter: "1 caractere especial",
73
+ validationRequireUppercase: "1 maiúscula (A-Z)",
74
+ validationSuggestion: "Evite símbolos de moeda ou letras acentuadas.",
75
+ validationTitle: "A senha deve conter pelo menos:"
76
+ }
77
+ }, Se = {
78
+ i18n: { messages: Ve },
79
+ name: "bento-input-field-password"
80
+ }, Ae = /* @__PURE__ */ le({
81
+ ...Se,
82
+ props: {
83
+ condensed: { default: !1 },
84
+ disabled: { default: !1 },
85
+ disableValidation: { type: Boolean, default: !1 },
86
+ errorMessage: { default: null },
87
+ placeholder: { default: "" },
88
+ readonly: { default: !1 },
89
+ value: { default: void 0 },
90
+ label: { default: null },
91
+ validation: { default: void 0 },
92
+ withHint: { type: Boolean, default: !0 }
93
+ },
94
+ emits: ["input:valid", "input:error", "input"],
95
+ setup(s, { emit: t }) {
96
+ const a = s, e = 500, L = 2e3, v = 2e3, { t: c } = ke(), M = ne(), h = n(k.PASSWORD), u = n(a.value), q = n(!1), b = n(!1), R = n([]), y = n({}), p = n(null), f = n(!1), B = n(null), H = n(null), X = n(null), I = n(!1);
97
+ re(we, "bento-input-field-password");
98
+ const { focused: N } = ge(B), G = z("validationListId"), O = z("validationPopoverId"), x = d(() => h.value === k.TEXT), F = d(() => {
99
+ const i = b.value && P.value, o = a.disableValidation && a.errorMessage;
100
+ return i || o ? a.errorMessage : "";
101
+ }), J = d(
102
+ () => R.value.map(
103
+ (i) => i ? "b-input-field-password__validation-list--valid" : "b-input-field-password__validation-list--invalid"
104
+ )
105
+ ), K = d(
106
+ () => p.value ? "b-input-field-password__input-tooltip--timed" : ""
107
+ ), Y = d(() => ({
108
+ ariaHidden: !1,
109
+ condensed: a.condensed,
110
+ disabled: a.disabled,
111
+ errorMessage: F.value,
112
+ placeholder: a.placeholder,
113
+ readonly: a.readonly,
114
+ type: h.value,
115
+ value: u.value,
116
+ "aria-haspopup": V.value ? "dialog" : !1,
117
+ "aria-describedby": V.value ? O : "",
118
+ ...M
119
+ })), T = d(() => {
120
+ var m, g, l, C, E, W;
121
+ if (a.validation && !a.validation.extendDefaultValidation)
122
+ return a.validation;
123
+ const i = [
124
+ {
125
+ label: c("validationMinLength"),
126
+ key: _.MIN_LENGTH,
127
+ validate: be
128
+ },
129
+ {
130
+ label: c("validationRequireLowercase"),
131
+ key: _.REQUIRE_LOWERCASE,
132
+ validate: ye
133
+ },
134
+ {
135
+ label: c("validationRequireUppercase"),
136
+ key: _.REQUIRE_UPPERCASE,
137
+ validate: Ie
138
+ },
139
+ {
140
+ label: c("validationRequireNumeric"),
141
+ key: _.REQUIRE_NUMERIC,
142
+ validate: Te
143
+ },
144
+ {
145
+ label: c("validationRequireSpecialCharacter"),
146
+ key: _.REQUIRE_SPECIAL_CHARACTER,
147
+ validate: Pe
148
+ }
149
+ ];
150
+ let o = i;
151
+ if (a.validation) {
152
+ const ie = i.map((r) => r.key), A = (g = (m = a.validation) == null ? void 0 : m.list) == null ? void 0 : g.map((r) => r.key), se = ((C = (l = a.validation) == null ? void 0 : l.list) == null ? void 0 : C.filter((r) => !ie.includes(r.key))) ?? [];
153
+ o = [...i.map((r) => {
154
+ var Q, Z;
155
+ return A != null && A.includes(r.key) ? (Z = (Q = a.validation) == null ? void 0 : Q.list) == null ? void 0 : Z.find((oe) => oe.key === r.key) : r;
156
+ }), ...se];
157
+ }
158
+ return {
159
+ title: ((E = a.validation) == null ? void 0 : E.title) ?? c("validationTitle"),
160
+ suggestion: ((W = a.validation) == null ? void 0 : W.suggestion) ?? c("validationSuggestion"),
161
+ list: o
162
+ };
163
+ }), D = d(() => {
164
+ var i, o;
165
+ return (o = (i = T.value) == null ? void 0 : i.list) == null ? void 0 : o.filter((m) => !m.disabled);
166
+ }), P = d(() => {
167
+ var i;
168
+ return (i = R.value) == null ? void 0 : i.some((o) => !o);
169
+ }), V = d(
170
+ () => {
171
+ var i, o;
172
+ return H.value && ((o = (i = T.value) == null ? void 0 : i.list) == null ? void 0 : o.length) > 0;
173
+ }
174
+ ), $ = (i) => {
175
+ typeof i.getModifierState == "function" && (I.value = i.getModifierState("CapsLock"));
176
+ }, j = () => {
177
+ x.value ? h.value = k.PASSWORD : h.value = k.TEXT;
178
+ }, ee = (i) => {
179
+ a.disabled || (u.value = i, t("input", u.value));
180
+ }, S = (i) => {
181
+ var g;
182
+ const o = (g = D.value) == null ? void 0 : g.map((l) => ({
183
+ key: l.key,
184
+ label: l.label,
185
+ isValid: l.validate(i, ...l.additionalArgs ?? [])
186
+ }));
187
+ let m = 1;
188
+ R.value = o == null ? void 0 : o.map((l) => l.isValid), y.value = o == null ? void 0 : o.filter((l) => !l.isValid).reduce((l, C) => {
189
+ const E = C.key ?? `custom-rule-${m++}`;
190
+ return {
191
+ ...l,
192
+ [E]: C.label
193
+ };
194
+ }, {});
195
+ }, ae = () => {
196
+ f.value = !1, p.value = null;
197
+ }, te = () => {
198
+ f.value = !0;
199
+ };
200
+ return U(
201
+ () => a.value,
202
+ (i) => {
203
+ u.value = i;
204
+ }
205
+ ), U(N, (i) => {
206
+ i || (b.value = !0), a.disableValidation || (a.withHint && (q.value = i), S(u.value));
207
+ }), U(I, (i) => {
208
+ i ? (f.value = !0, p.value = setTimeout(() => {
209
+ p.value = null, f.value = !1;
210
+ }, v)) : (clearTimeout(p.value), p.value = null, f.value = !1);
211
+ }), Ce(
212
+ u,
213
+ (i) => {
214
+ S(i), P.value ? t("input:error", y.value) : t("input:valid");
215
+ },
216
+ // wait for 0.5s before checking validity OR 2s of continuous typing
217
+ { debounce: e, maxWait: L }
218
+ ), { __sfc: !0, DEBOUNCE_DURATION: e, DEBOUNCE_MAX_WAIT: L, TOOLTIP_TIMEOUT: v, t: c, props: a, emit: t, attrs: M, inputType: h, inputValue: u, isHintDisplayed: q, isTouched: b, passwordValidity: R, errorsList: y, capsLockTooltipTimeoutID: p, isTooltipDisplayed: f, inputFieldPasswordRef: B, inputFieldPasswordInputRef: H, inputFieldPasswordCapsLockIconRef: X, isCapsLockOn: I, focused: N, validationListId: G, validationPopoverId: O, isPasswordReadable: x, computedErrorMessage: F, passwordValidityConditionalClass: J, tooltipConditionalClass: K, inputFieldArgs: Y, computedValidations: T, computedValidationList: D, hasErrors: P, hasValidations: V, checkCapsLock: $, toggleInputType: j, onInput: ee, checkValidity: S, handleCapsLockMouseLeave: ae, handleCapsLockMouseEnter: te, BentoButton: de, BentoImage: ce, BentoInputField: ue, BentoPopover: pe, BentoTypography: ve, Tooltip: Le, CheckmarkCircleFillIcon: fe, DotIcon: me, HideIcon: he, ShowIcon: _e, CapsLockIcon: Ee };
219
+ }
220
+ });
221
+ var Ue = function() {
222
+ var t = this, a = t._self._c, e = t._self._setupProxy;
223
+ return a("div", { ref: "inputFieldPasswordRef" }, [a(e.BentoInputField, t._b({ ref: "inputFieldPasswordInputRef", staticClass: "b-input-field-password__input", attrs: { spellcheck: "false" }, on: { input: e.onInput, keydown: e.checkCapsLock, keyup: e.checkCapsLock }, scopedSlots: t._u([{ key: "default", fn: function() {
224
+ return [t._v(t._s(t.label))];
225
+ }, proxy: !0 }, e.isCapsLockOn ? { key: "iconBefore", fn: function() {
226
+ return [a("div", { staticClass: "b-input-field-password__caps-lock-indicator", on: { mouseenter: e.handleCapsLockMouseEnter, mouseleave: e.handleCapsLockMouseLeave } }, [a(e.BentoImage, { ref: "inputFieldPasswordCapsLockIconRef", attrs: { src: e.CapsLockIcon, alt: e.t("capsLockEnabled") } })], 1), e.inputFieldPasswordCapsLockIconRef ? a(e.Tooltip, { class: e.tooltipConditionalClass, attrs: { content: e.t("capsLockEnabled"), "disabled-focus-trap": !0, "fallback-position": ["top", "bottom"], "is-shown": e.isTooltipDisplayed, "target-element": e.inputFieldPasswordCapsLockIconRef } }) : t._e()];
227
+ }, proxy: !0 } : null, t.disabled ? null : { key: "iconAfter", fn: function() {
228
+ return [a(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: e.toggleInputType }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
229
+ return [e.isPasswordReadable ? t._e() : a(e.ShowIcon, { attrs: { "svg-title": e.t("showPassword") } }), e.isPasswordReadable ? a(e.HideIcon, { attrs: { "svg-title": e.t("hidePassword") } }) : t._e()];
230
+ }, proxy: !0 }], null, !1, 956294632) })];
231
+ }, proxy: !0 }], null, !0) }, "bento-input-field", e.inputFieldArgs, !1)), e.hasValidations ? a(e.BentoPopover, { attrs: { open: e.isHintDisplayed, "target-element": e.inputFieldPasswordInputRef, "disable-focus-trap": !0, "aria-label": e.computedValidations.title, "aria-describedby": e.validationListId, position: "right-start" } }, [a("div", { attrs: { id: e.validationPopoverId } }, [e.computedValidations.title ? a(e.BentoTypography, { staticClass: "b-input-field-password__validation-title" }, [t._v(" " + t._s(e.computedValidations.title) + " ")]) : t._e(), e.hasErrors ? t._e() : a("p", { staticClass: "b-input-field-password__validation-status--valid", attrs: { role: "alert" } }, [t._v(" " + t._s(e.t("validationValid")) + " ")]), a("ul", { staticClass: "b-input-field-password__validation-list", attrs: { id: e.validationListId } }, t._l(e.computedValidationList, function(L, v) {
232
+ return a("li", { key: v, class: e.passwordValidityConditionalClass[v], attrs: { "aria-live": "polite", "aria-atomic": "true" } }, [a("span", { staticClass: "b-input-field-password__validation-list-icon" }, [e.passwordValidity[v] ? a(e.CheckmarkCircleFillIcon, { attrs: { "svg-title": e.t("validationChecked") } }) : a(e.DotIcon, { attrs: { "svg-title": e.t("validationUnchecked") } })], 1), a(e.BentoTypography, { staticClass: "b-input-field-password__validation-list-text", attrs: { el: "span" } }, [t._v(" " + t._s(L.label) + " ")])], 1);
233
+ }), 0), e.computedValidations.suggestion ? a(e.BentoTypography, { staticClass: "b-input-field-password__validation-suggestion" }, [t._v(" " + t._s(e.computedValidations.suggestion) + " ")]) : t._e()], 1)]) : t._e()], 1);
234
+ }, Me = [], qe = /* @__PURE__ */ Re(
235
+ Ae,
236
+ Ue,
237
+ Me,
238
+ !1,
239
+ null,
240
+ "67bc7893"
241
+ );
242
+ const je = qe.exports;
243
+ export {
244
+ Ie as a,
245
+ Te as b,
246
+ Pe as c,
247
+ je as i,
248
+ be as m,
249
+ ye as r
250
+ };
251
+ //# sourceMappingURL=input-field-password.DMcXkdVE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-field-password.DMcXkdVE.js","sources":["../../src/components/input-field-password/input-field-password.types.ts","../../src/components/input-field-password/assets/capslock.svg","../../src/components/input-field-password/utilities/input-field-password.validation.ts","../../src/components/input-field-password/input-field-password.vue"],"sourcesContent":["import type { BentoInputFieldProps, BentoInputFieldValue } from '@/components/input-field/input-field.types';\n\n/**\n * Public\n */\n\nexport interface BentoInputFieldPasswordValidationListItem {\n label?: string;\n key?: BentoInputFieldPasswordDefaultRuleKeys | string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n validate?: (value: BentoInputFieldValue, ...args: any[]) => boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n additionalArgs?: any[];\n disabled?: boolean;\n}\n\nexport type BentoInputFieldPasswordDefaultRuleKeys =\n | 'minLength'\n | 'requireLowercase'\n | 'requireNumeric'\n | 'requireSpecialCharacter'\n | 'requireUppercase';\n\nexport type BentoInputFieldPasswordErrorsList = Record<BentoInputFieldPasswordDefaultRuleKeys | string, string>;\n\nexport interface BentoInputFieldPasswordValidation {\n title?: string;\n suggestion?: string;\n extendDefaultValidation?: boolean;\n list: BentoInputFieldPasswordValidationListItem[];\n}\n\nexport interface BentoInputFieldPasswordProps {\n /**\n * Reduces height of the input\n */\n condensed?: BentoInputFieldProps['condensed'];\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled?: BentoInputFieldProps['disabled'];\n\n /**\n * Performs real-time validations over the input value. Default: `false`.\n * Disabling the option (set to `true`) will not run pre-defined validations or custom validations defined in the `validation` field.\n */\n disableValidation?: boolean;\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage?: BentoInputFieldProps['errorMessage'];\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder?: BentoInputFieldProps['placeholder'];\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly?: BentoInputFieldProps['readonly'];\n\n /**\n * Text displayed as the value of the input-field\n */\n value?: BentoInputFieldProps['value'];\n\n /**\n * Label to be shown with the input field\n */\n label?: string;\n\n /**\n * Configuration object for password field validation.\n *\n * This object defines the validation criteria and associated messages for a password field.\n * It includes the following properties:\n *\n * - `title`: The title displayed at the top of the validation hint.\n * - `suggestion`: The message displayed at the bottom of the validation hint, providing additional guidance.\n * - `extendDefaultValidation`: Set to true if you want to add your custom rules to the default validation instead of overriding the list.\n * - `list`: An array of callback functions to be executed on the value after each user input, validating the password against the specified rules.\n *\n * By default, the validation checks that:\n *\n * - The value has a minimum length of 12 characters.\n * - The value contains at least one lowercase letter.\n * - The value contains at least one uppercase letter.\n * - The value contains at least one numeric digit.\n * - The value contains at least one special character.\n *\n *\n */\n validation?: BentoInputFieldPasswordValidation;\n\n /**\n * Whether the password validation hint is displayed when the input field is activated via focus or input\n */\n withHint?: boolean;\n}\n\n/**\n * Private\n */\n\nexport enum BentoInputFieldPasswordType {\n TEXT = 'text',\n PASSWORD = 'password',\n}\n\nexport enum BentoInputFieldPasswordDefaultRule {\n MIN_LENGTH = 'minLength',\n REQUIRE_LOWERCASE = 'requireLowercase',\n REQUIRE_NUMERIC = 'requireNumeric',\n REQUIRE_SPECIAL_CHARACTER = 'requireSpecialCharacter',\n REQUIRE_UPPERCASE = 'requireUppercase',\n}\n","export default \"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='capslock'%3e%3cg%20id='Union'%3e%3cpath%20d='M13.75%205.63952L8%201.03952L2.25%205.63952V7.74999H4.75V11.75H11.25V7.74999H13.75V5.63952ZM6.25%206.24999H3.88809L8%202.96046L12.1119%206.24999H9.75V10.25H6.25V6.24999Z'%20fill='%2300112C'/%3e%3cpath%20d='M11.25%2014.75V13.25H4.75V14.75H11.25Z'%20fill='%2300112C'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","import { BentoInputFieldValue } from '@/components/input-field';\n\nfunction stringifyValue(value: BentoInputFieldValue): string {\n return value?.toString() ?? '';\n}\n\n/**\n * Validates if the length of the provided value is greater than or equal to the specified length.\n *\n * @param value - The input value to check.\n * @param length - The minimum required length of the value. Defaults to 12.\n * @returns `true` if the length of the value is greater than or equal to the specified length, `false` otherwise.\n */\nexport function minLength(value: BentoInputFieldValue, length = 12): boolean {\n return stringifyValue(value).length >= length;\n}\n\n/**\n * Validates if the provided value contains at least one lowercase letter.\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one lowercase letter, `false` otherwise.\n */\nexport function requireLowercase(value: BentoInputFieldValue): boolean {\n return /[a-z]/.test(stringifyValue(value));\n}\n\n/**\n * Validates if the provided value contains at least one uppercase letter.\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one uppercase letter, `false` otherwise.\n */\nexport function requireUppercase(value: BentoInputFieldValue): boolean {\n return /[A-Z]/.test(stringifyValue(value));\n}\n\n/**\n * Validates if the provided value contains at least one numerical digit.\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one numerical digit, `false` otherwise.\n */\nexport function requireNumeric(value: BentoInputFieldValue): boolean {\n return /\\d/.test(stringifyValue(value));\n}\n\n/**\n * Validates if the provided value contains at least one special character (non-alphanumeric).\n *\n * @param value - The input value to check.\n * @returns `true` if the value contains at least one special character, `false` otherwise.\n */\nexport function requireSpecialCharacter(value: BentoInputFieldValue): boolean {\n return /[^a-zA-Z0-9]/.test(stringifyValue(value));\n}\n","<template>\n <div ref=\"inputFieldPasswordRef\">\n <bento-input-field\n ref=\"inputFieldPasswordInputRef\"\n v-bind=\"inputFieldArgs\"\n class=\"b-input-field-password__input\"\n spellcheck=\"false\"\n @input=\"onInput\"\n @keydown=\"checkCapsLock\"\n @keyup=\"checkCapsLock\"\n >\n <template #default>{{ label }}</template>\n\n <template v-if=\"isCapsLockOn\" #iconBefore>\n <div\n class=\"b-input-field-password__caps-lock-indicator\"\n @mouseenter=\"handleCapsLockMouseEnter\"\n @mouseleave=\"handleCapsLockMouseLeave\"\n >\n <bento-image\n ref=\"inputFieldPasswordCapsLockIconRef\"\n :src=\"CapsLockIcon\"\n :alt=\"t('capsLockEnabled')\"\n />\n </div>\n\n <tooltip\n v-if=\"inputFieldPasswordCapsLockIconRef\"\n :class=\"tooltipConditionalClass\"\n :content=\"t('capsLockEnabled')\"\n :disabled-focus-trap=\"true\"\n :fallback-position=\"['top', 'bottom']\"\n :is-shown=\"isTooltipDisplayed\"\n :target-element=\"inputFieldPasswordCapsLockIconRef\"\n />\n </template>\n\n <template v-if=\"!disabled\" #iconAfter>\n <bento-button variant=\"tertiary\" @click=\"toggleInputType\">\n <template #iconLeft>\n <show-icon v-if=\"!isPasswordReadable\" :svg-title=\"t('showPassword')\" />\n <hide-icon v-if=\"isPasswordReadable\" :svg-title=\"t('hidePassword')\" />\n </template>\n </bento-button>\n </template>\n </bento-input-field>\n\n <bento-popover\n v-if=\"hasValidations\"\n :open=\"isHintDisplayed\"\n :target-element=\"inputFieldPasswordInputRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"computedValidations.title\"\n :aria-describedby=\"validationListId\"\n position=\"right-start\"\n >\n <div :id=\"validationPopoverId\">\n <bento-typography v-if=\"computedValidations.title\" class=\"b-input-field-password__validation-title\">\n {{ computedValidations.title }}\n </bento-typography>\n\n <p v-if=\"!hasErrors\" class=\"b-input-field-password__validation-status--valid\" role=\"alert\">\n {{ t('validationValid') }}\n </p>\n\n <ul :id=\"validationListId\" class=\"b-input-field-password__validation-list\">\n <li\n v-for=\"(rule, index) in computedValidationList\"\n :key=\"index\"\n :class=\"passwordValidityConditionalClass[index]\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n <span class=\"b-input-field-password__validation-list-icon\">\n <checkmark-circle-fill-icon\n v-if=\"passwordValidity[index]\"\n :svg-title=\"t('validationChecked')\"\n />\n\n <dot-icon v-else :svg-title=\"t('validationUnchecked')\" />\n </span>\n\n <bento-typography class=\"b-input-field-password__validation-list-text\" el=\"span\">\n {{ rule.label }}\n </bento-typography>\n </li>\n </ul>\n\n <bento-typography\n v-if=\"computedValidations.suggestion\"\n class=\"b-input-field-password__validation-suggestion\"\n >\n {{ computedValidations.suggestion }}\n </bento-typography>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoButton } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { BentoInputField } from '@/components/input-field';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { Tooltip } from '@/internal';\n import type { BentoInputFieldProps } from '@/components/input-field/input-field.types';\n import {\n BentoInputFieldPasswordDefaultRule,\n BentoInputFieldPasswordErrorsList,\n type BentoInputFieldPasswordProps,\n BentoInputFieldPasswordType,\n BentoInputFieldPasswordValidation,\n BentoInputFieldPasswordValidationListItem,\n } from './input-field-password.types';\n import CheckmarkCircleFillIcon from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import DotIcon from '@adyen/ui-assets-icons-16/vue/dot';\n import HideIcon from '@adyen/ui-assets-icons-16/vue/hide';\n import ShowIcon from '@adyen/ui-assets-icons-16/vue/show';\n import CapsLockIcon from './assets/capslock.svg';\n\n import { useFocusWithin, watchDebounced } from '@vueuse/core';\n import { computed, provide, ref, SetupContext, useAttrs, watch } from 'vue';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import {\n minLength,\n requireLowercase,\n requireNumeric,\n requireSpecialCharacter,\n requireUppercase,\n } from '@/components/input-field-password/utilities/input-field-password.validation';\n import { generateUid } from '@/core/utils/ts';\n import messages from './messages.json';\n import { INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEBOUNCE_DURATION = 500;\n const DEBOUNCE_MAX_WAIT = 2000;\n const TOOLTIP_TIMEOUT = 2000;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n condensed: { default: false },\n disabled: { default: false },\n disableValidation: { type: Boolean, default: false },\n errorMessage: { default: null },\n placeholder: { default: '' },\n readonly: { default: false },\n value: { default: undefined },\n label: { default: null },\n validation: { default: undefined },\n withHint: { type: Boolean, default: true }\n});\n\n const emit = defineEmits([\"input:valid\", \"input:error\", \"input\"]);\n\n const attrs = useAttrs();\n\n const inputType = ref(BentoInputFieldPasswordType.PASSWORD);\n const inputValue = ref(props.value);\n const isHintDisplayed = ref(false);\n const isTouched = ref(false);\n const passwordValidity = ref<boolean[]>([]);\n const errorsList = ref<BentoInputFieldPasswordErrorsList>({});\n const capsLockTooltipTimeoutID = ref<ReturnType<typeof setTimeout>>(null);\n const isTooltipDisplayed = ref(false);\n const inputFieldPasswordRef = ref(null);\n const inputFieldPasswordInputRef = ref(null);\n const inputFieldPasswordCapsLockIconRef = ref(null);\n const isCapsLockOn = ref(false);\n\n provide(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, 'bento-input-field-password');\n\n const { focused } = useFocusWithin(inputFieldPasswordRef);\n\n const validationListId = generateUid('validationListId');\n const validationPopoverId = generateUid('validationPopoverId');\n\n const isPasswordReadable = computed(() => inputType.value === BentoInputFieldPasswordType.TEXT);\n const computedErrorMessage = computed(() => {\n const hasRealTimeValidationErrors = isTouched.value && hasErrors.value;\n const hasAsyncValidationErrors = props.disableValidation && props.errorMessage;\n\n return hasRealTimeValidationErrors || hasAsyncValidationErrors ? props.errorMessage : '';\n });\n\n const passwordValidityConditionalClass = computed(() =>\n passwordValidity.value.map(validity =>\n validity\n ? 'b-input-field-password__validation-list--valid'\n : 'b-input-field-password__validation-list--invalid'\n )\n );\n\n const tooltipConditionalClass = computed(() =>\n capsLockTooltipTimeoutID.value ? 'b-input-field-password__input-tooltip--timed' : ''\n );\n\n const inputFieldArgs = computed<BentoInputFieldProps & SetupContext['attrs']>(() => ({\n ariaHidden: false,\n condensed: props.condensed,\n disabled: props.disabled,\n errorMessage: computedErrorMessage.value,\n placeholder: props.placeholder,\n readonly: props.readonly,\n type: inputType.value,\n value: inputValue.value,\n\n 'aria-haspopup': hasValidations.value ? 'dialog' : false,\n 'aria-describedby': hasValidations.value ? validationPopoverId : '',\n\n ...attrs,\n }));\n\n const computedValidations = computed<BentoInputFieldPasswordValidation>(() => {\n if (props.validation && !props.validation.extendDefaultValidation) {\n return props.validation;\n }\n\n const defaultValidationList = [\n {\n label: t('validationMinLength'),\n key: BentoInputFieldPasswordDefaultRule.MIN_LENGTH,\n validate: minLength,\n },\n {\n label: t('validationRequireLowercase'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_LOWERCASE,\n validate: requireLowercase,\n },\n {\n label: t('validationRequireUppercase'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_UPPERCASE,\n validate: requireUppercase,\n },\n {\n label: t('validationRequireNumeric'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_NUMERIC,\n validate: requireNumeric,\n },\n {\n label: t('validationRequireSpecialCharacter'),\n key: BentoInputFieldPasswordDefaultRule.REQUIRE_SPECIAL_CHARACTER,\n validate: requireSpecialCharacter,\n },\n ];\n\n let validationList: BentoInputFieldPasswordValidationListItem[] = defaultValidationList;\n\n if (props.validation) {\n const defaultValidationKeys: string[] = defaultValidationList.map(rule => rule.key);\n const customRuleKeys = props.validation?.list?.map(rule => rule.key);\n // remove from the custom list any rules with default keys (rules that are overriding existent rules)\n const customValidationList =\n props.validation?.list?.filter(rule => !defaultValidationKeys.includes(rule.key)) ?? [];\n\n // loop through the default list and replace default rule with the custom rule if it exists\n const validationListWithOverrides = defaultValidationList.map(rule => {\n if (customRuleKeys?.includes(rule.key)) {\n const customRule = props.validation?.list?.find(customRule => customRule.key === rule.key);\n return customRule;\n } else {\n return rule;\n }\n });\n validationList = [...validationListWithOverrides, ...customValidationList];\n }\n\n return {\n title: props.validation?.title ?? t('validationTitle'),\n suggestion: props.validation?.suggestion ?? t('validationSuggestion'),\n list: validationList,\n };\n });\n\n const computedValidationList = computed(() => computedValidations.value?.list?.filter(rule => !rule.disabled));\n\n const hasErrors = computed(() => passwordValidity.value?.some(validation => !validation));\n const hasValidations = computed(\n () => inputFieldPasswordInputRef.value && computedValidations.value?.list?.length > 0\n );\n\n const checkCapsLock = (e: KeyboardEvent) => {\n // Check if getModifierState exists and is a function in case the user's browser is autofilling\n if (typeof e.getModifierState === 'function') {\n isCapsLockOn.value = e.getModifierState('CapsLock');\n }\n };\n\n const toggleInputType = () => {\n if (isPasswordReadable.value) {\n inputType.value = BentoInputFieldPasswordType.PASSWORD;\n } else {\n inputType.value = BentoInputFieldPasswordType.TEXT;\n }\n };\n\n const onInput = (value: string) => {\n if (props.disabled) {\n return;\n }\n\n inputValue.value = value;\n\n emit('input', inputValue.value);\n };\n\n const checkValidity = (value: BentoInputFieldPasswordProps['value']) => {\n const rulesValidityObj = computedValidationList.value?.map(validationItem => ({\n key: validationItem.key,\n label: validationItem.label,\n isValid: validationItem.validate(value, ...(validationItem.additionalArgs ?? [])),\n }));\n let customRuleIndex = 1;\n\n passwordValidity.value = rulesValidityObj?.map(error => error.isValid);\n\n errorsList.value = rulesValidityObj\n ?.filter(rule => !rule.isValid)\n .reduce((errorsObject, error) => {\n const key = error.key ?? `custom-rule-${customRuleIndex++}`;\n return {\n ...errorsObject,\n [key]: error.label,\n };\n }, {});\n };\n\n const handleCapsLockMouseLeave = () => {\n isTooltipDisplayed.value = false;\n capsLockTooltipTimeoutID.value = null;\n };\n\n const handleCapsLockMouseEnter = () => {\n isTooltipDisplayed.value = true;\n };\n\n watch(\n () => props.value,\n newValue => {\n inputValue.value = newValue;\n }\n );\n\n watch(focused, focused => {\n // Always set dirty to true when blur occurs\n if (!focused) {\n isTouched.value = true;\n }\n\n // Disable validations & hint if \"disableValidation\" is \"true\"\n if (!props.disableValidation) {\n if (props.withHint) {\n isHintDisplayed.value = focused;\n }\n checkValidity(inputValue.value);\n }\n });\n\n watch(isCapsLockOn, isCapsLockOn => {\n if (!isCapsLockOn) {\n clearTimeout(capsLockTooltipTimeoutID.value);\n\n capsLockTooltipTimeoutID.value = null;\n isTooltipDisplayed.value = false;\n } else {\n isTooltipDisplayed.value = true;\n\n capsLockTooltipTimeoutID.value = setTimeout(() => {\n capsLockTooltipTimeoutID.value = null;\n isTooltipDisplayed.value = false;\n }, TOOLTIP_TIMEOUT);\n }\n });\n\n watchDebounced(\n inputValue,\n inputValue => {\n checkValidity(inputValue);\n\n if (!hasErrors.value) {\n emit('input:valid');\n } else {\n emit('input:error', errorsList.value);\n }\n },\n // wait for 0.5s before checking validity OR 2s of continuous typing\n { debounce: DEBOUNCE_DURATION, maxWait: DEBOUNCE_MAX_WAIT }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The input field password is a component designed to support users' preference for entering values securely.\n * This is an extension of the `bento-input-field` component.\n *\n * @example\n * import { BentoInputFieldPassword } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInputFieldPassword },\n * template: `\n * <bento-input-field-password\n * label=\"Label\"\n * error-message=\"Error\"\n * :validation=\"{\n * extendDefaultValidation: true,\n * list: [\n * { label: '18 characters', key: 'minLength', validate: minLength, additionalArgs: [18] },\n * { label: 'Always true', key: 'alwaysTrue', validate: () => true },\n * { key: 'requireSpecialCharacter', disabled: true }\n * ],\n * }\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-field-password',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field-password.scss\" />\n"],"names":["BentoInputFieldPasswordType","BentoInputFieldPasswordType2","BentoInputFieldPasswordDefaultRule","BentoInputFieldPasswordDefaultRule2","CapsLockIcon","stringifyValue","value","minLength","length","requireLowercase","requireUppercase","requireNumeric","requireSpecialCharacter","__default__","messages","DEBOUNCE_DURATION","DEBOUNCE_MAX_WAIT","TOOLTIP_TIMEOUT","t","useI18n","attrs","useAttrs","inputType","ref","inputValue","props","isHintDisplayed","isTouched","passwordValidity","errorsList","capsLockTooltipTimeoutID","isTooltipDisplayed","inputFieldPasswordRef","inputFieldPasswordInputRef","inputFieldPasswordCapsLockIconRef","isCapsLockOn","provide","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","focused","useFocusWithin","validationListId","generateUid","validationPopoverId","isPasswordReadable","computed","computedErrorMessage","hasRealTimeValidationErrors","hasErrors","hasAsyncValidationErrors","passwordValidityConditionalClass","validity","tooltipConditionalClass","inputFieldArgs","hasValidations","computedValidations","defaultValidationList","validationList","defaultValidationKeys","rule","customRuleKeys","_b","_a","customValidationList","_d","_c","customRule2","_e","_f","computedValidationList","validation","checkCapsLock","e","toggleInputType","onInput","emit","checkValidity","rulesValidityObj","validationItem","customRuleIndex","error","errorsObject","key","handleCapsLockMouseLeave","handleCapsLockMouseEnter","watch","newValue","focused2","isCapsLockOn2","watchDebounced","inputValue2"],"mappings":";;;;;;;;;;;;;;;;AA2GY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,aACAA,EAAA,oBAAA,oBACAA,EAAA,kBAAA,kBACAA,EAAA,4BAAA,2BACAA,EAAA,oBAAA,oBALQA,IAAAD,KAAA,CAAA,CAAA;AChHZ,MAAAE,KAAA;ACEA,SAAAC,EAAAC,GAAA;AACI,UAAAA,KAAA,gBAAAA,EAAA,eAAA;AACJ;AASgB,SAAAC,GAAAD,GAAAE,IAAA,IAAA;AACZ,SAAAH,EAAAC,CAAA,EAAA,UAAAE;AACJ;AAQO,SAAAC,GAAAH,GAAA;AACH,SAAA,QAAA,KAAAD,EAAAC,CAAA,CAAA;AACJ;AAQO,SAAAI,GAAAJ,GAAA;AACH,SAAA,QAAA,KAAAD,EAAAC,CAAA,CAAA;AACJ;AAQO,SAAAK,GAAAL,GAAA;AACH,SAAA,KAAA,KAAAD,EAAAC,CAAA,CAAA;AACJ;AAQO,SAAAM,GAAAN,GAAA;AACH,SAAA,eAAA,KAAAD,EAAAC,CAAA,CAAA;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GC8WIO,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;;;;iBA7RAC,IAAA,KACAC,IAAA,KACAC,IAAA,KAEA,EAAA,GAAAC,EAAA,IAAAC,GAAA,GAiBAC,IAAAC,GAAA,GAEAC,IAAAC,EAAAvB,EAAA,QAAA,GACAwB,IAAAD,EAAAE,EA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+1,7 @@
1
1
  import { defineComponent as oe, ref as G, provide as $e, computed as B, onMounted as ue, nextTick as le } from "vue";
2
- import { B as se } from "./input-field.DgUkNPXo.js";
2
+ import { B as se } from "./input-field.CP8Qui6G.js";
3
3
  import { u as fe } from "./i18n.BQkEbtPM.js";
4
- import { b as ce } from "./dropdown.Qc6K5BzU.js";
4
+ import { b as ce } from "./dropdown.C01pOog2.js";
5
5
  import { p as he } from "./typography.J1v_SPG3.js";
6
6
  import { a as jt, u as ge } from "./use-country-phon-code.DVgE19zT.js";
7
7
  import { n as me } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
@@ -3094,4 +3094,4 @@ const kd = Fd.exports;
3094
3094
  export {
3095
3095
  kd as i
3096
3096
  };
3097
- //# sourceMappingURL=input-field-phone-number.Bg9XyY_1.js.map
3097
+ //# sourceMappingURL=input-field-phone-number.Cfy_o9aE.js.map