@adyen/bento-vue3 1.23.0 → 1.25.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/packages/vue2/src/components/alert/alert.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +46 -54
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +38 -48
- package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +86 -174
- 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 +2 -2
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +8 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.vue.d.ts +6 -3
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +2 -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/composables/use-dropdown-options-listbox.d.ts +13 -7
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +14 -14
- 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/composables/use-display-value.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +3 -24
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue.d.ts +148 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue.d.ts +150 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +28 -27
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +21 -9
- package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +1 -1
- 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/dialog-page/dialog-page.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +25 -20
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +45 -9
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +10 -9
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +15 -15
- package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item-list/menu-item-list.vue.d.ts +3 -2
- package/dist/@types/packages/vue2/src/components/menu/components/menu-list-container/menu-list-container.vue.d.ts +8 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/selection-card/components/selection-card-group/selection-card-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +7 -40
- package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.types.d.ts +5 -0
- package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue.d.ts +7 -0
- package/dist/@types/packages/vue2/src/components/toast/index.d.ts +0 -1
- package/dist/@types/packages/vue2/src/components/toast/toast.vue.d.ts +1 -29
- package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +195 -55
- package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +71 -85
- package/dist/@types/packages/vue2/src/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/install.d.ts +6 -0
- package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/toast-stack.d.ts +7 -0
- package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.types.d.ts +23 -0
- package/dist/@types/packages/vue2/src/composables/use-click-outside/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/utils/ts/storybook.d.ts +10 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +6 -6
- package/dist/alert.js +150 -154
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/grid-layout.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/index4.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 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- 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 → use-cached-selected-values.css} +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +168 -267
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +5 -5
- package/dist/chunks/{base-button.13df4e44.js → base-button.6be8b60e.js} +2 -2
- package/dist/chunks/{base-button.13df4e44.js.map → base-button.6be8b60e.js.map} +1 -1
- package/dist/chunks/{base-modal.30bce990.js → base-modal.310c4790.js} +6 -6
- package/dist/chunks/{base-modal.30bce990.js.map → base-modal.310c4790.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.a5d2bb13.js → button-actions-with-menu.a007b034.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.a5d2bb13.js.map → button-actions-with-menu.a007b034.js.map} +1 -1
- package/dist/chunks/{button-actions.ec3c649c.js → button-actions.adc0a2fe.js} +3 -3
- package/dist/chunks/{button-actions.ec3c649c.js.map → button-actions.adc0a2fe.js.map} +1 -1
- package/dist/chunks/{button.e965bf53.js → button.de5589fa.js} +3 -3
- package/dist/chunks/{button.e965bf53.js.map → button.de5589fa.js.map} +1 -1
- package/dist/chunks/{calendar.52fe4032.js → calendar.73f5b904.js} +4 -4
- package/dist/chunks/{calendar.52fe4032.js.map → calendar.73f5b904.js.map} +1 -1
- package/dist/chunks/{checkbox.1442f41a.js → checkbox.4c96cc23.js} +3 -3
- package/dist/chunks/{checkbox.1442f41a.js.map → checkbox.4c96cc23.js.map} +1 -1
- package/dist/chunks/{controls-group.1f29b602.js → controls-group.37a67734.js} +3 -3
- package/dist/chunks/{controls-group.1f29b602.js.map → controls-group.37a67734.js.map} +1 -1
- package/dist/chunks/{copy.d052f444.js → copy.43de2653.js} +4 -4
- package/dist/chunks/{copy.d052f444.js.map → copy.43de2653.js.map} +1 -1
- package/dist/chunks/dialog-page.cd8c7fff.js +173 -0
- package/dist/chunks/dialog-page.cd8c7fff.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.e0ca5afb.js → dropdown-default-textbox.424e0eb6.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.e0ca5afb.js.map → dropdown-default-textbox.424e0eb6.js.map} +1 -1
- package/dist/chunks/{dropdown.257691c0.js → dropdown.57b2ea6f.js} +295 -317
- package/dist/chunks/dropdown.57b2ea6f.js.map +1 -0
- package/dist/chunks/{error-message.56247bcc.js → error-message.4bd22112.js} +2 -2
- package/dist/chunks/{error-message.56247bcc.js.map → error-message.4bd22112.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.47546775.js → fixed-scroller.5b93a6a6.js} +2 -2
- package/dist/chunks/{fixed-scroller.47546775.js.map → fixed-scroller.5b93a6a6.js.map} +1 -1
- package/dist/chunks/{footer-actions.3c2dbf43.js → footer-actions.c401ec50.js} +4 -4
- package/dist/chunks/{footer-actions.3c2dbf43.js.map → footer-actions.c401ec50.js.map} +1 -1
- package/dist/chunks/index.11b6dd35.js +74 -0
- package/dist/chunks/index.11b6dd35.js.map +1 -0
- package/dist/chunks/{index.4fb57ba0.js → index.38752f78.js} +6 -6
- package/dist/chunks/{index.4fb57ba0.js.map → index.38752f78.js.map} +1 -1
- package/dist/chunks/index.73ac0db6.js +62 -0
- package/dist/chunks/index.73ac0db6.js.map +1 -0
- package/dist/chunks/{index.824101bb.js → index.8682bd04.js} +2 -2
- package/dist/chunks/{index.824101bb.js.map → index.8682bd04.js.map} +1 -1
- package/dist/chunks/{index.10c69f39.js → index.8b10ee32.js} +212 -191
- package/dist/chunks/index.8b10ee32.js.map +1 -0
- package/dist/chunks/{index.f800b267.js → index.98bbaed9.js} +2 -2
- package/dist/chunks/{index.f800b267.js.map → index.98bbaed9.js.map} +1 -1
- package/dist/chunks/{index.bf4a116b.js → index.aa83aa48.js} +3 -3
- package/dist/chunks/{index.bf4a116b.js.map → index.aa83aa48.js.map} +1 -1
- package/dist/chunks/{index.08d813e2.js → index.bab8811d.js} +6 -6
- package/dist/chunks/{index.08d813e2.js.map → index.bab8811d.js.map} +1 -1
- package/dist/chunks/{index.44f2aca7.js → index.ea65003b.js} +2 -2
- package/dist/chunks/{index.44f2aca7.js.map → index.ea65003b.js.map} +1 -1
- package/dist/chunks/{index.9aaed799.js → index.f71015d8.js} +3 -3
- package/dist/chunks/{index.9aaed799.js.map → index.f71015d8.js.map} +1 -1
- package/dist/chunks/{index.56c13d2c.js → index.faec0854.js} +15 -15
- package/dist/chunks/{index.56c13d2c.js.map → index.faec0854.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.4de1659c.js → listbox-option-tag.d1a3b340.js} +3 -3
- package/dist/chunks/{listbox-option-tag.4de1659c.js.map → listbox-option-tag.d1a3b340.js.map} +1 -1
- package/dist/chunks/{loading-button.6e15f27f.js → loading-button.2db95771.js} +2 -2
- package/dist/chunks/{loading-button.6e15f27f.js.map → loading-button.2db95771.js.map} +1 -1
- package/dist/chunks/{payment-method.df1b62db.js → payment-method.26fa5509.js} +2 -2
- package/dist/chunks/{payment-method.df1b62db.js.map → payment-method.26fa5509.js.map} +1 -1
- package/dist/chunks/{tooltip.066fd8f7.js → tooltip.e29f7d7e.js} +3 -3
- package/dist/chunks/{tooltip.066fd8f7.js.map → tooltip.e29f7d7e.js.map} +1 -1
- package/dist/chunks/use-bento-toast-controller.98ca249a.js +50 -0
- package/dist/chunks/use-bento-toast-controller.98ca249a.js.map +1 -0
- package/dist/chunks/use-cached-selected-values.a9b0fb3d.js +1537 -0
- package/dist/chunks/use-cached-selected-values.a9b0fb3d.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1207 -1169
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +19 -19
- 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 +7 -7
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +1260 -1112
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +4 -4
- package/dist/index.js +259 -274
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +100 -93
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +31 -78
- package/dist/internal.js.map +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +6 -6
- package/dist/modal.js +6 -6
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +112 -112
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/selection-card.js +4 -4
- package/dist/sidepanel.js +64 -62
- 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 +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +7 -7
- package/dist/toast.js +185 -154
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +6 -6
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +7 -3
- package/dist/@types/packages/vue2/src/components/toast/components/toast-item/index.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.types.d.ts +0 -9
- package/dist/@types/packages/vue2/src/plugins/toastController.d.ts +0 -12
- package/dist/@types/packages/vue2/src/utils/ts/toastController.d.ts +0 -2
- package/dist/chunks/dialog-page.d505c5ec.js +0 -172
- package/dist/chunks/dialog-page.d505c5ec.js.map +0 -1
- package/dist/chunks/dropdown.257691c0.js.map +0 -1
- package/dist/chunks/index.0e01e0b2.js +0 -101
- package/dist/chunks/index.0e01e0b2.js.map +0 -1
- package/dist/chunks/index.10c69f39.js.map +0 -1
- package/dist/chunks/index.99c63a74.js +0 -125
- package/dist/chunks/index.99c63a74.js.map +0 -1
- package/dist/chunks/info-filled.a6f9d7d0.js +0 -44
- package/dist/chunks/info-filled.a6f9d7d0.js.map +0 -1
- package/dist/chunks/listbox.eb436d06.js +0 -1466
- package/dist/chunks/listbox.eb436d06.js.map +0 -1
- package/dist/chunks/toastController.0b01d2e8.js +0 -9
- package/dist/chunks/toastController.0b01d2e8.js.map +0 -1
package/dist/toast.js
CHANGED
|
@@ -1,187 +1,218 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import { B as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const F = {
|
|
1
|
+
import { defineComponent as N, openBlock as l, createElementBlock as A, createElementVNode as G, createVNode as k, unref as o, withCtx as B, createTextVNode as M, toDisplayString as R, createBlock as T, createCommentVNode as b, ref as u, computed as h, watch as w, onMounted as X, nextTick as J, normalizeStyle as K, TransitionGroup as Q, Fragment as Z, renderList as F, mergeProps as tt } from "vue";
|
|
2
|
+
import { u as U } from "./chunks/use-bento-toast-controller.98ca249a.js";
|
|
3
|
+
import { C as et } from "./chunks/cross-small.b85406fe.js";
|
|
4
|
+
import { u as st } from "./chunks/i18n.f7e6533e.js";
|
|
5
|
+
import { a as H } from "./chunks/button.de5589fa.js";
|
|
6
|
+
import { B as at } from "./chunks/index.11b6dd35.js";
|
|
7
|
+
import { _ as O } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
8
|
+
import "./assets/index34.css";
|
|
9
|
+
const P = {
|
|
11
10
|
"en-US": {
|
|
12
11
|
dismiss: "Dismiss"
|
|
13
12
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
}, ot = { class: "b-toast-item" }, nt = {
|
|
14
|
+
class: "b-toast-item__text",
|
|
15
|
+
role: "status"
|
|
16
|
+
}, it = {
|
|
17
|
+
i18n: { messages: P }
|
|
18
|
+
}, rt = /* @__PURE__ */ N({
|
|
19
|
+
...it,
|
|
20
|
+
__name: "toast-item",
|
|
18
21
|
props: {
|
|
19
|
-
|
|
20
|
-
type: String,
|
|
21
|
-
required: !0
|
|
22
|
-
},
|
|
23
|
-
action: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: null
|
|
26
|
-
}
|
|
22
|
+
toast: { type: Object, required: !0 }
|
|
27
23
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
t.action.handler(), n("dismiss");
|
|
24
|
+
setup(c) {
|
|
25
|
+
const d = c, { t: n } = st({ messages: P }), v = () => {
|
|
26
|
+
typeof d.toast.action.handler == "function" && d.toast.action.handler(), d.toast.dismiss();
|
|
32
27
|
};
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onActionClicked: a
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const M = {
|
|
42
|
-
class: "b-toast-item",
|
|
43
|
-
"data-testid": "toast-item"
|
|
44
|
-
}, R = { class: "b-toast-item__container" }, W = { role: "status" }, J = { class: "b-toast-item__container" };
|
|
45
|
-
function K(t, c, n, o, a, f) {
|
|
46
|
-
const r = _("info-icon"), i = _("bento-typography"), s = _("bento-button"), e = _("cross-icon");
|
|
47
|
-
return u(), d("div", M, [
|
|
48
|
-
b("div", R, [
|
|
49
|
-
l(r, {
|
|
50
|
-
class: "b-toast-item__left-icon b-toast-item__info-icon",
|
|
51
|
-
name: "info",
|
|
52
|
-
"aria-hidden": "true"
|
|
53
|
-
}),
|
|
54
|
-
b("output", W, [
|
|
55
|
-
l(i, {
|
|
28
|
+
return (a, i) => (l(), A("div", ot, [
|
|
29
|
+
G("output", nt, [
|
|
30
|
+
k(o(at), {
|
|
31
|
+
title: c.toast.text,
|
|
56
32
|
el: "span",
|
|
57
33
|
variant: "body",
|
|
58
34
|
strongest: ""
|
|
59
35
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
|
|
36
|
+
default: B(() => [
|
|
37
|
+
M(R(c.toast.text), 1)
|
|
62
38
|
]),
|
|
63
39
|
_: 1
|
|
64
|
-
})
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
b("div", J, [
|
|
68
|
-
t.action ? (u(), D(s, {
|
|
40
|
+
}, 8, ["title"])
|
|
41
|
+
]),
|
|
42
|
+
c.toast.action ? (l(), T(o(H), {
|
|
69
43
|
key: 0,
|
|
70
|
-
class: "b-toast-
|
|
44
|
+
class: "b-toast-item__btn",
|
|
71
45
|
variant: "tertiary",
|
|
72
|
-
|
|
46
|
+
"data-testid": "toast-item-action-btn",
|
|
47
|
+
onClick: v
|
|
73
48
|
}, {
|
|
74
|
-
default:
|
|
75
|
-
|
|
49
|
+
default: B(() => [
|
|
50
|
+
M(R(c.toast.action.text), 1)
|
|
76
51
|
]),
|
|
77
52
|
_: 1
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
class: "b-toast-
|
|
53
|
+
})) : b("", !0),
|
|
54
|
+
k(o(H), {
|
|
55
|
+
class: "b-toast-item__btn",
|
|
81
56
|
variant: "tertiary",
|
|
82
|
-
|
|
57
|
+
"data-testid": "toast-item-close-btn",
|
|
58
|
+
onClick: i[0] || (i[0] = (f) => c.toast.dismiss())
|
|
83
59
|
}, {
|
|
84
|
-
iconLeft:
|
|
85
|
-
|
|
86
|
-
"svg-title":
|
|
60
|
+
iconLeft: B(() => [
|
|
61
|
+
k(o(et), {
|
|
62
|
+
"svg-title": o(n)("dismiss")
|
|
87
63
|
}, null, 8, ["svg-title"])
|
|
88
64
|
]),
|
|
89
65
|
_: 1
|
|
90
|
-
}
|
|
91
|
-
])
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
setup() {
|
|
98
|
-
const {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
e && f(e);
|
|
66
|
+
})
|
|
67
|
+
]));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const $ = /* @__PURE__ */ O(rt, [["__scopeId", "data-v-eaedd6da"]]), lt = /* @__PURE__ */ N({
|
|
71
|
+
__name: "toast-shadow-stack",
|
|
72
|
+
emits: ["update"],
|
|
73
|
+
setup(c, { emit: d }) {
|
|
74
|
+
const { stack: n } = U(), v = u(), a = u(), i = u(), f = u(), S = [a, i, f], r = h(() => n.value.slice(0, 3)), m = async () => {
|
|
75
|
+
await J();
|
|
76
|
+
const { top: y } = v.value.getBoundingClientRect(), p = n.value.map((I, D) => {
|
|
77
|
+
if (D > 2)
|
|
78
|
+
return { ...I, bottom: 0, height: 0 };
|
|
79
|
+
const { height: g, top: x } = S[D].value.$el.getBoundingClientRect();
|
|
80
|
+
return { ...I, height: g, bottom: x - y };
|
|
81
|
+
});
|
|
82
|
+
d("update", p);
|
|
108
83
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}),
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
84
|
+
return w(n, m), X(() => {
|
|
85
|
+
n.value.length > 0 && m();
|
|
86
|
+
}), (y, p) => (l(), A("div", {
|
|
87
|
+
ref_key: "shadowStack",
|
|
88
|
+
ref: v,
|
|
89
|
+
class: "b-toast-shadow-stack"
|
|
90
|
+
}, [
|
|
91
|
+
o(r)[0] ? (l(), T($, {
|
|
92
|
+
key: 0,
|
|
93
|
+
ref_key: "toast0",
|
|
94
|
+
ref: a,
|
|
95
|
+
toast: o(r)[0]
|
|
96
|
+
}, null, 8, ["toast"])) : b("", !0),
|
|
97
|
+
o(r)[1] ? (l(), T($, {
|
|
98
|
+
key: 1,
|
|
99
|
+
ref_key: "toast1",
|
|
100
|
+
ref: i,
|
|
101
|
+
toast: o(r)[1]
|
|
102
|
+
}, null, 8, ["toast"])) : b("", !0),
|
|
103
|
+
o(r)[2] ? (l(), T($, {
|
|
104
|
+
key: 2,
|
|
105
|
+
ref_key: "toast2",
|
|
106
|
+
ref: f,
|
|
107
|
+
toast: o(r)[2]
|
|
108
|
+
}, null, 8, ["toast"])) : b("", !0)
|
|
109
|
+
], 512));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const ct = /* @__PURE__ */ O(lt, [["__scopeId", "data-v-81490a5e"]]), ut = /* @__PURE__ */ N({
|
|
113
|
+
__name: "toast",
|
|
114
|
+
setup(c) {
|
|
115
|
+
const n = u(!1), { stack: v } = U();
|
|
116
|
+
w(
|
|
117
|
+
v,
|
|
118
|
+
(t) => {
|
|
119
|
+
t.length > 0 && !n.value && (n.value = !0);
|
|
120
|
+
},
|
|
121
|
+
{ immediate: !0 }
|
|
116
122
|
);
|
|
117
|
-
const i =
|
|
118
|
-
|
|
119
|
-
|
|
123
|
+
const a = u(!1), i = u([]), f = 40, S = 10, r = h(() => i.value.length), m = h(() => Math.min(a.value ? 2 : 0, r.value - 1)), y = h(() => {
|
|
124
|
+
const t = i.value[m.value];
|
|
125
|
+
return t ? t.bottom + t.height : 0;
|
|
126
|
+
}), p = h(() => {
|
|
127
|
+
const t = y.value - f;
|
|
128
|
+
return i.value.map((e, s) => {
|
|
129
|
+
const C = s > m.value, q = !a.value && s > 1, L = C ? t + S * (q ? 2 : 1) : e.bottom;
|
|
120
130
|
return {
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
...e,
|
|
132
|
+
styles: {
|
|
133
|
+
height: `${C ? f : e.height}px`,
|
|
134
|
+
transform: C ? `translateY(${L * -1}px) scaleX(${q ? "0.8" : "0.9"})` : `translateY(${L * -1}px)`,
|
|
135
|
+
"z-index": r.value - s
|
|
136
|
+
},
|
|
137
|
+
// first toast has different animation, and toasts above index 2/3 are not visible so no need for a custom animation
|
|
138
|
+
dismissTransform: s > 0 && s < (a.value ? 4 : 3) ? `translateY(${(L - e.height) * -1}px) scale(0.5, 0.1)` : null,
|
|
139
|
+
isFirst: s === 0,
|
|
140
|
+
isInert: s > (a.value ? 2 : 0)
|
|
123
141
|
};
|
|
124
|
-
})
|
|
125
|
-
),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
142
|
+
});
|
|
143
|
+
}), I = (t) => {
|
|
144
|
+
t.dataset.dismissTransform && (t.style.transform = t.dataset.dismissTransform);
|
|
145
|
+
}, D = h(() => {
|
|
146
|
+
let t = 0;
|
|
147
|
+
if (m.value >= 0) {
|
|
148
|
+
const e = S * Math.min(r.value - 1 - m.value, a.value ? 1 : 2);
|
|
149
|
+
t = Math.min(y.value + e, document.body.parentElement.clientHeight);
|
|
150
|
+
}
|
|
151
|
+
return `${t}px`;
|
|
132
152
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
153
|
+
let g = null, x = null, _ = 5e3;
|
|
154
|
+
const V = (t, e) => {
|
|
155
|
+
x = Date.now(), g = setTimeout(() => t.dismiss(), e);
|
|
156
|
+
}, z = (t) => {
|
|
157
|
+
clearTimeout(g), t ? (_ = 5e3, a.value || V(t, _)) : _ = 0;
|
|
158
|
+
};
|
|
159
|
+
w(
|
|
160
|
+
() => p.value[0],
|
|
161
|
+
(t, e) => {
|
|
162
|
+
(t == null ? void 0 : t.id) !== (e == null ? void 0 : e.id) && z(t);
|
|
163
|
+
},
|
|
164
|
+
{ immediate: !0 }
|
|
165
|
+
);
|
|
166
|
+
const E = () => {
|
|
167
|
+
_ = _ - Date.now() + x, clearTimeout(g);
|
|
168
|
+
}, W = () => {
|
|
169
|
+
_ > 0 && V(p.value[0], _);
|
|
139
170
|
};
|
|
171
|
+
w(a, (t) => {
|
|
172
|
+
t ? E() : W();
|
|
173
|
+
});
|
|
174
|
+
const Y = u(), j = () => setTimeout(() => {
|
|
175
|
+
a.value = a.value ? Y.value.matches(":hover") : !1;
|
|
176
|
+
});
|
|
177
|
+
return (t, e) => n.value ? (l(), A("div", {
|
|
178
|
+
key: 0,
|
|
179
|
+
ref_key: "root",
|
|
180
|
+
ref: Y,
|
|
181
|
+
class: "b-toast",
|
|
182
|
+
"data-testid": "toast",
|
|
183
|
+
style: K({ height: o(D) }),
|
|
184
|
+
onMouseenter: e[1] || (e[1] = (s) => a.value = !0),
|
|
185
|
+
onMouseleave: e[2] || (e[2] = (s) => a.value = !1)
|
|
186
|
+
}, [
|
|
187
|
+
k(ct, {
|
|
188
|
+
onUpdate: e[0] || (e[0] = (s) => i.value = s)
|
|
189
|
+
}),
|
|
190
|
+
k(Q, {
|
|
191
|
+
name: "b-toast__queue",
|
|
192
|
+
tag: "div",
|
|
193
|
+
"aria-live": "polite",
|
|
194
|
+
"enter-class": "b-toast__queue--enter",
|
|
195
|
+
"leave-to-class": "b-toast__queue--leave-to",
|
|
196
|
+
onBeforeLeave: I,
|
|
197
|
+
onAfterLeave: j
|
|
198
|
+
}, {
|
|
199
|
+
default: B(() => [
|
|
200
|
+
(l(!0), A(Z, null, F(o(p), (s) => (l(), T($, tt({ "data-dismiss-transform": s.dismissTransform }, {
|
|
201
|
+
key: s.id,
|
|
202
|
+
toast: s,
|
|
203
|
+
style: s.styles,
|
|
204
|
+
class: [{ "b-toast__item--first": s.isFirst }, "b-toast__item"],
|
|
205
|
+
inert: s.isInert,
|
|
206
|
+
"data-testid": "toast-item"
|
|
207
|
+
}), null, 16, ["toast", "style", "class", "inert"]))), 128))
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
})
|
|
211
|
+
], 36)) : b("", !0);
|
|
140
212
|
}
|
|
141
213
|
});
|
|
142
|
-
const
|
|
143
|
-
function x(t, c, n, o, a, f) {
|
|
144
|
-
const r = _("toast-item");
|
|
145
|
-
return t.toastsToShow.length ? (u(), d("div", {
|
|
146
|
-
key: 0,
|
|
147
|
-
class: "b-toast",
|
|
148
|
-
style: $(t.computedHeight)
|
|
149
|
-
}, [
|
|
150
|
-
l(E, {
|
|
151
|
-
name: "b-toast",
|
|
152
|
-
tag: "ul",
|
|
153
|
-
class: "b-toast__container",
|
|
154
|
-
"aria-live": "polite",
|
|
155
|
-
"move-class": "b-toast__container--move",
|
|
156
|
-
"enter-active-class": "b-toast__container--enter-active",
|
|
157
|
-
"leave-active-class": "b-toast__container--leave-active",
|
|
158
|
-
"enter-from-class": "b-toast__container--enter-from",
|
|
159
|
-
"leave-to-class": "b-toast__container--leave-to"
|
|
160
|
-
}, {
|
|
161
|
-
default: p(() => [
|
|
162
|
-
(u(!0), d(O, null, V(t.toastsToShow, (i, s) => (u(), d("li", {
|
|
163
|
-
key: s,
|
|
164
|
-
class: "b-toast__item",
|
|
165
|
-
style: $(t.computedPositioning[s]),
|
|
166
|
-
inert: s !== t.toastsToShow.length - 1
|
|
167
|
-
}, [
|
|
168
|
-
l(r, {
|
|
169
|
-
ref_for: !0,
|
|
170
|
-
ref: s === t.toastsToShow.length - 1 ? "toast" : null,
|
|
171
|
-
class: A(s !== t.toastsToShow.length - 1 ? "b-toast--light-background" : null),
|
|
172
|
-
text: i.text,
|
|
173
|
-
action: i.action,
|
|
174
|
-
onDismiss: (e) => i.dismiss()
|
|
175
|
-
}, null, 8, ["class", "text", "action", "onDismiss"])
|
|
176
|
-
], 12, Z))), 128))
|
|
177
|
-
]),
|
|
178
|
-
_: 1
|
|
179
|
-
})
|
|
180
|
-
], 4)) : S("", !0);
|
|
181
|
-
}
|
|
182
|
-
const rt = /* @__PURE__ */ w(Y, [["render", x], ["__scopeId", "data-v-0b45cfe7"]]);
|
|
214
|
+
const yt = /* @__PURE__ */ O(ut, [["__scopeId", "data-v-e1c6f53c"]]);
|
|
183
215
|
export {
|
|
184
|
-
|
|
185
|
-
q as useBentoToastController
|
|
216
|
+
yt as BentoToast
|
|
186
217
|
};
|
|
187
218
|
//# sourceMappingURL=toast.js.map
|
package/dist/toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../vue2/src/components/toast/components/toast-item/toast-item.vue","../../vue2/src/components/toast/toast.vue"],"sourcesContent":["<template>\n <div class=\"b-toast-item\" data-testid=\"toast-item\">\n <div class=\"b-toast-item__container\">\n <info-icon\n class=\"b-toast-item__left-icon b-toast-item__info-icon\"\n name=\"info\"\n aria-hidden=\"true\"\n ></info-icon>\n <output role=\"status\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ text }}\n </bento-typography>\n </output>\n </div>\n <div class=\"b-toast-item__container\">\n <bento-button v-if=\"action\" class=\"b-toast-item__right-icon\" variant=\"tertiary\" @click=\"onActionClicked\">\n {{ action.text }}\n </bento-button>\n <bento-button class=\"b-toast-item__right-icon\" variant=\"tertiary\" @click=\"dismissButtonClicked\">\n <template #iconLeft>\n <cross-icon :svg-title=\"$t('dismiss')\" />\n </template>\n </bento-button>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info-filled';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n import messages from './messages.json';\n import { BentoToastItemAction } from './toast-item.types';\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n /**\n * @example\n * Toast item component, for internal use only.\n *\n * import { BentoToastItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoToastItem },\n * template: `\n * <bento-toast-item>\n * This is a toast message\n * <template #primaryAction>Button text</template>\n * </bento-toast-item>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'toast-item',\n components: { BentoButton, BentoTypography, CrossIcon, InfoIcon },\n props: {\n text: {\n type: String,\n required: true,\n },\n action: {\n type: Object as PropType<BentoToastItemAction>,\n default: null,\n },\n },\n emits: ['click', 'dismiss'],\n setup(props, { slots, emit }) {\n const dismissButtonClicked = () => emit('dismiss');\n const onActionClicked = () => {\n props.action.handler();\n emit('dismiss');\n };\n\n return {\n // Methods\n dismissButtonClicked,\n hasSlot: useHasSlot(slots),\n onActionClicked,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./toast-item.scss\" />\n","<template>\n <div v-if=\"toastsToShow.length\" class=\"b-toast\" :style=\"computedHeight\">\n <transition-group\n name=\"b-toast\"\n tag=\"ul\"\n class=\"b-toast__container\"\n aria-live=\"polite\"\n move-class=\"b-toast__container--move\"\n enter-active-class=\"b-toast__container--enter-active\"\n leave-active-class=\"b-toast__container--leave-active\"\n enter-from-class=\"b-toast__container--enter-from\"\n leave-to-class=\"b-toast__container--leave-to\"\n >\n <li\n v-for=\"(item, index) in toastsToShow\"\n :key=\"index\"\n class=\"b-toast__item\"\n :style=\"computedPositioning[index]\"\n :inert=\"index !== toastsToShow.length - 1\"\n >\n <toast-item\n :ref=\"index === toastsToShow.length - 1 ? 'toast' : null\"\n :class=\"index !== toastsToShow.length - 1 ? 'b-toast--light-background' : null\"\n :text=\"item.text\"\n :action=\"item.action\"\n @dismiss=\"item.dismiss()\"\n />\n </li>\n </transition-group>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, ref, watch } from 'vue';\n import { ToastItem } from './components/toast-item';\n import { useBentoToastController } from '@/utils/ts/toastController';\n\n const DURATION = 5000;\n\n /**\n * @example\n * import { BentoToast, useBentoToastController } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoToast },\n * template: `\n * // in your project root\n * <bento-toast />\n * setup() {\n * bentoToastController = useBentoToastController();\n * onTrigger = () => {\n * bentoToastController.addToast({ text: 'Your toast text', action: { text: 'Button text', handler: () => { your code here } });\n * }\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-toast',\n components: { ToastItem },\n setup() {\n const { state } = useBentoToastController();\n const dismissTimer = ref(null);\n const toast = ref(null);\n const toastsToShow = computed(() => state.queue.slice(-3));\n\n const cancelDismissTimer = () => {\n clearTimeout(dismissTimer.value);\n };\n\n const startTimer = toastToDismiss => {\n dismissTimer.value = setTimeout(() => {\n cancelDismissTimer();\n toastToDismiss.dismiss();\n }, DURATION);\n };\n\n const startDismissTimer = () => {\n cancelDismissTimer();\n\n const toastToDismiss = toastsToShow.value.slice(-1)[0];\n if (toastToDismiss) {\n startTimer(toastToDismiss);\n }\n };\n\n onMounted(() => {\n startDismissTimer();\n });\n\n watch(\n () => toastsToShow.value,\n () => {\n if (toastsToShow.value.length) {\n cancelDismissTimer();\n startDismissTimer();\n }\n }\n );\n\n const computedPositioning = computed(() =>\n toastsToShow.value.map((el, index) => {\n const diff = 10;\n const width = 100;\n const min = 10;\n const numberOfElements = toastsToShow.value.length - 1;\n return {\n top: `${diff * index}px`,\n width: `${width - min * (numberOfElements - index)}%`,\n };\n })\n );\n\n const computedHeight = computed(() => {\n // Get shown toast element height (last in the queue)\n const visibleToastHeight = toast.value?.offsetWidth;\n // Get number of elements excluding the toast currently displayed\n const numberOfElements = toastsToShow.value.length - 1;\n // Set height = number of stacked elements\n const stackedToastHeight = 10;\n // Set a stack height only if there's elements present\n const stackHeight = numberOfElements ? stackedToastHeight * numberOfElements : 0;\n // Set bottom to be padding + height of the visible toast :)\n return {\n bottom: `${visibleToastHeight}px`,\n height: `${stackHeight}px`,\n };\n });\n\n return {\n // Values,\n computedPositioning,\n computedHeight,\n toastsToShow,\n toast,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./toast.scss\" />\n"],"names":["_sfc_main$1","defineComponent","messages","BentoButton","BentoTypography","CrossIcon","InfoIcon","props","slots","emit","dismissButtonClicked","onActionClicked","useHasSlot","_hoisted_2","createElementVNode","createVNode","_component_info_icon","_hoisted_3","_component_bento_typography","_ctx","openBlock","createBlock","_component_bento_button","createCommentVNode","withCtx","_component_cross_icon","DURATION","_sfc_main","ToastItem","state","useBentoToastController","dismissTimer","ref","toast","toastsToShow","computed","cancelDismissTimer","startTimer","toastToDismiss","startDismissTimer","onMounted","watch","computedPositioning","el","index","numberOfElements","computedHeight","visibleToastHeight","_a","stackHeight","TransitionGroup","createElementBlock","normalizeStyle","normalizeClass","item"],"mappings":";;;;;;;;;;;;;GAqDIA,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,YAAA,EAAA,aAAAC,GAAA,iBAAAC,GAAA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ACf,CAAA;AAGJ,WAAA;AAAA;AAAA,MAAO,qBAAAP;AAAA,MAEH,gBAAAI;AAAA,MACA,cAAAZ;AAAA,MACA,OAAAD;AAAA,IACA;AAAA,EACJ;AAER,CAAA;;;;;IAvI+C,KAAA;AAAA,IAAO,OAAA;AAAA;EA2B/B,GAAA;AAAA,IAxBPlB,EAAAmC,GAAA;AAAA,MAAA,MAAA;AAAA,MACH,KAAA;AAAA,MACL,OAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,sBAAA;AAAA,MACiB,sBAAA;AAAA,MACF,oBAAA;AAAA,MAGX,kBAAA;AAAA,IAAA,GAAA;AAAA;wDAEK9B,EAAA,GAAA+B,EAAA,MAAA;AAAA,UAAgB,KAAAP;AAAA,UACf,OAAA;AAAA,UACE,OAAAQ,EAAAjC,EAAA,oBAAAyB,CAAA,CAAA;AAAA;QAQN,GAAA;AAAA;YAL+B,SAAA;AAAA,YACvB,KAAAA,MAAAzB,EAAA,aAAA,SAAA,IAAA,UAAA;AAAA,YACU,OAAAkC,EAAAT,MAAAzB,EAAA,aAAA,SAAA,IAAA,8BAAA,IAAA;AAAA,YACI,MAAAmC,EAAA;AAAA,YACZ,QAAAA,EAAA;AAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../vue2/src/components/toast/components/toast-item/toast-item.vue","../../vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue","../../vue2/src/components/toast/toast.vue"],"sourcesContent":["<template>\n <div class=\"b-toast-item\">\n <output class=\"b-toast-item__text\" role=\"status\">\n <bento-typography :title=\"toast.text\" el=\"span\" variant=\"body\" strongest>\n {{ toast.text }}\n </bento-typography>\n </output>\n <bento-button\n v-if=\"toast.action\"\n class=\"b-toast-item__btn\"\n variant=\"tertiary\"\n data-testid=\"toast-item-action-btn\"\n @click=\"onAction\"\n >\n {{ toast.action.text }}\n </bento-button>\n <bento-button\n class=\"b-toast-item__btn\"\n variant=\"tertiary\"\n data-testid=\"toast-item-close-btn\"\n @click=\"toast.dismiss()\"\n >\n <template #iconLeft>\n <cross-icon :svg-title=\"t('dismiss')\" />\n </template>\n </bento-button>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import type { BentoToastItem } from '@/composables';\n import messages from './messages.json';\n\n const props = defineProps({\n toast: { type: Object as PropType<BentoToastItem>, required: true },\n });\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const onAction = () => {\n if (typeof props.toast.action.handler === 'function') {\n props.toast.action.handler();\n }\n props.toast.dismiss();\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./toast-item.scss\" />\n","<template>\n <div ref=\"shadowStack\" class=\"b-toast-shadow-stack\">\n <!--\n since we only interested in the size of the last 3 toasts and order of the toast items\n is not guaranteed when we use ref with v-for (more info at the end of this section https://vuejs.org/guide/essentials/template-refs.html#refs-inside-v-for),\n toast items would be rendered independently with individual ref references.\n -->\n <toast-item v-if=\"toasts[0]\" ref=\"toast0\" :toast=\"toasts[0]\" />\n <toast-item v-if=\"toasts[1]\" ref=\"toast1\" :toast=\"toasts[1]\" />\n <toast-item v-if=\"toasts[2]\" ref=\"toast2\" :toast=\"toasts[2]\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n /**\n * This component will \"shadow-render\" ToastItems positioned relatively to each other,\n * would grab their positions and size and would emit augmented list of toasts with those\n * additional details. This would allow us to have perfect control over toasts positioning and animation\n * in the parent Toast component, where ToastItems would actually be visible.\n */\n import { computed, nextTick, onMounted, ref, watch } from 'vue';\n import { useBentoToastController } from '@/composables';\n import type { BentoToastItemWithDimensions } from './toast-shadow-stack.types';\n import ToastItem from '../toast-item/toast-item.vue';\n\n const { stack } = useBentoToastController();\n\n const emit = defineEmits<{\n /**\n *\n */\n (e: 'update', toasts: Array<BentoToastItemWithDimensions>): void;\n }>();\n\n const shadowStack = ref<HTMLElement>();\n const toast0 = ref<InstanceType<typeof ToastItem>>();\n const toast1 = ref<InstanceType<typeof ToastItem>>();\n const toast2 = ref<InstanceType<typeof ToastItem>>();\n const toastRefs = [toast0, toast1, toast2];\n\n // only get 3 last toast as only they would be rendered on the screen\n const toasts = computed(() => stack.value.slice(0, 3));\n\n const shareToastsWithDimensions = async () => {\n // Wait for all toasts to render, so we would be able to get their ClientRect\n await nextTick();\n\n // Parent container \"top\" value should be 0, but can be something else due to CSS. So have to account for it\n const { top: parentTop } = shadowStack.value.getBoundingClientRect();\n\n const toastsWithDimensions = stack.value.map((toast, index) => {\n if (index > 2) {\n return { ...toast, bottom: 0, height: 0 };\n }\n const { height, top } = toastRefs[index].value.$el.getBoundingClientRect();\n return { ...toast, height, bottom: top - parentTop };\n });\n emit('update', toastsWithDimensions);\n };\n\n watch(stack, shareToastsWithDimensions);\n\n onMounted(() => {\n // Refs would be null until component is mounted, so let's make sure we only do it after that\n if (stack.value.length > 0) {\n shareToastsWithDimensions();\n }\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./toast-shadow-stack.scss\" />\n","<template>\n <div\n v-if=\"renderToast\"\n ref=\"root\"\n class=\"b-toast\"\n data-testid=\"toast\"\n :style=\"{ height: stackHeight }\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n >\n <toast-shadow-stack @update=\"toastsWithDimensions = $event\" />\n\n <transition-group\n name=\"b-toast__queue\"\n tag=\"div\"\n aria-live=\"polite\"\n enter-class=\"b-toast__queue--enter\"\n leave-to-class=\"b-toast__queue--leave-to\"\n @before-leave=\"onBeforeToastLeave\"\n @after-leave=\"checkHover\"\n >\n <toast-item\n v-for=\"toast in queue\"\n v-bind=\"{ 'data-dismiss-transform': toast.dismissTransform }\"\n :key=\"toast.id\"\n :toast=\"toast\"\n :style=\"toast.styles\"\n :class=\"{ 'b-toast__item--first': toast.isFirst }\"\n :inert=\"toast.isInert\"\n data-testid=\"toast-item\"\n class=\"b-toast__item\"\n />\n </transition-group>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue';\n import { useBentoToastController } from '@/composables';\n import ToastShadowStack from './components/toast-shadow-stack/toast-shadow-stack.vue';\n import type { BentoToastItemWithDimensions } from './components/toast-shadow-stack/toast-shadow-stack.types';\n import ToastItem from './components/toast-item/toast-item.vue';\n\n // By design, top-most toast should be visible for 5 seconds before auto-dismiss\n const TOAST_DISPLAY_DURATION = 5000;\n\n // Delay first render of the toast until we actually need it, to skip all the positioning calculation logic\n // until we actually have anything to render.\n const renderToast = ref(false);\n const { stack } = useBentoToastController();\n\n watch(\n stack,\n toastStack => {\n if (toastStack.length > 0 && !renderToast.value) {\n renderToast.value = true;\n }\n },\n { immediate: true }\n );\n\n const hovered = ref(false);\n const toastsWithDimensions = ref<Array<BentoToastItemWithDimensions>>([]);\n // In collapsed mode we need for toast to \"stick out\", but not overflow another toast in the forefront.\n // Random number that satisfies this condition (single-line toast is roughly 52px height)\n const collapsedToastHeight = 40;\n // How much pixels of the stacked toast will be \"sticking out\" from the visible toast\n const stackIndicatorHeight = 10;\n\n const queueSize = computed(() => toastsWithDimensions.value.length);\n const lastVisibleToastIndex = computed(() => Math.min(hovered.value ? 2 : 0, queueSize.value - 1));\n const lastVisibleToastBottom = computed(() => {\n const toast = toastsWithDimensions.value[lastVisibleToastIndex.value];\n return toast ? toast.bottom + toast.height : 0;\n });\n\n const queue = computed(() => {\n const translateBaseValue = lastVisibleToastBottom.value - collapsedToastHeight;\n return toastsWithDimensions.value.map((toast, index) => {\n const collapsed = index > lastVisibleToastIndex.value;\n const isSmallerStack = !hovered.value && index > 1;\n const translateY = collapsed\n ? translateBaseValue + stackIndicatorHeight * (isSmallerStack ? 2 : 1)\n : toast.bottom;\n\n return {\n ...toast,\n styles: {\n height: `${collapsed ? collapsedToastHeight : toast.height}px`,\n transform: collapsed\n ? `translateY(${translateY * -1}px) scaleX(${isSmallerStack ? '0.8' : '0.9'})`\n : `translateY(${translateY * -1}px)`,\n 'z-index': queueSize.value - index,\n },\n // first toast has different animation, and toasts above index 2/3 are not visible so no need for a custom animation\n dismissTransform:\n index > 0 && index < (hovered.value ? 4 : 3)\n ? `translateY(${(translateY - toast.height) * -1}px) scale(0.5, 0.1)`\n : null,\n isFirst: index === 0,\n isInert: index > (hovered.value ? 2 : 0),\n };\n });\n });\n\n const onBeforeToastLeave = (el: HTMLElement) => {\n // We have to swap transformation on the toast element that is about to be removed\n // Unfortunately we cannot do it via transition classes as transformation function is\n // unique per toast, and we cannot use reactivity because it won't be applied for a toast\n // that is removed. So direct DOM manipulation is the only way it seems.\n if (el.dataset.dismissTransform) {\n /* eslint-disable no-param-reassign -- explicitly manipulating with DOM properties, no way around it unfortunately */\n el.style.transform = el.dataset.dismissTransform;\n }\n };\n\n const stackHeight = computed(() => {\n // Track stack container height, so that hover over would work without glitches\n // (when mouse is over space between toasts)\n let height = 0;\n if (lastVisibleToastIndex.value >= 0) {\n const stackIndicator =\n stackIndicatorHeight *\n Math.min(queueSize.value - 1 - lastVisibleToastIndex.value, hovered.value ? 1 : 2);\n height = Math.min(lastVisibleToastBottom.value + stackIndicator, document.body.parentElement.clientHeight);\n }\n return `${height}px`;\n });\n\n let dismissTimout = null;\n let timeoutStart = null;\n let remainingTimeToDismiss = TOAST_DISPLAY_DURATION;\n\n const startTimer = (toast, duration) => {\n timeoutStart = Date.now();\n dismissTimout = setTimeout(() => toast.dismiss(), duration);\n };\n\n const startNewDismissTimer = toast => {\n // stop previous timeouts, if any\n clearTimeout(dismissTimout);\n if (toast) {\n remainingTimeToDismiss = TOAST_DISPLAY_DURATION;\n if (!hovered.value) {\n startTimer(toast, remainingTimeToDismiss);\n }\n } else {\n remainingTimeToDismiss = 0;\n }\n };\n\n watch(\n () => queue.value[0],\n (firstToast, oldFirstToast) => {\n if (firstToast?.id === oldFirstToast?.id) {\n return;\n }\n startNewDismissTimer(firstToast);\n },\n { immediate: true }\n );\n\n const pauseDismissTimer = () => {\n remainingTimeToDismiss = remainingTimeToDismiss - Date.now() + timeoutStart;\n clearTimeout(dismissTimout);\n };\n\n const resumeDismissTimer = () => {\n if (remainingTimeToDismiss > 0) {\n startTimer(queue.value[0], remainingTimeToDismiss);\n }\n };\n\n watch(hovered, isHovered => {\n if (isHovered) {\n pauseDismissTimer();\n } else {\n resumeDismissTimer();\n }\n });\n\n const root = ref<HTMLElement>();\n // \"mouseleave\" event would be emitted for the root element when the mouse moves out of the root element,\n // but browser wouldn't emit this event when root element shrinks to the point when mouse is not over element anymore.\n // This can happen when user clicks on dismiss button the top-most toast and doesn't move the mouse during animation,\n // after which browser would think that root element is still hovered. This workaround addresses this particular issue.\n const checkHover = () =>\n setTimeout(() => {\n hovered.value = hovered.value ? root.value.matches(':hover') : false;\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./toast.scss\" />\n"],"names":["__default__","messages","t","useI18n","onAction","props","stack","useBentoToastController","shadowStack","ref","toast0","toast1","toast2","toastRefs","toasts","computed","shareToastsWithDimensions","nextTick","parentTop","toastsWithDimensions","toast","index","height","top","emit","watch","onMounted","renderToast","toastStack","hovered","collapsedToastHeight","stackIndicatorHeight","queueSize","lastVisibleToastIndex","lastVisibleToastBottom","queue","translateBaseValue","collapsed","isSmallerStack","translateY","onBeforeToastLeave","el","stackHeight","stackIndicator","dismissTimout","timeoutStart","remainingTimeToDismiss","startTimer","duration","startNewDismissTimer","firstToast","oldFirstToast","pauseDismissTimer","resumeDismissTimer","isHovered","root","checkHover"],"mappings":";;;;;;;;;;;;;;;GAsDIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;iBAbA,EAAA,GAAAC,EAAA,IAAAC,GAAA,EAAA,UAAAF,EAAA,CAAA,GAEAG,IAAA,MAAA;AACI,MAAA,OAAAC,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;;;;;;;;;;"}
|
package/dist/toggle.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as $, ref as y, computed as p, toRefs as V, watch as D, resolveComponent as _, openBlock as n, createElementBlock as k, normalizeClass as T, withDirectives as w, createElementVNode as b, vModelCheckbox as O, createBlock as g, createCommentVNode as i, withCtx as h, renderSlot as v } from "vue";
|
|
2
2
|
import { C as N } from "./chunks/checkmark-small.c79220d9.js";
|
|
3
|
-
import { B as U } from "./chunks/index.
|
|
3
|
+
import { B as U } from "./chunks/index.11b6dd35.js";
|
|
4
4
|
import { g as j } from "./chunks/unique-id.a2a2b458.js";
|
|
5
5
|
import { u as z } from "./chunks/use-default-slot-validator.1169c221.js";
|
|
6
6
|
import { u as H } from "./chunks/use-has-slot.4d98bf29.js";
|
|
7
7
|
import { g as m } from "./chunks/get-slot-text.bead058f.js";
|
|
8
8
|
import { u as M } from "./chunks/aria-label.ac9651a5.js";
|
|
9
9
|
import { _ as P } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
10
|
-
import "./assets/
|
|
10
|
+
import "./assets/index47.css";
|
|
11
11
|
var C = /* @__PURE__ */ ((e) => (e.LABEL_FIRST = "label-first", e))(C || {}), d = /* @__PURE__ */ ((e) => (e.BEFORE = "before", e.AFTER = "after", e))(d || {});
|
|
12
12
|
const q = $({
|
|
13
13
|
name: "bento-toggle",
|
package/dist/tutorial.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as x, ref as O, openBlock as u, createBlock as S, unref as o, withCtx as f, createElementVNode as c, normalizeStyle as j, createElementBlock as b, mergeProps as R, toDisplayString as E, createCommentVNode as y, computed as r, isRef as q, watch as L, nextTick as Z, createVNode as h, withKeys as z, createSlots as H, createTextVNode as I, renderSlot as U, pushScopeId as W, popScopeId as X, Fragment as G, renderList as J } from "vue";
|
|
2
|
-
import { B as Q } from "./chunks/index.
|
|
3
|
-
import { B as F, a as Y } from "./chunks/index.
|
|
4
|
-
import { B } from "./chunks/index.
|
|
2
|
+
import { B as Q } from "./chunks/index.8b10ee32.js";
|
|
3
|
+
import { B as F, a as Y } from "./chunks/index.bab8811d.js";
|
|
4
|
+
import { B } from "./chunks/index.11b6dd35.js";
|
|
5
5
|
import { BentoImage as tt } from "./image.js";
|
|
6
6
|
import { u as et } from "./chunks/i18n.f7e6533e.js";
|
|
7
7
|
import { R as ot } from "./chunks/refresh.bd60f6a8.js";
|
|
8
8
|
import { _ as k } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
9
|
-
import { a as N, h as at, o as st } from "./chunks/index.
|
|
10
|
-
import { B as nt } from "./chunks/button-actions.
|
|
11
|
-
import "./assets/
|
|
9
|
+
import { a as N, h as at, o as st } from "./chunks/index.f71015d8.js";
|
|
10
|
+
import { B as nt } from "./chunks/button-actions.adc0a2fe.js";
|
|
11
|
+
import "./assets/index36.css";
|
|
12
12
|
var A;
|
|
13
13
|
const it = /* @__PURE__ */ x({
|
|
14
14
|
__name: "tutorial-indicator",
|
package/dist/typography.js
CHANGED
package/dist/web-types.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/bento-vue3",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "Adyen Bento Vue 3 components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"url": "git@github.com:Adyen/bento.git"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@adyen/bento-design-tokens": "1.
|
|
55
|
+
"@adyen/bento-design-tokens": "1.25.0",
|
|
56
56
|
"@adyen/ui-assets-icons-16": "4.1.0",
|
|
57
57
|
"@adyen/ui-assets-payment-method-icons": "6.1.0",
|
|
58
58
|
"@codemirror/commands": "6.3.3",
|
|
@@ -77,9 +77,13 @@
|
|
|
77
77
|
},
|
|
78
78
|
"overrides": {
|
|
79
79
|
"@codemirror/state": "6.4.0",
|
|
80
|
-
"react": "16.14.0"
|
|
80
|
+
"react": "16.14.0",
|
|
81
|
+
"@adyen/lume-vue3": {
|
|
82
|
+
"vue": "^3.0"
|
|
83
|
+
}
|
|
81
84
|
},
|
|
82
85
|
"devDependencies": {
|
|
86
|
+
"@adyen/lume-vue3": "1.11.1",
|
|
83
87
|
"@storybook/addon-a11y": "7.6.17",
|
|
84
88
|
"@storybook/addon-essentials": "7.6.17",
|
|
85
89
|
"@storybook/addon-storysource": "7.6.17",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BentoToastItem } from "../components/toast/components/toast-item";
|
|
2
|
-
export default class ToastController {
|
|
3
|
-
get state(): {
|
|
4
|
-
queue: Array<BentoToastItem>;
|
|
5
|
-
};
|
|
6
|
-
private _state;
|
|
7
|
-
constructor();
|
|
8
|
-
private dismissToast;
|
|
9
|
-
addToast(params: BentoToastItem): {
|
|
10
|
-
dismiss: () => void;
|
|
11
|
-
};
|
|
12
|
-
}
|