@adyen/bento-vue3 1.6.1 → 1.7.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.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +45 -0
- package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +229 -220
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +44 -46
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +8 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +8 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +46 -28
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +802 -52
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +64 -7
- package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +10 -1
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +7 -4
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +15 -15
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +173 -0
- package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
- package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
- package/dist/accordion.js +52 -43
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +210 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/checkmark.css +1 -0
- package/dist/assets/chevron-left.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/refresh.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +30 -22
- package/dist/button.js.map +1 -1
- package/dist/card.js +84 -84
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.4b5ab17e.js → base-button.7897a95e.js} +2 -2
- package/dist/chunks/{base-button.4b5ab17e.js.map → base-button.7897a95e.js.map} +1 -1
- package/dist/chunks/{base-modal.53a229ac.js → base-modal.0c85e7cb.js} +4 -4
- package/dist/chunks/{base-modal.53a229ac.js.map → base-modal.0c85e7cb.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.fa35390c.js +107 -0
- package/dist/chunks/button-actions-with-menu.fa35390c.js.map +1 -0
- package/dist/chunks/{button.975d0bb8.js → button.e5177388.js} +44 -36
- package/dist/chunks/button.e5177388.js.map +1 -0
- package/dist/chunks/{calendar.cc37ac1f.js → calendar.c83d4e99.js} +274 -250
- package/dist/chunks/calendar.c83d4e99.js.map +1 -0
- package/dist/chunks/{checkbox.67ceb148.js → checkbox.3cdbdd52.js} +7 -7
- package/dist/chunks/{checkbox.67ceb148.js.map → checkbox.3cdbdd52.js.map} +1 -1
- package/dist/chunks/checkmark.83e4f1e0.js +30 -0
- package/dist/chunks/checkmark.83e4f1e0.js.map +1 -0
- package/dist/chunks/{chevron-right.aef416c6.js → chevron-left.2fd6b083.js} +10 -10
- package/dist/chunks/chevron-left.2fd6b083.js.map +1 -0
- package/dist/chunks/{controls-group.7214dc7f.js → controls-group.38b436f6.js} +2 -2
- package/dist/chunks/{controls-group.7214dc7f.js.map → controls-group.38b436f6.js.map} +1 -1
- package/dist/chunks/{copy.7a73d1fd.js → copy.86236c8d.js} +4 -4
- package/dist/chunks/{copy.7a73d1fd.js.map → copy.86236c8d.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.0f878a8d.js → dropdown-default-textbox.0b38fac3.js} +4 -4
- package/dist/chunks/dropdown-default-textbox.0b38fac3.js.map +1 -0
- package/dist/chunks/{dropdown.7a104ce3.js → dropdown.afff433b.js} +144 -110
- package/dist/chunks/dropdown.afff433b.js.map +1 -0
- package/dist/chunks/{error-message.b91afffc.js → error-message.64e1964b.js} +2 -2
- package/dist/chunks/{error-message.b91afffc.js.map → error-message.64e1964b.js.map} +1 -1
- package/dist/chunks/fixed-scroller.e5aa7b00.js +148 -0
- package/dist/chunks/fixed-scroller.e5aa7b00.js.map +1 -0
- package/dist/chunks/{footer-actions.13f19a22.js → footer-actions.1ce44374.js} +3 -3
- package/dist/chunks/{footer-actions.13f19a22.js.map → footer-actions.1ce44374.js.map} +1 -1
- package/dist/chunks/{index.7f24db66.js → index.2bd3812b.js} +2 -2
- package/dist/chunks/{index.7f24db66.js.map → index.2bd3812b.js.map} +1 -1
- package/dist/chunks/{index.1dc4ebae.js → index.369b0e66.js} +112 -92
- package/dist/chunks/index.369b0e66.js.map +1 -0
- package/dist/chunks/{index.536bcb56.js → index.6a665ade.js} +3 -3
- package/dist/chunks/{index.536bcb56.js.map → index.6a665ade.js.map} +1 -1
- package/dist/chunks/{index.4c951e0d.js → index.77f35162.js} +6 -6
- package/dist/chunks/{index.4c951e0d.js.map → index.77f35162.js.map} +1 -1
- package/dist/chunks/index.bcc58fdd.js +1334 -0
- package/dist/chunks/index.bcc58fdd.js.map +1 -0
- package/dist/chunks/index.c207e9ab.js +602 -0
- package/dist/chunks/index.c207e9ab.js.map +1 -0
- package/dist/chunks/{index.6700224a.js → index.e579bc02.js} +2 -2
- package/dist/chunks/{index.6700224a.js.map → index.e579bc02.js.map} +1 -1
- package/dist/chunks/{index.d68847b0.js → index.fa7b44f1.js} +2 -2
- package/dist/chunks/{index.d68847b0.js.map → index.fa7b44f1.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.0f31ecb2.js → listbox-option-tag.809ec40e.js} +3 -3
- package/dist/chunks/{listbox-option-tag.0f31ecb2.js.map → listbox-option-tag.809ec40e.js.map} +1 -1
- package/dist/chunks/listbox.f6e5a11d.js +1306 -0
- package/dist/chunks/listbox.f6e5a11d.js.map +1 -0
- package/dist/chunks/{loading-button.6523a015.js → loading-button.746b7fa1.js} +2 -2
- package/dist/chunks/{loading-button.6523a015.js.map → loading-button.746b7fa1.js.map} +1 -1
- package/dist/chunks/refresh.c38c9eee.js +30 -0
- package/dist/chunks/refresh.c38c9eee.js.map +1 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
- package/dist/chunks/{tooltip.b5391514.js → tooltip.f769eb14.js} +54 -51
- package/dist/chunks/{tooltip.b5391514.js.map → tooltip.f769eb14.js.map} +1 -1
- package/dist/code-snippet.js +6 -6
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +553 -541
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +10 -10
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +129 -118
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +44 -42
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +696 -683
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +3 -3
- package/dist/header.js +121 -198
- package/dist/header.js.map +1 -1
- package/dist/image.js +4 -4
- package/dist/index.js +164 -158
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +8 -8
- package/dist/input-field.js +7 -7
- package/dist/internal.js +20 -144
- package/dist/internal.js.map +1 -1
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +3 -592
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +3 -3
- package/dist/pagination.js +37 -21
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +50 -40
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +16 -16
- package/dist/popper-container.js +6 -1276
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +128 -97
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +130 -106
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +94 -91
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +146 -163
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +128 -99
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +216 -203
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +6 -6
- package/dist/tutorial.js +375 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -2
- package/dist/assets/chevron-right.css +0 -1
- package/dist/chunks/button.975d0bb8.js.map +0 -1
- package/dist/chunks/calendar.cc37ac1f.js.map +0 -1
- package/dist/chunks/chevron-right.aef416c6.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.0f878a8d.js.map +0 -1
- package/dist/chunks/dropdown.7a104ce3.js.map +0 -1
- package/dist/chunks/index.1dc4ebae.js.map +0 -1
- package/dist/chunks/listbox.0f25778d.js +0 -1213
- package/dist/chunks/listbox.0f25778d.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -1,147 +1,23 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { C as
|
|
3
|
-
import { C as
|
|
4
|
-
import { C as
|
|
5
|
-
import { E as
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import { C as G, a as I } from "./chunks/chevron-right.aef416c6.js";
|
|
10
|
-
import { _ as O } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
11
|
-
import { G as ie, a as fe } from "./chunks/grid-layout.7c919507.js";
|
|
12
|
-
import { B as de } from "./chunks/listbox.0f25778d.js";
|
|
13
|
-
import "./assets/index13.css";
|
|
14
|
-
const A = ({
|
|
15
|
-
contentRef: C,
|
|
16
|
-
containerRef: f,
|
|
17
|
-
leftButtonRef: u,
|
|
18
|
-
rightButtonRef: d
|
|
19
|
-
}) => {
|
|
20
|
-
const r = n(0), o = n(0), c = a(() => {
|
|
21
|
-
var e;
|
|
22
|
-
return (e = C.value) == null ? void 0 : e.scrollWidth;
|
|
23
|
-
}), s = a(() => {
|
|
24
|
-
var e;
|
|
25
|
-
return (e = f.value) == null ? void 0 : e.clientWidth;
|
|
26
|
-
}), p = a(() => {
|
|
27
|
-
var l, _;
|
|
28
|
-
const e = ((l = u.value) == null ? void 0 : l.scrollWidth) ?? 0, b = ((_ = d.value) == null ? void 0 : _.scrollWidth) ?? 0;
|
|
29
|
-
return e + b;
|
|
30
|
-
}), i = a(() => Math.ceil(c.value / s.value) ?? 0), v = a(() => {
|
|
31
|
-
const e = new Array(i.value).fill(0);
|
|
32
|
-
return e.forEach((b, l) => {
|
|
33
|
-
if (l === 0)
|
|
34
|
-
return;
|
|
35
|
-
if (l === i.value - 1) {
|
|
36
|
-
e[e.length - 1] = -(c.value - s.value);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const _ = e[l - 1];
|
|
40
|
-
e[l] = -(s.value + Math.abs(_) - p.value);
|
|
41
|
-
}), e;
|
|
42
|
-
}), m = a(() => o.value !== 0), y = a(
|
|
43
|
-
() => r.value === 0 || r.value >= -(c.value - s.value - 1)
|
|
44
|
-
);
|
|
45
|
-
return {
|
|
46
|
-
offset: r,
|
|
47
|
-
shouldShowLeftButton: m,
|
|
48
|
-
shouldShowRightButton: y,
|
|
49
|
-
// Methods
|
|
50
|
-
scrollLeft: () => {
|
|
51
|
-
o.value !== 0 && (o.value -= 1, r.value = v.value[o.value]);
|
|
52
|
-
},
|
|
53
|
-
scrollRight: () => {
|
|
54
|
-
o.value !== i.value - 1 && (o.value += 1, r.value = v.value[o.value]);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}, k = {
|
|
58
|
-
"en-US": {
|
|
59
|
-
scrollLeft: "Scroll left",
|
|
60
|
-
scrollRight: "Scroll right"
|
|
61
|
-
}
|
|
62
|
-
}, F = { class: "b-fixed-scroller__container" }, M = {
|
|
63
|
-
i18n: { messages: k }
|
|
64
|
-
}, N = /* @__PURE__ */ W({
|
|
65
|
-
...M,
|
|
66
|
-
__name: "fixed-scroller",
|
|
67
|
-
setup(C) {
|
|
68
|
-
const { t: f } = V({ messages: k }), u = n(null), d = n(null), r = n(null), o = n(null), { offset: c, shouldShowLeftButton: s, shouldShowRightButton: p, scrollLeft: i, scrollRight: v } = A({
|
|
69
|
-
contentRef: u,
|
|
70
|
-
containerRef: d,
|
|
71
|
-
leftButtonRef: r,
|
|
72
|
-
rightButtonRef: o
|
|
73
|
-
});
|
|
74
|
-
return (m, y) => (x(), g("div", {
|
|
75
|
-
ref_key: "fixedScrollerRef",
|
|
76
|
-
ref: d,
|
|
77
|
-
class: "b-fixed-scroller"
|
|
78
|
-
}, [
|
|
79
|
-
B("div", F, [
|
|
80
|
-
B("div", {
|
|
81
|
-
ref_key: "contentRef",
|
|
82
|
-
ref: u,
|
|
83
|
-
class: "b-fixed-scroller__content",
|
|
84
|
-
style: w({ transform: `translateX(${t(c)}px)` })
|
|
85
|
-
}, [
|
|
86
|
-
E(m.$slots, "default", {}, void 0, !0)
|
|
87
|
-
], 4)
|
|
88
|
-
]),
|
|
89
|
-
t(s) ? (x(), g("div", {
|
|
90
|
-
key: 0,
|
|
91
|
-
ref_key: "leftButtonRef",
|
|
92
|
-
ref: r,
|
|
93
|
-
class: "b-fixed-scroller__left"
|
|
94
|
-
}, [
|
|
95
|
-
h(t(S), {
|
|
96
|
-
variant: "secondary",
|
|
97
|
-
"aria-label": t(f)("scrollLeft"),
|
|
98
|
-
onClick: t(i)
|
|
99
|
-
}, {
|
|
100
|
-
iconLeft: R(() => [
|
|
101
|
-
h(t(G), {
|
|
102
|
-
"svg-title": "checked",
|
|
103
|
-
"aria-hidden": "true"
|
|
104
|
-
})
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
}, 8, ["aria-label", "onClick"])
|
|
108
|
-
], 512)) : L("", !0),
|
|
109
|
-
t(p) ? (x(), g("div", {
|
|
110
|
-
key: 1,
|
|
111
|
-
ref_key: "rightButtonRef",
|
|
112
|
-
ref: o,
|
|
113
|
-
class: "b-fixed-scroller__right"
|
|
114
|
-
}, [
|
|
115
|
-
h(t(S), {
|
|
116
|
-
variant: "secondary",
|
|
117
|
-
"aria-label": t(f)("scrollRight"),
|
|
118
|
-
onClick: t(v)
|
|
119
|
-
}, {
|
|
120
|
-
iconLeft: R(() => [
|
|
121
|
-
h(t(I), {
|
|
122
|
-
"svg-title": "checked",
|
|
123
|
-
"aria-hidden": "true"
|
|
124
|
-
})
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}, 8, ["aria-label", "onClick"])
|
|
128
|
-
], 512)) : L("", !0)
|
|
129
|
-
], 512));
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
const q = /* @__PURE__ */ O(N, [["__scopeId", "data-v-ba6ad0f9"]]);
|
|
1
|
+
import { B as a, L as e } from "./chunks/listbox-option-tag.809ec40e.js";
|
|
2
|
+
import { C as s, a as p, b as x } from "./chunks/calendar.c83d4e99.js";
|
|
3
|
+
import { C as f } from "./chunks/copy.86236c8d.js";
|
|
4
|
+
import { C as i } from "./chunks/controls-group.38b436f6.js";
|
|
5
|
+
import { E as d } from "./chunks/error-message.64e1964b.js";
|
|
6
|
+
import { F as y } from "./chunks/fixed-scroller.e5aa7b00.js";
|
|
7
|
+
import { G as B, a as G } from "./chunks/grid-layout.7c919507.js";
|
|
8
|
+
import { B as u } from "./chunks/listbox.f6e5a11d.js";
|
|
133
9
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
10
|
+
a as BentoAvatar,
|
|
11
|
+
u as BentoListbox,
|
|
12
|
+
s as Calendar,
|
|
13
|
+
p as CalendarEvent,
|
|
14
|
+
x as CalendarFirstDayOfWeek,
|
|
15
|
+
i as ControlsGroup,
|
|
16
|
+
f as Copy,
|
|
17
|
+
d as ErrorMessage,
|
|
18
|
+
y as FixedScroller,
|
|
19
|
+
B as GridLayout,
|
|
20
|
+
G as GridLayoutContainerType,
|
|
21
|
+
e as ListboxOptionTag
|
|
146
22
|
};
|
|
147
23
|
//# sourceMappingURL=internal.js.map
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sources":["../../vue2/src/components/internal/fixed-scroller/composables/useFixedScroller.ts","../../vue2/src/components/internal/fixed-scroller/fixed-scroller.vue"],"sourcesContent":["import { computed, ref } from 'vue';\nimport type { Ref } from 'vue';\n\ninterface useFixedScrollerProps {\n contentRef?: Ref<HTMLElement | undefined>;\n containerRef?: Ref<HTMLElement | undefined>;\n leftButtonRef?: Ref<HTMLElement | undefined>;\n rightButtonRef?: Ref<HTMLElement | undefined>;\n}\n\n/**\n * Function to calculate the offset of each view and change the \"view\" via offsets\n * through the functions `scrollLeft` and `scrollRight` whilst providing a way to\n * show and hide the buttons based on the current \"view\" via\n * `shouldShowLeftButton` and `shouldShowRightButton`.\n *\n * Each view is pre-calculated (offsetArray) and updated if the content changes as a computed ref:\n * First view: Always 0 (x axis beginning).\n * Last view: total content space - visible width\n * Intermediate views: Previous offset (to the left) plus the visible space taking\n * away the space the buttons take so that the whole view can be rendered\n *\n *\n * @param {useFixedScrollerProps} props - All the necessary references to calculate the scroll\n * @param {Ref<HTMLElement | undefined>} props.containerRef - Reference to the container, this defines the visible space width\n * @param {Ref<HTMLElement | undefined>} props.contentRef - Reference to the content itself, this defines the total content width\n * @param {Ref<HTMLElement | undefined>} props.leftButtonRef - Reference to the left button, used to calculate total space in which the content will be rendered\n * @param {Ref<HTMLElement | undefined>} props.rightButtonRef - Reference to the right button, used to calculate total space in which the content will be rendered\n * @returns {Object} response - Values used in the view to show the buttons and to change the view right or left\n * @returns {Ref<number>} response.offset - Offset value by which the view will move on the x axis. To be used in `styles`.\n * @returns {ComputedRef<boolean>} response.shouldShowLeftButton - Indicates if the button on the left should be shown\n * @returns {ComputedRef<boolean>} response.shouldShowRightButton - Indicates if the button on the right should be shown\n * @returns {() => {}} response.scrollLeft - Used to shift the view to the left\n * @returns {() => {}} response.scrollRight - Used to shift the view to the right\n */\nexport const useFixedScroller = ({\n contentRef,\n containerRef,\n leftButtonRef,\n rightButtonRef,\n}: useFixedScrollerProps) => {\n const offset = ref(0);\n const currentView = ref(0);\n\n // Calculated using 'scrollWidth' to get the full width of the content\n const totalContentWidth = computed(() => contentRef.value?.scrollWidth);\n // Calculated using 'clientWidth' to get the rendered componen width\n const visibleSpaceWidth = computed(() => containerRef.value?.clientWidth);\n // Sum of the space used by the Left and Right buttons\n // Used to calculate how much space the \"actual\" visible space is\n const buttonsWidth = computed(() => {\n const leftButtonWidth = leftButtonRef.value?.scrollWidth ?? 0;\n const rightButtonWidth = rightButtonRef.value?.scrollWidth ?? 0;\n\n return leftButtonWidth + rightButtonWidth;\n });\n // Total number of pages/views available.\n // Calculated as \"ceil\" because if the space doesn't fit \"one view\" (irrational number) the content flows to the next view (integer).\n const totalViews = computed(() => Math.ceil(totalContentWidth.value / visibleSpaceWidth.value) ?? 0);\n\n // Calculation of offsets per view (index).\n // This allows to easily swap the offset without on-the-fly calculations\n const offsetArray = computed(() => {\n const calculatedOffsetList = new Array(totalViews.value).fill(0);\n\n calculatedOffsetList.forEach((_, index) => {\n // First offset will be 0\n if (index === 0) {\n return;\n }\n\n // Calculate last\n if (index === totalViews.value - 1) {\n calculatedOffsetList[calculatedOffsetList.length - 1] = -(\n totalContentWidth.value - visibleSpaceWidth.value\n );\n return;\n }\n\n // Calculate each offset - Move 1 view\n const previousOffset = calculatedOffsetList[index - 1];\n calculatedOffsetList[index] = -(visibleSpaceWidth.value + Math.abs(previousOffset) - buttonsWidth.value);\n });\n\n return calculatedOffsetList;\n });\n\n // Hide left button when it's the first view\n const shouldShowLeftButton = computed(() => currentView.value !== 0);\n // Hide right button if it's the last view\n const shouldShowRightButton = computed(\n () => offset.value === 0 || offset.value >= -(totalContentWidth.value - visibleSpaceWidth.value - 1)\n );\n\n /**\n * Shifts the current offset by one view to the left.\n */\n const scrollLeft = () => {\n // Do nothing if it is already in page 0\n if (currentView.value === 0) {\n return;\n }\n\n currentView.value -= 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n /**\n * Shifts the current offset by one view to the right.\n */\n const scrollRight = () => {\n // Do nothing if it is already in last page\n if (currentView.value === totalViews.value - 1) {\n return;\n }\n\n currentView.value += 1;\n offset.value = offsetArray.value[currentView.value];\n };\n\n return {\n offset,\n shouldShowLeftButton,\n shouldShowRightButton,\n\n // Methods\n scrollLeft,\n scrollRight,\n };\n};\n","<template>\n <div ref=\"fixedScrollerRef\" class=\"b-fixed-scroller\">\n <div class=\"b-fixed-scroller__container\">\n <div ref=\"contentRef\" class=\"b-fixed-scroller__content\" :style=\"{ transform: `translateX(${offset}px)` }\">\n <slot></slot>\n </div>\n </div>\n\n <div v-if=\"shouldShowLeftButton\" ref=\"leftButtonRef\" class=\"b-fixed-scroller__left\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollLeft')\" @click=\"scrollLeft\">\n <template #iconLeft>\n <chevron-left-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n <div v-if=\"shouldShowRightButton\" ref=\"rightButtonRef\" class=\"b-fixed-scroller__right\">\n <bento-button variant=\"secondary\" :aria-label=\"t('scrollRight')\" @click=\"scrollRight\">\n <template #iconLeft>\n <chevron-right-icon svg-title=\"checked\" aria-hidden=\"true\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { useFixedScroller } from './composables';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const contentRef = ref(null);\n const fixedScrollerRef = ref(null);\n const leftButtonRef = ref(null);\n const rightButtonRef = ref(null);\n\n const { offset, shouldShowLeftButton, shouldShowRightButton, scrollLeft, scrollRight } = useFixedScroller({\n contentRef,\n containerRef: fixedScrollerRef,\n leftButtonRef,\n rightButtonRef,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Allows to horizontally scroll content by one view at a time.\n *\n * @example\n * import { FixedScroller } from '@/internal';\n *\n * export default {\n * components: { FixedScroller },\n * template: `\n * <fixed-scroller>\n * <div style=\"display: flex; gap: 8px;\">\n * {{ Content here }}\n * </div>\n * </fixed-scroller>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./fixed-scroller.scss\" />\n"],"names":["useFixedScroller","contentRef","containerRef","leftButtonRef","rightButtonRef","offset","ref","currentView","totalContentWidth","computed","_a","visibleSpaceWidth","buttonsWidth","leftButtonWidth","rightButtonWidth","_b","totalViews","offsetArray","calculatedOffsetList","_","index","previousOffset","shouldShowLeftButton","shouldShowRightButton","__default__","messages","t","useI18n","fixedScrollerRef","scrollLeft","scrollRight"],"mappings":";;;;;;;;;;;;;AAmCO,MAAAA,IAAA,CAAA;AAAA,EAA0B,YAAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAEJ,MAAA;AACI,QAAAC,IAAAC,EAAA,CAAA,GACAC,IAAAD,EAAA,CAAA,GAGAE,IAAAC,EAAA,MAAA;;AAAA,YAAAC,IAAAT,EAAA,UAAA,gBAAAS,EAAA;AAAA,GAAA,GAEAC,IAAAF,EAAA,MAAA;;AAAA,YAAAC,IAAAR,EAAA,UAAA,gBAAAQ,EAAA;AAAA,GAAA,GAGAE,IAAAH,EAAA,MAAA;;AACI,UAAAI,MAAAH,IAAAP,EAAA,UAAA,gBAAAO,EAAA,gBAAA,GACAI,MAAAC,IAAAX,EAAA,UAAA,gBAAAW,EAAA,gBAAA;AAEA,WAAAF,IAAAC;AAAA,EAAyB,CAAA,GAI7BE,IAAAP,EAAA,MAAA,KAAA,KAAAD,EAAA,QAAAG,EAAA,KAAA,KAAA,CAAA,GAIAM,IAAAR,EAAA,MAAA;AACI,UAAAS,IAAA,IAAA,MAAAF,EAAA,KAAA,EAAA,KAAA,CAAA;AAEA,WAAAE,EAAA,QAAA,CAAAC,GAAAC,MAAA;AAEI,UAAAA,MAAA;AACI;AAIJ,UAAAA,MAAAJ,EAAA,QAAA,GAAA;AACI,QAAAE,EAAAA,EAAA,SAAA,CAAA,IAAA,EAAAV,EAAA,QAAAG,EAAA;AAGA;AAAA;AAIJ,YAAAU,IAAAH,EAAAE,IAAA,CAAA;AACA,MAAAF,EAAAE,CAAA,IAAA,EAAAT,EAAA,QAAA,KAAA,IAAAU,CAAA,IAAAT,EAAA;AAAA,IAAkG,CAAA,GAGtGM;AAAA,EAAO,CAAA,GAIXI,IAAAb,EAAA,MAAAF,EAAA,UAAA,CAAA,GAEAgB,IAAAd;AAAA,IAA8B,MAAAJ,EAAA,UAAA,KAAAA,EAAA,SAAA,EAAAG,EAAA,QAAAG,EAAA,QAAA;AAAA,EACwE;AA6BtG,SAAA;AAAA,IAAO,QAAAN;AAAA,IACH,sBAAAiB;AAAA,IACA,uBAAAC;AAAA;AAAA,IACA,YA1BJ,MAAA;AAEI,MAAAhB,EAAA,UAAA,MAIAA,EAAA,SAAA,GACAF,EAAA,QAAAY,EAAA,MAAAV,EAAA,KAAA;AAAA,IAAkD;AAAA,IAsBlD,aAhBJ,MAAA;AAEI,MAAAA,EAAA,UAAAS,EAAA,QAAA,MAIAT,EAAA,SAAA,GACAF,EAAA,QAAAY,EAAA,MAAAV,EAAA,KAAA;AAAA,IAAkD;AAAA,EAUlD;AAER;;;;;iDC3DIiB,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;AAnCA,UAAA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GAEAxB,IAAAK,EAAA,IAAA,GACAsB,IAAAtB,EAAA,IAAA,GACAH,IAAAG,EAAA,IAAA,GACAF,IAAAE,EAAA,IAAA,GAEA,EAAA,QAAAD,GAAA,sBAAAiB,GAAA,uBAAAC,GAAA,YAAAM,GAAA,aAAAC,EAAA,IAAA9B,EAAA;AAAA,MAA0G,YAAAC;AAAA,MACtG,cAAA2B;AAAA,MACc,eAAAzB;AAAA,MACd,gBAAAC;AAAA,IACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"internal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/link.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as g, computed as b, useAttrs as h, openBlock as a, createElementBlock as v, mergeProps as y, unref as e, createBlock as n, withCtx as i, renderSlot as r } from "vue";
|
|
2
2
|
import { RouterLink as T } from "vue-router";
|
|
3
|
-
import { B as k } from "./chunks/index.
|
|
3
|
+
import { B as k } from "./chunks/index.2bd3812b.js";
|
|
4
4
|
import { _ as B } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
5
|
-
import "./assets/
|
|
5
|
+
import "./assets/index14.css";
|
|
6
6
|
var l = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.QUIET = "quiet", t))(l || {});
|
|
7
7
|
const E = ["href", "title", "target"], U = {
|
|
8
8
|
name: "bento-link",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t, onMounted as i, onUnmounted as l, computed as s, openBlock as d, createElementBlock as r, normalizeClass as c } from "vue";
|
|
2
2
|
import { _ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
3
|
-
import "./assets/
|
|
3
|
+
import "./assets/index18.css";
|
|
4
4
|
var e = /* @__PURE__ */ ((a) => (a.START = "loading-start", a.END = "loading-end", a))(e || {});
|
|
5
5
|
const p = t({
|
|
6
6
|
name: "bento-loading-indicator",
|