@adyen/bento-vue3 1.3.0 → 1.4.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 +8 -4
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/accordion/accordion.keys.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/accordion/accordion.types.d.ts +1 -24
- package/dist/@types/packages/vue2/src/components/accordion/accordion.vue.d.ts +17 -57
- package/dist/@types/packages/vue2/src/components/accordion/components/accordion-item.vue.d.ts +27 -29
- package/dist/@types/packages/vue2/src/components/accordion/index.d.ts +2 -3
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +0 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +136 -128
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +3 -5
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +46 -15
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +6 -7
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +37 -11
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +0 -3
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +3 -22
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/components/data-grid-config-settings-column-row/data-grid-config-settings-column-row.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +0 -24
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +277 -16
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +0 -20
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +0 -20
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +164 -104
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +7 -9
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +27 -0
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +76 -0
- package/dist/@types/packages/vue2/src/components/empty-state/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +19 -25
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -27
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-filter/date-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -11
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +53 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/focus-trap/focus-trap.vue.d.ts +7 -0
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/image/const.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/image/image.types.d.ts +19 -0
- package/dist/@types/packages/vue2/src/components/image/image.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
- 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.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +61 -58
- package/dist/@types/packages/vue2/src/components/internal/avatar/avatar.vue.d.ts +0 -3
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +0 -2
- 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 +0 -2
- 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 +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -7
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +6 -31
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +14 -9
- 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/components/modal-dialog/modal-dialog.vue.d.ts +4 -14
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -6
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/popover/components/popover-title/popover-title.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -14
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -6
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +19 -390
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +0 -3
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +2 -23
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +4 -9
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +6 -9
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +6 -10
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +4 -10
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +4 -6
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +24 -40
- package/dist/@types/packages/vue2/src/composables/use-default-slot-validator/use-default-slot-validator.d.ts +2 -1
- package/dist/@types/packages/vue2/src/composables/use-has-slot/use-has-slot.d.ts +8 -1
- package/dist/@types/packages/vue2/src/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/utils/ts/get-slot-text/get-slot-text.d.ts +1 -1
- package/dist/@types/packages/vue2/src/utils/ts/print-development-warning.d.ts +1 -0
- package/dist/accordion.js +104 -254
- package/dist/accordion.js.map +1 -1
- package/dist/alert.js +61 -64
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.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/chevron-up.css +1 -0
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/footer-actions.css +1 -1
- 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/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 -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-option-tag.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +2 -2
- package/dist/button.js +143 -12
- package/dist/button.js.map +1 -1
- package/dist/card.js +99 -94
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +40 -39
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/base-button.6d2843c2.js +108 -0
- package/dist/chunks/base-button.6d2843c2.js.map +1 -0
- package/dist/chunks/base-modal.3ccb9eb5.js +291 -0
- package/dist/chunks/base-modal.3ccb9eb5.js.map +1 -0
- package/dist/chunks/{button.e1c39f66.js → button.a8462029.js} +39 -42
- package/dist/chunks/button.a8462029.js.map +1 -0
- package/dist/chunks/{calendar.09b683b3.js → calendar.3f930683.js} +237 -240
- package/dist/chunks/calendar.3f930683.js.map +1 -0
- package/dist/chunks/checkbox.5e1e05ae.js +235 -0
- package/dist/chunks/checkbox.5e1e05ae.js.map +1 -0
- package/dist/chunks/{chevron-down.69bedf14.js → chevron-up.c03b58f8.js} +8 -8
- package/dist/chunks/chevron-up.c03b58f8.js.map +1 -0
- package/dist/chunks/controls-group.3b0dfb94.js +136 -0
- package/dist/chunks/controls-group.3b0dfb94.js.map +1 -0
- package/dist/chunks/{copy.2cf5e6c3.js → copy.1d14b783.js} +49 -50
- package/dist/chunks/copy.1d14b783.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.203e747f.js → dropdown-default-textbox.a90e84f9.js} +88 -90
- package/dist/chunks/dropdown-default-textbox.a90e84f9.js.map +1 -0
- package/dist/chunks/{dropdown.8b415aac.js → dropdown.b798a82e.js} +348 -330
- package/dist/chunks/dropdown.b798a82e.js.map +1 -0
- package/dist/chunks/{error-message.ddfe8ea5.js → error-message.9acead25.js} +16 -16
- package/dist/chunks/error-message.9acead25.js.map +1 -0
- package/dist/chunks/footer-actions.9537d0df.js +111 -0
- package/dist/chunks/footer-actions.9537d0df.js.map +1 -0
- package/dist/chunks/get-slot-text.bead058f.js +9 -0
- package/dist/chunks/get-slot-text.bead058f.js.map +1 -0
- package/dist/chunks/{grid-layout.a30855ff.js → grid-layout.984317d7.js} +2 -2
- package/dist/chunks/{grid-layout.a30855ff.js.map → grid-layout.984317d7.js.map} +1 -1
- package/dist/chunks/index.228ecda0.js +101 -0
- package/dist/chunks/index.228ecda0.js.map +1 -0
- package/dist/chunks/index.89b00b94.js +124 -0
- package/dist/chunks/index.89b00b94.js.map +1 -0
- package/dist/chunks/{index.3da90517.js → index.9d8273fc.js} +38 -40
- package/dist/chunks/index.9d8273fc.js.map +1 -0
- package/dist/chunks/{index.c9225c3b.js → index.c2a80208.js} +195 -201
- package/dist/chunks/index.c2a80208.js.map +1 -0
- package/dist/chunks/{index.13949709.js → index.d26fdf71.js} +116 -113
- package/dist/chunks/{index.13949709.js.map → index.d26fdf71.js.map} +1 -1
- package/dist/chunks/{index.d27367cd.js → index.e84dbeae.js} +80 -83
- package/dist/chunks/{index.d27367cd.js.map → index.e84dbeae.js.map} +1 -1
- package/dist/chunks/listbox-option-tag.0c9c571e.js +129 -0
- package/dist/chunks/listbox-option-tag.0c9c571e.js.map +1 -0
- package/dist/chunks/{listbox.0c7c4e5e.js → listbox.6b52af1a.js} +315 -334
- package/dist/chunks/listbox.6b52af1a.js.map +1 -0
- package/dist/chunks/{loading-button.61d8ebe5.js → loading-button.081adbf3.js} +33 -33
- package/dist/chunks/loading-button.081adbf3.js.map +1 -0
- package/dist/chunks/tabs.keys.358742f2.js +7 -0
- package/dist/chunks/tabs.keys.358742f2.js.map +1 -0
- package/dist/chunks/{tooltip.835d9b52.js → tooltip.e4e34b86.js} +56 -59
- package/dist/chunks/tooltip.e4e34b86.js.map +1 -0
- package/dist/chunks/use-default-slot-validator.1169c221.js +16 -0
- package/dist/chunks/use-default-slot-validator.1169c221.js.map +1 -0
- package/dist/chunks/use-has-slot.9fac7123.js +16 -0
- package/dist/chunks/use-has-slot.9fac7123.js.map +1 -0
- package/dist/code-snippet.js +548 -463
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +501 -505
- package/dist/country.js.map +1 -1
- package/dist/currency.js +38 -41
- package/dist/currency.js.map +1 -1
- package/dist/data-grid.js +837 -833
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +83 -87
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +30 -32
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +166 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/filter-bar.js +986 -935
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +72 -72
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +50 -52
- package/dist/header.js.map +1 -1
- package/dist/image.js +76 -0
- package/dist/image.js.map +1 -0
- package/dist/index.js +239 -232
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +241 -269
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +7 -7
- package/dist/link.js +38 -36
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +131 -139
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +121 -356
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +182 -185
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +19 -23
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +56 -52
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +36 -41
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +112 -113
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +77 -91
- package/dist/search-bar.js.map +1 -1
- package/dist/segmented-control.js +88 -75
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +122 -121
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +18 -21
- package/dist/status.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +129 -162
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +83 -75
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +32 -35
- package/dist/tag.js.map +1 -1
- package/dist/textarea.js +156 -155
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +212 -213
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +68 -72
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +75 -73
- package/dist/toggle.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +11 -10
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.types.d.ts +0 -8
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts +0 -58
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/index.d.ts +0 -1
- package/dist/assets/button-actions.css +0 -1
- package/dist/assets/chevron-down.css +0 -1
- package/dist/chunks/base-button.20be08da.js +0 -111
- package/dist/chunks/base-button.20be08da.js.map +0 -1
- package/dist/chunks/button-actions.54e28e75.js +0 -124
- package/dist/chunks/button-actions.54e28e75.js.map +0 -1
- package/dist/chunks/button.e1c39f66.js.map +0 -1
- package/dist/chunks/calendar.09b683b3.js.map +0 -1
- package/dist/chunks/checkbox.a404069b.js +0 -226
- package/dist/chunks/checkbox.a404069b.js.map +0 -1
- package/dist/chunks/chevron-down.69bedf14.js.map +0 -1
- package/dist/chunks/controls-group.60fb2a86.js +0 -136
- package/dist/chunks/controls-group.60fb2a86.js.map +0 -1
- package/dist/chunks/copy.2cf5e6c3.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.203e747f.js.map +0 -1
- package/dist/chunks/dropdown.8b415aac.js.map +0 -1
- package/dist/chunks/error-message.ddfe8ea5.js.map +0 -1
- package/dist/chunks/footer-actions.0f640f87.js +0 -106
- package/dist/chunks/footer-actions.0f640f87.js.map +0 -1
- package/dist/chunks/get-slot-text.2db867f8.js +0 -9
- package/dist/chunks/get-slot-text.2db867f8.js.map +0 -1
- package/dist/chunks/index.222d29b0.js +0 -120
- package/dist/chunks/index.222d29b0.js.map +0 -1
- package/dist/chunks/index.3da90517.js.map +0 -1
- package/dist/chunks/index.aa34e363.js +0 -104
- package/dist/chunks/index.aa34e363.js.map +0 -1
- package/dist/chunks/index.c9225c3b.js.map +0 -1
- package/dist/chunks/listbox-option-tag.5ae8b79b.js +0 -133
- package/dist/chunks/listbox-option-tag.5ae8b79b.js.map +0 -1
- package/dist/chunks/listbox.0c7c4e5e.js.map +0 -1
- package/dist/chunks/loading-button.61d8ebe5.js.map +0 -1
- package/dist/chunks/tooltip.835d9b52.js.map +0 -1
- package/dist/chunks/use-default-slot-validator.83d977a1.js +0 -11
- package/dist/chunks/use-default-slot-validator.83d977a1.js.map +0 -1
- package/dist/chunks/use-has-slot.068222e6.js +0 -5
- package/dist/chunks/use-has-slot.068222e6.js.map +0 -1
package/dist/sidepanel.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as K, ref as u, inject as
|
|
2
|
-
import {
|
|
3
|
-
import { B as
|
|
4
|
-
import { F as
|
|
5
|
-
import { A as
|
|
6
|
-
import { u as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { B as
|
|
9
|
-
import { C as
|
|
10
|
-
import "./assets/
|
|
11
|
-
var
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as K, ref as u, inject as V, onUnmounted as W, computed as r, watch as N, openBlock as h, createBlock as U, Transition as X, unref as s, withCtx as f, withDirectives as Z, createElementVNode as S, normalizeClass as B, createVNode as d, createCommentVNode as x, createTextVNode as ee, toDisplayString as ae, renderSlot as F, createElementBlock as H, vShow as te, nextTick as R, toRefs as se, provide as G, withKeys as le } from "vue";
|
|
2
|
+
import { a as j } from "./chunks/button.a8462029.js";
|
|
3
|
+
import { B as $ } from "./chunks/index.89b00b94.js";
|
|
4
|
+
import { F as ne } from "./chunks/footer-actions.9537d0df.js";
|
|
5
|
+
import { A as oe } from "./chunks/arrow-left.cdbcc128.js";
|
|
6
|
+
import { u as J } from "./chunks/i18n.6c402773.js";
|
|
7
|
+
import { _ as Y } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
8
|
+
import { B as ie } from "./chunks/index.d26fdf71.js";
|
|
9
|
+
import { C as ue } from "./chunks/cross.5c36a670.js";
|
|
10
|
+
import "./assets/index3.css";
|
|
11
|
+
var b = /* @__PURE__ */ ((a) => (a.UPDATE_ACTIVE_PAGE = "update:active-page", a.UPDATE_IS_OPEN = "update:is-open", a))(b || {}), P = /* @__PURE__ */ ((a) => (a.TRANSITION_LEVEL_DEEPER = "b-sidepanel-page__animation--level-deeper", a.TRANSITION_LEVEL_UPPER = "b-sidepanel-page__animation--level-upper", a))(P || {});
|
|
12
|
+
const z = Symbol("sidepanel registerPage injection key"), M = Symbol("sidepanel config data injection key"), q = {
|
|
13
13
|
"en-US": {
|
|
14
14
|
goToPreviousPage: "Go to previous page"
|
|
15
15
|
}
|
|
16
|
-
},
|
|
17
|
-
i18n: { messages:
|
|
18
|
-
},
|
|
19
|
-
...
|
|
16
|
+
}, re = { class: "b-sidepanel-page" }, ce = {
|
|
17
|
+
i18n: { messages: q }
|
|
18
|
+
}, de = /* @__PURE__ */ K({
|
|
19
|
+
...ce,
|
|
20
20
|
__name: "sidepanel-page",
|
|
21
21
|
props: {
|
|
22
22
|
/**
|
|
@@ -77,97 +77,97 @@ const q = Symbol("sidepanel registerPage injection key"), Q = Symbol("sidepanel
|
|
|
77
77
|
default: null
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
setup(
|
|
81
|
-
const o =
|
|
82
|
-
|
|
83
|
-
const { activePage:
|
|
80
|
+
setup(a) {
|
|
81
|
+
const o = a, { t: C } = J({ messages: q }), t = u(null), c = u(!1), E = u(!0), i = u(!1), v = V(z), { unregisterPage: l } = v({ title: o.title, pageId: o.pageId });
|
|
82
|
+
W(() => l());
|
|
83
|
+
const { activePage: T, animation: p, goToPreviousPage: _, hasPreviousPages: y, isOpen: L } = V(M), m = r(() => T.value ? T.value === o.pageId : !0), O = r(() => o.previousPage ? !0 : o.previousPage === null ? !1 : y.value && m.value), k = r(() => ({
|
|
84
84
|
"b-sidepanel-page__header--with-border": c.value && !E.value
|
|
85
|
-
})),
|
|
85
|
+
})), g = r(() => ({
|
|
86
86
|
"b-sidepanel-page__actions--with-border": c.value && !i.value
|
|
87
|
-
})),
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
87
|
+
})), w = () => {
|
|
88
|
+
t.value && (E.value = t.value.scrollTop === 0, i.value = t.value.scrollHeight - t.value.clientHeight === t.value.scrollTop);
|
|
89
|
+
}, A = async (e) => {
|
|
90
|
+
e && (await R(), c.value = t.value && t.value.scrollHeight > t.value.clientHeight);
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
92
|
+
N(() => L.value, A, { immediate: !0 }), N(() => m.value, A, { immediate: !0 });
|
|
93
|
+
const D = () => {
|
|
94
|
+
p.value === P.TRANSITION_LEVEL_UPPER && (p.value = P.TRANSITION_LEVEL_DEEPER);
|
|
95
95
|
};
|
|
96
|
-
return (
|
|
97
|
-
name:
|
|
96
|
+
return (e, n) => (h(), U(X, {
|
|
97
|
+
name: s(p),
|
|
98
98
|
mode: "out-in",
|
|
99
|
-
onAfterLeave:
|
|
99
|
+
onAfterLeave: D
|
|
100
100
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
class:
|
|
101
|
+
default: f(() => [
|
|
102
|
+
Z(S("div", re, [
|
|
103
|
+
S("div", {
|
|
104
|
+
class: B(["b-sidepanel-page__header", s(k)])
|
|
105
105
|
}, [
|
|
106
|
-
|
|
106
|
+
s(O) ? (h(), U(s(j), {
|
|
107
107
|
key: 0,
|
|
108
|
-
variant:
|
|
109
|
-
onClick: n[0] || (n[0] = (
|
|
108
|
+
variant: "tertiary",
|
|
109
|
+
onClick: n[0] || (n[0] = (I) => s(_)(a.previousPage))
|
|
110
110
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
d(
|
|
113
|
-
"svg-title":
|
|
111
|
+
default: f(() => [
|
|
112
|
+
d(s(oe), {
|
|
113
|
+
"svg-title": s(C)("goToPreviousPage")
|
|
114
114
|
}, null, 8, ["svg-title"])
|
|
115
115
|
]),
|
|
116
116
|
_: 1
|
|
117
|
-
}
|
|
118
|
-
d(
|
|
117
|
+
})) : x("", !0),
|
|
118
|
+
d(s($), {
|
|
119
119
|
class: "b-sidepanel-page__title",
|
|
120
|
-
el:
|
|
121
|
-
variant:
|
|
120
|
+
el: "h2",
|
|
121
|
+
variant: "title"
|
|
122
122
|
}, {
|
|
123
|
-
default:
|
|
124
|
-
ae(
|
|
123
|
+
default: f(() => [
|
|
124
|
+
ee(ae(a.title), 1)
|
|
125
125
|
]),
|
|
126
126
|
_: 1
|
|
127
|
-
}
|
|
127
|
+
})
|
|
128
128
|
], 2),
|
|
129
|
-
|
|
129
|
+
S("div", {
|
|
130
130
|
ref_key: "contentElement",
|
|
131
|
-
ref:
|
|
131
|
+
ref: t,
|
|
132
132
|
class: "b-sidepanel-page__content",
|
|
133
|
-
onScroll:
|
|
133
|
+
onScroll: w
|
|
134
134
|
}, [
|
|
135
|
-
d(
|
|
136
|
-
el:
|
|
137
|
-
variant:
|
|
135
|
+
d(s($), {
|
|
136
|
+
el: "div",
|
|
137
|
+
variant: "body"
|
|
138
138
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
139
|
+
default: f(() => [
|
|
140
|
+
F(e.$slots, "default", {}, void 0, !0)
|
|
141
141
|
]),
|
|
142
142
|
_: 3
|
|
143
|
-
}
|
|
143
|
+
})
|
|
144
144
|
], 544),
|
|
145
|
-
|
|
145
|
+
a.actions ? (h(), H("div", {
|
|
146
146
|
key: 0,
|
|
147
|
-
class:
|
|
147
|
+
class: B(["b-sidepanel-page__actions", s(g)])
|
|
148
148
|
}, [
|
|
149
|
-
d(
|
|
150
|
-
actions:
|
|
151
|
-
"actions-label":
|
|
152
|
-
"destructive-actions":
|
|
149
|
+
d(s(ne), {
|
|
150
|
+
actions: a.actions,
|
|
151
|
+
"actions-label": a.actionsLabel,
|
|
152
|
+
"destructive-actions": a.destructiveActions
|
|
153
153
|
}, null, 8, ["actions", "actions-label", "destructive-actions"])
|
|
154
|
-
], 2)) :
|
|
154
|
+
], 2)) : x("", !0)
|
|
155
155
|
], 512), [
|
|
156
|
-
[
|
|
156
|
+
[te, s(m)]
|
|
157
157
|
])
|
|
158
158
|
]),
|
|
159
159
|
_: 3
|
|
160
160
|
}, 8, ["name"]));
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
const
|
|
163
|
+
const Se = /* @__PURE__ */ Y(de, [["__scopeId", "data-v-364351c8"]]), Q = {
|
|
164
164
|
"en-US": {
|
|
165
165
|
close: "Close"
|
|
166
166
|
}
|
|
167
|
-
},
|
|
168
|
-
i18n: { messages:
|
|
169
|
-
},
|
|
170
|
-
...
|
|
167
|
+
}, ve = ["onKeydown"], pe = { class: "b-sidepanel__close-button" }, _e = {
|
|
168
|
+
i18n: { messages: Q }
|
|
169
|
+
}, ge = /* @__PURE__ */ K({
|
|
170
|
+
..._e,
|
|
171
171
|
__name: "sidepanel",
|
|
172
172
|
props: {
|
|
173
173
|
/**
|
|
@@ -194,86 +194,87 @@ const be = /* @__PURE__ */ M(ve, [["__scopeId", "data-v-f307d910"]]), X = {
|
|
|
194
194
|
default: null
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
-
setup(
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
const n = l.value.indexOf(
|
|
201
|
-
n !== -1 ? l.value = l.value.slice(0, n + 1) : l.value = [
|
|
197
|
+
setup(a, { emit: o }) {
|
|
198
|
+
const C = a, { activePage: t, isOpen: c } = se(C), { t: E } = J({ messages: Q }), i = u(null), v = u([]), l = u([]), T = r(() => l.value.length > 1), p = u(P.TRANSITION_LEVEL_DEEPER), _ = u(!1), y = r(() => l.value[l.value.length - 1]), L = r(() => v.value.some((e) => e.pageId === t.value)), m = (e) => {
|
|
199
|
+
if (e) {
|
|
200
|
+
const n = l.value.indexOf(e);
|
|
201
|
+
n !== -1 ? l.value = l.value.slice(0, n + 1) : l.value = [e];
|
|
202
202
|
} else
|
|
203
203
|
l.value.pop();
|
|
204
|
-
|
|
204
|
+
p.value = P.TRANSITION_LEVEL_UPPER, o(b.UPDATE_ACTIVE_PAGE, y.value);
|
|
205
205
|
};
|
|
206
|
-
|
|
207
|
-
() =>
|
|
206
|
+
N(
|
|
207
|
+
() => t.value,
|
|
208
208
|
async () => {
|
|
209
|
-
if (await
|
|
210
|
-
console.error(`The activePage passed "${
|
|
209
|
+
if (await R(), t.value && !L.value) {
|
|
210
|
+
console.error(`The activePage passed "${t.value}" does not match the id of any SidepanelPage`);
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
|
-
|
|
213
|
+
t.value !== y.value && l.value.push(t.value);
|
|
214
214
|
},
|
|
215
215
|
{ immediate: !0 }
|
|
216
216
|
);
|
|
217
|
-
const
|
|
218
|
-
"b-sidepanel__hide":
|
|
219
|
-
})),
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
|
|
217
|
+
const O = r(() => ({
|
|
218
|
+
"b-sidepanel__hide": _.value
|
|
219
|
+
})), k = (e) => {
|
|
220
|
+
_.value && e.pseudoElement === "::backdrop" && (i.value.close(), l.value[0] && o(b.UPDATE_ACTIVE_PAGE, l.value[0]), l.value = [], _.value = !1, o(b.UPDATE_IS_OPEN, !1));
|
|
221
|
+
}, g = (e) => {
|
|
222
|
+
e && e.preventDefault(), i.value.open && (_.value = !0);
|
|
223
|
+
}, w = ({ target: e }) => {
|
|
224
|
+
e && e.tagName === "DIALOG" && g();
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
N(
|
|
227
227
|
() => c.value,
|
|
228
228
|
async () => {
|
|
229
|
-
await
|
|
229
|
+
await R(), i.value && (c.value ? (i.value.showModal(), l.value.length || l.value.push(t.value)) : i.value.open && g());
|
|
230
230
|
},
|
|
231
231
|
{ immediate: !0 }
|
|
232
232
|
);
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
233
|
+
const A = (e) => () => {
|
|
234
|
+
var n;
|
|
235
|
+
v.value = (n = v.value) == null ? void 0 : n.filter(({ pageId: I }) => I !== e);
|
|
236
|
+
}, D = ({ title: e, pageId: n }) => (v.value.push({ title: e, pageId: n }), { unregisterPage: A(n) });
|
|
237
|
+
return G(M, {
|
|
238
|
+
activePage: t,
|
|
239
|
+
animation: p,
|
|
240
|
+
goToPreviousPage: m,
|
|
241
|
+
hasPreviousPages: T,
|
|
241
242
|
isOpen: c
|
|
242
|
-
}),
|
|
243
|
+
}), G(z, D), (e, n) => (h(), H("dialog", {
|
|
243
244
|
ref_key: "sidepanel",
|
|
244
245
|
ref: i,
|
|
245
|
-
class:
|
|
246
|
-
onAnimationend:
|
|
247
|
-
onClick: n[0] || (n[0] = (
|
|
248
|
-
onKeydown:
|
|
246
|
+
class: B(["b-sidepanel", s(O)]),
|
|
247
|
+
onAnimationend: k,
|
|
248
|
+
onClick: n[0] || (n[0] = (I) => a.isDismissible && w(I)),
|
|
249
|
+
onKeydown: le(g, ["esc"])
|
|
249
250
|
}, [
|
|
250
|
-
d(
|
|
251
|
-
default:
|
|
252
|
-
|
|
253
|
-
d(
|
|
254
|
-
variant:
|
|
255
|
-
onClick:
|
|
251
|
+
d(s(ie), null, {
|
|
252
|
+
default: f(() => [
|
|
253
|
+
S("div", pe, [
|
|
254
|
+
d(s(j), {
|
|
255
|
+
variant: "tertiary",
|
|
256
|
+
onClick: g
|
|
256
257
|
}, {
|
|
257
|
-
default:
|
|
258
|
-
d(
|
|
259
|
-
"svg-title":
|
|
258
|
+
default: f(() => [
|
|
259
|
+
d(s(ue), {
|
|
260
|
+
"svg-title": s(E)("close")
|
|
260
261
|
}, null, 8, ["svg-title"])
|
|
261
262
|
]),
|
|
262
263
|
_: 1
|
|
263
|
-
}
|
|
264
|
+
})
|
|
264
265
|
]),
|
|
265
|
-
|
|
266
|
+
F(e.$slots, "default", {}, void 0, !0)
|
|
266
267
|
]),
|
|
267
268
|
_: 3
|
|
268
269
|
})
|
|
269
|
-
], 42,
|
|
270
|
+
], 42, ve));
|
|
270
271
|
}
|
|
271
272
|
});
|
|
272
|
-
const
|
|
273
|
+
const be = /* @__PURE__ */ Y(ge, [["__scopeId", "data-v-54fe9dbf"]]);
|
|
273
274
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
275
|
+
be as BentoSidepanel,
|
|
276
|
+
P as BentoSidepanelAnimation,
|
|
277
|
+
b as BentoSidepanelEvent,
|
|
278
|
+
Se as BentoSidepanelPage
|
|
278
279
|
};
|
|
279
280
|
//# sourceMappingURL=sidepanel.js.map
|
package/dist/sidepanel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidepanel.js","sources":["../../vue2/src/components/sidepanel/sidepanel.types.ts","../../vue2/src/components/sidepanel/sidepanel.keys.ts","../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nexport interface BentoSidepanelPageObject {\n title: string;\n pageId: string;\n}\n\nexport enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n\nexport enum BentoSidepanelAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-sidepanel-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-sidepanel-page__animation--level-upper',\n}\n\nexport interface BentoSidepanelConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n goToPreviousPage: (page: string) => void;\n hasPreviousPages: Ref<boolean>;\n isOpen: Ref<boolean>;\n}\n\nexport type BentoSidepanelRegisterPage = (props: BentoSidepanelPageObject) => void;\n","export const SIDEPANEL_REGISTER_PAGE_INJECTION_KEY = Symbol('sidepanel registerPage injection key');\nexport const SIDEPANEL_CONFIG_INJECTION_KEY = Symbol('sidepanel config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-show=\"showPage\" class=\"b-sidepanel-page\">\n <div class=\"b-sidepanel-page__header\" :class=\"headerConditionalClasses\">\n <bento-button\n v-if=\"showBackButton\"\n :variant=\"BentoButtonVariant.TERTIARY\"\n @click=\"goToPreviousPage(previousPage)\"\n >\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n\n <bento-typography\n class=\"b-sidepanel-page__title\"\n :el=\"BentoTypographyElement.H2\"\n :variant=\"BentoTypographyVariant.TITLE\"\n >\n {{ title }}\n </bento-typography>\n </div>\n <div ref=\"contentElement\" class=\"b-sidepanel-page__content\" @scroll=\"onScroll\">\n <bento-typography :el=\"BentoTypographyElement.DIV\" :variant=\"BentoTypographyVariant.BODY\">\n <slot />\n </bento-typography>\n </div>\n <div v-if=\"actions\" class=\"b-sidepanel-page__actions\" :class=\"actionsConditionalClasses\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, PropType, ref, watch } from 'vue';\n\n import { BentoButton, BentoButtonActionsList, BentoButtonVariant } from '@/components/button';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { BentoSidepanelAnimation, BentoSidepanelConfigData, BentoSidepanelRegisterPage } from '../sidepanel.types';\n import { SIDEPANEL_CONFIG_INJECTION_KEY, SIDEPANEL_REGISTER_PAGE_INJECTION_KEY } from '../sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoSidepanelRegisterPage>(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY);\n\n registerPage({ title: props.title, pageId: props.pageId });\n\n const { activePage, animation, goToPreviousPage, hasPreviousPages, isOpen } =\n inject<BentoSidepanelConfigData>(SIDEPANEL_CONFIG_INJECTION_KEY);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-sidepanel-page__header--with-border': hasScroll.value && !isScrollAtTop.value,\n }));\n\n const actionsConditionalClasses = computed(() => ({\n 'b-sidepanel-page__actions--with-border': hasScroll.value && !isScrollAtBottom.value,\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Animation\n const updateAnimation = () => {\n if (animation.value === BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER) {\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER;\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc=\"startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div class=\"b-sidepanel__close-button\">\n <bento-button :variant=\"BentoButtonVariant.TERTIARY\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton, BentoButtonVariant } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import {\n BentoSidepanelAnimation,\n BentoSidepanelEvent,\n BentoSidepanelPageObject,\n BentoSidepanelRegisterPage,\n } from './sidepanel.types';\n\n import { SIDEPANEL_CONFIG_INJECTION_KEY, SIDEPANEL_REGISTER_PAGE_INJECTION_KEY } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<BentoSidepanelPageObject[]>([]);\n const previousPages = ref([]);\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const animation = ref(BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n\n // Previous page/back button logic\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page.pageId === activePage.value));\n\n const goToPreviousPage = (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER;\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n\n if (!!activePage.value && !isActivePageValid.value) {\n // eslint-disable-next-line no-console\n console.error(`The activePage passed \"${activePage.value}\" does not match the id of any SidepanelPage`);\n return;\n }\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel__hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = (event: AnimationEvent) => {\n if (isClosing.value && event.pseudoElement === '::backdrop') {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoSidepanelRegisterPage = ({ title, pageId }) => {\n pages.value.push({ title, pageId });\n };\n\n provide(SIDEPANEL_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n goToPreviousPage,\n hasPreviousPages,\n isOpen,\n });\n provide(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["BentoSidepanelEvent","BentoSidepanelEvent2","BentoSidepanelAnimation","BentoSidepanelAnimation2","SIDEPANEL_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_CONFIG_INJECTION_KEY","__default__$1","messages$1","t","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","inject","props","activePage","animation","goToPreviousPage","hasPreviousPages","isOpen","showPage","computed","showBackButton","headerConditionalClasses","actionsConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","watch","updateAnimation","__default__","messages","toRefs","sidepanel","pages","previousPages","isClosing","lastPage","isActivePageValid","page","index","emit","conditionalClasses","closeSidepanelAfterAnimation","event","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","target","registerPage","title","pageId","provide"],"mappings":";;;;;;;;;;AAOY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,0BAAA,6CACAA,EAAA,yBAAA,4CAFQA,IAAAD,KAAA,CAAA,CAAA;ACZC,MAAAE,IAAA,OAAA,sCAAA,GACAC,IAAA,OAAA,qCAAA;;;;uCC8NTC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;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AAAA,MACA,QAAAC;AAAA,IACA,CAAA,GAEJiC,EAAAlD,GAAA+C,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sidepanel.js","sources":["../../vue2/src/components/sidepanel/sidepanel.types.ts","../../vue2/src/components/sidepanel/sidepanel.keys.ts","../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nexport interface BentoSidepanelPageObject {\n title: string;\n pageId: string;\n}\n\nexport enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n\nexport enum BentoSidepanelAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-sidepanel-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-sidepanel-page__animation--level-upper',\n}\n\nexport interface BentoSidepanelConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n goToPreviousPage: (page: string) => void;\n hasPreviousPages: Ref<boolean>;\n isOpen: Ref<boolean>;\n}\n\nexport type BentoSidepanelRegisterPage = (props: BentoSidepanelPageObject) => { unregisterPage: () => void };\n","export const SIDEPANEL_REGISTER_PAGE_INJECTION_KEY = Symbol('sidepanel registerPage injection key');\nexport const SIDEPANEL_CONFIG_INJECTION_KEY = Symbol('sidepanel config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-show=\"showPage\" class=\"b-sidepanel-page\">\n <div class=\"b-sidepanel-page__header\" :class=\"headerConditionalClasses\">\n <bento-button v-if=\"showBackButton\" variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n <div ref=\"contentElement\" class=\"b-sidepanel-page__content\" @scroll=\"onScroll\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n <div v-if=\"actions\" class=\"b-sidepanel-page__actions\" :class=\"actionsConditionalClasses\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, watch } from 'vue';\n\n import { BentoButton, BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { BentoSidepanelAnimation, BentoSidepanelConfigData, BentoSidepanelRegisterPage } from '../sidepanel.types';\n import { SIDEPANEL_CONFIG_INJECTION_KEY, SIDEPANEL_REGISTER_PAGE_INJECTION_KEY } from '../sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoSidepanelRegisterPage>(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage({ title: props.title, pageId: props.pageId });\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n\n const { activePage, animation, goToPreviousPage, hasPreviousPages, isOpen } =\n inject<BentoSidepanelConfigData>(SIDEPANEL_CONFIG_INJECTION_KEY);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-sidepanel-page__header--with-border': hasScroll.value && !isScrollAtTop.value,\n }));\n\n const actionsConditionalClasses = computed(() => ({\n 'b-sidepanel-page__actions--with-border': hasScroll.value && !isScrollAtBottom.value,\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Animation\n const updateAnimation = () => {\n if (animation.value === BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER) {\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER;\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @click=\"isDismissible && closeSidepanelOnClickOutside($event)\"\n @keydown.esc=\"startCloseSidepanelAnimation\"\n >\n <bento-focus-trap>\n <div class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import {\n BentoSidepanelAnimation,\n BentoSidepanelEvent,\n BentoSidepanelPageObject,\n BentoSidepanelRegisterPage,\n } from './sidepanel.types';\n\n import { SIDEPANEL_CONFIG_INJECTION_KEY, SIDEPANEL_REGISTER_PAGE_INJECTION_KEY } from './sidepanel.keys';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<BentoSidepanelPageObject[]>([]);\n const previousPages = ref([]);\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const animation = ref(BentoSidepanelAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n\n // Previous page/back button logic\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page.pageId === activePage.value));\n\n const goToPreviousPage = (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoSidepanelAnimation.TRANSITION_LEVEL_UPPER;\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n\n if (!!activePage.value && !isActivePageValid.value) {\n // eslint-disable-next-line no-console\n console.error(`The activePage passed \"${activePage.value}\" does not match the id of any SidepanelPage`);\n return;\n }\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel__hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = (event: AnimationEvent) => {\n if (isClosing.value && event.pseudoElement === '::backdrop') {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeSidepanelOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === 'DIALOG') {\n startCloseSidepanelAnimation();\n }\n };\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(({ pageId }) => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoSidepanelRegisterPage = ({ title, pageId }) => {\n pages.value.push({ title, pageId });\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(SIDEPANEL_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n goToPreviousPage,\n hasPreviousPages,\n isOpen,\n });\n provide(SIDEPANEL_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["BentoSidepanelEvent","BentoSidepanelEvent2","BentoSidepanelAnimation","BentoSidepanelAnimation2","SIDEPANEL_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_CONFIG_INJECTION_KEY","__default__$1","messages$1","t","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","registerPage","inject","unregisterPage","props","onUnmounted","activePage","animation","goToPreviousPage","hasPreviousPages","isOpen","showPage","computed","showBackButton","headerConditionalClasses","actionsConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","watch","updateAnimation","__default__","messages","toRefs","sidepanel","pages","previousPages","isClosing","lastPage","isActivePageValid","page","index","emit","conditionalClasses","closeSidepanelAfterAnimation","event","startCloseSid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,YAAA;AAKT,QAFA,MAAAS,EAAA,GAEAM,EAAA,UAIAf,EAAA,SACIe,EAAA,MAAA,UAAA,GACAE,EAAA,MAAA,UACIA,EAAA,MAAA,KAAArB,EAAA,KAAA,KACJmB,EAAA,MAAA,QAEAY,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAlC,IAAA,CAAAqC,MAAA,MAAA;;AACI,MAAAd,EAAA,SAAAe,IAAAf,EAAA,UAAA,gBAAAe,EAAA,OAAA,CAAA,EAAA,QAAAC,EAAA,MAAAA,MAAAF;AAAA,IAA2E,GAI/EvC,IAAA,CAAA,EAAA,OAAA0C,GAAA,QAAAD,EAAA,OACIhB,EAAA,MAAA,KAAA,EAAA,OAAAiB,GAAA,QAAAD,EAAA,CAAA,GAEA,EAAA,gBAAAvC,EAAAuC,CAAA,EAAA;AAGJ,WAAAE,EAAArD,GAAA;AAAA,MAAwC,YAAAe;AAAA,MACpC,WAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,QAAAC;AAAA,IACA,CAAA,GAEJkC,EAAAtD,GAAAW,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/status.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as n, computed as r, resolveComponent as a, openBlock as
|
|
2
|
-
import { B as m
|
|
3
|
-
import { _ as
|
|
4
|
-
import "./assets/
|
|
1
|
+
import { defineComponent as n, computed as r, resolveComponent as a, openBlock as l, createElementBlock as c, createElementVNode as p, normalizeClass as _, createVNode as d, withCtx as i, renderSlot as u } from "vue";
|
|
2
|
+
import { B as m } from "./chunks/index.89b00b94.js";
|
|
3
|
+
import { _ as b } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
4
|
+
import "./assets/index43.css";
|
|
5
5
|
var t = /* @__PURE__ */ ((e) => (e.BLUE = "blue", e.GREEN = "green", e.GREY = "grey", e.ORANGE = "orange", e.RED = "red", e.YELLOW = "yellow", e))(t || {});
|
|
6
|
-
const
|
|
6
|
+
const y = n({
|
|
7
7
|
name: "bento-status",
|
|
8
8
|
components: { BentoTypography: m },
|
|
9
9
|
props: {
|
|
@@ -18,39 +18,36 @@ const v = n({
|
|
|
18
18
|
// Values
|
|
19
19
|
conditionalClass: r(() => ({
|
|
20
20
|
[`b-status__indicator--${e.variant}`]: !0
|
|
21
|
-
}))
|
|
22
|
-
// Enums
|
|
23
|
-
BentoTypographyElement: y,
|
|
24
|
-
BentoTypographyVariant: b
|
|
21
|
+
}))
|
|
25
22
|
};
|
|
26
23
|
}
|
|
27
24
|
});
|
|
28
|
-
const
|
|
25
|
+
const v = {
|
|
29
26
|
class: "b-status",
|
|
30
27
|
role: "status"
|
|
31
28
|
};
|
|
32
|
-
function f(e, o,
|
|
29
|
+
function f(e, o, E, g, C, h) {
|
|
33
30
|
const s = a("bento-typography");
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
class:
|
|
31
|
+
return l(), c("div", v, [
|
|
32
|
+
p("span", {
|
|
33
|
+
class: _(["b-status__indicator", e.conditionalClass]),
|
|
37
34
|
role: "presentation"
|
|
38
35
|
}, null, 2),
|
|
39
|
-
|
|
36
|
+
d(s, {
|
|
40
37
|
class: "b-status__label",
|
|
41
|
-
el:
|
|
42
|
-
variant:
|
|
38
|
+
el: "span",
|
|
39
|
+
variant: "body"
|
|
43
40
|
}, {
|
|
44
|
-
default:
|
|
41
|
+
default: i(() => [
|
|
45
42
|
u(e.$slots, "default", {}, void 0, !0)
|
|
46
43
|
]),
|
|
47
44
|
_: 3
|
|
48
|
-
}
|
|
45
|
+
})
|
|
49
46
|
]);
|
|
50
47
|
}
|
|
51
|
-
const
|
|
48
|
+
const x = /* @__PURE__ */ b(y, [["render", f], ["__scopeId", "data-v-885a00b1"]]);
|
|
52
49
|
export {
|
|
53
|
-
|
|
50
|
+
x as BentoStatus,
|
|
54
51
|
t as BentoStatusVariant
|
|
55
52
|
};
|
|
56
53
|
//# sourceMappingURL=status.js.map
|
package/dist/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sources":["../../vue2/src/components/status/status.types.ts","../../vue2/src/components/status/status.vue"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"status.js","sources":["../../vue2/src/components/status/status.types.ts","../../vue2/src/components/status/status.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoStatusVariant {\n BLUE = 'blue',\n GREEN = 'green',\n GREY = 'grey',\n ORANGE = 'orange',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-status\" role=\"status\">\n <span class=\"b-status__indicator\" :class=\"conditionalClass\" role=\"presentation\"></span>\n <bento-typography class=\"b-status__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoStatusVariant } from './status.types';\n\n /**\n * A Status component is used to indicate a\n * passage of time or a particular step of a process.\n *\n * @example\n * import { BentoStatus } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStatus },\n * template: `\n * <bento-status variant=\"red\">\n * 1 week ago\n * </bento-status>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-status',\n components: { BentoTypography },\n props: {\n variant: {\n type: String as PropType<BentoStatusVariant | `${BentoStatusVariant}`>,\n required: true,\n validator: (type: BentoStatusVariant) => Object.values(BentoStatusVariant).includes(type),\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({\n [`b-status__indicator--${props.variant}`]: true,\n }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./status.scss\" />\n"],"names":["BentoStatusVariant","BentoStatusVariant2","_sfc_main","defineComponent","BentoTypography","type","props","computed","createElementVNode","normalizeClass","_ctx","createVNode","_component_bento_typography"],"mappings":";;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UACAA,EAAA,MAAA,OACAA,EAAA,SAAA,UANQA,IAAAD,KAAA,CAAA,CAAA;AC2BR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA,IACvB,SAAA;AAAA,MACM,MAAA;AAAA,MACC,UAAA;AAAA,MACI,WAAA,CAAAC,MAAA,OAAA,OAAAL,CAAA,EAAA,SAAAK,CAAA;AAAA,IAC8E;AAAA,EAC5F;AAAA,EACJ,MAAAC,GAAA;AAMI,WAAA;AAAA;AAAA,MAAO,kBAJPC,EAAA,OAAA;AAAA,QAAyC,CAAA,wBAAAD,EAAA,SAAA,GAAA;AAAA,MACM,EAAA;AAAA,IAK3C;AAAA,EACJ;AAER,CAAA;;EAjDmC,OAAA;AAAA;;;;;IACWE,EAAA,QAAA;AAAA,MAAqC,OAAAC,EAAA,CAAA,uBAAAC,EAAA,gBAAA,CAAA;AAAA,MAC/E,MAAA;AAAA,IAAA,GAAA,MAAA,CAAA;AAAA,IAAwBC,EAAAC,GAAA;AAAA,MAA2B,OAAA;AAAA,MAAQ,IAAA;AAAA;;;;;;;;;;"}
|
package/dist/structured-list.js
CHANGED