@adyen/bento-vue2 1.65.0 → 1.66.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/index.d.ts +416 -234
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/copy.css +1 -1
  9. package/dist/assets/data-grid-template.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/date.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header.css +1 -1
  17. package/dist/assets/info-icon.css +1 -1
  18. package/dist/assets/input-field-password.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/menu.css +1 -1
  21. package/dist/assets/modal-fullscreen.css +1 -1
  22. package/dist/assets/pagination.css +1 -1
  23. package/dist/assets/popover.css +1 -1
  24. package/dist/assets/sidepanel.css +1 -1
  25. package/dist/assets/step.css +1 -1
  26. package/dist/assets/summary-grid.css +1 -1
  27. package/dist/assets/tab.css +1 -0
  28. package/dist/assets/textarea.css +1 -1
  29. package/dist/assets/use-cached-selected-values.css +1 -1
  30. package/dist/checkbox.js +2 -2
  31. package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.C8zeHAJG.js} +31 -31
  32. package/dist/chunks/action-bar.C8zeHAJG.js.map +1 -0
  33. package/dist/chunks/button-actions-with-menu.BVU1NS0m.js +83 -0
  34. package/dist/chunks/button-actions-with-menu.BVU1NS0m.js.map +1 -0
  35. package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
  36. package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
  37. package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
  38. package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
  39. package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
  40. package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
  41. package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.BcoVTIs2.js} +3 -3
  42. package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.BcoVTIs2.js.map} +1 -1
  43. package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
  44. package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
  45. package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
  46. package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
  47. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.CcEIwDqX.js} +3 -3
  48. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.CcEIwDqX.js.map} +1 -1
  49. package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.DJQcVuPs.js} +16 -14
  50. package/dist/chunks/data-grid-template.DJQcVuPs.js.map +1 -0
  51. package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.t4fCoE2Y.js} +10 -10
  52. package/dist/chunks/{data-grid.D4oeTUhn.js.map → data-grid.t4fCoE2Y.js.map} +1 -1
  53. package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.DOAWsba5.js} +6 -7
  54. package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.DOAWsba5.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.DYxZygbL.js} +22 -23
  56. package/dist/chunks/{date-range-picker.D9lyIoO-.js.map → date-range-picker.DYxZygbL.js.map} +1 -1
  57. package/dist/chunks/date.BfyWX2PY.js +160 -0
  58. package/dist/chunks/date.BfyWX2PY.js.map +1 -0
  59. package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYg5l6HT.js} +2 -2
  60. package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYg5l6HT.js.map} +1 -1
  61. package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.BWsU98dn.js} +265 -270
  62. package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.BWsU98dn.js.map} +1 -1
  63. package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
  64. package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
  65. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  66. package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
  67. package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
  68. package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.Bx3wivl8.js} +664 -649
  69. package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.Bx3wivl8.js.map} +1 -1
  70. package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
  71. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
  72. package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.B6mwBJjk.js} +13 -13
  73. package/dist/chunks/{header-with-views.Ds9mcwmp.js.map → header-with-views.B6mwBJjk.js.map} +1 -1
  74. package/dist/chunks/{header.Cb644uAi.js → header.hTMmMN8n.js} +25 -24
  75. package/dist/chunks/{header.Cb644uAi.js.map → header.hTMmMN8n.js.map} +1 -1
  76. package/dist/chunks/index.BrH1t1iu.js +407 -0
  77. package/dist/chunks/index.BrH1t1iu.js.map +1 -0
  78. package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
  79. package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
  80. package/dist/chunks/input-field-password.B8qWGzaB.js +252 -0
  81. package/dist/chunks/input-field-password.B8qWGzaB.js.map +1 -0
  82. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Bi4TJhbX.js} +3 -3
  83. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Bi4TJhbX.js.map} +1 -1
  84. package/dist/chunks/{input-field.B_3nZFYz.js → input-field.L5bWjTpB.js} +3 -3
  85. package/dist/chunks/{input-field.B_3nZFYz.js.map → input-field.L5bWjTpB.js.map} +1 -1
  86. package/dist/chunks/{pagination.Cl7SzoId.js → pagination.CW_1yX5C.js} +115 -115
  87. package/dist/chunks/pagination.CW_1yX5C.js.map +1 -0
  88. package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
  89. package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
  90. package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.BpaFd2-y.js} +3 -3
  91. package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.BpaFd2-y.js.map} +1 -1
  92. package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.5JHI6li0.js} +3 -3
  93. package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.5JHI6li0.js.map} +1 -1
  94. package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.D4hrWvf7.js} +2 -2
  95. package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.D4hrWvf7.js.map} +1 -1
  96. package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
  97. package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
  98. package/dist/chunks/step.DMMofD4B.js +217 -0
  99. package/dist/chunks/step.DMMofD4B.js.map +1 -0
  100. package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
  101. package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
  102. package/dist/chunks/summary-grid.types.Cwri2Y3T.js +337 -0
  103. package/dist/chunks/summary-grid.types.Cwri2Y3T.js.map +1 -0
  104. package/dist/chunks/tab.BhWPBxcB.js +192 -0
  105. package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
  106. package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
  107. package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
  108. package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
  109. package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
  110. package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.DK2d00rt.js} +10 -11
  111. package/dist/chunks/timeline-item.DK2d00rt.js.map +1 -0
  112. package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.CusB5KBl.js} +568 -528
  113. package/dist/chunks/use-cached-selected-values.CusB5KBl.js.map +1 -0
  114. package/dist/code-snippet.js +1 -1
  115. package/dist/dashboard-template.js +1 -1
  116. package/dist/data-grid-template.js +1 -1
  117. package/dist/data-grid.js +1 -1
  118. package/dist/date-picker.js +2 -2
  119. package/dist/date-range-picker.js +2 -2
  120. package/dist/date.js +1 -1
  121. package/dist/dropdown.js +3 -3
  122. package/dist/file-uploader.js +1 -1
  123. package/dist/filter-bar.js +1 -1
  124. package/dist/header-with-views.js +1 -1
  125. package/dist/header.js +1 -1
  126. package/dist/index.js +34 -34
  127. package/dist/info-icon.js +1 -1
  128. package/dist/input-field-password.js +1 -1
  129. package/dist/input-field-phone-number.js +1 -1
  130. package/dist/input-field.js +1 -1
  131. package/dist/internal.js +6 -6
  132. package/dist/pagination.js +1 -1
  133. package/dist/radio-group.js +1 -1
  134. package/dist/rich-text-editor.js +1 -1
  135. package/dist/search-bar.js +2 -2
  136. package/dist/secondary-nav.js +1 -1
  137. package/dist/selection-card.js +1 -1
  138. package/dist/stepper.js +1 -1
  139. package/dist/structured-list.js +1 -1
  140. package/dist/styles/bento-dark.css +1 -0
  141. package/dist/styles/bento-light.css +1 -0
  142. package/dist/styles/bento.css +1 -0
  143. package/dist/styles/legacy.css +1 -0
  144. package/dist/styles/styleguide.css +1 -0
  145. package/dist/summary-grid.js +1 -1
  146. package/dist/tabs.js +1 -1
  147. package/dist/textarea.js +1 -1
  148. package/dist/timeline.js +1 -1
  149. package/dist/web-types.json +197 -79
  150. package/package.json +5 -5
  151. package/dist/assets/tabs.css +0 -1
  152. package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
  153. package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
  154. package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
  155. package/dist/chunks/calendar.DbTC35rM.js +0 -1167
  156. package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
  157. package/dist/chunks/copy.CXeLbvUP.js +0 -129
  158. package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
  159. package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
  160. package/dist/chunks/date.dYFFEunA.js +0 -987
  161. package/dist/chunks/date.dYFFEunA.js.map +0 -1
  162. package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
  163. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
  164. package/dist/chunks/index.BDuTpjD8.js +0 -40
  165. package/dist/chunks/index.BDuTpjD8.js.map +0 -1
  166. package/dist/chunks/index.DD7TppDb.js +0 -10
  167. package/dist/chunks/index.DD7TppDb.js.map +0 -1
  168. package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
  169. package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
  170. package/dist/chunks/input-field-password.Bloa-rqx.js +0 -252
  171. package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
  172. package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
  173. package/dist/chunks/step.dNTg2rtW.js +0 -217
  174. package/dist/chunks/step.dNTg2rtW.js.map +0 -1
  175. package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
  176. package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
  177. package/dist/chunks/tabs.Dx6teJGW.js +0 -205
  178. package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
  179. package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
  180. package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
  181. package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
@@ -0,0 +1,160 @@
1
+ import { defineComponent as o, computed as s } from "vue";
2
+ import { u as t } from "./i18n.BQkEbtPM.js";
3
+ import { B as c } from "./typography.J1v_SPG3.js";
4
+ import { n as y } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
+ import "../assets/date.css";
6
+ var i = /* @__PURE__ */ ((_) => (_.SHORT_MONTH = "LLL", _.DAY_OF_MONTH = "d", _.LONG_WEEKDAY = "EEEE", _.SHORT_TIME_WITH_PERIOD = "h:mm aa", _.SHORT_TIME_WITHOUT_PERIOD = "H:mm", _.EXACT_TIME_WITH_PERIOD = "h:mm:ss aa", _.EXACT_TIME_WITHOUT_PERIOD = "H:mm:ss", _.LONG_DATE = "LLLL dd, yyyy", _.SHORT_DATE = "LLL dd, yyyy", _.FULL_DATE_EXACT_TIME_WITH_PERIOD = "LLL dd, yyyy, h:mm:ss aa", _.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm:ss", _.FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = "LLL dd, yyyy, h:mm:ss aa O", _.FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm:ss O", _.FULL_DATE_TIME_WITH_PERIOD = "LLL dd, yyyy, h:mm aa", _.FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = "LLL dd, yyyy, h:mm aa O", _.FULL_DATE_TIME_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm", _.FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm O", _))(i || {});
7
+ const T = {
8
+ SHORT_MONTH: {
9
+ month: "short"
10
+ },
11
+ DAY_OF_MONTH: {
12
+ day: "numeric"
13
+ },
14
+ LONG_WEEKDAY: {
15
+ weekday: "long"
16
+ },
17
+ SHORT_TIME_WITH_PERIOD: {
18
+ hour: "numeric",
19
+ minute: "numeric",
20
+ hour12: !0
21
+ },
22
+ SHORT_TIME_WITHOUT_PERIOD: {
23
+ hour: "numeric",
24
+ minute: "numeric",
25
+ hour12: !1
26
+ },
27
+ EXACT_TIME_WITH_PERIOD: {
28
+ hour: "numeric",
29
+ minute: "numeric",
30
+ second: "numeric",
31
+ hour12: !0
32
+ },
33
+ EXACT_TIME_WITHOUT_PERIOD: {
34
+ hour: "numeric",
35
+ minute: "numeric",
36
+ second: "numeric",
37
+ hour12: !1
38
+ },
39
+ LONG_DATE: {
40
+ year: "numeric",
41
+ month: "long",
42
+ day: "numeric"
43
+ },
44
+ SHORT_DATE: {
45
+ year: "numeric",
46
+ month: "short",
47
+ day: "numeric"
48
+ },
49
+ FULL_DATE_TIME_WITH_PERIOD: {
50
+ year: "numeric",
51
+ month: "short",
52
+ day: "numeric",
53
+ hour: "numeric",
54
+ minute: "numeric",
55
+ hour12: !0
56
+ },
57
+ FULL_DATE_TIME_WITHOUT_PERIOD: {
58
+ year: "numeric",
59
+ month: "short",
60
+ day: "numeric",
61
+ hour: "numeric",
62
+ minute: "numeric",
63
+ hour12: !1
64
+ },
65
+ FULL_DATE_EXACT_TIME_WITH_PERIOD: {
66
+ year: "numeric",
67
+ month: "short",
68
+ day: "numeric",
69
+ hour: "numeric",
70
+ minute: "numeric",
71
+ second: "numeric",
72
+ hour12: !0
73
+ },
74
+ FULL_DATE_EXACT_TIME_WITHOUT_PERIOD: {
75
+ year: "numeric",
76
+ month: "short",
77
+ day: "numeric",
78
+ hour: "2-digit",
79
+ minute: "2-digit",
80
+ second: "2-digit",
81
+ hour12: !1
82
+ },
83
+ FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD: {
84
+ year: "numeric",
85
+ month: "short",
86
+ day: "numeric",
87
+ hour: "numeric",
88
+ minute: "numeric",
89
+ hour12: !0,
90
+ timeZoneName: "short"
91
+ },
92
+ FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {
93
+ year: "numeric",
94
+ month: "short",
95
+ day: "numeric",
96
+ hour: "numeric",
97
+ minute: "numeric",
98
+ hour12: !1,
99
+ timeZoneName: "short"
100
+ },
101
+ FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD: {
102
+ year: "numeric",
103
+ month: "short",
104
+ day: "numeric",
105
+ hour: "numeric",
106
+ minute: "numeric",
107
+ second: "numeric",
108
+ hour12: !0,
109
+ timeZoneName: "short"
110
+ },
111
+ FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {
112
+ year: "numeric",
113
+ month: "short",
114
+ day: "numeric",
115
+ hour: "numeric",
116
+ minute: "numeric",
117
+ second: "numeric",
118
+ hour12: !1,
119
+ timeZoneName: "short"
120
+ }
121
+ }, L = {
122
+ name: "bento-date"
123
+ }, d = /* @__PURE__ */ o({
124
+ ...L,
125
+ props: {
126
+ date: { default: null },
127
+ format: { default: i.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD },
128
+ disableTypography: { type: Boolean, default: !1 }
129
+ },
130
+ setup(_) {
131
+ const r = _, { locale: n } = t(void 0, !0), e = Object.entries(i).reduce(
132
+ (m, [u, E]) => (m[E.toString()] = u, m),
133
+ {}
134
+ ), I = s(() => {
135
+ if (!r.date)
136
+ return "";
137
+ const m = typeof r.date == "string" ? new Date(r.date) : r.date, u = e == null ? void 0 : e[r.format];
138
+ let E;
139
+ return u && (T != null && T[u]) && (E = T == null ? void 0 : T[u]), new Intl.DateTimeFormat(n.value, E).format(m);
140
+ });
141
+ return { __sfc: !0, BentoDateFormatPresets: T, props: r, locale: n, bentoDateFormatKeyValuePairs: e, formattedDate: I, BentoTypography: c };
142
+ }
143
+ });
144
+ var O = function() {
145
+ var r = this, n = r._self._c, e = r._self._setupProxy;
146
+ return n("div", { staticClass: "b-date" }, [r.disableTypography ? [r._v(r._s(e.formattedDate))] : n(e.BentoTypography, { staticClass: "b-date__label", attrs: { el: "span", variant: "body", strong: "" } }, [r._v(" " + r._s(e.formattedDate) + " ")])], 2);
147
+ }, a = [], h = /* @__PURE__ */ y(
148
+ d,
149
+ O,
150
+ a,
151
+ !1,
152
+ null,
153
+ "02030534"
154
+ );
155
+ const f = h.exports;
156
+ export {
157
+ f as B,
158
+ i as a
159
+ };
160
+ //# sourceMappingURL=date.BfyWX2PY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.BfyWX2PY.js","sources":["../../src/components/date/date.types.ts","../../src/components/date/date.vue"],"sourcesContent":["export enum BentoDateFormat {\n // MONTH\n SHORT_MONTH = 'LLL', // Jun\n\n // DAY\n DAY_OF_MONTH = 'd', // 1, 2, ..., 31,\n LONG_WEEKDAY = 'EEEE', // Friday\n\n // TIME\n SHORT_TIME_WITH_PERIOD = `h:mm aa`, // 2:44 PM\n SHORT_TIME_WITHOUT_PERIOD = 'H:mm', // 14:45\n EXACT_TIME_WITH_PERIOD = 'h:mm:ss aa', // 2:05:11 PM\n EXACT_TIME_WITHOUT_PERIOD = 'H:mm:ss', // 14:05:11\n\n // DATE\n LONG_DATE = 'LLLL dd, yyyy', // June 30, 2023\n SHORT_DATE = 'LLL dd, yyyy', // Jun 30, 2023\n FULL_DATE_EXACT_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm:ss aa`, // June 30, 2023, 2:54:10 PM\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss`, // June 30, 2023, 14:54:42\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm:ss aa O`, // June 30, 2023, 2:56:07 PM GMT+2\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss O`, // June 30, 2023, 14:56:28 GMT+2\n FULL_DATE_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm aa`, // Jun 30, 2023, 2:48 PM\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm aa O`, // Jun 30, 2023, 2:44 PM GMT+2\n FULL_DATE_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm`, // Jun 30, 2023, 14:48\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm O`, // Jun 30, 2023, 14:43 GMT+2\n}\n\nexport interface BentoDateProps {\n /**\n * The date to format. The data can be supplied as:\n * - a Date object.\n * - a number of milliseconds elapsed since the epoch.\n * - a date string e.g. '2023-07-31T10:55:22+02:00'.\n */\n date?: Date | number | string | null;\n /**\n * The string format of the date to be displayed\n */\n format?: BentoDateFormat | `${BentoDateFormat}`;\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography\n */\n disableTypography?: boolean;\n}\n","<template>\n <div class=\"b-date\">\n <bento-typography v-if=\"!disableTypography\" class=\"b-date__label\" el=\"span\" variant=\"body\" strong>\n {{ formattedDate }}\n </bento-typography>\n <template v-else>{{ formattedDate }}</template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDateFormat, type BentoDateProps } from './date.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoTypography } from '@/components/typography';\n\n const props = defineProps({\n date: { default: null },\n format: { default: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD },\n disableTypography: { type: Boolean, default: false }\n});\n\n const { locale } = useI18n(undefined, true);\n\n /**\n * This is a reverse mapping of the BentoDateFormat enum.\n * It allows us to get the key of the enum by its value, which is then used to look up the\n * corresponding formatting options in `BentoDateFormatPresets`.\n */\n const bentoDateFormatKeyValuePairs = Object.entries(BentoDateFormat).reduce<\n Record<BentoDateFormat, keyof typeof BentoDateFormat>\n >(\n (acc, [key, value]) => {\n acc[value.toString()] = key;\n return acc;\n },\n {} as Record<BentoDateFormat, keyof typeof BentoDateFormat>\n );\n\n const formattedDate = computed(() => {\n // If null, return empty string\n if (!props.date) {\n return '';\n }\n const datePropAsDateObject = typeof props.date === 'string' ? new Date(props.date) : props.date;\n\n const formatKeyEntry = bentoDateFormatKeyValuePairs?.[props.format];\n\n let dateFormat: Intl.DateTimeFormatOptions | undefined = undefined;\n // Translate the key of the enum to the Intl.DateTimeFormatOptions configuration object\n if (formatKeyEntry && BentoDateFormatPresets?.[formatKeyEntry]) {\n dateFormat = BentoDateFormatPresets?.[formatKeyEntry];\n }\n return new Intl.DateTimeFormat(locale.value, dateFormat).format(datePropAsDateObject);\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The format presets to use when being supplied with a key name in BentoDateFormat.\n * They translate to configuration options that are used in the Intl.DateTimeFormat function\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n const BentoDateFormatPresets: { [key in keyof typeof BentoDateFormat]: Intl.DateTimeFormatOptions } = {\n SHORT_MONTH: {\n month: 'short',\n },\n DAY_OF_MONTH: {\n day: 'numeric',\n },\n LONG_WEEKDAY: {\n weekday: 'long',\n },\n SHORT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n SHORT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n EXACT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n EXACT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n },\n LONG_DATE: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n SHORT_DATE: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n FULL_DATE_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n FULL_DATE_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n FULL_DATE_EXACT_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n };\n\n /**\n * A Date component is used to display a formatted date value.\n *\n * @example\n * import { BentoDate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDate },\n * template: `\n * <bento-date :date=\"dateObject\" :format=\"BentoDateFormat.LONG_DATE\"/>\n * `\n * }\n */\n export default {\n name: 'bento-date',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date.scss\" />\n"],"names":["BentoDateFormat","BentoDateFormat2","BentoDateFormatPresets","__default__","locale","useI18n","bentoDateFormatKeyValuePairs","acc","key","value","formattedDate","computed","props","datePropAsDateObject","formatKeyEntry","dateFormat"],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as a, computed as i, toRefs as m } from "vue";
2
2
  import { B as v } from "./avatar.BgwjpLQO.js";
3
- import { B as p } from "./dropdown.DV7uhHNP.js";
3
+ import { B as p } from "./dropdown.BWsU98dn.js";
4
4
  import { n as c } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import { d as y, B as b } from "./typography.J1v_SPG3.js";
6
6
  import { u as w } from "./use-country-items.HFnjuDsG.js";
@@ -212,4 +212,4 @@ export {
212
212
  nt as d,
213
213
  st as e
214
214
  };
215
- //# sourceMappingURL=dropdown-tag.DKhxBV52.js.map
215
+ //# sourceMappingURL=dropdown-tag.DYg5l6HT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-tag.DKhxBV52.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option.\n * * @property {string,number} value.value - Value of the option.\n * * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @input=\"onInput\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n * * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;AAkEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;sBCQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCsCAkB,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAmB,IAAAhB,EAAA,MAAA;;AAAA,cAAAiB,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,IAAA,CAAA,EAAA,OAAAd,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown-tag.DYg5l6HT.js","sources":["../../src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue","../../src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue","../../src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue","../../src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue","../../src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue"],"sourcesContent":["<template>\n <div>\n <bento-dropdown v-slot=\"{ label, data }\" v-bind=\"$props\" :items=\"dropdownItems\" @input=\"onInput\">\n <bento-avatar :username=\"label\" :src=\"data\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoAvatarListboxOptions } from './dropdown-avatar.types';\n import { BentoAvatar } from '@/components/avatar';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the avatar dropdown with.\n * It must be an array of {@see BentoAvatarListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option.\n * * @property {string,number} value.value - Value of the option.\n * * @property {string} value.src - Image source of the avatar image.\n */\n items: {\n type: Array as PropType<BentoAvatarListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const dropdownItems = computed(() => props.items.map(({ value, label, src }) => ({ value, label, data: src })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Avatar Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownAvatar } from '@adyen/bento-vue2';\n * import type { BentoAvatarListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownAvatar },\n * template: `\n * <bento-dropdown-avatar\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('user-id-1') // Default value\n * const options: BentoAvatarListboxOptions = [\n * { label: 'User 1', value: 'user-id-1' },\n * { label: 'User 2', value: 'user-id-2', src: 'image-source.jpeg' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-avatar',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ label }\" v-bind=\"$props\" :items=\"countryItems\" @input=\"onInput\">\n <bento-typography el=\"span\">{{ label }}</bento-typography>\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType, toRefs } from 'vue';\n import { BentoCountryListboxOptions } from './dropdown-country.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoTypography } from '@/components/typography';\n import { useCountryItems } from './composables/use-country-items';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoCountryVariant } from '@/components/country';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCountryListboxOptions }\n * * @deprecated {string} value.label - Use BentoDropdown instead of custom labels\n * * @property {BentoCountryCode | string} value.value - Country code of the option\n */\n items: {\n type: Array as PropType<BentoCountryListboxOptions>,\n default: () => [],\n },\n\n /**\n * Which label variant to display.\n * @values iso, name, phone_code, capital\n */\n variant: {\n type: String as PropType<BentoCountryVariant | `${BentoCountryVariant}`>,\n default: BentoCountryVariant.CUSTOM,\n validator: (value: BentoCountryVariant) => Object.values(BentoCountryVariant).includes(value),\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const { variant, items } = toRefs(props);\n const countryItems = useCountryItems(variant, items);\n\n if (variant.value === 'custom' || items.value.some(item => item.label)) {\n deprecate(\n 'BentoDropdownCountry \"custom\" variant and \"items\" prop \"label\" key',\n 'Use any of the other BentoDropdownCountry variants instead OR use BentoDropdown component for custom labels',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * A Country Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-country\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-country',\n });\n</script>\n","<template>\n <bento-dropdown v-slot=\"slotProps\" v-bind=\"$props\" @input=\"onInput\">\n <listbox-option-tag :option=\"slotProps\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import type { BentoCurrencyListboxOptions } from './dropdown-currency.types';\n import type { BentoListboxSelectedValue } from '@/types';\n import { ListboxOptionTag } from '@/internal';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the country dropdown with.\n * It must be an array of {@see BentoCurrencyListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {BentoCurrencyISOCode} value.code - Currency ISO code of the option\n */\n items: {\n type: Array as PropType<BentoCurrencyListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Currency Dropdown showing a selectable list of currencies.\n *\n * @example\n * import { BentoDropdownCountry, BentoCountryCode } from '@adyen/bento-vue2';\n * import type { BentoCountryListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdown },\n * template: `\n * <bento-dropdown-currency\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 2\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref(BentoCountryCode.NL) // Default value\n * const options: BentoCountryListboxOptions = [\n * { label: 'Option 1', value: BentoCountryCode.NL },\n * { label: 'Option 2', value: BentoCountryCode.BE },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'b-dropdown-currency',\n });\n</script>\n","<template>\n <div>\n <bento-dropdown v-slot=\"{ value, label }\" v-bind=\"$props\" @input=\"onInput\">\n <bento-payment-method :type=\"value\" :label=\"label\" />\n </bento-dropdown>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { BentoPaymentMethodListboxOptions } from './dropdown-payment-method.types';\n import { BentoListboxSelectedValue } from '@/types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n\n defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the payment method dropdown with.\n * It must be an array of {@see BentoPaymentMethodListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string} value.value - Payment type code that translates to a payment icon name {@see https://adyen-ui-assets.netlify.app/?path=/story/packages-ui-assets-payment-method-icons--icons}\n */\n items: {\n type: Array as PropType<BentoPaymentMethodListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n</script>\n\n<script lang=\"ts\">\n /**\n * A Payment method Dropdown showing a selectable list of countries.\n *\n * @example\n * import { BentoDropdownPaymentMethod } from '@adyen/bento-vue2';\n * import type { BentoPaymentMethodListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownPaymentMethod },\n * template: `\n * <bento-dropdown-payment-method\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :multiple=\"true\"\n * :isOptionsDisabled=\"option => option.value === 'Visa'\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('ideal') // Default value\n * const options: BentoPaymentMethodListboxOptions = [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-payment-method',\n });\n</script>\n","<template>\n <bento-dropdown\n v-slot=\"{ label, data }\"\n v-bind=\"$props\"\n class=\"b-dropdown-tag\"\n :items=\"tagItems\"\n show-slot-content-in-multiple\n @input=\"onInput\"\n >\n <listbox-option-tag :option=\"{ value: label, data, label: '' }\" />\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import type { BentoTagListboxOptions } from './dropdown-tag.types';\n import type { BentoListboxSelectedValue } from '../../../../../types';\n import { ListboxOptionTag } from '../../../../internal';\n import BentoDropdown from '../../../dropdown.vue';\n\n const props = defineProps({\n ...BentoDropdown.props,\n /**\n * The option elements to populate the tag dropdown with.\n * It must be an array of {@see BentoTagListboxOptions }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n * * @property {string} value.variant - The BentTag variant shown for the option.\n */\n items: {\n type: Array as PropType<BentoTagListboxOptions>,\n default: () => [],\n },\n });\n\n const emit = defineEmits([\"input\"]);\n\n const onInput = (selectedValue: BentoListboxSelectedValue) => emit('input', selectedValue);\n\n const tagItems = computed(() => props.items?.map(({ label, value, variant }) => ({ label, value, data: variant })));\n</script>\n\n<script lang=\"ts\">\n /**\n * A Tag Dropdown showing a selectable list of tags.\n *\n * @example\n * import { BentoDropdownTag } from '@adyen/bento-vue2';\n * import type { BentoTagListboxOptions } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoDropdownTag },\n * template: `\n * <bento-dropdown-tag\n * v-model=\"selectedValue\"\n * :disabled=\"false\"\n * :items=\"options\"\n * />\n * `,\n * setup() {\n * const selectedValue = ref('unique-id-1') // Default value\n * const options: BentoTagListboxOptions = [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * ];\n * return { options, selectedValue };\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-dropdown-tag',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./dropdown-tag.scss\" />\n"],"names":["__default__$4","defineComponent","onInput","selectedValue","emit","dropdownItems","computed","props","value","label","src","__default__$3","variant","items","toRefs","countryItems","useCountryItems","item","deprecate","__default__$2","__default__$1","__default__","tagItems","_a"],"mappings":";;;;;;;;;;AAkEI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBApCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAE,IAAAC,EAAA,MAAAC,EAAA,MAAA,IAAA,CAAA,EAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,EAAA,OAAA,EAAA,OAAAF,GAAA,OAAAC,GAAA,MAAAC,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;sBCqDAC,IAAAV,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEA,EAAA,SAAAS,GAAA,OAAAC,EAAA,IAAAC,EAAAP,CAAA,GACAQ,IAAAC,EAAAJ,GAAAC,CAAA;AAEA,YAAAD,EAAA,UAAA,YAAAC,EAAA,MAAA,KAAA,CAAAI,MAAAA,EAAA,KAAA,MACIC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;sBCQRC,IAAAlB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCkCAiB,IAAAnB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;0CAlCA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;;;;;;;;;;;;;;;;sBCsCAkB,IAAApB,EAAA;AAAA,EAA+B,MAAA;AAE/B,CAAA;;;;;;;;;;;;;;;;;;iBAlCAC,IAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA,GAEAmB,IAAAhB,EAAA,MAAA;;AAAA,cAAAiB,IAAAhB,EAAA,UAAA,gBAAAgB,EAAA,IAAA,CAAA,EAAA,OAAAd,GAAA,OAAAD,GAAA,SAAAI,EAAA,OAAA,EAAA,OAAAH,GAAA,OAAAD,GAAA,MAAAI,EAAA;AAAA,KAAA;;;;;;;;;;;;;;;;;;"}