@adyen/bento-vue2 1.18.0 → 1.19.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 (239) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/index.d.ts +1 -0
  3. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle-button.vue.d.ts +65 -0
  4. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle.types.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/button/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +3 -8
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +3 -6
  8. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +1 -1
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +7 -5
  11. package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.types.d.ts +2 -2
  12. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +5 -5
  13. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +5 -5
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +18 -19
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +1 -1
  17. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +2 -2
  18. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +7 -7
  19. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.types.d.ts +20 -0
  20. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +90 -0
  21. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/index.d.ts +3 -0
  22. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.keys.d.ts +2 -0
  23. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.types.d.ts +16 -0
  24. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.vue.d.ts +54 -0
  25. package/dist/@types/packages/vue2/src/components/internal/dialog-page/index.d.ts +3 -0
  26. package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
  27. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +14 -0
  28. package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
  29. package/dist/@types/packages/vue2/src/components/internal/radio-input/index.d.ts +3 -0
  30. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.types.d.ts +6 -0
  31. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +80 -0
  32. package/dist/@types/packages/vue2/src/components/modal-fullscreen/components/modal-fullscreen-page.vue.d.ts +60 -0
  33. package/dist/@types/packages/vue2/src/components/modal-fullscreen/index.d.ts +1 -0
  34. package/dist/@types/packages/vue2/src/components/modal-fullscreen/modal-fullscreen.vue.d.ts +12 -1
  35. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +3 -6
  36. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +1 -1
  37. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/sidepanel/components/sidepanel-page.vue.d.ts +3 -3
  39. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +0 -2
  40. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +0 -19
  41. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.vue.d.ts +1 -1
  42. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +1 -1
  43. package/dist/accordion.js +2 -2
  44. package/dist/action-bar.js +6 -6
  45. package/dist/alert.js +3 -3
  46. package/dist/assets/base-modal.css +1 -1
  47. package/dist/assets/button-actions.css +1 -0
  48. package/dist/assets/button.css +1 -1
  49. package/dist/assets/calendar.css +1 -1
  50. package/dist/assets/checkbox.css +1 -1
  51. package/dist/assets/dialog-page.css +1 -0
  52. package/dist/assets/dropdown-default-textbox.css +1 -1
  53. package/dist/assets/dropdown.css +1 -1
  54. package/dist/assets/index10.css +1 -1
  55. package/dist/assets/index11.css +1 -1
  56. package/dist/assets/index12.css +1 -1
  57. package/dist/assets/index13.css +1 -1
  58. package/dist/assets/index14.css +1 -1
  59. package/dist/assets/index15.css +1 -1
  60. package/dist/assets/index16.css +1 -1
  61. package/dist/assets/index17.css +1 -1
  62. package/dist/assets/index18.css +1 -1
  63. package/dist/assets/index19.css +1 -1
  64. package/dist/assets/index20.css +1 -1
  65. package/dist/assets/index21.css +1 -1
  66. package/dist/assets/index22.css +1 -1
  67. package/dist/assets/index23.css +1 -1
  68. package/dist/assets/index24.css +1 -1
  69. package/dist/assets/index25.css +1 -1
  70. package/dist/assets/index26.css +1 -1
  71. package/dist/assets/index27.css +1 -1
  72. package/dist/assets/index28.css +1 -1
  73. package/dist/assets/index29.css +1 -1
  74. package/dist/assets/index3.css +1 -1
  75. package/dist/assets/index30.css +1 -1
  76. package/dist/assets/index31.css +1 -1
  77. package/dist/assets/index32.css +1 -1
  78. package/dist/assets/index33.css +1 -1
  79. package/dist/assets/index34.css +1 -1
  80. package/dist/assets/index35.css +1 -1
  81. package/dist/assets/index36.css +1 -1
  82. package/dist/assets/index37.css +1 -1
  83. package/dist/assets/index38.css +1 -1
  84. package/dist/assets/index39.css +1 -1
  85. package/dist/assets/index4.css +1 -1
  86. package/dist/assets/index40.css +1 -1
  87. package/dist/assets/index41.css +1 -1
  88. package/dist/assets/index42.css +1 -1
  89. package/dist/assets/index43.css +1 -1
  90. package/dist/assets/index44.css +1 -1
  91. package/dist/assets/index45.css +1 -1
  92. package/dist/assets/index46.css +1 -1
  93. package/dist/assets/index47.css +1 -1
  94. package/dist/assets/index48.css +1 -1
  95. package/dist/assets/index5.css +1 -1
  96. package/dist/assets/index6.css +1 -1
  97. package/dist/assets/index7.css +1 -1
  98. package/dist/assets/index8.css +1 -1
  99. package/dist/assets/index9.css +1 -1
  100. package/dist/assets/teleport.css +1 -1
  101. package/dist/avatar-image.js +1 -1
  102. package/dist/button.js +71 -93
  103. package/dist/button.js.map +1 -1
  104. package/dist/card.js +3 -3
  105. package/dist/checkbox.js +6 -6
  106. package/dist/chunks/{base-button.bf0c938c.js → base-button.3c3d473d.js} +2 -2
  107. package/dist/chunks/{base-button.bf0c938c.js.map → base-button.3c3d473d.js.map} +1 -1
  108. package/dist/chunks/{base-modal.1dc6cf96.js → base-modal.27c6f2db.js} +5 -5
  109. package/dist/chunks/{base-modal.1dc6cf96.js.map → base-modal.27c6f2db.js.map} +1 -1
  110. package/dist/chunks/{button-actions-with-menu.4ecf3d93.js → button-actions-with-menu.a38327c2.js} +4 -4
  111. package/dist/chunks/{button-actions-with-menu.4ecf3d93.js.map → button-actions-with-menu.a38327c2.js.map} +1 -1
  112. package/dist/chunks/button-actions.1dc90a19.js +111 -0
  113. package/dist/chunks/button-actions.1dc90a19.js.map +1 -0
  114. package/dist/chunks/{button.f5739261.js → button.0b6cda85.js} +3 -3
  115. package/dist/chunks/{button.f5739261.js.map → button.0b6cda85.js.map} +1 -1
  116. package/dist/chunks/calendar.263cfc88.js +913 -0
  117. package/dist/chunks/calendar.263cfc88.js.map +1 -0
  118. package/dist/chunks/checkbox.c7a74005.js +275 -0
  119. package/dist/chunks/checkbox.c7a74005.js.map +1 -0
  120. package/dist/chunks/{controls-group.2b645d54.js → controls-group.8abe0bd1.js} +3 -3
  121. package/dist/chunks/{controls-group.2b645d54.js.map → controls-group.8abe0bd1.js.map} +1 -1
  122. package/dist/chunks/{copy.e01532cf.js → copy.647aae54.js} +4 -4
  123. package/dist/chunks/{copy.e01532cf.js.map → copy.647aae54.js.map} +1 -1
  124. package/dist/chunks/dialog-page.f787969c.js +113 -0
  125. package/dist/chunks/dialog-page.f787969c.js.map +1 -0
  126. package/dist/chunks/{dropdown-default-textbox.d45138fa.js → dropdown-default-textbox.59803edd.js} +97 -111
  127. package/dist/chunks/dropdown-default-textbox.59803edd.js.map +1 -0
  128. package/dist/chunks/{dropdown.0a9acf8b.js → dropdown.0574f613.js} +62 -61
  129. package/dist/chunks/dropdown.0574f613.js.map +1 -0
  130. package/dist/chunks/{error-message.317dd85f.js → error-message.75666843.js} +2 -2
  131. package/dist/chunks/{error-message.317dd85f.js.map → error-message.75666843.js.map} +1 -1
  132. package/dist/chunks/{fixed-scroller.afe02620.js → fixed-scroller.06574a66.js} +2 -2
  133. package/dist/chunks/{fixed-scroller.afe02620.js.map → fixed-scroller.06574a66.js.map} +1 -1
  134. package/dist/chunks/{footer-actions.e0b866b1.js → footer-actions.0268a57b.js} +4 -4
  135. package/dist/chunks/{footer-actions.e0b866b1.js.map → footer-actions.0268a57b.js.map} +1 -1
  136. package/dist/chunks/{index.7aa428c2.js → index.026ae47b.js} +2 -2
  137. package/dist/chunks/{index.7aa428c2.js.map → index.026ae47b.js.map} +1 -1
  138. package/dist/chunks/{index.898a95bc.js → index.0bb773a7.js} +6 -6
  139. package/dist/chunks/{index.898a95bc.js.map → index.0bb773a7.js.map} +1 -1
  140. package/dist/chunks/{index.651dac2d.js → index.10b9618d.js} +3 -3
  141. package/dist/chunks/{index.651dac2d.js.map → index.10b9618d.js.map} +1 -1
  142. package/dist/chunks/{index.6c299479.js → index.302e9cf2.js} +2 -2
  143. package/dist/chunks/{index.6c299479.js.map → index.302e9cf2.js.map} +1 -1
  144. package/dist/chunks/index.408e1419.js +712 -0
  145. package/dist/chunks/index.408e1419.js.map +1 -0
  146. package/dist/chunks/{index.88ac1dab.js → index.45cd2344.js} +31 -31
  147. package/dist/chunks/index.45cd2344.js.map +1 -0
  148. package/dist/chunks/{index.6c017121.js → index.5b47c56b.js} +7 -7
  149. package/dist/chunks/{index.6c017121.js.map → index.5b47c56b.js.map} +1 -1
  150. package/dist/chunks/{index.2e70720a.js → index.5bfc67d1.js} +2 -2
  151. package/dist/chunks/{index.2e70720a.js.map → index.5bfc67d1.js.map} +1 -1
  152. package/dist/chunks/{index.e6aa2c36.js → index.932c230b.js} +6 -6
  153. package/dist/chunks/{index.e6aa2c36.js.map → index.932c230b.js.map} +1 -1
  154. package/dist/chunks/{index.81443e01.js → index.a52b98d1.js} +8 -8
  155. package/dist/chunks/{index.81443e01.js.map → index.a52b98d1.js.map} +1 -1
  156. package/dist/chunks/{index.290bbc9e.js → index.dc985e76.js} +3 -3
  157. package/dist/chunks/{index.290bbc9e.js.map → index.dc985e76.js.map} +1 -1
  158. package/dist/chunks/{index.546b27ae.js → index.de687404.js} +3 -2
  159. package/dist/chunks/{index.546b27ae.js.map → index.de687404.js.map} +1 -1
  160. package/dist/chunks/{listbox-option-tag.720eabb5.js → listbox-option-tag.89846151.js} +3 -3
  161. package/dist/chunks/{listbox-option-tag.720eabb5.js.map → listbox-option-tag.89846151.js.map} +1 -1
  162. package/dist/chunks/{listbox.dc3d986e.js → listbox.a8180c4a.js} +5 -5
  163. package/dist/chunks/{listbox.dc3d986e.js.map → listbox.a8180c4a.js.map} +1 -1
  164. package/dist/chunks/{loading-button.390228ff.js → loading-button.50dddf2f.js} +2 -2
  165. package/dist/chunks/{loading-button.390228ff.js.map → loading-button.50dddf2f.js.map} +1 -1
  166. package/dist/chunks/modal-fullscreen.keys.b9f31632.js +5 -0
  167. package/dist/chunks/modal-fullscreen.keys.b9f31632.js.map +1 -0
  168. package/dist/chunks/sidepanel.keys.1ed8a57c.js +5 -0
  169. package/dist/chunks/sidepanel.keys.1ed8a57c.js.map +1 -0
  170. package/dist/chunks/{teleport.d52e5254.js → teleport.84b0f20b.js} +14 -13
  171. package/dist/chunks/teleport.84b0f20b.js.map +1 -0
  172. package/dist/chunks/{tooltip.d452f6c4.js → tooltip.6748027a.js} +3 -3
  173. package/dist/chunks/{tooltip.d452f6c4.js.map → tooltip.6748027a.js.map} +1 -1
  174. package/dist/code-snippet.js +7 -7
  175. package/dist/code-snippet.js.map +1 -1
  176. package/dist/country.js +2 -2
  177. package/dist/currency.js +1 -1
  178. package/dist/data-grid.js +1 -1
  179. package/dist/date-picker.js +18 -18
  180. package/dist/date-range-picker.js +2 -2
  181. package/dist/date.js +1 -1
  182. package/dist/divider.js +1 -1
  183. package/dist/dropdown.js +6 -6
  184. package/dist/empty-state.js +3 -3
  185. package/dist/filter-bar.js +19 -19
  186. package/dist/filter-bar.js.map +1 -1
  187. package/dist/focus-trap.js +1 -1
  188. package/dist/form-layout.js +2 -2
  189. package/dist/header.js +4 -4
  190. package/dist/index.js +299 -2935
  191. package/dist/index.js.map +1 -1
  192. package/dist/info-icon.js +3 -3
  193. package/dist/input-field.js +4 -4
  194. package/dist/internal.js +78 -25
  195. package/dist/internal.js.map +1 -1
  196. package/dist/link.js +1 -1
  197. package/dist/loading-indicator.js +1 -1
  198. package/dist/menu.js +1 -1
  199. package/dist/modal-fullscreen.js +144 -44
  200. package/dist/modal-fullscreen.js.map +1 -1
  201. package/dist/modal.js +6 -6
  202. package/dist/pagination.js +4 -4
  203. package/dist/payment-method.js +2 -2
  204. package/dist/popover.js +1 -1
  205. package/dist/popper-container.js +1 -1
  206. package/dist/radio-group.js +147 -78
  207. package/dist/radio-group.js.map +1 -1
  208. package/dist/search-bar.js +2 -2
  209. package/dist/secondary-nav.js +2 -2
  210. package/dist/segmented-control.js +3 -3
  211. package/dist/sidepanel.js +78 -111
  212. package/dist/sidepanel.js.map +1 -1
  213. package/dist/status.js +2 -2
  214. package/dist/stepper.js +3 -3
  215. package/dist/structured-list.js +1 -1
  216. package/dist/summary-grid.js +3 -3
  217. package/dist/tabs.js +3 -3
  218. package/dist/tag.js +3 -3
  219. package/dist/textarea.js +4 -4
  220. package/dist/timeline.js +12 -12
  221. package/dist/toast.js +3 -3
  222. package/dist/toggle.js +2 -2
  223. package/dist/tutorial.js +6 -6
  224. package/dist/typography.js +1 -1
  225. package/dist/web-types.json +431 -5
  226. package/package.json +3 -3
  227. package/dist/chunks/calendar.7a2d1894.js +0 -960
  228. package/dist/chunks/calendar.7a2d1894.js.map +0 -1
  229. package/dist/chunks/checkbox.1345941b.js +0 -195
  230. package/dist/chunks/checkbox.1345941b.js.map +0 -1
  231. package/dist/chunks/dropdown-default-textbox.d45138fa.js.map +0 -1
  232. package/dist/chunks/dropdown.0a9acf8b.js.map +0 -1
  233. package/dist/chunks/index.84c2cef6.js +0 -637
  234. package/dist/chunks/index.84c2cef6.js.map +0 -1
  235. package/dist/chunks/index.88ac1dab.js.map +0 -1
  236. package/dist/chunks/sidepanel.keys.3f8d69c1.js +0 -7
  237. package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +0 -1
  238. package/dist/chunks/teleport.d52e5254.js.map +0 -1
  239. /package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.d.ts +0 -0
package/dist/sidepanel.js CHANGED
@@ -1,24 +1,17 @@
1
- import { defineComponent as D, ref as r, inject as L, onUnmounted as G, computed as p, watch as y, nextTick as B, toRefs as F, provide as O } from "vue";
2
- import { a as w } from "./chunks/button.f5739261.js";
3
- import { B as $ } from "./chunks/index.546b27ae.js";
4
- import { F as H } from "./chunks/footer-actions.e0b866b1.js";
5
- import { A as J } from "./chunks/arrow-left.2db60716.js";
6
- import { a as R, b as k, S as K } from "./chunks/sidepanel.keys.3f8d69c1.js";
7
- import { u as x } from "./chunks/i18n.eb5b985b.js";
8
- import { n as U } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
9
- import { B as Y } from "./chunks/index.6c299479.js";
10
- import { C as j } from "./chunks/cross.04678d81.js";
11
- import { g as z } from "./chunks/unique-id.a2a2b458.js";
12
- import "./assets/index44.css";
13
- var C = /* @__PURE__ */ ((o) => (o.UPDATE_ACTIVE_PAGE = "update:active-page", o.UPDATE_IS_OPEN = "update:is-open", o))(C || {}), I = /* @__PURE__ */ ((o) => (o.TRANSITION_LEVEL_DEEPER = "b-sidepanel-page__animation--level-deeper", o.TRANSITION_LEVEL_UPPER = "b-sidepanel-page__animation--level-upper", o))(I || {});
14
- const M = {
15
- "en-US": {
16
- goToPreviousPage: "Go to previous page"
17
- }
18
- }, q = {
19
- i18n: { messages: M }
20
- }, Q = /* @__PURE__ */ D({
21
- ...q,
1
+ import { defineComponent as P, toRefs as T, ref as r, computed as B, watch as h, nextTick as k, provide as f } from "vue";
2
+ import { B as N } from "./chunks/index.de687404.js";
3
+ import { F as x } from "./chunks/footer-actions.0268a57b.js";
4
+ import { D as G, B as L, b as F, a as R } from "./chunks/dialog-page.f787969c.js";
5
+ import { n as C } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
6
+ import { a as U } from "./chunks/button.0b6cda85.js";
7
+ import { B as w } from "./chunks/index.302e9cf2.js";
8
+ import { C as V } from "./chunks/cross.04678d81.js";
9
+ import { S as J } from "./chunks/sidepanel.keys.1ed8a57c.js";
10
+ import { u as K } from "./chunks/i18n.eb5b985b.js";
11
+ import { g as Y } from "./chunks/unique-id.a2a2b458.js";
12
+ import "./assets/index29.css";
13
+ const $ = {}, z = /* @__PURE__ */ P({
14
+ ...$,
22
15
  __name: "sidepanel-page",
23
16
  props: {
24
17
  /**
@@ -79,46 +72,39 @@ const M = {
79
72
  default: null
80
73
  }
81
74
  },
82
- setup(o) {
83
- const a = o, { t } = x(), e = r(null), n = r(!1), m = r(!0), i = r(!1), u = L(R), { unregisterPage: s } = u({ title: a.title, pageId: a.pageId });
84
- G(() => s());
85
- const { activePage: v, animation: _, goToPreviousPage: d, hasPreviousPages: P, isOpen: f } = L(k), g = p(() => v.value ? v.value === a.pageId : !0), T = p(() => a.previousPage ? !0 : a.previousPage === null ? !1 : P.value && g.value), S = p(() => ({
86
- "b-sidepanel-page__header--with-border": n.value && !m.value
87
- })), b = p(() => ({
88
- "b-sidepanel-page__actions--with-border": n.value && !i.value
89
- })), E = () => {
90
- e.value && (m.value = e.value.scrollTop === 0, i.value = e.value.scrollHeight - e.value.clientHeight === e.value.scrollTop);
91
- }, A = async (h) => {
92
- h && (await B(), n.value = e.value && e.value.scrollHeight > e.value.clientHeight);
93
- };
94
- return y(() => f.value, A, { immediate: !0 }), y(() => g.value, A, { immediate: !0 }), { __sfc: !0, props: a, t, contentElement: e, hasScroll: n, isScrollAtTop: m, isScrollAtBottom: i, registerPage: u, unregisterPage: s, activePage: v, animation: _, goToPreviousPage: d, hasPreviousPages: P, isOpen: f, showPage: g, showBackButton: T, headerConditionalClasses: S, actionsConditionalClasses: b, onScroll: E, calculateScroll: A, updateAnimation: () => {
95
- _.value === I.TRANSITION_LEVEL_UPPER && (_.value = I.TRANSITION_LEVEL_DEEPER);
96
- }, BentoButton: w, BentoTypography: $, FooterActions: H, ArrowLeftIcon: J };
75
+ setup(i) {
76
+ return { __sfc: !0, BentoTypography: N, FooterActions: x, DialogPage: G };
97
77
  }
98
78
  });
99
- var W = function() {
100
- var a = this, t = a._self._c, e = a._self._setupProxy;
101
- return t("Transition", { attrs: { name: e.animation, mode: "out-in" }, on: { "after-leave": e.updateAnimation } }, [t("div", { directives: [{ name: "show", rawName: "v-show", value: e.showPage, expression: "showPage" }], staticClass: "b-sidepanel-page" }, [t("div", { staticClass: "b-sidepanel-page__header", class: e.headerConditionalClasses }, [e.showBackButton ? t(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(n) {
102
- return e.goToPreviousPage(a.previousPage);
103
- } } }, [t(e.ArrowLeftIcon, { attrs: { "svg-title": e.t("goToPreviousPage") } })], 1) : a._e(), t(e.BentoTypography, { staticClass: "b-sidepanel-page__title", attrs: { el: "h2", variant: "title" } }, [a._v(" " + a._s(a.title) + " ")])], 1), t("div", { ref: "contentElement", staticClass: "b-sidepanel-page__content", on: { scroll: e.onScroll } }, [t(e.BentoTypography, { attrs: { el: "div", variant: "body" } }, [a._t("default")], 2)], 1), a.actions && a.actions.length > 0 ? t("div", { staticClass: "b-sidepanel-page__actions", class: e.actionsConditionalClasses }, [t(e.FooterActions, { attrs: { actions: a.actions, "actions-label": a.actionsLabel, "destructive-actions": a.destructiveActions } })], 1) : a._e()])]);
104
- }, X = [], Z = /* @__PURE__ */ U(
105
- Q,
106
- W,
107
- X,
79
+ var M = function() {
80
+ var e = this, s = e._self._c, t = e._self._setupProxy;
81
+ return s(t.DialogPage, { staticClass: "b-sidepanel-page", attrs: { "page-id": e.pageId, "previous-page": e.previousPage }, scopedSlots: e._u([{ key: "header", fn: function() {
82
+ return [s("div", { staticClass: "b-sidepanel-page__header" }, [s(t.BentoTypography, { staticClass: "b-sidepanel-page__title", attrs: { el: "h2", variant: "title" } }, [e._v(" " + e._s(e.title) + " ")])], 1)];
83
+ }, proxy: !0 }, { key: "content", fn: function() {
84
+ return [s("div", { staticClass: "b-sidepanel-page__content" }, [s(t.BentoTypography, { attrs: { el: "div", variant: "body" } }, [e._t("default")], 2)], 1)];
85
+ }, proxy: !0 }, e.actions && e.actions.length > 0 ? { key: "footer", fn: function() {
86
+ return [s("div", { staticClass: "b-sidepanel-page__actions" }, [s(t.FooterActions, { attrs: { actions: e.actions, "actions-label": e.actionsLabel, "destructive-actions": e.destructiveActions } })], 1)];
87
+ }, proxy: !0 } : null], null, !0) });
88
+ }, j = [], q = /* @__PURE__ */ C(
89
+ z,
90
+ M,
91
+ j,
108
92
  !1,
109
93
  null,
110
- "8de64d4b",
94
+ "4e6c994b",
111
95
  null,
112
96
  null
113
97
  );
114
- const me = Z.exports, ee = {
98
+ const ue = q.exports;
99
+ var u = /* @__PURE__ */ ((i) => (i.UPDATE_ACTIVE_PAGE = "update:active-page", i.UPDATE_IS_OPEN = "update:is-open", i))(u || {});
100
+ const H = {
115
101
  "en-US": {
116
102
  close: "Close"
117
103
  }
118
- }, ae = {
119
- i18n: { messages: ee }
120
- }, te = /* @__PURE__ */ D({
121
- ...ae,
104
+ }, Q = {
105
+ i18n: { messages: H }
106
+ }, W = /* @__PURE__ */ P({
107
+ ...Q,
122
108
  __name: "sidepanel",
123
109
  props: {
124
110
  /**
@@ -145,79 +131,60 @@ const me = Z.exports, ee = {
145
131
  default: null
146
132
  }
147
133
  },
148
- setup(o, { emit: a }) {
149
- const t = o, { activePage: e, isOpen: n } = F(t), { t: m } = x(), i = r(null), u = r([]), s = r([]), v = p(() => s.value.length > 1), _ = r(I.TRANSITION_LEVEL_DEEPER), d = r(!1), P = z("sidepanel"), f = p(() => s.value[s.value.length - 1]), g = p(() => u.value.some((l) => l.pageId === e.value)), T = (l) => {
150
- if (l) {
151
- const c = s.value.indexOf(l);
152
- c !== -1 ? s.value = s.value.slice(0, c + 1) : s.value = [l];
153
- } else
154
- s.value.pop();
155
- _.value = I.TRANSITION_LEVEL_UPPER, a(C.UPDATE_ACTIVE_PAGE, f.value);
156
- };
157
- y(
158
- () => e.value,
159
- async () => {
160
- if (await B(), e.value && !g.value) {
161
- console.error(`The activePage passed "${e.value}" does not match the id of any SidepanelPage`);
162
- return;
163
- }
164
- e.value !== f.value && s.value.push(e.value);
165
- },
166
- { immediate: !0 }
167
- );
168
- const S = p(() => ({
169
- "b-sidepanel--hide": d.value
170
- })), b = () => {
171
- d.value && (i.value.close(), s.value[0] && a(C.UPDATE_ACTIVE_PAGE, s.value[0]), s.value = [], d.value = !1, a(C.UPDATE_IS_OPEN, !1));
172
- }, E = () => {
173
- i.value.open && (d.value = !0);
174
- }, A = ({ target: l }) => {
175
- l && l.tagName === "DIALOG" && E();
134
+ setup(i, { emit: e }) {
135
+ const s = i, { activePage: t, isOpen: a } = T(s), { t: I } = K(), l = r(null), p = r([]), o = r([]), v = r(L.TRANSITION_LEVEL_DEEPER), c = r(!1), g = Y("sidepanel"), _ = r(!1), b = B(() => ({
136
+ "b-sidepanel--hide": c.value
137
+ })), D = () => {
138
+ c.value && (l.value.close(), o.value[0] && e(u.UPDATE_ACTIVE_PAGE, o.value[0]), o.value = [], c.value = !1, _.value = !1, e(u.UPDATE_IS_OPEN, !1));
139
+ }, d = () => {
140
+ l.value.open && (c.value = !0);
141
+ }, S = ({ target: n }) => {
142
+ n && n.tagName === "DIALOG" && d();
176
143
  };
177
- y(
178
- () => n.value,
144
+ h(
145
+ () => a.value,
179
146
  async () => {
180
- await B(), i.value && (n.value ? (i.value.showModal(), s.value.length || s.value.push(e.value)) : i.value.open && E());
147
+ await k(), l.value && (a.value ? (_.value = !0, l.value.showModal(), o.value.length || o.value.push(t.value)) : l.value.open && d());
181
148
  },
182
149
  { immediate: !0 }
183
150
  );
184
- const N = (l) => () => {
185
- var c;
186
- u.value = (c = u.value) == null ? void 0 : c.filter(({ pageId: V }) => V !== l);
187
- }, h = ({ title: l, pageId: c }) => (u.value.push({ title: l, pageId: c }), { unregisterPage: N(c) });
188
- return O(k, {
189
- activePage: e,
190
- animation: _,
191
- goToPreviousPage: T,
192
- hasPreviousPages: v,
193
- isOpen: n
194
- }), O(R, h), O(K, P), { __sfc: !0, props: t, emit: a, activePage: e, isOpen: n, t: m, sidepanel: i, pages: u, previousPages: s, hasPreviousPages: v, animation: _, isClosing: d, sidepanelId: P, lastPage: f, isActivePageValid: g, goToPreviousPage: T, conditionalClasses: S, closeSidepanelAfterAnimation: b, startCloseSidepanelAnimation: E, closeSidepanelOnClickOutside: A, unregisterPage: N, registerPage: h, BentoButton: w, BentoFocusTrap: Y, CrossIcon: j };
151
+ const m = (n) => e(u.UPDATE_ACTIVE_PAGE, n), y = (n) => () => {
152
+ var E;
153
+ p.value = (E = p.value) == null ? void 0 : E.filter((O) => O !== n);
154
+ }, A = (n) => (p.value.push(n), { unregisterPage: y(n) });
155
+ return f(F, {
156
+ activePage: t,
157
+ animation: v,
158
+ isOpen: _,
159
+ pages: p,
160
+ previousPages: o,
161
+ updatePage: m
162
+ }), f(R, A), f(J, g), { __sfc: !0, props: s, emit: e, activePage: t, isOpen: a, t: I, sidepanel: l, pages: p, previousPages: o, animation: v, isClosing: c, sidepanelId: g, internalIsOpen: _, conditionalClasses: b, closeSidepanelAfterAnimation: D, startCloseSidepanelAnimation: d, closeSidepanelOnClickOutside: S, updatePage: m, unregisterPage: y, registerPage: A, BentoButton: U, BentoFocusTrap: w, CrossIcon: V };
195
163
  }
196
164
  });
197
- var se = function() {
198
- var a = this, t = a._self._c, e = a._self._setupProxy;
199
- return t("dialog", { ref: "sidepanel", staticClass: "b-sidepanel", class: e.conditionalClasses, attrs: { id: e.sidepanelId }, on: { animationend: e.closeSidepanelAfterAnimation, click: function(n) {
200
- a.isDismissible && e.closeSidepanelOnClickOutside(n);
201
- }, keydown: function(n) {
202
- if (!n.type.indexOf("key") && a._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]))
165
+ var X = function() {
166
+ var e = this, s = e._self._c, t = e._self._setupProxy;
167
+ return s("dialog", { ref: "sidepanel", staticClass: "b-sidepanel", class: t.conditionalClasses, attrs: { id: t.sidepanelId }, on: { animationend: t.closeSidepanelAfterAnimation, click: function(a) {
168
+ e.isDismissible && t.closeSidepanelOnClickOutside(a);
169
+ }, keydown: function(a) {
170
+ if (!a.type.indexOf("key") && e._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]))
203
171
  return null;
204
- n.preventDefault(), a.isDismissible && e.startCloseSidepanelAnimation;
205
- } } }, [t(e.BentoFocusTrap, [a.isDismissible ? t("div", { staticClass: "b-sidepanel__close-button" }, [t(e.BentoButton, { attrs: { variant: "tertiary" }, on: { click: e.startCloseSidepanelAnimation } }, [t(e.CrossIcon, { attrs: { "svg-title": e.t("close") } })], 1)], 1) : a._e(), a._t("default")], 2)], 1);
206
- }, ne = [], oe = /* @__PURE__ */ U(
207
- te,
208
- se,
209
- ne,
172
+ a.preventDefault(), e.isDismissible && t.startCloseSidepanelAnimation;
173
+ } } }, [s(t.BentoFocusTrap, [e.isDismissible ? s("div", { staticClass: "b-sidepanel__close-button" }, [s(t.BentoButton, { attrs: { variant: "tertiary" }, on: { click: t.startCloseSidepanelAnimation } }, [s(t.CrossIcon, { attrs: { "svg-title": t.t("close") } })], 1)], 1) : e._e(), e._t("default")], 2)], 1);
174
+ }, Z = [], ee = /* @__PURE__ */ C(
175
+ W,
176
+ X,
177
+ Z,
210
178
  !1,
211
179
  null,
212
- "0f05baad",
180
+ "97a8b5da",
213
181
  null,
214
182
  null
215
183
  );
216
- const Pe = oe.exports;
184
+ const de = ee.exports;
217
185
  export {
218
- Pe as BentoSidepanel,
219
- I as BentoSidepanelAnimation,
220
- C as BentoSidepanelEvent,
221
- me as BentoSidepanelPage
186
+ de as BentoSidepanel,
187
+ u as BentoSidepanelEvent,
188
+ ue as BentoSidepanelPage
222
189
  };
223
190
  //# sourceMappingURL=sidepanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/components/sidepanel-page.vue","../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nexport interface BentoSidepanelPageObject {\n title: string;\n pageId: string;\n}\n\nexport enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n\nexport enum BentoSidepanelAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-sidepanel-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-sidepanel-page__animation--level-upper',\n}\n\nexport interface BentoSidepanelConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n goToPreviousPage: (page: string) => void;\n hasPreviousPages: Ref<boolean>;\n isOpen: Ref<boolean>;\n}\n\nexport type BentoSidepanelRegisterPage = (props: BentoSidepanelPageObject) => { unregisterPage: () => void };\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-show=\"showPage\" class=\"b-sidepanel-page\">\n <div class=\"b-sidepanel-page__header\" :class=\"headerConditionalClasses\">\n <bento-button v-if=\"showBackButton\" variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n <div ref=\"contentElement\" class=\"b-sidepanel-page__content\" @scroll=\"onScroll\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n <div\n v-if=\"actions && actions.length > 0\"\n class=\"b-sidepanel-page__actions\"\n :class=\"actionsConditionalClasses\"\n >\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, watch } from 'vue';\n\n import { BentoButton, BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { BentoSidepanelAnimation, BentoSidepanelConfigData, BentoSidepanelRegisterPage } from '../sidepanel.types';\n import { SIDEPANEL_CONFIG_INJECTION_KEY, SIDEPANEL_REGISTER_PAGE_INJECTION_KEY } from '../sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\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 * ```\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoSidepanelRegisterPage>(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage({ title: props.title, pageId: props.pageId });\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n\n const { activePage, animation, goToPreviousPage, hasPreviousPages, isOpen } =\n inject<BentoSidepanelConfigData>(SIDEPANEL_CONFIG_INJECTION_KEY);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-sidepanel-page__header--with-border': hasScroll.value && !isScrollAtTop.value,\n }));\n\n const actionsConditionalClasses = computed(() => ({\n 'b-sidepanel-page__actions--with-border': hasScroll.value && !isScrollAtBottom.value,\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Animation\n const updateAnimation = () => {\n if (animation.value === BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER) {\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER;\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","<template>\n <dialog\n :id=\"sidepanelId\"\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div v-if=\"isDismissible\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import {\n BentoSidepanelAnimation,\n BentoSidepanelEvent,\n BentoSidepanelPageObject,\n BentoSidepanelRegisterPage,\n } from './sidepanel.types';\n\n import {\n SIDEPANEL_CONFIG_INJECTION_KEY,\n SIDEPANEL_DIALOG_ID_INJECTION_KEY,\n SIDEPANEL_REGISTER_PAGE_INJECTION_KEY,\n } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<BentoSidepanelPageObject[]>([]);\n const previousPages = ref([]);\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const animation = ref(BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n\n // Previous page/back button logic\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page.pageId === activePage.value));\n\n const goToPreviousPage = (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER;\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n\n if (!!activePage.value && !isActivePageValid.value) {\n // eslint-disable-next-line no-console\n console.error(`The activePage passed \"${activePage.value}\" does not match the id of any SidepanelPage`);\n return;\n }\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(({ pageId }) => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoSidepanelRegisterPage = ({ title, pageId }) => {\n pages.value.push({ title, pageId });\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(SIDEPANEL_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n goToPreviousPage,\n hasPreviousPages,\n isOpen,\n });\n provide(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["BentoSidepanelEvent","BentoSidepanelEvent2","BentoSidepanelAnimation","BentoSidepanelAnimation2","__default__$1","messages$1","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","registerPage","inject","SIDEPANEL_REGISTER_PAGE_INJECTION_KEY","unregisterPage","props","onUnmounted","activePage","animation","goToPreviousPage","hasPreviousPages","isOpen","SIDEPANEL_CONFIG_INJECTION_KEY","showPage","computed","showBackButton","headerConditionalClasses","actionsConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","watch","__default__","messages","toRefs","t","sidepanel","pages","previousPages","isClosing","sidepanelId","generateUid","lastPage","isActivePageValid","page","index","emit","conditionalClasses","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","pageIdToRemove","_a","pageId","title","provide","SIDEPANEL_DIALOG_ID_INJECTION_KEY"],"mappings":"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"}
1
+ {"version":3,"file":"sidepanel.js","sources":["../src/components/sidepanel/components/sidepanel-page.vue","../src/components/sidepanel/sidepanel.types.ts","../src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n 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 * ```\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n :id=\"sidepanelId\"\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div v-if=\"isDismissible\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","activePage","isOpen","toRefs","props","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","conditionalClasses","computed","closeSidepanelAfterAnimation","emit","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY"],"mappings":";;;;;;;;;;;;AA2II,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IQ,IAAAC,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;GC8NRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA1IA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GACA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,EAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,EAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GAGAS,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAL,EAAA;AAAA,IACR,EAAA,GAInCM,IAAA,MAAA;AACI,MAAAN,EAAA,UACIN,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAAA,KACIU,EAAAvB,EAAA,oBAAAa,EAAA,MAAA,CAAA,CAAA,GAEJA,EAAA,QAAA,CAAA,GACAG,EAAA,QAAA,IACAG,EAAA,QAAA,IACAI,EAAAvB,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJwB,IAAA,MAAA;AACI,MAAAd,EAAA,MAAA,SAGAM,EAAA,QAAA;AAAA,IAAkB,GAOtBS,IAAA,CAAA,EAAA,QAAAC,EAAA,MAAA;AACI,MAAAA,KAAAA,EAAA,YAAA,YACIF,EAAA;AAAA,IACJ;AAIJ,IAAAG;AAAA,MAAA,MAAAtB,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAuB,EAAA,GAEAlB,EAAA,UAIAL,EAAA,SACIc,EAAA,QAAA,IACAT,EAAA,MAAA,UAAA,GACAG,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAT,EAAA,KAAA,KACJM,EAAA,MAAA,QAEAc,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAK,IAAA,CAAAC,MAAAP,EAAAvB,EAAA,oBAAA8B,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAApB,EAAA,SAAAqB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACItB,EAAA,MAAA,KAAAsB,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,GAAA;AAAA,MAAqE,YAAAjC;AAAA,MACjE,WAAAU;AAAA,MACA,QAAAK;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAgB;AAAA,IACA,CAAA,GAEJO,EAAAE,GAAAH,CAAA,GAGAC,EAAAG,GAAAtB,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/status.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as n, computed as a } from "vue";
2
- import { B as o } from "./chunks/index.546b27ae.js";
2
+ import { B as o } from "./chunks/index.de687404.js";
3
3
  import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
4
- import "./assets/index16.css";
4
+ import "./assets/index30.css";
5
5
  var r = /* @__PURE__ */ ((s) => (s.BLUE = "blue", s.GREEN = "green", s.GREY = "grey", s.ORANGE = "orange", s.RED = "red", s.YELLOW = "yellow", s))(r || {});
6
6
  const _ = n({
7
7
  name: "bento-status",
package/dist/stepper.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as V, ref as p, computed as o, watch as A, provide as w, readonly as K, useSlots as W, inject as z, onMounted as Z } from "vue";
2
- import { B as L } from "./chunks/index.546b27ae.js";
2
+ import { B as L } from "./chunks/index.de687404.js";
3
3
  import { B as I, a as M } from "./chunks/keyboard-navigation.ca47dfa8.js";
4
4
  import { u as U } from "./chunks/i18n.eb5b985b.js";
5
5
  import { n as T } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
6
- import { B as j } from "./chunks/base-button.bf0c938c.js";
6
+ import { B as j } from "./chunks/base-button.3c3d473d.js";
7
7
  import { C as G } from "./chunks/checkmark-small.520f01b1.js";
8
- import "./assets/index17.css";
8
+ import "./assets/index31.css";
9
9
  const q = (i) => {
10
10
  function s(r) {
11
11
  return ({ detail: u }) => {
@@ -1,4 +1,4 @@
1
- import { B as r, a as o } from "./chunks/index.898a95bc.js";
1
+ import { B as r, a as o } from "./chunks/index.0bb773a7.js";
2
2
  export {
3
3
  r as BentoStructuredList,
4
4
  o as BentoStructuredListItem
@@ -4,10 +4,10 @@ import { S as h } from "./chunks/summary-grid.keys.1d1028c2.js";
4
4
  import { G as E } from "./chunks/grid-layout.e0025286.js";
5
5
  import { n as c } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
6
6
  import { BentoInfoIcon as O } from "./info-icon.js";
7
- import { B as L, a as g } from "./chunks/index.546b27ae.js";
7
+ import { B as L, a as g } from "./chunks/index.de687404.js";
8
8
  import { BentoTag as M, BentoTagVariant as f } from "./tag.js";
9
- import { C as G } from "./chunks/copy.e01532cf.js";
10
- import "./assets/index19.css";
9
+ import { C as G } from "./chunks/copy.647aae54.js";
10
+ import "./assets/index44.css";
11
11
  const P = l({
12
12
  name: "bento-summary-grid",
13
13
  components: { GridLayout: E },
package/dist/tabs.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as m, toRefs as C, ref as b, provide as u, computed as w, inject as p, onUnmounted as A, watch as N, nextTick as B } from "vue";
2
2
  import { E as k, T as I, a as h } from "./chunks/tabs.keys.358742f2.js";
3
3
  import { n as g } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
4
- import { B as R } from "./chunks/index.546b27ae.js";
4
+ import { B as R } from "./chunks/index.de687404.js";
5
5
  import { g as D } from "./chunks/unique-id.a2a2b458.js";
6
- import { F as S } from "./chunks/fixed-scroller.afe02620.js";
7
- import "./assets/index20.css";
6
+ import { F as S } from "./chunks/fixed-scroller.06574a66.js";
7
+ import "./assets/index33.css";
8
8
  const K = m({
9
9
  props: {
10
10
  /**
package/dist/tag.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as c, computed as o } from "vue";
2
- import { B as d } from "./chunks/index.546b27ae.js";
2
+ import { B as d } from "./chunks/index.de687404.js";
3
3
  import { u as m } from "./chunks/aria-label.ac9651a5.js";
4
4
  import { g as s } from "./chunks/get-slot-text.99c3d860.js";
5
- import { B as _ } from "./chunks/tooltip.d452f6c4.js";
5
+ import { B as _ } from "./chunks/tooltip.6748027a.js";
6
6
  import { n as v } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
7
- import "./assets/index21.css";
7
+ import "./assets/index34.css";
8
8
  var r = /* @__PURE__ */ ((t) => (t.GREY = "grey", t.BLUE = "blue", t.GREEN = "green", t.ORANGE = "orange", t.RED = "red", t.WHITE = "white", t))(r || {});
9
9
  const p = c({
10
10
  name: "bento-tag",
package/dist/textarea.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as K, useAttrs as Q, toRefs as O, ref as u, toRef as X, computed as o, watch as L, nextTick as ee, onMounted as te, onUnmounted as ae } from "vue";
2
- import { a as le } from "./chunks/button.f5739261.js";
3
- import { B as re } from "./chunks/index.546b27ae.js";
2
+ import { a as le } from "./chunks/button.0b6cda85.js";
3
+ import { B as re } from "./chunks/index.de687404.js";
4
4
  import { n as w } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
5
5
  import { g as se } from "./chunks/unique-id.a2a2b458.js";
6
6
  import { o as F } from "./chunks/resize.a041304d.js";
7
7
  import { u as oe } from "./chunks/aria-label.ac9651a5.js";
8
8
  import { u as ne } from "./chunks/i18n.eb5b985b.js";
9
9
  import { u as ie } from "./chunks/use-form-layout-loading.d03e5d48.js";
10
- import { E as ue, F as ce } from "./chunks/error-message.317dd85f.js";
11
- import "./assets/index22.css";
10
+ import { E as ue, F as ce } from "./chunks/error-message.75666843.js";
11
+ import "./assets/index35.css";
12
12
  let T = 0;
13
13
  const de = {
14
14
  beforeCreate() {
package/dist/timeline.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { defineComponent as Y, computed as r, ref as N, toRefs as Z, provide as A, inject as D, onUnmounted as G } from "vue";
2
- import { a as z } from "./chunks/button.f5739261.js";
2
+ import { a as z } from "./chunks/button.0b6cda85.js";
3
3
  import { BentoTextarea as Q } from "./textarea.js";
4
4
  import { u as H } from "./chunks/i18n.eb5b985b.js";
5
- import { BentoButtonActions as X } from "./button.js";
5
+ import { B as X } from "./chunks/button-actions.1dc90a19.js";
6
6
  import { n as x } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
7
- import { B as ee } from "./chunks/index.2e70720a.js";
8
- import { B as te } from "./chunks/index.6c017121.js";
7
+ import { B as ee } from "./chunks/index.5bfc67d1.js";
8
+ import { B as te } from "./chunks/index.5b47c56b.js";
9
9
  import { BentoTag as ie } from "./tag.js";
10
- import { B as ae, d as se } from "./chunks/index.546b27ae.js";
11
- import { B as ne, a as oe, S as re } from "./chunks/index.898a95bc.js";
10
+ import { B as ae, d as se } from "./chunks/index.de687404.js";
11
+ import { B as ne, a as oe, S as re } from "./chunks/index.0bb773a7.js";
12
12
  import { g as le } from "./chunks/unique-id.a2a2b458.js";
13
13
  import { u as me } from "./chunks/use-has-slot.fbeb19ec.js";
14
14
  import { r as ce, e as de, t as w, g as k } from "./chunks/index.f55fdc32.js";
15
15
  import { c as ue, a as _e } from "./chunks/index.86453263.js";
16
- import "./assets/index23.css";
16
+ import "./assets/index36.css";
17
17
  var F = 1e3 * 60, M = 60 * 24, U = M * 30, j = M * 365;
18
- function $(t, e) {
18
+ function B(t, e) {
19
19
  var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
20
20
  ce(2, arguments);
21
21
  var a = i.locale || de;
@@ -169,10 +169,10 @@ var be = function() {
169
169
  null
170
170
  );
171
171
  const Pe = he.exports;
172
- let B = 0;
172
+ let $ = 0;
173
173
  const ye = {
174
174
  beforeCreate() {
175
- this.uuid = B.toString(), B += 1;
175
+ this.uuid = $.toString(), $ += 1;
176
176
  }
177
177
  };
178
178
  var Ce = function() {
@@ -307,10 +307,10 @@ const Te = Ee.exports, Ne = {
307
307
  if (!L || !V)
308
308
  return null;
309
309
  const { date: R } = d.value[n], W = parseInt(
310
- $(L, R, { unit: b.value.unit }),
310
+ B(L, R, { unit: b.value.unit }),
311
311
  10
312
312
  );
313
- return b.value.amount < W ? $(L, R, { roundingMethod: "floor" }) : null;
313
+ return b.value.amount < W ? B(L, R, { roundingMethod: "floor" }) : null;
314
314
  }), T = r(() => v.value ? i("timegap", { timegap: v.value }) : ""), h = r(() => _.value && C.value === n), J = r(() => n === d.value.length - 1);
315
315
  return {
316
316
  // Values
package/dist/toast.js CHANGED
@@ -2,11 +2,11 @@ import { defineComponent as d, ref as u, computed as c, onMounted as g, watch as
2
2
  import { u as y } from "./chunks/toastController.fd667b68.js";
3
3
  import { I as C } from "./chunks/info-filled.c37e091d.js";
4
4
  import { C as k } from "./chunks/cross-small.e851e0de.js";
5
- import { a as x } from "./chunks/button.f5739261.js";
6
- import { B as S } from "./chunks/index.546b27ae.js";
5
+ import { a as x } from "./chunks/button.0b6cda85.js";
6
+ import { B as S } from "./chunks/index.de687404.js";
7
7
  import { u as w } from "./chunks/use-has-slot.fbeb19ec.js";
8
8
  import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
9
- import "./assets/index24.css";
9
+ import "./assets/index40.css";
10
10
  const $ = {
11
11
  "en-US": {
12
12
  dismiss: "Dismiss"
package/dist/toggle.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as k, ref as p, computed as u, toRefs as I, watch as A } from "vue";
2
2
  import { C as B } from "./chunks/checkmark-small.520f01b1.js";
3
- import { B as L } from "./chunks/index.546b27ae.js";
3
+ import { B as L } from "./chunks/index.de687404.js";
4
4
  import { g as E } from "./chunks/unique-id.a2a2b458.js";
5
5
  import { u as F } from "./chunks/use-default-slot-validator.b9bff4c6.js";
6
6
  import { u as R } from "./chunks/use-has-slot.fbeb19ec.js";
7
7
  import { g } from "./chunks/get-slot-text.99c3d860.js";
8
8
  import { u as x } from "./chunks/aria-label.ac9651a5.js";
9
9
  import { n as T } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
10
- import "./assets/index25.css";
10
+ import "./assets/index46.css";
11
11
  var f = /* @__PURE__ */ ((t) => (t.LABEL_FIRST = "label-first", t))(f || {}), d = /* @__PURE__ */ ((t) => (t.BEFORE = "before", t.AFTER = "after", t))(d || {});
12
12
  const D = k({
13
13
  name: "bento-toggle",
package/dist/tutorial.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as g, ref as d, computed as a, isRef as R, watch as F, nextTick as $ } from "vue";
2
- import { B as I } from "./chunks/index.81443e01.js";
3
- import { B as S, a as P } from "./chunks/index.e6aa2c36.js";
4
- import { B as k } from "./chunks/index.546b27ae.js";
2
+ import { B as I } from "./chunks/index.a52b98d1.js";
3
+ import { B as S, a as P } from "./chunks/index.932c230b.js";
4
+ import { B as k } from "./chunks/index.de687404.js";
5
5
  import { BentoImage as w } from "./image.js";
6
6
  import { u as A } from "./chunks/i18n.eb5b985b.js";
7
7
  import { R as N } from "./chunks/refresh.71a03998.js";
8
8
  import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
9
- import { a as T, h as D, o as M } from "./chunks/index.290bbc9e.js";
10
- import { BentoButtonActions as V } from "./button.js";
11
- import "./assets/index26.css";
9
+ import { a as T, h as D, o as M } from "./chunks/index.dc985e76.js";
10
+ import { B as V } from "./chunks/button-actions.1dc90a19.js";
11
+ import "./assets/index48.css";
12
12
  var E;
13
13
  const j = /* @__PURE__ */ g({
14
14
  __name: "tutorial-indicator",
@@ -1,4 +1,4 @@
1
- import { B as p, c as e, b as r, a as y } from "./chunks/index.546b27ae.js";
1
+ import { B as p, c as e, b as r, a as y } from "./chunks/index.de687404.js";
2
2
  export {
3
3
  p as BentoTypography,
4
4
  e as BentoTypographyElement,