@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/toggle.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { C as
|
|
3
|
-
import { B as
|
|
4
|
-
import { g as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { _ as
|
|
10
|
-
import "./assets/
|
|
11
|
-
var
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as $, ref as y, computed as p, toRefs as V, watch as D, resolveComponent as _, openBlock as n, createElementBlock as h, normalizeClass as T, withDirectives as w, createElementVNode as b, vModelCheckbox as O, createBlock as g, createCommentVNode as i, withCtx as k, renderSlot as v } from "vue";
|
|
2
|
+
import { C as N } from "./chunks/checkmark-small.3e93a119.js";
|
|
3
|
+
import { B as U } from "./chunks/index.89b00b94.js";
|
|
4
|
+
import { g as j } from "./chunks/unique-id.a2a2b458.js";
|
|
5
|
+
import { u as z } from "./chunks/use-has-slot.9fac7123.js";
|
|
6
|
+
import { u as H } from "./chunks/use-default-slot-validator.1169c221.js";
|
|
7
|
+
import { g as m } from "./chunks/get-slot-text.bead058f.js";
|
|
8
|
+
import { u as M } from "./chunks/aria-label.ac9651a5.js";
|
|
9
|
+
import { _ as P } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
10
|
+
import "./assets/index42.css";
|
|
11
|
+
var C = /* @__PURE__ */ ((e) => (e.LABEL_FIRST = "label-first", e))(C || {}), d = /* @__PURE__ */ ((e) => (e.BEFORE = "before", e.AFTER = "after", e))(d || {});
|
|
12
|
+
const q = $({
|
|
13
13
|
name: "bento-toggle",
|
|
14
|
-
components: { BentoTypography:
|
|
14
|
+
components: { BentoTypography: U, CheckmarkSmall: N },
|
|
15
15
|
props: {
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated from version 2.0.0. Use the aria-label attribute instead.
|
|
18
|
+
*/
|
|
16
19
|
/**
|
|
17
20
|
* Accessible name for the toggle. It is strongly recommended to pass such value when the toggle is used without a label
|
|
18
21
|
*/
|
|
@@ -33,8 +36,8 @@ const M = T({
|
|
|
33
36
|
*/
|
|
34
37
|
labelPosition: {
|
|
35
38
|
type: String,
|
|
36
|
-
default:
|
|
37
|
-
validator: (e) => Object.values(
|
|
39
|
+
default: d.BEFORE,
|
|
40
|
+
validator: (e) => Object.values(d).includes(e)
|
|
38
41
|
},
|
|
39
42
|
/**
|
|
40
43
|
* Setting this property to true will set the toggle to read only state.
|
|
@@ -52,61 +55,60 @@ const M = T({
|
|
|
52
55
|
}
|
|
53
56
|
},
|
|
54
57
|
emits: ["input"],
|
|
55
|
-
setup(e, {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
ariaLabel:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
setup(e, { attrs: t, slots: a, emit: f }) {
|
|
59
|
+
const c = z(a), u = y(e.value), r = j("toggle-description"), s = m(a)("default"), o = m(a)("description");
|
|
60
|
+
H("bento-toggle", a.default, a.description);
|
|
61
|
+
const S = p(() => c("default") ? m(a)("default") : null), B = y(t["aria-label"]), { ariaLabel: E } = V(e), L = M({
|
|
62
|
+
ariaLabel: B.value,
|
|
63
|
+
// TODO: take this line away when the aria-label props is removed
|
|
64
|
+
label: E,
|
|
65
|
+
defaultFallback: S
|
|
66
|
+
}), I = p(() => r ?? null), A = p(() => ({
|
|
67
|
+
[`b-toggle--${C.LABEL_FIRST}`]: e.labelPosition === d.BEFORE,
|
|
64
68
|
"b-toggle--disabled": e.disabled,
|
|
65
69
|
"b-toggle--readonly": e.readonly
|
|
66
|
-
})),
|
|
67
|
-
|
|
68
|
-
},
|
|
70
|
+
})), F = (l) => {
|
|
71
|
+
f("input", l.target.checked);
|
|
72
|
+
}, R = (l) => {
|
|
69
73
|
e.readonly && l.preventDefault();
|
|
70
74
|
};
|
|
71
|
-
return
|
|
75
|
+
return D(
|
|
72
76
|
() => e.value,
|
|
73
77
|
(l) => {
|
|
74
|
-
|
|
78
|
+
u.value = l;
|
|
75
79
|
}
|
|
76
80
|
), {
|
|
77
81
|
// Refs
|
|
78
|
-
toggleInput:
|
|
79
|
-
// Types
|
|
80
|
-
BentoTypographyElement: w,
|
|
81
|
-
BentoTypographyVariant: N,
|
|
82
|
+
toggleInput: u,
|
|
82
83
|
// Values
|
|
83
|
-
computedAriaLabel:
|
|
84
|
-
computedDescription:
|
|
85
|
-
defaultSlotValue:
|
|
86
|
-
descriptionSlotValue:
|
|
87
|
-
conditionalClasses:
|
|
84
|
+
computedAriaLabel: L,
|
|
85
|
+
computedDescription: I,
|
|
86
|
+
defaultSlotValue: s,
|
|
87
|
+
descriptionSlotValue: o,
|
|
88
|
+
conditionalClasses: A,
|
|
88
89
|
descriptionId: r,
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
// Method
|
|
91
|
+
hasSlot: c,
|
|
92
|
+
onChange: F,
|
|
93
|
+
onClick: R
|
|
92
94
|
};
|
|
93
95
|
}
|
|
94
96
|
});
|
|
95
|
-
const
|
|
97
|
+
const G = ["aria-label", "aria-describedby", "disabled", "aria-readonly"], J = {
|
|
96
98
|
class: "b-toggle__track",
|
|
97
99
|
"aria-hidden": "true"
|
|
98
|
-
},
|
|
100
|
+
}, K = { class: "b-toggle__handle" }, Q = {
|
|
99
101
|
key: 0,
|
|
100
102
|
class: "b-toggle__label-container"
|
|
101
103
|
};
|
|
102
|
-
function
|
|
103
|
-
const r =
|
|
104
|
-
return n(),
|
|
105
|
-
class:
|
|
104
|
+
function W(e, t, a, f, c, u) {
|
|
105
|
+
const r = _("checkmark-small"), s = _("bento-typography");
|
|
106
|
+
return n(), h("label", {
|
|
107
|
+
class: T(["b-toggle", e.conditionalClasses]),
|
|
106
108
|
"data-testid": "label"
|
|
107
109
|
}, [
|
|
108
|
-
|
|
109
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
110
|
+
w(b("input", {
|
|
111
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.toggleInput = o),
|
|
110
112
|
"aria-label": e.computedAriaLabel,
|
|
111
113
|
"aria-describedby": e.computedDescription,
|
|
112
114
|
disabled: e.disabled,
|
|
@@ -114,47 +116,47 @@ function Q(e, t, m, d, b, p) {
|
|
|
114
116
|
role: "switch",
|
|
115
117
|
class: "b-toggle__input",
|
|
116
118
|
type: "checkbox",
|
|
117
|
-
onChange: t[1] || (t[1] = (
|
|
118
|
-
onClick: t[2] || (t[2] = (...
|
|
119
|
-
}, null, 40,
|
|
120
|
-
[
|
|
119
|
+
onChange: t[1] || (t[1] = (o) => e.onChange(o)),
|
|
120
|
+
onClick: t[2] || (t[2] = (...o) => e.onClick && e.onClick(...o))
|
|
121
|
+
}, null, 40, G), [
|
|
122
|
+
[O, e.toggleInput]
|
|
121
123
|
]),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
e.toggleInput ? (n(), g(r, { key: 0 })) :
|
|
124
|
+
b("span", J, [
|
|
125
|
+
b("span", K, [
|
|
126
|
+
e.toggleInput ? (n(), g(r, { key: 0 })) : i("", !0)
|
|
125
127
|
])
|
|
126
128
|
]),
|
|
127
|
-
e.
|
|
128
|
-
e.
|
|
129
|
+
e.hasSlot("default") ? (n(), h("span", Q, [
|
|
130
|
+
e.hasSlot("default") ? (n(), g(s, {
|
|
129
131
|
key: 0,
|
|
130
|
-
el:
|
|
131
|
-
variant:
|
|
132
|
+
el: "span",
|
|
133
|
+
variant: "body",
|
|
132
134
|
"data-testid": "inner-label"
|
|
133
135
|
}, {
|
|
134
|
-
default:
|
|
135
|
-
|
|
136
|
+
default: k(() => [
|
|
137
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
136
138
|
]),
|
|
137
139
|
_: 3
|
|
138
|
-
}
|
|
139
|
-
e.
|
|
140
|
+
})) : i("", !0),
|
|
141
|
+
e.hasSlot("default") && e.hasSlot("description") ? (n(), g(s, {
|
|
140
142
|
key: 1,
|
|
141
143
|
id: e.descriptionId,
|
|
142
|
-
el:
|
|
143
|
-
variant:
|
|
144
|
+
el: "span",
|
|
145
|
+
variant: "body",
|
|
144
146
|
class: "b-toggle__description"
|
|
145
147
|
}, {
|
|
146
|
-
default:
|
|
147
|
-
|
|
148
|
+
default: k(() => [
|
|
149
|
+
v(e.$slots, "description", {}, void 0, !0)
|
|
148
150
|
]),
|
|
149
151
|
_: 3
|
|
150
|
-
}, 8, ["id"
|
|
151
|
-
])) :
|
|
152
|
+
}, 8, ["id"])) : i("", !0)
|
|
153
|
+
])) : i("", !0)
|
|
152
154
|
], 2);
|
|
153
155
|
}
|
|
154
|
-
const ne = /* @__PURE__ */
|
|
156
|
+
const ne = /* @__PURE__ */ P(q, [["render", W], ["__scopeId", "data-v-878ec27c"]]);
|
|
155
157
|
export {
|
|
156
158
|
ne as BentoToggle,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
d as BentoToggleLabelPosition,
|
|
160
|
+
C as BentoTogglePropClass
|
|
159
161
|
};
|
|
160
162
|
//# sourceMappingURL=toggle.js.map
|
package/dist/toggle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sources":["../../vue2/src/components/toggle/toggle.types.ts","../../vue2/src/components/toggle/toggle.vue"],"sourcesContent":["export enum BentoTogglePropClass {\n LABEL_FIRST = 'label-first',\n}\n\nexport enum BentoToggleLabelPosition {\n BEFORE = 'before',\n AFTER = 'after',\n}\n","<template>\n <label class=\"b-toggle\" :class=\"conditionalClasses\" data-testid=\"label\">\n <input\n v-model=\"toggleInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedDescription\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly\"\n role=\"switch\"\n class=\"b-toggle__input\"\n type=\"checkbox\"\n @change=\"$event => onChange($event)\"\n @click=\"onClick\"\n />\n <span class=\"b-toggle__track\" aria-hidden=\"true\">\n <span class=\"b-toggle__handle\">\n <checkmark-small v-if=\"toggleInput\" />\n </span>\n </span>\n <span v-if=\"defaultSlotValue\" class=\"b-toggle__label-container\">\n <bento-typography\n v-if=\"defaultSlotValue\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.BODY\"\n data-testid=\"inner-label\"\n >\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"defaultSlotValue && descriptionSlotValue\"\n :id=\"descriptionId\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.BODY\"\n class=\"b-toggle__description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs, watch } from 'vue';\n import CheckmarkSmall from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import { BentoToggleLabelPosition, BentoTogglePropClass } from './toggle.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { getSlotText } from '@/utils/ts/get-slot-text/get-slot-text';\n\n /**\n * A wrapper around the bento toggle, providing checkbox functionality with a knob-like toggle\n *\n * @usage\n * import { BentoToggle, BentoLabelPosition } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoToggle },\n * template: `\n * <bento-toggle\n * :value=\"toggleValue\"`\n * label-position=\"LabelPosition.BEFORE\"\n * @input=\"optionalHandler($event)\"\n * >\n * Label Text\n * </bento-toggle>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-toggle',\n components: { BentoTypography, CheckmarkSmall },\n props: {\n /**\n * Accessible name for the toggle. It is strongly recommended to pass such value when the toggle is used without a label\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n /**\n * Disable the toggle (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Position of the label relative to the toggle (optional)\n * @values before, after\n */\n labelPosition: {\n type: String as PropType<BentoToggleLabelPosition | `${BentoToggleLabelPosition}`>,\n default: BentoToggleLabelPosition.BEFORE,\n validator: (value: BentoToggleLabelPosition) => Object.values(BentoToggleLabelPosition).includes(value),\n },\n /**\n * Setting this property to true will set the toggle to read only state.\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * Indicates if the switch is \"on\" or \"off\"\n */\n value: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['input'],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n const { ariaLabel } = toRefs(props);\n\n const toggleInput = ref(props.value);\n const descriptionId: string = generateUid('toggle-description');\n\n const defaultSlotValue = hasSlot('default');\n const descriptionSlotValue = hasSlot('description');\n\n useDefaultSlotValidator('bento-toggle', defaultSlotValue, descriptionSlotValue);\n\n const labelSlot = computed((): string => (slots.default ? getSlotText(slots)('default') : null));\n\n const computedAriaLabel = useAriaLabel({\n ariaLabel,\n label: labelSlot,\n defaultFallback: 'toggle',\n });\n\n const computedDescription = computed((): string | null => descriptionId ?? null);\n\n const conditionalClasses = computed((): { [key: string]: boolean } => ({\n [`b-toggle--${BentoTogglePropClass.LABEL_FIRST}`]:\n props.labelPosition === BentoToggleLabelPosition.BEFORE,\n 'b-toggle--disabled': props.disabled,\n 'b-toggle--readonly': props.readonly,\n }));\n\n const onChange = (event: Event) => {\n emit('input', (event.target as HTMLInputElement).checked);\n };\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n watch(\n () => props.value,\n newValue => {\n toggleInput.value = newValue;\n }\n );\n\n return {\n // Refs\n toggleInput,\n\n // Types\n BentoTypographyElement,\n BentoTypographyVariant,\n\n // Values\n computedAriaLabel,\n computedDescription,\n defaultSlotValue,\n descriptionSlotValue,\n conditionalClasses,\n descriptionId,\n\n // Events\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./toggle.scss\" />\n"],"names":["BentoTogglePropClass","BentoTogglePropClass2","BentoToggleLabelPosition","BentoToggleLabelPosition2","_sfc_main","defineComponent","BentoTypography","CheckmarkSmall","value","props","slots","emit","hasSlot","useHasSlot","ariaLabel","toRefs","toggleInput","ref","descriptionId","generateUid","defaultSlotValue","descriptionSlotValue","useDefaultSlotValidator","labelSlot","computed","getSlotText","computedAriaLabel","useAriaLabel","computedDescription","conditionalClasses","onChange","event","onClick","watch","newValue","BentoTypographyElement","BentoTypographyVariant","_hoisted_1","openBlock","createElementBlock","normalizeClass","_ctx","_cache","$event","vModelCheckbox","createElementVNode","_hoisted_3","createBlock","_component_checkmark_small","createCommentVNode","_hoisted_4","_component_bento_typography"],"mappings":";;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA,GAIAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACkER,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,GAAA,gBAAAC,EAAA;AAAA,EACwC,OAAA;AAAA;AAAA;AAAA;AAAA,IACvC,WAAA;AAAA,MAIQ,MAAA;AAAA,MACD,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,eAAA;AAAA,MAKe,MAAA;AAAA,MACL,SAAAL,EAAA;AAAA,MAC4B,WAAA,CAAAM,MAAA,OAAA,OAAAN,CAAA,EAAA,SAAAM,CAAA;AAAA,IACoE;AAAA;AAAA;AAAA;AAAA,IAC1G,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,OAAA;AAAA,MAIO,MAAA;AAAA,MACG,SAAA;AAAA,IACG;AAAA,EACb;AAAA,EACJ,OAAA,CAAA,OAAA;AAAA,EACe,MAAAC,GAAA,EAAA,OAAAC,GAAA,MAAAC,EAAA,GAAA;AAEX,UAAAC,IAAAC,EAAAH,CAAA,GACA,EAAA,WAAAI,EAAA,IAAAC,EAAAN,CAAA,GAEAO,IAAAC,EAAAR,EAAA,KAAA,GACAS,IAAAC,EAAA,oBAAA,GAEAC,IAAAR,EAAA,SAAA,GACAS,IAAAT,EAAA,aAAA;AAEA,IAAAU,EAAA,gBAAAF,GAAAC,CAAA;AAEA,UAAAE,IAAAC,EAAA,MAAAd,EA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C3B,oBAAAA,EAAA;AAAA,MACK,UAAAA,EAAA;AAAA,MACH,iBAAAA,EAAA;AAAA,MACP,MAAA;AAAA,MACD,OAAA;AAAA,MACJ,MAAA;AAAA,MACA,UAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAF,EAAA,SAAAE,CAAA;AAAA;IATmB,GAAA,MAAA,IAAAN,CAAA,GAAA;AAAA,MAWxB,CAAAO,GAAAH,EAAA,WAAA;AAAA,IAAA,CAAA;AAAA;MAE0CI,EAAA,QAAAC,GAAA;AAAA,QAAIL,EAAA,eAAAH,EAAA,GAAAS,EAAAC,GAAA,EAAA,KAAA,EAAA,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,MAGlC,CAAA;AAAA,IAAA,CAAA;AAAA,IAQWR,EAAA,oBAAAH,EAAA,GAAAC,EAAA,QAAAW,GAAA;AAAA,MAAAT,EAAA,oBAAAH,EAAA,GAAAS,EAAAI,GAAA;AAAA,QALiB,KAAA;AAAA,QAC/B,IAAAV,EAAA,uBAAA;AAAA,QACwB,SAAAA,EAAA,uBAAA;AAAA;;;;;;MAKnB,GAAA,GAAA,CAAA,MAAA,SAAA,CAAA,KAAAQ,EAAA,IAAA,EAAA;AAAA,MAOSR,EAAA,oBAAAA,EAAA,wBAAAH,EAAA,GAAAS,EAAAI,GAAA;AAAA,QANG,KAAA;AAAA,QACb,IAAAV,EAAA;AAAA,QACK,IAAAA,EAAA,uBAAA;AAAA,QACmB,SAAAA,EAAA,uBAAA;AAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"toggle.js","sources":["../../vue2/src/components/toggle/toggle.types.ts","../../vue2/src/components/toggle/toggle.vue"],"sourcesContent":["export enum BentoTogglePropClass {\n LABEL_FIRST = 'label-first',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoToggleLabelPosition {\n BEFORE = 'before',\n AFTER = 'after',\n}\n","<template>\n <label class=\"b-toggle\" :class=\"conditionalClasses\" data-testid=\"label\">\n <input\n v-model=\"toggleInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedDescription\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly\"\n role=\"switch\"\n class=\"b-toggle__input\"\n type=\"checkbox\"\n @change=\"$event => onChange($event)\"\n @click=\"onClick\"\n />\n <span class=\"b-toggle__track\" aria-hidden=\"true\">\n <span class=\"b-toggle__handle\">\n <checkmark-small v-if=\"toggleInput\" />\n </span>\n </span>\n <span v-if=\"hasSlot('default')\" class=\"b-toggle__label-container\">\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" data-testid=\"inner-label\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n el=\"span\"\n variant=\"body\"\n class=\"b-toggle__description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs, watch } from 'vue';\n import CheckmarkSmall from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import { BentoToggleLabelPosition, BentoTogglePropClass } from './toggle.types';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { getSlotText } from '@/utils/ts/get-slot-text/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n /**\n * A wrapper around the bento toggle, providing checkbox functionality with a knob-like toggle\n *\n * @usage\n * import { BentoToggle, BentoLabelPosition } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoToggle },\n * template: `\n * <bento-toggle\n * :value=\"toggleValue\"`\n * label-position=\"LabelPosition.BEFORE\"\n * @input=\"optionalHandler($event)\"\n * >\n * Label Text\n * </bento-toggle>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-toggle',\n components: { BentoTypography, CheckmarkSmall },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the toggle. It is strongly recommended to pass such value when the toggle is used without a label\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n /**\n * Disable the toggle (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Position of the label relative to the toggle (optional)\n * @values before, after\n */\n labelPosition: {\n type: String as PropType<BentoToggleLabelPosition | `${BentoToggleLabelPosition}`>,\n default: BentoToggleLabelPosition.BEFORE,\n validator: (value: BentoToggleLabelPosition) => Object.values(BentoToggleLabelPosition).includes(value),\n },\n /**\n * Setting this property to true will set the toggle to read only state.\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * Indicates if the switch is \"on\" or \"off\"\n */\n value: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['input'],\n setup(props, { attrs, slots, emit }) {\n const hasSlot = useHasSlot(slots);\n\n const toggleInput = ref(props.value);\n const descriptionId: string = generateUid('toggle-description');\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-toggle', slots.default, slots.description);\n\n const labelSlot = computed((): string => (hasSlot('default') ? getSlotText(slots)('default') : null));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: labelSlot,\n });\n\n const computedDescription = computed((): string | null => descriptionId ?? null);\n\n const conditionalClasses = computed((): { [key: string]: boolean } => ({\n [`b-toggle--${BentoTogglePropClass.LABEL_FIRST}`]:\n props.labelPosition === BentoToggleLabelPosition.BEFORE,\n 'b-toggle--disabled': props.disabled,\n 'b-toggle--readonly': props.readonly,\n }));\n\n const onChange = (event: Event) => {\n emit('input', (event.target as HTMLInputElement).checked);\n };\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n watch(\n () => props.value,\n newValue => {\n toggleInput.value = newValue;\n }\n );\n\n return {\n // Refs\n toggleInput,\n\n // Values\n computedAriaLabel,\n computedDescription,\n defaultSlotValue,\n descriptionSlotValue,\n conditionalClasses,\n descriptionId,\n\n // Method\n hasSlot,\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./toggle.scss\" />\n"],"names":["BentoTogglePropClass","BentoTogglePropClass2","BentoToggleLabelPosition","BentoToggleLabelPosition2","_sfc_main","defineComponent","BentoTypography","CheckmarkSmall","value","props","attrs","slots","emit","hasSlot","useHasSlot","toggleInput","ref","descriptionId","generateUid","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","labelSlot","computed","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","computedDescription","conditionalClasses","onChange","event","onClick","watch","newValue","_hoisted_1","openBlock","createElementBlock","normalizeClass","_ctx","_cache","$event","vModelCheckbox","createElementVNode","_hoisted_3","createBlock","_component_checkmark_small","createCommentVNode","_hoisted_4","_component_bento_typography"],"mappings":";;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;AC0DR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,GAAA,gBAAAC,EAAA;AAAA,EACwC,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACvC,WAAA;AAAA,MAOQ,MAAA;AAAA,MACD,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,eAAA;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,IACgBR,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAW,GAAA;AAAA,MAELT,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAS,EAAAI,GAAA;AAAA,QAFkC,KAAA;AAAA,QAAC,IAAA;AAAA,QAAe,SAAA;AAAA;;;;;;MAI3D,CAAA,KAAAF,EAAA,IAAA,EAAA;AAAA,MAOSR,EAAA,QAAA,SAAA,KAAAA,EAAA,QAAA,aAAA,KAAAH,EAAA,GAAAS,EAAAI,GAAA;AAAA,QANG,KAAA;AAAA,QACf,IAAAV,EAAA;AAAA,QACK,IAAA;AAAA,QACR,SAAA;AAAA;;;;;;;;;;;"}
|
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.4.0",
|
|
4
4
|
"description": "Adyen Bento Vue 3 components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
"build:prod": "npm run clean:build && vite --config vite.production.config.ts build && npm run build:types && npm run build:webtypes",
|
|
29
29
|
"build:types": "vue-tsc -p ./tsconfig.d.json && npm run copy-components-defs",
|
|
30
30
|
"test": "TZ='Europe/Paris' vitest run",
|
|
31
|
+
"test:coverage": "npm run test -- --coverage",
|
|
32
|
+
"test:watch": "TZ='Europe/Paris' vitest watch",
|
|
31
33
|
"copy-components-defs": "cp ../vue2/src/components.d.ts dist/@types",
|
|
32
34
|
"build:webtypes": "vue-docgen-web-types --outFile=./dist/web-types.json",
|
|
33
35
|
"component:create": "bento-cli component create",
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
"url": "git@github.com:Adyen/bento.git"
|
|
51
53
|
},
|
|
52
54
|
"dependencies": {
|
|
53
|
-
"@adyen/bento-design-tokens": "1.
|
|
55
|
+
"@adyen/bento-design-tokens": "1.4.0",
|
|
54
56
|
"@adyen/ui-assets-icons-16": "3.1.0",
|
|
55
57
|
"@adyen/ui-assets-payment-method-icons": "5.2.0",
|
|
56
58
|
"@codemirror/commands": "6.3.3",
|
|
@@ -70,17 +72,16 @@
|
|
|
70
72
|
},
|
|
71
73
|
"overrides": {
|
|
72
74
|
"@codemirror/state": "6.4.0",
|
|
73
|
-
"@playwright/experimental-ct-vue": "1.30.0",
|
|
74
75
|
"react": "16.14.0"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
|
-
"@
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/addon-
|
|
80
|
-
"@storybook/
|
|
81
|
-
"@storybook/
|
|
82
|
-
"@storybook/
|
|
83
|
-
"@storybook/vue3
|
|
78
|
+
"@storybook/addon-a11y": "7.6.17",
|
|
79
|
+
"@storybook/addon-essentials": "7.6.17",
|
|
80
|
+
"@storybook/addon-storysource": "7.6.17",
|
|
81
|
+
"@storybook/core-common": "7.6.17",
|
|
82
|
+
"@storybook/core-server": "7.6.17",
|
|
83
|
+
"@storybook/theming": "7.6.17",
|
|
84
|
+
"@storybook/vue3": "7.6.17",
|
|
84
85
|
"@testing-library/jest-dom": "5.16.5",
|
|
85
86
|
"@testing-library/user-event": "14.4.3",
|
|
86
87
|
"@testing-library/vue": "8.0.2",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Ref } from "../../../../../../vue3/node_modules/vue";
|
|
2
|
-
export interface UseCalculateBodyFitContentDynamicStylesOptions {
|
|
3
|
-
paginationRef: Ref<HTMLDivElement>;
|
|
4
|
-
fitContent: Ref<boolean>;
|
|
5
|
-
}
|
|
6
|
-
export type UseCalculateBodyFitContentDynamicStyles = (options: UseCalculateBodyFitContentDynamicStylesOptions) => {
|
|
7
|
-
height: Ref<string>;
|
|
8
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
declare const _default: import("../../../../../../../../vue3/node_modules/vue").DefineComponent<{
|
|
2
|
-
label: {
|
|
3
|
-
type: StringConstructor;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
appliedFiltersCount: {
|
|
7
|
-
type: NumberConstructor;
|
|
8
|
-
default: any;
|
|
9
|
-
};
|
|
10
|
-
hasChevron: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
|
-
isFilterOpen: {
|
|
15
|
-
type: BooleanConstructor;
|
|
16
|
-
default: boolean;
|
|
17
|
-
};
|
|
18
|
-
disabled: {
|
|
19
|
-
type: BooleanConstructor;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
}, {
|
|
23
|
-
conditionalClasses: import("../../../../../../../../vue3/node_modules/vue").ComputedRef<{
|
|
24
|
-
"b-filter-bar-filter-button--with-counter": number;
|
|
25
|
-
"b-filter-bar-filter-button--filter-open": boolean;
|
|
26
|
-
}>;
|
|
27
|
-
filterBarButtonRef: any;
|
|
28
|
-
onClick: () => void;
|
|
29
|
-
}, unknown, {}, {}, import("../../../../../../../../vue3/node_modules/vue").ComponentOptionsMixin, import("../../../../../../../../vue3/node_modules/vue").ComponentOptionsMixin, "click"[], "click", import("../../../../../../../../vue3/node_modules/vue").VNodeProps & import("../../../../../../../../vue3/node_modules/vue").AllowedComponentProps & import("../../../../../../../../vue3/node_modules/vue").ComponentCustomProps, Readonly<import("../../../../../../../../vue3/node_modules/vue").ExtractPropTypes<{
|
|
30
|
-
label: {
|
|
31
|
-
type: StringConstructor;
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
appliedFiltersCount: {
|
|
35
|
-
type: NumberConstructor;
|
|
36
|
-
default: any;
|
|
37
|
-
};
|
|
38
|
-
hasChevron: {
|
|
39
|
-
type: BooleanConstructor;
|
|
40
|
-
default: boolean;
|
|
41
|
-
};
|
|
42
|
-
isFilterOpen: {
|
|
43
|
-
type: BooleanConstructor;
|
|
44
|
-
default: boolean;
|
|
45
|
-
};
|
|
46
|
-
disabled: {
|
|
47
|
-
type: BooleanConstructor;
|
|
48
|
-
default: boolean;
|
|
49
|
-
};
|
|
50
|
-
}>> & {
|
|
51
|
-
onClick?: (...args: any[]) => any;
|
|
52
|
-
}, {
|
|
53
|
-
disabled: boolean;
|
|
54
|
-
isFilterOpen: boolean;
|
|
55
|
-
hasChevron: boolean;
|
|
56
|
-
appliedFiltersCount: number;
|
|
57
|
-
}>;
|
|
58
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as FilterBarFilterButton } from './filter-bar-filter-button/filter-bar-filter-button.vue';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.b-button-actions[data-v-18f16af9]{container-type:inline-size;flex-grow:1}.b-button-actions__container-wrapper[data-v-18f16af9]{display:flex;flex-direction:column;gap:var(--b-button-actions-vertical-stack-row-gap)}.b-button-actions__button-wrapper>*[data-v-18f16af9]{width:100%}@container (min-width: 250px){.b-button-actions--buttons-start[data-v-18f16af9]{flex-direction:row;justify-content:start}.b-button-actions--buttons-end[data-v-18f16af9]{column-gap:var(--b-button-actions-buttons-end-column-gap);flex-direction:row;justify-content:end}.b-button-actions--fill-container[data-v-18f16af9]{column-gap:var(--b-button-actions-fill-container-column-gap);display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column}.b-button-actions--space-between[data-v-18f16af9]{flex-direction:unset;justify-content:space-between}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
svg[data-v-32f5f438]{display:inline-flex;flex-shrink:0}svg[data-v-32f5f438],svg *[data-v-32f5f438]{fill:currentcolor}svg[data-v-58c18347]{display:inline-flex;flex-shrink:0}svg[data-v-58c18347],svg *[data-v-58c18347]{fill:currentcolor}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, computed as y, ref as C, resolveComponent as m, openBlock as n, createElementBlock as i, normalizeClass as h, renderSlot as r, createCommentVNode as l, createBlock as g, withCtx as S } from "vue";
|
|
2
|
-
import { B, a as k, b as L } from "./index.222d29b0.js";
|
|
3
|
-
import { u as O } from "./use-has-slot.068222e6.js";
|
|
4
|
-
import { _ as T } from "./_plugin-vue_export-helper.dad06003.js";
|
|
5
|
-
import "../assets/base-button.css";
|
|
6
|
-
var d = /* @__PURE__ */ ((t) => (t.DESTRUCTIVE = "critical", t.ICON_ONLY = "icon-only", t))(d || {}), e = /* @__PURE__ */ ((t) => (t.BLUR = "blur", t.CLICK = "click", t.FOCUS = "focus", t.KEYDOWN_ESC = "keydown.esc", t))(e || {});
|
|
7
|
-
const $ = _({
|
|
8
|
-
name: "base-button",
|
|
9
|
-
components: { BentoTypography: B },
|
|
10
|
-
props: {
|
|
11
|
-
/**
|
|
12
|
-
* Disables button functionality
|
|
13
|
-
*/
|
|
14
|
-
disabled: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: !1
|
|
17
|
-
},
|
|
18
|
-
/**
|
|
19
|
-
* Displays button as critical
|
|
20
|
-
*/
|
|
21
|
-
critical: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
25
|
-
/**
|
|
26
|
-
* The default behavior of the button.
|
|
27
|
-
* Possible values are: 'button', 'reset', 'submit'
|
|
28
|
-
*/
|
|
29
|
-
type: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "button"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: [
|
|
35
|
-
e.CLICK,
|
|
36
|
-
e.FOCUS,
|
|
37
|
-
e.BLUR,
|
|
38
|
-
e.KEYDOWN_ESC
|
|
39
|
-
],
|
|
40
|
-
setup(t, { slots: o, emit: p, attrs: u }) {
|
|
41
|
-
const c = y(() => {
|
|
42
|
-
var a;
|
|
43
|
-
return {
|
|
44
|
-
"aria-expanded": (a = u["aria-expanded"]) == null ? void 0 : a.toString()
|
|
45
|
-
};
|
|
46
|
-
}), b = C(null), s = y(() => ({
|
|
47
|
-
[`b-base-button--${d.DESTRUCTIVE}`]: t.critical,
|
|
48
|
-
[`b-base-button--${d.ICON_ONLY}`]: !o.default
|
|
49
|
-
}));
|
|
50
|
-
return {
|
|
51
|
-
// Enums
|
|
52
|
-
BentoTypographyElement: k,
|
|
53
|
-
BentoTypographyVariant: L,
|
|
54
|
-
// Values
|
|
55
|
-
ariaAttributes: c,
|
|
56
|
-
conditionalClasses: s,
|
|
57
|
-
// Methods
|
|
58
|
-
onClickButton: (a) => {
|
|
59
|
-
t.disabled || p(e.CLICK, a);
|
|
60
|
-
},
|
|
61
|
-
hasSlot: O(o),
|
|
62
|
-
// Refs
|
|
63
|
-
bentoBaseButtonRef: b
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const E = ["disabled", "type", "aria-expanded"], I = {
|
|
68
|
-
key: 0,
|
|
69
|
-
class: "b-base-button__icon-left",
|
|
70
|
-
"data-testid": "icon-button-left"
|
|
71
|
-
}, N = {
|
|
72
|
-
key: 2,
|
|
73
|
-
class: "b-base-button__icon-right",
|
|
74
|
-
"data-testid": "icon-button-right"
|
|
75
|
-
};
|
|
76
|
-
function R(t, o, p, u, c, b) {
|
|
77
|
-
const s = m("bento-typography");
|
|
78
|
-
return n(), i("button", {
|
|
79
|
-
ref: "bentoBaseButtonRef",
|
|
80
|
-
class: h(["b-base-button", t.conditionalClasses]),
|
|
81
|
-
disabled: t.disabled,
|
|
82
|
-
type: t.type,
|
|
83
|
-
"aria-expanded": t.ariaAttributes["aria-expanded"],
|
|
84
|
-
onClick: o[0] || (o[0] = (...f) => t.onClickButton && t.onClickButton(...f))
|
|
85
|
-
}, [
|
|
86
|
-
t.hasSlot("iconLeft") ? (n(), i("span", I, [
|
|
87
|
-
r(t.$slots, "iconLeft", {}, void 0, !0)
|
|
88
|
-
])) : l("", !0),
|
|
89
|
-
t.hasSlot("default") ? (n(), g(s, {
|
|
90
|
-
key: 1,
|
|
91
|
-
el: t.BentoTypographyElement.SPAN,
|
|
92
|
-
variant: t.BentoTypographyVariant.BODY,
|
|
93
|
-
stronger: "",
|
|
94
|
-
class: "b-base-button__label"
|
|
95
|
-
}, {
|
|
96
|
-
default: S(() => [
|
|
97
|
-
r(t.$slots, "default", {}, void 0, !0)
|
|
98
|
-
]),
|
|
99
|
-
_: 3
|
|
100
|
-
}, 8, ["el", "variant"])) : l("", !0),
|
|
101
|
-
t.hasSlot("iconRight") ? (n(), i("span", N, [
|
|
102
|
-
r(t.$slots, "iconRight", {}, void 0, !0)
|
|
103
|
-
])) : l("", !0)
|
|
104
|
-
], 10, E);
|
|
105
|
-
}
|
|
106
|
-
const V = /* @__PURE__ */ T($, [["render", R], ["__scopeId", "data-v-7a3f6d20"]]);
|
|
107
|
-
export {
|
|
108
|
-
V as B,
|
|
109
|
-
e as a
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=base-button.20be08da.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.20be08da.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography\n v-if=\"hasSlot('default')\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.BODY\"\n stronger\n class=\"b-base-button__label\"\n >\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { Booleanish } from '@/types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n },\n emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n }\n };\n\n return {\n // Enums\n BentoTypographyElement,\n BentoTypographyVariant,\n\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","BentoTypographyElement","BentoTypographyVariant","e","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","createCommentVNode","createBlock","_component_bento_typography","_hoisted_3"],"mappings":";;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;AC4DR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,UAAA;AAAA,MAIO,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IAC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