@adyen/bento-vue2 1.95.0 → 1.96.1

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 (106) hide show
  1. package/dist/@types/index.d.ts +77 -0
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/date-picker.css +1 -1
  9. package/dist/assets/dialog-page.css +1 -1
  10. package/dist/assets/draggable-handle.css +1 -1
  11. package/dist/assets/dropdown.css +1 -1
  12. package/dist/assets/field-label.css +1 -1
  13. package/dist/assets/file-uploader.css +1 -1
  14. package/dist/assets/filter-bar.css +1 -1
  15. package/dist/assets/input-field-password.css +1 -1
  16. package/dist/assets/inspector.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/navigation-menu-group.css +1 -1
  19. package/dist/assets/secondary-nav.css +1 -1
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/checkbox.js +2 -2
  22. package/dist/chunks/{calendar.ofn3G6eW.js → calendar.D0JIbmoS.js} +310 -304
  23. package/dist/chunks/calendar.D0JIbmoS.js.map +1 -0
  24. package/dist/chunks/{checkbox-group.BAjvgXlc.js → checkbox-group.CNTMMwQr.js} +2 -2
  25. package/dist/chunks/{checkbox-group.BAjvgXlc.js.map → checkbox-group.CNTMMwQr.js.map} +1 -1
  26. package/dist/chunks/{checkbox.BAQDBNL6.js → checkbox.BIzqX_eH.js} +18 -18
  27. package/dist/chunks/{checkbox.BAQDBNL6.js.map → checkbox.BIzqX_eH.js.map} +1 -1
  28. package/dist/chunks/{code-snippet.B3iCsNmb.js → code-snippet.lcQRsLdZ.js} +2 -2
  29. package/dist/chunks/{code-snippet.B3iCsNmb.js.map → code-snippet.lcQRsLdZ.js.map} +1 -1
  30. package/dist/chunks/{dashboard-section.HFJcf8-_.js → dashboard-section.DiGQXS9L.js} +2 -2
  31. package/dist/chunks/{dashboard-section.HFJcf8-_.js.map → dashboard-section.DiGQXS9L.js.map} +1 -1
  32. package/dist/chunks/{data-grid-template.BjfPUEoH.js → data-grid-template.BVppx9kZ.js} +2 -2
  33. package/dist/chunks/{data-grid-template.BjfPUEoH.js.map → data-grid-template.BVppx9kZ.js.map} +1 -1
  34. package/dist/chunks/{data-grid.Cua2Jxvq.js → data-grid.DQwAkw4U.js} +11 -11
  35. package/dist/chunks/{data-grid.Cua2Jxvq.js.map → data-grid.DQwAkw4U.js.map} +1 -1
  36. package/dist/chunks/{date-picker.CYDTf6De.js → date-picker.BWxvyK5J.js} +40 -40
  37. package/dist/chunks/date-picker.BWxvyK5J.js.map +1 -0
  38. package/dist/chunks/{date-range-picker.DGGvwRfn.js → date-range-picker.gfRJmzXn.js} +10 -10
  39. package/dist/chunks/{date-range-picker.DGGvwRfn.js.map → date-range-picker.gfRJmzXn.js.map} +1 -1
  40. package/dist/chunks/{date-time-picker.CyNb-xDm.js → date-time-picker.BIl9kFLh.js} +5 -5
  41. package/dist/chunks/{date-time-picker.CyNb-xDm.js.map → date-time-picker.BIl9kFLh.js.map} +1 -1
  42. package/dist/chunks/{draggable-handle.CU1L7J87.js → draggable-handle.DIhHtHG9.js} +530 -499
  43. package/dist/chunks/{draggable-handle.CU1L7J87.js.map → draggable-handle.DIhHtHG9.js.map} +1 -1
  44. package/dist/chunks/{dropdown-tag.C1qg52L9.js → dropdown-tag.CuDxdSfb.js} +2 -2
  45. package/dist/chunks/{dropdown-tag.C1qg52L9.js.map → dropdown-tag.CuDxdSfb.js.map} +1 -1
  46. package/dist/chunks/{dropdown.BEurqT8m.js → dropdown.C70AlvOT.js} +264 -257
  47. package/dist/chunks/dropdown.C70AlvOT.js.map +1 -0
  48. package/dist/chunks/{filter-bar.gjMPoK6d.js → filter-bar.DQ9fJXq1.js} +57 -50
  49. package/dist/chunks/{filter-bar.gjMPoK6d.js.map → filter-bar.DQ9fJXq1.js.map} +1 -1
  50. package/dist/chunks/{header-with-views.B2Ok5KI1.js → header-with-views.4VNHbNk0.js} +4 -4
  51. package/dist/chunks/{header-with-views.B2Ok5KI1.js.map → header-with-views.4VNHbNk0.js.map} +1 -1
  52. package/dist/chunks/{input-field-password.viF49CQh.js → input-field-password.CRqYWZGS.js} +34 -34
  53. package/dist/chunks/input-field-password.CRqYWZGS.js.map +1 -0
  54. package/dist/chunks/{input-field-phone-number.DnpTj7q5.js → input-field-phone-number.DHiuL0cF.js} +2 -2
  55. package/dist/chunks/{input-field-phone-number.DnpTj7q5.js.map → input-field-phone-number.DHiuL0cF.js.map} +1 -1
  56. package/dist/chunks/{input-field.D86PSAiu.js → input-field.BkQZ6Qzl.js} +2 -2
  57. package/dist/chunks/{input-field.D86PSAiu.js.map → input-field.BkQZ6Qzl.js.map} +1 -1
  58. package/dist/chunks/{input-time.LyKZXnVO.js → input-time.BiOHvUEA.js} +3 -3
  59. package/dist/chunks/{input-time.LyKZXnVO.js.map → input-time.BiOHvUEA.js.map} +1 -1
  60. package/dist/chunks/{pagination.CJ3d1O_s.js → pagination.DItyAwy1.js} +2 -2
  61. package/dist/chunks/{pagination.CJ3d1O_s.js.map → pagination.DItyAwy1.js.map} +1 -1
  62. package/dist/chunks/{rich-text-editor.Dwq3Z_lK.js → rich-text-editor.D5URbwnM.js} +2 -2
  63. package/dist/chunks/{rich-text-editor.Dwq3Z_lK.js.map → rich-text-editor.D5URbwnM.js.map} +1 -1
  64. package/dist/chunks/{search-bar.BvHhXdNu.js → search-bar.D-WK8eMQ.js} +3 -3
  65. package/dist/chunks/{search-bar.BvHhXdNu.js.map → search-bar.D-WK8eMQ.js.map} +1 -1
  66. package/dist/chunks/secondary-nav.C7lEDaoj.js +259 -0
  67. package/dist/chunks/{secondary-nav.BvbT8LXa.js.map → secondary-nav.C7lEDaoj.js.map} +1 -1
  68. package/dist/chunks/{selection-card-group.ZZ_qF1L1.js → selection-card-group.CiFW4AZR.js} +8 -8
  69. package/dist/chunks/{selection-card-group.ZZ_qF1L1.js.map → selection-card-group.CiFW4AZR.js.map} +1 -1
  70. package/dist/chunks/tab.QEKU5Udp.js +256 -0
  71. package/dist/chunks/{tab.YQXssvyU.js.map → tab.QEKU5Udp.js.map} +1 -1
  72. package/dist/chunks/{use-cached-selected-values.txnml8sE.js → use-cached-selected-values.D0s14AxT.js} +2 -2
  73. package/dist/chunks/{use-cached-selected-values.txnml8sE.js.map → use-cached-selected-values.D0s14AxT.js.map} +1 -1
  74. package/dist/chunks/{use-date-input-formatter.D7Ud6Ana.js → use-date-input-formatter.B5GQd3s2.js} +2 -2
  75. package/dist/chunks/{use-date-input-formatter.D7Ud6Ana.js.map → use-date-input-formatter.B5GQd3s2.js.map} +1 -1
  76. package/dist/code-snippet.js +1 -1
  77. package/dist/dashboard-template.js +1 -1
  78. package/dist/data-grid-template.js +1 -1
  79. package/dist/data-grid.js +1 -1
  80. package/dist/date-picker.js +2 -2
  81. package/dist/date-range-picker.js +2 -2
  82. package/dist/date-time-picker.js +1 -1
  83. package/dist/draggable.js +1 -1
  84. package/dist/dropdown.js +3 -3
  85. package/dist/filter-bar.js +1 -1
  86. package/dist/header-with-views.js +1 -1
  87. package/dist/index.js +26 -26
  88. package/dist/input-field-password.js +1 -1
  89. package/dist/input-field-phone-number.js +1 -1
  90. package/dist/input-field.js +1 -1
  91. package/dist/input-time.js +1 -1
  92. package/dist/internal.js +2 -2
  93. package/dist/pagination.js +1 -1
  94. package/dist/rich-text-editor.js +1 -1
  95. package/dist/search-bar.js +2 -2
  96. package/dist/secondary-nav.js +1 -1
  97. package/dist/selection-card.js +1 -1
  98. package/dist/tabs.js +1 -1
  99. package/dist/web-types.json +11 -1
  100. package/package.json +4 -4
  101. package/dist/chunks/calendar.ofn3G6eW.js.map +0 -1
  102. package/dist/chunks/date-picker.CYDTf6De.js.map +0 -1
  103. package/dist/chunks/dropdown.BEurqT8m.js.map +0 -1
  104. package/dist/chunks/input-field-password.viF49CQh.js.map +0 -1
  105. package/dist/chunks/secondary-nav.BvbT8LXa.js +0 -223
  106. package/dist/chunks/tab.YQXssvyU.js +0 -229
@@ -1,229 +0,0 @@
1
- import { defineComponent as A, ref as p, provide as g, watch as E, nextTick as k, computed as m, unref as $, onUnmounted as N, toRefs as U, inject as B } from "vue";
2
- import { B as j } from "./typography.C8lPlsbD.js";
3
- import { B as G } from "./tag.CbNFG45Y.js";
4
- import { C as J } from "./cross-circle-fill.DTDtgLMf.js";
5
- import { u as z } from "./index.B6WW_F-J.js";
6
- import { g as q } from "./generate-uid.NJ8tVoha.js";
7
- import { T as R, a as O, E as H } from "./tabs.keys.B4qGhjp2.js";
8
- import { F as M } from "./fixed-scroller.4xAzt_OI.js";
9
- import { n as S } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
10
- import "../assets/tab.css";
11
- const F = (n, t) => {
12
- const a = n === 0 ? t.length - 1 : n - 1, e = t[a];
13
- return e.disabled || e.hidden ? F(a, t) : a;
14
- }, D = (n, t) => {
15
- const a = n === t.length - 1 ? 0 : n + 1, e = t[a];
16
- return e.disabled || e.hidden ? D(a, t) : a;
17
- }, Q = {
18
- "en-US": {
19
- errorCount: "error | errors"
20
- }
21
- };
22
- var w = /* @__PURE__ */ ((n) => (n.ACTIVE_TAB_INDEX = "update:active-tab-index", n))(w || {});
23
- const V = A({
24
- i18n: { messages: Q },
25
- components: {
26
- BentoTag: G,
27
- BentoTypography: j,
28
- CrossCircleFillIcon: J,
29
- FixedScroller: M
30
- },
31
- props: {
32
- /**
33
- * Sets the active tab by its index (0 being the first tab item).
34
- */
35
- activeTabIndex: { type: Number, default: 0 },
36
- /*
37
- * Renders the tab with a sticky positioning.
38
- */
39
- sticky: { type: Boolean, default: !1 },
40
- /**
41
- * Additional configurable options for tabs rendered with a sticky positioning.
42
- * It must be an object of type {@see BentoStickyTabsOption}
43
- * @property {Ref<number>} stickyOptions.top - Top position the tabs should take up when rendered as sticky.
44
- */
45
- stickyOptions: { type: Object, default: null }
46
- },
47
- emits: [w.ACTIVE_TAB_INDEX],
48
- setup(n, { emit: t }) {
49
- const { tc: a } = z(), e = p([]), b = p(null), u = p(), l = p(""), r = p(!1);
50
- let c;
51
- g(R, l);
52
- const _ = (s) => () => {
53
- var i;
54
- e.value = (i = e.value) == null ? void 0 : i.filter(({ id: o }) => o !== s);
55
- };
56
- g(O, ({
57
- title: s,
58
- disabled: i,
59
- errorCounter: o,
60
- withNotificationIndicator: f,
61
- counter: h,
62
- hidden: X,
63
- setElementRef: Y
64
- }) => {
65
- const C = q("b-tab");
66
- return e.value.push({
67
- counter: h,
68
- disabled: i,
69
- errorCounter: o,
70
- hidden: X,
71
- id: C,
72
- title: s,
73
- withNotificationIndicator: f,
74
- setElementRef: Y
75
- }), { id: C, unregisterTab: _(C) };
76
- });
77
- const d = (s) => {
78
- if (s.code === "ArrowLeft" || s.code === "ArrowRight") {
79
- const i = e.value.find((f) => document.activeElement.id === f.id);
80
- let o = e.value.indexOf(i);
81
- s.code === "ArrowLeft" ? o = F(o, e.value) : s.code === "ArrowRight" && (o = D(o, e.value)), b.value.children[o].focus();
82
- }
83
- };
84
- E(
85
- [() => n.activeTabIndex, e],
86
- ([s, i]) => {
87
- k(() => {
88
- var f;
89
- const o = i[s];
90
- l.value = o && !o.disabled ? o.id : (f = e.value.find(({ disabled: h }) => !h)) == null ? void 0 : f.id;
91
- });
92
- },
93
- { immediate: !0 }
94
- );
95
- const I = (s) => {
96
- l.value = s;
97
- const i = e.value.findIndex(({ id: o }) => o === l.value);
98
- t(w.ACTIVE_TAB_INDEX, i);
99
- }, y = (s) => s ? "disabled" : !1, T = m(() => {
100
- var s;
101
- return (s = n.stickyOptions) != null && s.top ? $(n.stickyOptions.top) : 0;
102
- }), K = m(() => n.sticky && T.value > 0 ? !0 : r.value), x = () => {
103
- c && (c.disconnect(), c = null), r.value = !1;
104
- }, P = (s) => {
105
- n.sticky && T.value === 0 && (c = new IntersectionObserver(
106
- ([i]) => {
107
- r.value = i.intersectionRatio < 1;
108
- },
109
- { threshold: [1] }
110
- ), c.observe(s));
111
- };
112
- E(
113
- [() => n.sticky, u, T],
114
- ([s, i]) => {
115
- x(), s && i && k(() => P(i));
116
- },
117
- { immediate: !0 }
118
- ), N(() => {
119
- x();
120
- });
121
- const L = m(() => ({
122
- "b-tabs__tab-list-wrapper--sticky": n.sticky,
123
- "b-tabs__tab-list-wrapper--pinned": K.value
124
- })), W = m(
125
- () => {
126
- var s;
127
- return (
128
- // This helps us detect when the tabs are pinned without calculations on the tabs positions because it makes the tabs intersect by 1 pixel with the element on top of it, which is getting aught by the intersection observer.
129
- // Followed this example: https://css-tricks.com/how-to-detect-when-a-sticky-element-gets-pinned/
130
- n.sticky ? {
131
- top: `${(((s = n.stickyOptions) == null ? void 0 : s.top) ?? 0) - 1}px`
132
- } : {}
133
- );
134
- }
135
- );
136
- return {
137
- tc: a,
138
- tabs: e,
139
- tablist: b,
140
- tablistwrapper: u,
141
- activeTabId: l,
142
- tablistWrapperConditionalClasses: L,
143
- tablistWrapperStyles: W,
144
- onKeydownTabsNavigation: d,
145
- handleTabChange: I,
146
- isDisabled: y
147
- };
148
- }
149
- });
150
- var Z = function() {
151
- var t = this, a = t._self._c;
152
- return t._self._setupProxy, a("div", { staticClass: "b-tabs" }, [a("div", { ref: "tablistwrapper", staticClass: "b-tabs__tab-list-wrapper", class: t.tablistWrapperConditionalClasses, style: t.tablistWrapperStyles }, [a("fixed-scroller", { attrs: { condensed: "", "extra-padding-top": 2 } }, [a("div", { ref: "tablist", staticClass: "b-tabs__tab-list", attrs: { role: "tablist" }, on: { keydown: t.onKeydownTabsNavigation } }, t._l(t.tabs, function({
153
- counter: e,
154
- disabled: b,
155
- errorCounter: u,
156
- hidden: l,
157
- id: r,
158
- title: c,
159
- withNotificationIndicator: _,
160
- setElementRef: v
161
- }) {
162
- return a("button", { directives: [{ name: "show", rawName: "v-show", value: !l, expression: "!hidden" }], key: r, ref: v, refInFor: !0, staticClass: "b-tabs__tab", class: {
163
- "b-tabs__tab--active": t.activeTabId === r,
164
- "b-tabs__tab--disabled": b
165
- }, attrs: { id: r, role: "tab", type: "button", "aria-controls": `${r}-tabpanel`, "aria-hidden": l ? "true" : "false", "aria-selected": t.activeTabId === r ? "true" : "false", tabindex: t.activeTabId === r && !b.value ? null : -1, disabled: t.isDisabled(b) }, on: { click: function(d) {
166
- return t.handleTabChange(r);
167
- }, keydown: function(d) {
168
- return !d.type.indexOf("key") && t._k(d.keyCode, "enter", 13, d.key, "Enter") && t._k(d.keyCode, "space", 32, d.key, [" ", "Spacebar"]) ? null : t.handleTabChange(r);
169
- } } }, [a("span", { staticClass: "b-tabs__tab-text" }, [a("bento-typography", { staticClass: "b-tabs__tab-title", attrs: { el: "span", variant: "body", stronger: "" } }, [t._v(" " + t._s(c) + " ")]), e != null ? a("bento-typography", { staticClass: "b-tabs__tab-counter", class: {
170
- "b-tabs__tab-counter--active": t.activeTabId === r
171
- }, attrs: { el: "span", variant: "body", stronger: "" } }, [t._v(" " + t._s(e) + " ")]) : t._e(), u != null ? a("bento-tag", { staticClass: "b-tabs__tab-error-counter", attrs: { variant: "red" }, scopedSlots: t._u([{ key: "icon", fn: function() {
172
- return [a("cross-circle-fill-icon", { attrs: { "aria-hidden": "true" } })];
173
- }, proxy: !0 }], null, !0) }, [a("span", [t._v(t._s(u))]), a("span", { staticClass: "b-tabs__visually-hidden" }, [t._v(t._s(t.tc("errorCount", u)))])]) : t._e(), _ ? a("span", { staticClass: "b-tabs__tab-notification-dot", attrs: { "aria-hidden": "true" } }) : t._e()], 1), a("span", { directives: [{ name: "show", rawName: "v-show", value: t.activeTabId === r, expression: "activeTabId === id" }], staticClass: "b-tabs__tab-underline", attrs: { "aria-hidden": "true" } })]);
174
- }), 0)])], 1), t._t("default")], 2);
175
- }, tt = [], et = /* @__PURE__ */ S(
176
- V,
177
- Z,
178
- tt,
179
- !1,
180
- null,
181
- "c941b744"
182
- );
183
- const vt = et.exports, at = {
184
- name: "bento-tab"
185
- }, st = /* @__PURE__ */ A({
186
- ...at,
187
- props: {
188
- counter: { default: null },
189
- disabled: { type: Boolean, default: !1 },
190
- errorCounter: { default: null },
191
- hidden: { type: Boolean, default: !1 },
192
- title: null,
193
- withNotificationIndicator: { type: Boolean, default: !1 },
194
- setElementRef: { type: Function, default: void 0 }
195
- },
196
- setup(n) {
197
- const t = n, { counter: a, disabled: e, errorCounter: b, hidden: u, withNotificationIndicator: l } = U(t), r = p(), c = (T) => {
198
- r.value = T;
199
- };
200
- g(H, c);
201
- const _ = m(() => r.value ?? t.title), v = B(O), d = B(R), { id: I, unregisterTab: y } = v({
202
- counter: a,
203
- disabled: e,
204
- errorCounter: b,
205
- hidden: u,
206
- title: _,
207
- withNotificationIndicator: l,
208
- setElementRef: t.setElementRef
209
- });
210
- return N(() => y()), { __sfc: !0, props: t, counter: a, disabled: e, errorCounter: b, hidden: u, withNotificationIndicator: l, componentTitle: r, setTitle: c, computedTitle: _, registerTab: v, activeTabId: d, id: I, unregisterTab: y };
211
- }
212
- });
213
- var nt = function() {
214
- var t = this, a = t._self._c, e = t._self._setupProxy;
215
- return a("div", { directives: [{ name: "show", rawName: "v-show", value: e.activeTabId === e.id, expression: "activeTabId === id" }], staticClass: "b-tab", attrs: { id: `${e.id}-tabpanel`, role: "tabpanel", "aria-labelledby": e.id } }, [e.activeTabId === e.id ? [t._t("default")] : t._e()], 2);
216
- }, rt = [], it = /* @__PURE__ */ S(
217
- st,
218
- nt,
219
- rt,
220
- !1,
221
- null,
222
- "95343e8e"
223
- );
224
- const Tt = it.exports;
225
- export {
226
- Tt as B,
227
- vt as a
228
- };
229
- //# sourceMappingURL=tab.YQXssvyU.js.map