@adyen/bento-vue2 1.7.0 → 1.8.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 (223) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
  4. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
  5. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
  6. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +28 -18
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
  9. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
  11. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
  12. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +18 -0
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +320 -21
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +9 -0
  16. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +9 -0
  17. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +9 -0
  18. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +9 -0
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +9 -0
  20. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
  21. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
  22. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
  23. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
  24. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
  25. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
  26. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
  27. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
  28. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
  29. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
  30. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
  31. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
  32. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  33. package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
  34. package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
  35. package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
  36. package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
  37. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
  38. package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
  39. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +16 -22
  40. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
  41. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
  42. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
  43. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
  44. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
  45. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
  46. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
  47. package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +18 -2
  48. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  49. package/dist/accordion.js +1 -1
  50. package/dist/action-bar.js +112 -93
  51. package/dist/action-bar.js.map +1 -1
  52. package/dist/alert.js +1 -1
  53. package/dist/assets/base-modal.css +1 -1
  54. package/dist/assets/calendar.css +1 -1
  55. package/dist/assets/checkbox.css +1 -1
  56. package/dist/assets/controls-group.css +1 -1
  57. package/dist/assets/dropdown.css +1 -1
  58. package/dist/assets/field-label.css +1 -0
  59. package/dist/assets/grid-layout.css +1 -1
  60. package/dist/assets/index.css +1 -1
  61. package/dist/assets/index11.css +1 -1
  62. package/dist/assets/index12.css +1 -1
  63. package/dist/assets/index13.css +1 -1
  64. package/dist/assets/index14.css +1 -1
  65. package/dist/assets/index15.css +1 -1
  66. package/dist/assets/index16.css +1 -1
  67. package/dist/assets/index17.css +1 -1
  68. package/dist/assets/index18.css +1 -1
  69. package/dist/assets/index19.css +1 -1
  70. package/dist/assets/index2.css +1 -1
  71. package/dist/assets/index20.css +1 -1
  72. package/dist/assets/index21.css +1 -1
  73. package/dist/assets/index22.css +1 -1
  74. package/dist/assets/index23.css +1 -1
  75. package/dist/assets/index24.css +1 -1
  76. package/dist/assets/index25.css +1 -1
  77. package/dist/assets/index26.css +1 -1
  78. package/dist/assets/index27.css +1 -1
  79. package/dist/assets/index28.css +1 -1
  80. package/dist/assets/index29.css +1 -1
  81. package/dist/assets/index3.css +1 -1
  82. package/dist/assets/index30.css +1 -1
  83. package/dist/assets/index32.css +1 -1
  84. package/dist/assets/index33.css +1 -1
  85. package/dist/assets/index34.css +1 -1
  86. package/dist/assets/index35.css +1 -1
  87. package/dist/assets/index36.css +1 -1
  88. package/dist/assets/index37.css +1 -1
  89. package/dist/assets/index38.css +1 -1
  90. package/dist/assets/index39.css +1 -1
  91. package/dist/assets/index4.css +1 -1
  92. package/dist/assets/index40.css +1 -1
  93. package/dist/assets/index41.css +1 -1
  94. package/dist/assets/index42.css +1 -1
  95. package/dist/assets/index43.css +1 -1
  96. package/dist/assets/index44.css +1 -1
  97. package/dist/assets/index45.css +1 -1
  98. package/dist/assets/index5.css +1 -1
  99. package/dist/assets/index6.css +1 -1
  100. package/dist/assets/index7.css +1 -1
  101. package/dist/assets/index8.css +1 -1
  102. package/dist/assets/index9.css +1 -1
  103. package/dist/assets/loading-button.css +1 -1
  104. package/dist/avatar-image.js +1 -1
  105. package/dist/badge.js +1 -1
  106. package/dist/button.js +38 -35
  107. package/dist/button.js.map +1 -1
  108. package/dist/card.js +1 -1
  109. package/dist/checkbox.js +5 -5
  110. package/dist/chunks/{base-modal.88e7b9d4.js → base-modal.31634fe8.js} +60 -49
  111. package/dist/chunks/base-modal.31634fe8.js.map +1 -0
  112. package/dist/chunks/{button-actions-with-menu.a5413243.js → button-actions-with-menu.5faea13e.js} +5 -5
  113. package/dist/chunks/{button-actions-with-menu.a5413243.js.map → button-actions-with-menu.5faea13e.js.map} +1 -1
  114. package/dist/chunks/button.e09d5980.js.map +1 -1
  115. package/dist/chunks/calendar.47e9e755.js +959 -0
  116. package/dist/chunks/calendar.47e9e755.js.map +1 -0
  117. package/dist/chunks/{checkbox.5343e28e.js → checkbox.2277450e.js} +67 -56
  118. package/dist/chunks/checkbox.2277450e.js.map +1 -0
  119. package/dist/chunks/controls-group.6c5bfccd.js +79 -0
  120. package/dist/chunks/controls-group.6c5bfccd.js.map +1 -0
  121. package/dist/chunks/{copy.346eadb1.js → copy.a85c2e9f.js} +3 -3
  122. package/dist/chunks/{copy.346eadb1.js.map → copy.a85c2e9f.js.map} +1 -1
  123. package/dist/chunks/{dropdown.f1253a54.js → dropdown.ce937989.js} +200 -196
  124. package/dist/chunks/dropdown.ce937989.js.map +1 -0
  125. package/dist/chunks/field-label.330edb60.js +107 -0
  126. package/dist/chunks/field-label.330edb60.js.map +1 -0
  127. package/dist/chunks/{grid-layout.b7e0d964.js → grid-layout.a806acb2.js} +36 -27
  128. package/dist/chunks/grid-layout.a806acb2.js.map +1 -0
  129. package/dist/chunks/index.210d2169.js +290 -0
  130. package/dist/chunks/index.210d2169.js.map +1 -0
  131. package/dist/chunks/{index.8ac70774.js → index.66503760.js} +3 -3
  132. package/dist/chunks/{index.8ac70774.js.map → index.66503760.js.map} +1 -1
  133. package/dist/chunks/{index.2625175a.js → index.86fc63ca.js} +30 -28
  134. package/dist/chunks/{index.2625175a.js.map → index.86fc63ca.js.map} +1 -1
  135. package/dist/chunks/{index.a201f750.js → index.89942d3a.js} +4 -5
  136. package/dist/chunks/{index.a201f750.js.map → index.89942d3a.js.map} +1 -1
  137. package/dist/chunks/index.a5de5242.js +130 -0
  138. package/dist/chunks/index.a5de5242.js.map +1 -0
  139. package/dist/chunks/index.a99ffd48.js +634 -0
  140. package/dist/chunks/index.a99ffd48.js.map +1 -0
  141. package/dist/chunks/index.d80206ed.js +10 -0
  142. package/dist/chunks/index.d80206ed.js.map +1 -0
  143. package/dist/chunks/{index.37283390.js → index.d8bd7596.js} +96 -99
  144. package/dist/chunks/{index.37283390.js.map → index.d8bd7596.js.map} +1 -1
  145. package/dist/chunks/{listbox-option-tag.6a09e8e2.js → listbox-option-tag.97af47fc.js} +6 -7
  146. package/dist/chunks/{listbox-option-tag.6a09e8e2.js.map → listbox-option-tag.97af47fc.js.map} +1 -1
  147. package/dist/chunks/{listbox.73c38f38.js → listbox.d039b178.js} +5 -6
  148. package/dist/chunks/{listbox.73c38f38.js.map → listbox.d039b178.js.map} +1 -1
  149. package/dist/chunks/loading-button.9a9cbbad.js +89 -0
  150. package/dist/chunks/loading-button.9a9cbbad.js.map +1 -0
  151. package/dist/chunks/{tooltip.104e5fac.js → tooltip.ecd0f707.js} +2 -2
  152. package/dist/chunks/{tooltip.104e5fac.js.map → tooltip.ecd0f707.js.map} +1 -1
  153. package/dist/code-snippet.js +4 -4
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +1 -1
  156. package/dist/data-grid.js +563 -541
  157. package/dist/data-grid.js.map +1 -1
  158. package/dist/date-picker.js +83 -80
  159. package/dist/date-picker.js.map +1 -1
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/divider.js +1 -1
  162. package/dist/dropdown.js +3 -3
  163. package/dist/empty-state.js +1 -1
  164. package/dist/filter-bar.js +13 -12
  165. package/dist/filter-bar.js.map +1 -1
  166. package/dist/focus-trap.js +1 -1
  167. package/dist/form-layout.js +1 -1
  168. package/dist/header.js +63 -67
  169. package/dist/header.js.map +1 -1
  170. package/dist/index.js +211 -209
  171. package/dist/index.js.map +1 -1
  172. package/dist/info-icon.js +3 -3
  173. package/dist/input-field.js +57 -55
  174. package/dist/input-field.js.map +1 -1
  175. package/dist/internal.js +13 -12
  176. package/dist/link.js +1 -1
  177. package/dist/loading-indicator.js +1 -1
  178. package/dist/menu.js +1 -1
  179. package/dist/modal.js +2 -2
  180. package/dist/modal.js.map +1 -1
  181. package/dist/pagination.js +2 -2
  182. package/dist/payment-method.js +1 -1
  183. package/dist/popover.js +3 -305
  184. package/dist/popover.js.map +1 -1
  185. package/dist/popper-container.js +1 -1
  186. package/dist/radio-group.js +3 -3
  187. package/dist/search-bar.js +2 -2
  188. package/dist/segmented-control.js +2 -2
  189. package/dist/sidepanel.js +2 -2
  190. package/dist/status.js +1 -1
  191. package/dist/stepper.js +1 -1
  192. package/dist/structured-list.js +1 -1
  193. package/dist/summary-grid.js +3 -3
  194. package/dist/summary-grid.js.map +1 -1
  195. package/dist/tabs.js +1 -1
  196. package/dist/tag.js +2 -2
  197. package/dist/textarea.js +59 -56
  198. package/dist/textarea.js.map +1 -1
  199. package/dist/timeline.js +226 -173
  200. package/dist/timeline.js.map +1 -1
  201. package/dist/toast.js +1 -1
  202. package/dist/toggle.js +1 -1
  203. package/dist/tutorial.js +7 -7
  204. package/dist/web-types.json +519 -393
  205. package/package.json +3 -3
  206. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -118
  207. package/dist/assets/error-message.css +0 -1
  208. package/dist/chunks/base-modal.88e7b9d4.js.map +0 -1
  209. package/dist/chunks/calendar.24d0ac04.js +0 -821
  210. package/dist/chunks/calendar.24d0ac04.js.map +0 -1
  211. package/dist/chunks/checkbox.5343e28e.js.map +0 -1
  212. package/dist/chunks/controls-group.2a21bd83.js +0 -87
  213. package/dist/chunks/controls-group.2a21bd83.js.map +0 -1
  214. package/dist/chunks/dropdown.f1253a54.js.map +0 -1
  215. package/dist/chunks/error-message.8302a46c.js +0 -47
  216. package/dist/chunks/error-message.8302a46c.js.map +0 -1
  217. package/dist/chunks/grid-layout.b7e0d964.js.map +0 -1
  218. package/dist/chunks/index.d6b5f5e1.js +0 -112
  219. package/dist/chunks/index.d6b5f5e1.js.map +0 -1
  220. package/dist/chunks/index.e566354f.js +0 -532
  221. package/dist/chunks/index.e566354f.js.map +0 -1
  222. package/dist/chunks/loading-button.c65682d6.js +0 -86
  223. package/dist/chunks/loading-button.c65682d6.js.map +0 -1
@@ -0,0 +1,290 @@
1
+ import { defineComponent as r, computed as a, useSlots as T, useAttrs as A, inject as x, ref as L, toRefs as O } from "vue";
2
+ import { c as E, a as d, b as F } from "./index.66503760.js";
3
+ import { B as I, a as f } from "./index.965ac1af.js";
4
+ import { n as l } from "./_plugin-vue2_normalizer.71e2aa87.js";
5
+ import { a as $ } from "./button.e09d5980.js";
6
+ import { C as k } from "./cross.a2cadac5.js";
7
+ import { u as R } from "./use-has-slot.6052d56a.js";
8
+ import { u as w } from "./aria-label.ac9651a5.js";
9
+ import { BentoButtonActionsLayout as m, BentoButtonActions as D } from "../button.js";
10
+ import "../assets/index36.css";
11
+ const V = r({
12
+ components: { BentoTypography: I },
13
+ props: {
14
+ /**
15
+ * Indicates if the popover contains an image.
16
+ */
17
+ isImageTitle: { type: Boolean, default: !1 },
18
+ /**
19
+ * Indicates the title you want to give the popover.
20
+ */
21
+ title: { type: String, default: null }
22
+ },
23
+ setup(s) {
24
+ const t = a(() => !s.isImageTitle), e = a(
25
+ () => s.isImageTitle ? f.SUBTITLE : f.BODY
26
+ );
27
+ return {
28
+ // Values
29
+ isStrongest: t,
30
+ titleVariant: e
31
+ };
32
+ }
33
+ });
34
+ var j = function() {
35
+ var t = this, e = t._self._c;
36
+ return t._self._setupProxy, e("bento-typography", { attrs: { strongest: t.isStrongest, variant: t.titleVariant, el: "span" } }, [t._v(" " + t._s(t.title) + " ")]);
37
+ }, N = [], U = /* @__PURE__ */ l(
38
+ V,
39
+ j,
40
+ N,
41
+ !1,
42
+ null,
43
+ null,
44
+ null,
45
+ null
46
+ );
47
+ const Y = U.exports, q = r({
48
+ name: "bento-popover-dismiss-button",
49
+ components: { BentoButton: $, CrossIcon: k },
50
+ props: {
51
+ onImage: {
52
+ type: Boolean,
53
+ default: !1
54
+ }
55
+ },
56
+ setup(s) {
57
+ return {
58
+ // Values
59
+ conditionalClass: a(() => ({ "b-popover-dismiss-button--on-image": s.onImage }))
60
+ };
61
+ }
62
+ });
63
+ var z = function() {
64
+ var t = this, e = t._self._c;
65
+ return t._self._setupProxy, e("bento-button", { class: t.conditionalClass, attrs: { variant: "tertiary" }, on: { click: function(o) {
66
+ return t.$emit("click");
67
+ } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
68
+ return [e("cross-icon", { attrs: { "svg-title": "dismiss" } })];
69
+ }, proxy: !0 }]) });
70
+ }, H = [], J = /* @__PURE__ */ l(
71
+ q,
72
+ z,
73
+ H,
74
+ !1,
75
+ null,
76
+ "71876338",
77
+ null,
78
+ null
79
+ );
80
+ const K = J.exports, v = { ...E }, M = Symbol("popover offset injection key"), G = {};
81
+ var b;
82
+ const Q = /* @__PURE__ */ r({
83
+ ...G,
84
+ __name: "popover",
85
+ props: {
86
+ /**
87
+ * List of actions that will be used to render the buttons.
88
+ * First element in the list will be rendered as "primary".
89
+ * All elements after the first will be rendered as "secondary".
90
+ *
91
+ * Each object in the list should have a `title`, an `event` and
92
+ * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.
93
+ *
94
+ * `title`: Button's text.
95
+ *
96
+ * `event`: Event triggered when clicking the Button.
97
+ *
98
+ * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.
99
+ *
100
+ * ```
101
+ * [{
102
+ * title: 'Primary',
103
+ * event: () => { ... },
104
+ * icon: FourPeopleIcon
105
+ * }, {
106
+ * title: 'Secondary',
107
+ * event: () => { ... }
108
+ * }]
109
+ * ```
110
+ */
111
+ actions: {
112
+ type: Array,
113
+ default: null
114
+ },
115
+ /**
116
+ * Defines the layout in which the button actions is presented.
117
+ * It can be one of:
118
+ *
119
+ * @values BUTTONS_END
120
+ * @values FILL_CONTAINER
121
+ * @values SPACE_BETWEEN
122
+ * @values VERTICAL_STACK
123
+ */
124
+ actionsLayout: {
125
+ type: String,
126
+ default: m.BUTTONS_END,
127
+ validator: (s) => Object.values(m).includes(s)
128
+ },
129
+ /**
130
+ * @deprecated from version 2.0.0. Use the aria-label attribute instead.
131
+ */
132
+ /**
133
+ * Defines a string value that provides an accessible name for the popover.
134
+ */
135
+ ariaLabel: {
136
+ type: String,
137
+ default: null
138
+ },
139
+ /**
140
+ * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the "default" slot.
141
+ */
142
+ divider: {
143
+ type: Boolean,
144
+ default: !1
145
+ },
146
+ /**
147
+ * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.
148
+ * */
149
+ disableFocusTrap: {
150
+ type: Boolean,
151
+ default: !1
152
+ },
153
+ /**
154
+ * Adds a "dismiss" icon that triggers the "dismiss" event. Requires the `title` prop to be set.
155
+ */
156
+ dismissible: {
157
+ type: Boolean,
158
+ default: !1
159
+ },
160
+ /**
161
+ * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].
162
+ * Useful when not using auto as starting placement.
163
+ * https://floating-ui.com/docs/flip#fallbackplacements
164
+ */
165
+ fallbackPosition: {
166
+ type: Array,
167
+ default: () => ["bottom-start", "right-start", "top-start", "left-start"]
168
+ },
169
+ /**
170
+ * Sets the size of the container to fit its content
171
+ */
172
+ fitContent: { type: Boolean, default: !1 },
173
+ /**
174
+ * Instructs popover to be visible outside of the containing container.
175
+ * Useful when component would be used in limited containers like Modal, Side panel, etc.
176
+ * @see {@link https://floating-ui.com/docs/usefloating#strategy}
177
+ */
178
+ fixedPositioning: {
179
+ type: Boolean,
180
+ default: !1
181
+ },
182
+ /**
183
+ * Toggles the popover open and closed
184
+ */
185
+ open: {
186
+ type: Boolean,
187
+ default: !1
188
+ },
189
+ /**
190
+ * Displays the popover in a large size.
191
+ */
192
+ large: {
193
+ type: Boolean,
194
+ default: !1
195
+ },
196
+ /**
197
+ * @deprecated
198
+ * NOTE: This property no longer functions since moving to the floating-ui framework.
199
+ */
200
+ modifiers: { type: Array, default: null },
201
+ /**
202
+ * Popover's position relative to the target element.
203
+ * Possible values are:
204
+ * 'auto', 'auto-start', 'auto-end',
205
+ * 'top', 'top-start', 'top-end'
206
+ * 'right', 'right-start', 'right-end'
207
+ * 'bottom', 'bottom-start', 'bottom-end'
208
+ * 'left', 'left-start', 'left-end'
209
+ */
210
+ position: {
211
+ type: String,
212
+ default: v.BOTTOM_START,
213
+ validator: (s) => Object.values(v).includes(s)
214
+ },
215
+ /**
216
+ * Displays the popover in a small size.
217
+ */
218
+ small: {
219
+ type: Boolean,
220
+ default: !1
221
+ },
222
+ /**
223
+ * Indicates the title you want to give the popover.
224
+ */
225
+ title: {
226
+ type: String,
227
+ default: null
228
+ },
229
+ /**
230
+ * Popover's target element.
231
+ * The popover will position itself relatively to target element, in specified position.
232
+ */
233
+ targetElement: {
234
+ type: (b = d.props) == null ? void 0 : b.targetElement.type,
235
+ required: !0
236
+ },
237
+ /**
238
+ * Displays the popover without padding.
239
+ */
240
+ withoutSpace: {
241
+ type: Boolean,
242
+ default: !1
243
+ }
244
+ },
245
+ emits: ["dismiss", "placement"],
246
+ setup(s, { emit: t }) {
247
+ const e = s, o = 2, n = T(), i = A(), y = a(() => {
248
+ var u;
249
+ return {
250
+ id: (u = i.id) == null ? void 0 : u.toString()
251
+ };
252
+ }), g = x(M, o), p = L(i["aria-label"]), { ariaLabel: c, title: _ } = O(e), B = w({
253
+ ariaLabel: p.value,
254
+ // TODO: take this line away when the aria-label props is removed
255
+ label: c,
256
+ defaultFallback: _
257
+ }), P = a(() => ({
258
+ "b-popover--small": e.small && !e.large,
259
+ "b-popover--with-divider": !!e.divider,
260
+ "b-popover--large": e.large && !e.small,
261
+ "b-popover--fit-content": e.fitContent,
262
+ "b-popover--without-space": e.withoutSpace
263
+ })), C = a(() => ({
264
+ "b-popover__content--with-title": !!e.title
265
+ })), S = () => t("dismiss"), h = R(n);
266
+ return { __sfc: !0, DEFAULT_OFFSET: o, props: e, emit: t, slots: n, attrs: i, computedAttributes: y, offset: g, ariaLabelAttribute: p, ariaLabel: c, title: _, computedAriaLabel: B, conditionalClasses: P, contentConditionalClasses: C, dismissPopover: S, hasSlot: h, BentoButtonActions: D, PopperContainer: d, PopperContainerAriaRole: F, BentoPopoverTitle: Y, BentoPopoverDismissButton: K };
267
+ }
268
+ });
269
+ var W = function() {
270
+ var t = this, e = t._self._c, o = t._self._setupProxy;
271
+ return e("Transition", { attrs: { name: "b-popover__animation" } }, [t.open ? e(o.PopperContainer, { staticClass: "b-popover", class: o.conditionalClasses, attrs: { id: o.computedAttributes.id, "aria-role": o.PopperContainerAriaRole.POPOVER, "aria-label": o.computedAriaLabel, arrow: { classes: ["b-popover__arrow"] }, "disabled-focus-trap": t.disableFocusTrap, "fallback-position": t.fallbackPosition, "fixed-positioning": t.fixedPositioning, offset: [0, o.offset], position: t.position, "target-element": t.targetElement }, on: { placement: function(n) {
272
+ return t.$emit("placement", n);
273
+ } } }, [o.hasSlot("image") ? e("div", { staticClass: "b-popover__image" }, [t.dismissible ? e("div", { staticClass: "b-popover__image-dismiss-button" }, [e(o.BentoPopoverDismissButton, { attrs: { "on-image": "" }, on: { click: o.dismissPopover } })], 1) : t._e(), t._t("image")], 2) : t._e(), o.title ? e("div", { staticClass: "b-popover__header" }, [e("div", { staticClass: "b-popover__header-title" }, [o.hasSlot("headerIcon") ? t._t("headerIcon") : t._e(), e(o.BentoPopoverTitle, { attrs: { title: o.title, "is-image-title": !!o.hasSlot("image") } })], 2), t.dismissible && !o.hasSlot("image") ? e("div", [e(o.BentoPopoverDismissButton, { on: { click: o.dismissPopover } })], 1) : t._e()]) : t._e(), o.hasSlot("default") ? e("div", { staticClass: "b-popover__content", class: o.contentConditionalClasses }, [t._t("default")], 2) : t._e(), t.actions ? e("div", { staticClass: "b-popover__footer" }, [e(o.BentoButtonActions, { attrs: { actions: t.actions, layout: t.actionsLayout } })], 1) : t._e()]) : t._e()], 1);
274
+ }, X = [], Z = /* @__PURE__ */ l(
275
+ Q,
276
+ W,
277
+ X,
278
+ !1,
279
+ null,
280
+ "6a9f44ad",
281
+ null,
282
+ null
283
+ );
284
+ const pt = Z.exports;
285
+ export {
286
+ v as B,
287
+ M as P,
288
+ pt as a
289
+ };
290
+ //# sourceMappingURL=index.210d2169.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.210d2169.js","sources":["../../src/components/popover/components/popover-title/popover-title.vue","../../src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../../src/components/popover/popover.types.ts","../../src/components/popover/popover.keys.ts","../../src/components/popover/popover.vue"],"sourcesContent":["<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" el=\"span\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" variant=\"tertiary\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","import { PopperContainerPosition } from '../popper-container';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","export const POPOVER_OFFSET_INJECTION_KEY = Symbol('popover offset injection key');\n","<template>\n <Transition name=\"b-popover__animation\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n :aria-role=\"PopperContainerAriaRole.POPOVER\"\n :aria-label=\"computedAriaLabel\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :fallback-position=\"fallbackPosition\"\n :fixed-positioning=\"fixedPositioning\"\n :offset=\"[0, offset]\"\n :position=\"position\"\n :target-element=\"targetElement\"\n class=\"b-popover\"\n @placement=\"$emit('placement', $event)\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, ref, toRefs, useAttrs, useSlots } from 'vue';\n\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n\n import { BentoPopoverPositions } from './popover.types';\n import { Placement } from '@floating-ui/vue';\n\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n import { POPOVER_OFFSET_INJECTION_KEY } from './popover.keys';\n\n const DEFAULT_OFFSET = 2;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition: {\n type: Array as PropType<Placement[]>,\n default: () => ['bottom-start', 'right-start', 'top-start', 'left-start'],\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Triggered when the `dismiss` button is clicked\n */\n (e: 'dismiss'): void;\n /**\n * Triggered when the popover `placement` changes\n */\n (e: 'placement', placement: Placement): void;\n }>();\n\n const slots = useSlots();\n const attrs = useAttrs();\n\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n }));\n\n const offset = inject<number>(POPOVER_OFFSET_INJECTION_KEY, DEFAULT_OFFSET);\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, title } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: title,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","_sfc_main$1","BentoButton","CrossIcon","BentoPopoverPositions","PopperContainerPosition","POPOVER_OFFSET_INJECTION_KEY","__default__","DEFAULT_OFFSET","slots","useSlots","attrs","useAttrs","computedAttributes","_a","offset","inject","ariaLabelAttribute","ref","ariaLabel","title","toRefs","computedAriaLabel","useAriaLabel","conditionalClasses","contentConditionalClasses","dismissPopover","emit","hasSlot","useHasSlot"],"mappings":";;;;;;;;;;AAUA,MAAAA,IAAAC,EAAA;AAAA,EAAA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,cAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA,EAKA;AAAA,EACA,MAAAC,GAAA;AAGA,UAAAC,IAAAC,EAAA,MAAA,CAAAF,EAAA,YAAA,GAGAG,IAAAD;AAAA,MAAA,MAAAF,EAAA,eAAAI,EAAA,WAAAA,EAAA;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,aAAAH;AAAA,MAEA,cAAAE;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;qBCzBAE,IAAAP,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,aAAAQ,GAAA,WAAAC,EAAA;AAAA,EACA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAP,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,kBAFAE,EAAA,OAAA,EAAA,sCAAAF,EAAA,QAAA,EAAA;AAAA,IAIA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;qBCzBaQ,IAAA,EAAA,GAAAC,EAAA,GCLAC,IAAA,OAAA,8BAAA,GC6STC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhPAC,IAAA,GA6LAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GAEAC,IAAAf,EAAA,MAAA;;AAAA;AAAA,QAA2C,KAAAgB,IAAAH,EAAA,OAAA,gBAAAG,EAAA;AAAA,MAChB;AAAA,KAAA,GAG3BC,IAAAC,EAAAV,GAAAE,CAAA,GAEAS,IAAAC,EAAAP,EAAA,YAAA,CAAA,GACA,EAAA,WAAAQ,GAAA,OAAAC,EAAA,IAAAC,EAAAzB,CAAA,GACA0B,IAAAC,EAAA;AAAA,MAAuC,WAAAN,EAAA;AAAA;AAAA,MACL,OAAAE;AAAA,MAEvB,iBAAAC;AAAA,IACU,CAAA,GAGrBI,IAAA1B,EAAA,OAAA;AAAA,MAA2C,oBAAAF,EAAA,SAAA,CAAAA,EAAA;AAAA,MACG,2BAAA,CAAA,CAAAA,EAAA;AAAA,MACP,oBAAAA,EAAA,SAAA,CAAAA,EAAA;AAAA,MACO,0BAAAA,EAAA;AAAA,MACV,4BAAAA,EAAA;AAAA,IACE,EAAA,GAGtC6B,IAAA3B,EAAA,OAAA;AAAA,MAAkD,kCAAA,CAAA,CAAAF,EAAA;AAAA,IACJ,EAAA,GAG9C8B,IAAA,MAAAC,EAAA,SAAA,GAEAC,IAAAC,EAAApB,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { unref as G, computed as R, ref as I, shallowRef as Xt, watch as Z, getCurrentScope as Yt, onScopeDispose as qt, shallowReadonly as q, defineComponent as Gt, toRefs as Kt } from "vue";
2
2
  import "./index.af05ced4.js";
3
- import { B as Jt } from "./index.2625175a.js";
3
+ import { B as Jt } from "./index.86fc63ca.js";
4
4
  import { n as Qt } from "./_plugin-vue2_normalizer.71e2aa87.js";
5
- import "../assets/index6.css";
5
+ import "../assets/index37.css";
6
6
  const Lt = ["top", "right", "bottom", "left"], yt = ["start", "end"], xt = /* @__PURE__ */ Lt.reduce((t, e) => t.concat(e, e + "-" + yt[0], e + "-" + yt[1]), []), J = Math.min, U = Math.max, it = Math.round, ot = Math.floor, z = (t) => ({
7
7
  x: t,
8
8
  y: t
@@ -1325,4 +1325,4 @@ export {
1325
1325
  Qe as h,
1326
1326
  de as o
1327
1327
  };
1328
- //# sourceMappingURL=index.8ac70774.js.map
1328
+ //# sourceMappingURL=index.66503760.js.map