@adyen/bento-vue3 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/packages/vue2/src/components/accordion/accordion.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/accordion/components/accordion-item.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +24 -20
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/badge/badge.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/button/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +36 -32
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +14 -14
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/click-outside/click-outside.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +23 -19
- package/dist/@types/packages/vue2/src/components/code-snippet/composables/useLanguage.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/country/composables/useCountryCapital/useCountryCapital.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/country/composables/useCountryFlag.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/country/composables/useCountryName/useCountryName.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/country/composables/useCountryPhoneCode/useCountryPhoneCode.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +15 -13
- package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +12 -12
- 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 +11 -11
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +12 -12
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useColumnReorderer/useColumnReorderer.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useConfigSettings/useConfigSettings.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useKeyboardNavigator/useKeyboardNavigator.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useResizer.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useSelector.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useSorter.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +30 -30
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +11 -9
- package/dist/@types/packages/vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +8 -8
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/date-range-picker/composables/use-date-range-picker-calendar-text.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/composables/use-date-range-picker-calendar-text.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/divider/divider.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/useDropdownOptionsListbox.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +100 -98
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/composables/useCountryItems.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +3 -3
- 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/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDropdownSearchFilter.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useKeyboardNavigation.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +27 -25
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +41 -41
- 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 +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/composables/use-base-filter.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-filter/date-filter.vue.d.ts +8 -8
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +18 -18
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +8 -8
- package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/select-filter.vue.d.ts +14 -14
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +12 -12
- package/dist/@types/packages/vue2/src/components/focus-trap/focus-trap.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +11 -9
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +36 -28
- package/dist/@types/packages/vue2/src/components/internal/avatar/avatar.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/move-calendar-date.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +6 -6
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/internal/error-message/error-message.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/footer-actions/footer-actions.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +4 -4
- 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 +11 -11
- 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 +6 -6
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +15 -15
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option/listbox-option.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +8 -8
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +24 -22
- package/dist/@types/packages/vue2/src/components/link/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/loading-indicator/loading-indicator.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item-list/menu-item-list.vue.d.ts +8 -8
- package/dist/@types/packages/vue2/src/components/menu/components/menu-list-container/menu-list-container.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +11 -11
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +28 -20
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/payment-method/composables/usePaymentIcon.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +11 -9
- package/dist/@types/packages/vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popover/components/popover-image/popover-image.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/popover/components/popover-title/popover-title.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +19 -19
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +97 -85
- package/dist/@types/packages/vue2/src/components/search-bar/useSearchBarDataFilter.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +47 -39
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +19 -13
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +19 -13
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +19 -13
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +25 -23
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +30 -30
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/toast/toast.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/toggle/toggle.types.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +16 -16
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +37 -37
- package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +10 -10
- package/dist/@types/packages/vue2/src/composables/initials.d.ts +2 -2
- package/dist/@types/packages/vue2/src/composables/use-checkbox-select-all/use-checkbox-select-all.d.ts +3 -3
- package/dist/@types/packages/vue2/src/composables/use-has-slot/use-has-slot.d.ts +1 -1
- package/dist/@types/packages/vue2/src/composables/useDynamicImport.d.ts +2 -2
- package/dist/@types/packages/vue2/src/directives/click-outside/directive.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/click-outside/on-click-outside.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/click-outside/types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/click-outside/useEventListener/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/click-outside/utils.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/keyboard-navigation/keyboard-navigation.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/keyboard-navigation/keyboard-navigation.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/directives/tooltip/tooltip.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/install.d.ts +1 -1
- package/dist/@types/packages/vue2/src/plugins/toastController.d.ts +1 -1
- package/dist/@types/packages/vue2/src/types/elements.d.ts +1 -1
- package/dist/@types/packages/vue2/src/types/index.d.ts +0 -1
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +1 -1
- package/dist/@types/packages/vue2/src/types/maybe-ref.d.ts +1 -1
- package/dist/@types/packages/vue2/src/types/refs.d.ts +1 -1
- package/dist/@types/packages/vue2/src/utils/ts/aria-label.d.ts +2 -2
- package/dist/@types/packages/vue2/src/utils/ts/events.d.ts +1 -1
- package/dist/@types/packages/vue2/src/utils/ts/focus-trap.utils.d.ts +1 -1
- 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/i18n.d.ts +1 -1
- package/dist/alert.js +49 -47
- package/dist/alert.js.map +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/dropdown.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/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/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/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +77 -68
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +16 -16
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.fe807878.js → base-button.4a56c2fb.js} +2 -2
- package/dist/chunks/{base-button.fe807878.js.map → base-button.4a56c2fb.js.map} +1 -1
- package/dist/chunks/{button-actions.59449cda.js → button-actions.a6e541ad.js} +7 -7
- package/dist/chunks/{button-actions.59449cda.js.map → button-actions.a6e541ad.js.map} +1 -1
- package/dist/chunks/{button.4ccc3a72.js → button.1f630b6e.js} +10 -10
- package/dist/chunks/button.1f630b6e.js.map +1 -0
- package/dist/chunks/{calendar.1fb0d5b2.js → calendar.08885a56.js} +4 -4
- package/dist/chunks/{calendar.1fb0d5b2.js.map → calendar.08885a56.js.map} +1 -1
- package/dist/chunks/{checkbox.39fa87c7.js → checkbox.cfb8b8df.js} +3 -3
- package/dist/chunks/{checkbox.39fa87c7.js.map → checkbox.cfb8b8df.js.map} +1 -1
- package/dist/chunks/{controls-group.0126679a.js → controls-group.806da9bd.js} +2 -2
- package/dist/chunks/{controls-group.0126679a.js.map → controls-group.806da9bd.js.map} +1 -1
- package/dist/chunks/{copy.012e43f2.js → copy.1ce0203e.js} +3 -3
- package/dist/chunks/{copy.012e43f2.js.map → copy.1ce0203e.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.2ac50ee2.js → dropdown-default-textbox.dd77bb42.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.2ac50ee2.js.map → dropdown-default-textbox.dd77bb42.js.map} +1 -1
- package/dist/chunks/{dropdown.374481a8.js → dropdown.f9997464.js} +84 -82
- package/dist/chunks/dropdown.f9997464.js.map +1 -0
- package/dist/chunks/{error-message.a65a9abf.js → error-message.b88bb75a.js} +2 -2
- package/dist/chunks/{error-message.a65a9abf.js.map → error-message.b88bb75a.js.map} +1 -1
- package/dist/chunks/{index.0f958a0c.js → index.361c61d3.js} +2 -2
- package/dist/chunks/{index.0f958a0c.js.map → index.361c61d3.js.map} +1 -1
- package/dist/chunks/{index.05d4c01b.js → index.64b7b3cc.js} +6 -6
- package/dist/chunks/{index.05d4c01b.js.map → index.64b7b3cc.js.map} +1 -1
- package/dist/chunks/{index.c25bbcc8.js → index.7dd953ea.js} +53 -52
- package/dist/chunks/{index.c25bbcc8.js.map → index.7dd953ea.js.map} +1 -1
- package/dist/chunks/{index.1e002876.js → index.96001b1d.js} +3 -3
- package/dist/chunks/{index.1e002876.js.map → index.96001b1d.js.map} +1 -1
- package/dist/chunks/{index.b2d970f6.js → index.b46a5047.js} +20 -20
- package/dist/chunks/{index.b2d970f6.js.map → index.b46a5047.js.map} +1 -1
- package/dist/chunks/index.ebf5f6cf.js +119 -0
- package/dist/chunks/index.ebf5f6cf.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.caa1ceba.js → listbox-option-tag.73661a5d.js} +3 -3
- package/dist/chunks/{listbox-option-tag.caa1ceba.js.map → listbox-option-tag.73661a5d.js.map} +1 -1
- package/dist/chunks/{listbox.ceacb0ca.js → listbox.7b5e0eee.js} +42 -41
- package/dist/chunks/{listbox.ceacb0ca.js.map → listbox.7b5e0eee.js.map} +1 -1
- package/dist/chunks/{loading-button.5b8db3dc.js → loading-button.426d89b9.js} +2 -2
- package/dist/chunks/{loading-button.5b8db3dc.js.map → loading-button.426d89b9.js.map} +1 -1
- package/dist/chunks/{tooltip.ca53a83a.js → tooltip.53290a34.js} +2 -2
- package/dist/chunks/{tooltip.ca53a83a.js.map → tooltip.53290a34.js.map} +1 -1
- package/dist/chunks/useCountryItems.e83ef8f0.js.map +1 -1
- package/dist/code-snippet.js +71 -69
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +25 -24
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/currency.js.map +1 -1
- package/dist/data-grid.js +204 -204
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +21 -21
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/dropdown.js.map +1 -1
- package/dist/filter-bar.js +13 -13
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header.js +61 -61
- package/dist/header.js.map +1 -1
- package/dist/index.js +65 -65
- package/dist/info-icon.js +20 -19
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +81 -77
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +6 -6
- package/dist/link.js +15 -15
- package/dist/link.js.map +1 -1
- package/dist/menu.js +5 -5
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +113 -109
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +15 -14
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +21 -21
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +17 -17
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +5 -5
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +4 -4
- package/dist/status.js +6 -6
- package/dist/status.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +155 -142
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +2 -2
- package/dist/tag.js +8 -8
- package/dist/tag.js.map +1 -1
- package/dist/textarea.js +25 -21
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +31 -31
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +157 -3
- package/dist/toggle.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +5 -4
- package/dist/@types/packages/vue2/src/types/label-position.d.ts +0 -4
- package/dist/chunks/button.4ccc3a72.js.map +0 -1
- package/dist/chunks/dropdown.374481a8.js.map +0 -1
- package/dist/chunks/index.0b6c7187.js +0 -160
- package/dist/chunks/index.0b6c7187.js.map +0 -1
- package/dist/chunks/index.92f7d550.js +0 -119
- package/dist/chunks/index.92f7d550.js.map +0 -1
package/dist/card.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { a as
|
|
1
|
+
import { defineComponent as H, ref as M, watch as z, computed as a, resolveComponent as h, openBlock as o, createElementBlock as i, normalizeClass as c, withKeys as k, createElementVNode as B, createBlock as y, createCommentVNode as s, mergeProps as R, withCtx as S, renderSlot as g, createVNode as W } from "vue";
|
|
2
|
+
import { B as Y, a as E, b as v } from "./chunks/index.ebf5f6cf.js";
|
|
3
|
+
import { a as j, C as F } from "./chunks/chevron-down.69bedf14.js";
|
|
4
4
|
import { u as P } from "./chunks/use-has-slot.068222e6.js";
|
|
5
5
|
import { g as K } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { B as
|
|
8
|
-
import { _ as
|
|
9
|
-
import "./assets/
|
|
10
|
-
var
|
|
11
|
-
const
|
|
6
|
+
import { u as x } from "./chunks/i18n.6c402773.js";
|
|
7
|
+
import { B as q, c as T } from "./chunks/button-actions.a6e541ad.js";
|
|
8
|
+
import { _ as G } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
9
|
+
import "./assets/index4.css";
|
|
10
|
+
var m = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e))(m || {}), u = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SMALL = "small", e))(u || {});
|
|
11
|
+
const A = {
|
|
12
12
|
"en-US": {
|
|
13
13
|
showCardContent: "Show card content",
|
|
14
14
|
hideCardContent: "Hide card content"
|
|
15
15
|
}
|
|
16
|
-
},
|
|
17
|
-
i18n: { messages:
|
|
16
|
+
}, J = H({
|
|
17
|
+
i18n: { messages: A },
|
|
18
18
|
name: "bento-card",
|
|
19
|
-
components: { ChevronUpIcon:
|
|
19
|
+
components: { ChevronUpIcon: j, ChevronDownIcon: F, BentoTypography: Y, BentoButtonActions: q },
|
|
20
20
|
props: {
|
|
21
21
|
/**
|
|
22
22
|
* Defines the color of card background
|
|
23
23
|
*/
|
|
24
24
|
background: {
|
|
25
25
|
type: String,
|
|
26
|
-
default:
|
|
26
|
+
default: m.PRIMARY,
|
|
27
|
+
validator: (e) => Object.values(m).includes(e)
|
|
27
28
|
},
|
|
28
29
|
/**
|
|
29
30
|
* Defines the title size of the card header
|
|
30
31
|
*/
|
|
31
32
|
titleSize: {
|
|
32
33
|
type: String,
|
|
33
|
-
default: u.DEFAULT
|
|
34
|
+
default: u.DEFAULT,
|
|
35
|
+
validator: (e) => Object.values(u).includes(e)
|
|
34
36
|
},
|
|
35
37
|
/**
|
|
36
38
|
* The whole content of the card will be expandable in accordion manner
|
|
@@ -40,7 +42,7 @@ const T = {
|
|
|
40
42
|
default: !1
|
|
41
43
|
},
|
|
42
44
|
/**
|
|
43
|
-
*
|
|
45
|
+
* Sets the expandable card in a closed state
|
|
44
46
|
*/
|
|
45
47
|
closed: {
|
|
46
48
|
type: Boolean,
|
|
@@ -94,16 +96,23 @@ const T = {
|
|
|
94
96
|
*/
|
|
95
97
|
actionsLayout: {
|
|
96
98
|
type: String,
|
|
97
|
-
default:
|
|
98
|
-
validator: (e) => Object.values(
|
|
99
|
+
default: T.BUTTONS_END,
|
|
100
|
+
validator: (e) => Object.values(T).includes(e)
|
|
99
101
|
}
|
|
100
102
|
},
|
|
101
103
|
emits: ["click", "expanded"],
|
|
102
|
-
setup(e, { emit: n, slots:
|
|
103
|
-
const { t: f } =
|
|
104
|
+
setup(e, { emit: n, slots: _ }) {
|
|
105
|
+
const { t: f } = x({ messages: A }), t = P(_), w = K("card"), l = M(!e.closed);
|
|
106
|
+
z(
|
|
107
|
+
() => e.closed,
|
|
108
|
+
(r) => {
|
|
109
|
+
l.value = !r;
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
const b = a(() => t("default") || t("description") || t("header")), p = a(() => t("default") || t("header")), C = a(
|
|
104
113
|
() => {
|
|
105
|
-
var
|
|
106
|
-
return (t("content") || ((
|
|
114
|
+
var r;
|
|
115
|
+
return (t("content") || ((r = e.actions) == null ? void 0 : r.length)) && (!e.expandable || e.expandable && l.value);
|
|
107
116
|
}
|
|
108
117
|
), d = a(() => e.expandable && !e.disabled ? 0 : -1), L = a(() => ({
|
|
109
118
|
[`b-card--${e.background}`]: e.background,
|
|
@@ -116,40 +125,40 @@ const T = {
|
|
|
116
125
|
"b-card__toggle--small-text": e.titleSize === u.SMALL
|
|
117
126
|
})), $ = a(() => ({
|
|
118
127
|
"b-card__body--expandable": e.expandable && t("content"),
|
|
119
|
-
"b-card__body--without-header": !e.expandable && !
|
|
128
|
+
"b-card__body--without-header": !e.expandable && !b.value
|
|
120
129
|
})), N = a(() => ({
|
|
121
|
-
"b-card__content--without-header": !e.expandable && !
|
|
130
|
+
"b-card__content--without-header": !e.expandable && !b.value,
|
|
122
131
|
"b-card__content--expandable": e.expandable
|
|
123
|
-
})),
|
|
124
|
-
const
|
|
132
|
+
})), O = a(() => {
|
|
133
|
+
const r = !e.expandable && e.actions && !t("content");
|
|
125
134
|
return {
|
|
126
|
-
"b-card__actions--without-content":
|
|
127
|
-
"b-card__actions--without-content-and-with-header":
|
|
135
|
+
"b-card__actions--without-content": r,
|
|
136
|
+
"b-card__actions--without-content-and-with-header": r && b.value
|
|
128
137
|
};
|
|
129
|
-
}),
|
|
138
|
+
}), U = a(() => ({
|
|
130
139
|
"b-card__title-wrapper--truncated": t("header")
|
|
131
|
-
})),
|
|
132
|
-
el:
|
|
140
|
+
})), V = a(() => ({
|
|
141
|
+
el: E.DIV,
|
|
133
142
|
variant: e.titleSize === u.DEFAULT ? v.TITLE : v.BODY,
|
|
134
143
|
strongest: e.titleSize === u.SMALL,
|
|
135
144
|
wide: e.titleSize === u.SMALL
|
|
136
145
|
}));
|
|
137
146
|
return {
|
|
138
147
|
// Values
|
|
139
|
-
cardId:
|
|
148
|
+
cardId: w,
|
|
140
149
|
cardConditionalClasses: L,
|
|
141
150
|
cardBodyConditionalClasses: $,
|
|
142
151
|
cardHeaderConditionalClasses: I,
|
|
143
152
|
cardContentConditionalClasses: N,
|
|
144
|
-
cardActionsConditionalClasses:
|
|
145
|
-
cardTitleWrapperConditionalClasses:
|
|
153
|
+
cardActionsConditionalClasses: O,
|
|
154
|
+
cardTitleWrapperConditionalClasses: U,
|
|
146
155
|
cardToggleConditionalClasses: D,
|
|
147
156
|
showCardBody: C,
|
|
148
157
|
showContent: l,
|
|
149
158
|
tabIndex: d,
|
|
150
|
-
showHeader:
|
|
159
|
+
showHeader: b,
|
|
151
160
|
showTitleWrapper: p,
|
|
152
|
-
typography:
|
|
161
|
+
typography: V,
|
|
153
162
|
// Methods
|
|
154
163
|
hasSlot: t,
|
|
155
164
|
onClick: () => {
|
|
@@ -161,58 +170,58 @@ const T = {
|
|
|
161
170
|
},
|
|
162
171
|
// Enums
|
|
163
172
|
BentoTypographyVariant: v,
|
|
164
|
-
BentoTypographyElement:
|
|
173
|
+
BentoTypographyElement: E
|
|
165
174
|
};
|
|
166
175
|
}
|
|
167
176
|
});
|
|
168
|
-
const
|
|
177
|
+
const Q = ["tabindex", "aria-controls", "aria-expanded", "role"], X = { class: "b-card__header-wrapper" }, Z = {
|
|
169
178
|
key: 0,
|
|
170
179
|
class: "b-card__header-slot-wrapper"
|
|
171
|
-
},
|
|
172
|
-
function
|
|
173
|
-
const l = h("chevron-up-icon"),
|
|
174
|
-
return o(),
|
|
175
|
-
class:
|
|
180
|
+
}, ee = ["id"];
|
|
181
|
+
function ae(e, n, _, f, t, w) {
|
|
182
|
+
const l = h("chevron-up-icon"), b = h("chevron-down-icon"), p = h("bento-typography"), C = h("bento-button-actions");
|
|
183
|
+
return o(), i("div", {
|
|
184
|
+
class: c(["b-card", e.cardConditionalClasses]),
|
|
176
185
|
"data-testid": "card",
|
|
177
186
|
onClick: n[3] || (n[3] = (...d) => e.onClick && e.onClick(...d))
|
|
178
187
|
}, [
|
|
179
|
-
e.showHeader ? (o(),
|
|
188
|
+
e.showHeader ? (o(), i("div", {
|
|
180
189
|
key: 0,
|
|
181
|
-
class:
|
|
190
|
+
class: c(["b-card__header", e.cardHeaderConditionalClasses]),
|
|
182
191
|
tabindex: e.tabIndex,
|
|
183
192
|
"aria-controls": e.expandable ? e.cardId : null,
|
|
184
193
|
"aria-expanded": e.expandable ? `${e.showContent}` : null,
|
|
185
194
|
role: e.expandable ? "button" : null,
|
|
186
195
|
onClick: n[0] || (n[0] = (...d) => e.toggleExpansion && e.toggleExpansion(...d)),
|
|
187
196
|
onKeypress: [
|
|
188
|
-
n[1] || (n[1] =
|
|
189
|
-
n[2] || (n[2] =
|
|
197
|
+
n[1] || (n[1] = k((...d) => e.toggleExpansion && e.toggleExpansion(...d), ["enter"])),
|
|
198
|
+
n[2] || (n[2] = k((...d) => e.toggleExpansion && e.toggleExpansion(...d), ["space"]))
|
|
190
199
|
]
|
|
191
200
|
}, [
|
|
192
|
-
|
|
193
|
-
e.showTitleWrapper ? (o(),
|
|
194
|
-
|
|
195
|
-
class:
|
|
201
|
+
B("div", X, [
|
|
202
|
+
e.showTitleWrapper ? (o(), i("div", Z, [
|
|
203
|
+
B("div", {
|
|
204
|
+
class: c(["b-card__title-wrapper", e.cardTitleWrapperConditionalClasses])
|
|
196
205
|
}, [
|
|
197
|
-
e.expandable ? (o(),
|
|
206
|
+
e.expandable ? (o(), i("div", {
|
|
198
207
|
key: 0,
|
|
199
|
-
class:
|
|
208
|
+
class: c(["b-card__toggle", e.cardToggleConditionalClasses])
|
|
200
209
|
}, [
|
|
201
210
|
e.showContent ? (o(), y(l, {
|
|
202
211
|
key: 0,
|
|
203
212
|
"svg-title": e.t("hideCardContent"),
|
|
204
213
|
"aria-hidden": "true"
|
|
205
|
-
}, null, 8, ["svg-title"])) : (o(), y(
|
|
214
|
+
}, null, 8, ["svg-title"])) : (o(), y(b, {
|
|
206
215
|
key: 1,
|
|
207
216
|
"svg-title": e.t("showCardContent"),
|
|
208
217
|
"aria-hidden": "true"
|
|
209
218
|
}, null, 8, ["svg-title"]))
|
|
210
219
|
], 2)) : s("", !0),
|
|
211
|
-
e.hasSlot("default") ? (o(), y(p,
|
|
220
|
+
e.hasSlot("default") ? (o(), y(p, R({
|
|
212
221
|
key: 1,
|
|
213
222
|
class: "b-card__title"
|
|
214
223
|
}, e.typography), {
|
|
215
|
-
default:
|
|
224
|
+
default: S(() => [
|
|
216
225
|
g(e.$slots, "default", {}, void 0, !0)
|
|
217
226
|
]),
|
|
218
227
|
_: 3
|
|
@@ -226,40 +235,40 @@ function ee(e, n, m, f, t, _) {
|
|
|
226
235
|
el: e.BentoTypographyElement.DIV,
|
|
227
236
|
variant: e.BentoTypographyVariant.BODY
|
|
228
237
|
}, {
|
|
229
|
-
default:
|
|
238
|
+
default: S(() => [
|
|
230
239
|
g(e.$slots, "description", {}, void 0, !0)
|
|
231
240
|
]),
|
|
232
241
|
_: 3
|
|
233
242
|
}, 8, ["el", "variant"])) : s("", !0)
|
|
234
243
|
])
|
|
235
|
-
], 42,
|
|
236
|
-
e.showCardBody ? (o(),
|
|
244
|
+
], 42, Q)) : s("", !0),
|
|
245
|
+
e.showCardBody ? (o(), i("div", {
|
|
237
246
|
key: 1,
|
|
238
247
|
id: e.expandable ? e.cardId : null,
|
|
239
|
-
class:
|
|
248
|
+
class: c(["b-card__body", e.cardBodyConditionalClasses])
|
|
240
249
|
}, [
|
|
241
|
-
e.hasSlot("content") ? (o(),
|
|
250
|
+
e.hasSlot("content") ? (o(), i("div", {
|
|
242
251
|
key: 0,
|
|
243
|
-
class:
|
|
252
|
+
class: c(["b-card__content", e.cardContentConditionalClasses])
|
|
244
253
|
}, [
|
|
245
254
|
g(e.$slots, "content", {}, void 0, !0)
|
|
246
255
|
], 2)) : s("", !0),
|
|
247
|
-
e.actions ? (o(),
|
|
256
|
+
e.actions ? (o(), i("div", {
|
|
248
257
|
key: 1,
|
|
249
|
-
class:
|
|
258
|
+
class: c(["b-card__actions", e.cardActionsConditionalClasses])
|
|
250
259
|
}, [
|
|
251
|
-
|
|
260
|
+
W(C, {
|
|
252
261
|
actions: e.actions,
|
|
253
262
|
layout: e.actionsLayout
|
|
254
263
|
}, null, 8, ["actions", "layout"])
|
|
255
264
|
], 2)) : s("", !0)
|
|
256
|
-
], 10,
|
|
265
|
+
], 10, ee)) : s("", !0)
|
|
257
266
|
], 2);
|
|
258
267
|
}
|
|
259
|
-
const
|
|
268
|
+
const be = /* @__PURE__ */ G(J, [["render", ae], ["__scopeId", "data-v-86118643"]]);
|
|
260
269
|
export {
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
be as BentoCard,
|
|
271
|
+
m as BentoCardBackground,
|
|
263
272
|
u as BentoCardTitleSize
|
|
264
273
|
};
|
|
265
274
|
//# sourceMappingURL=card.js.map
|
package/dist/card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../vue2/src/components/card/card.types.ts","../../vue2/src/components/card/card.vue"],"sourcesContent":["export enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div class=\"b-card\" :class=\"cardConditionalClasses\" data-testid=\"card\" @click=\"onClick\">\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"tabIndex\"\n :aria-controls=\"expandable ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideCardContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showCardContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-card__description\"\n :el=\"BentoTypographyElement.DIV\"\n :variant=\"BentoTypographyVariant.BODY\"\n >\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <div\n v-if=\"showCardBody\"\n :id=\"expandable ? cardId : null\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n\n // Components\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-card',\n components: { ChevronUpIcon, ChevronDownIcon, BentoTypography, BentoButtonActions },\n props: {\n /**\n * Defines the color of card background\n */\n background: {\n type: String as PropType<BentoCardBackground>,\n default: BentoCardBackground.PRIMARY,\n },\n /**\n * Defines the title size of the card header\n */\n titleSize: {\n type: String as PropType<BentoCardTitleSize>,\n default: BentoCardTitleSize.DEFAULT,\n },\n /**\n * The whole content of the card will be expandable in accordion manner\n */\n expandable: {\n type: Boolean,\n default: false,\n },\n /**\n * Initially sets the expandable card in a closed state\n */\n closed: {\n type: Boolean,\n default: false,\n },\n /**\n * Disables the expandable card\n */\n disabled: {\n type: Boolean,\n default: false,\n },\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 * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\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 * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n },\n emits: ['click', 'expanded'],\n setup(props, { emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': props.expandable && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header':\n isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant:\n props.titleSize === BentoCardTitleSize.DEFAULT\n ? BentoTypographyVariant.TITLE\n : BentoTypographyVariant.BODY,\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const toggleExpansion = () => {\n if (!props.disabled) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n }\n };\n\n return {\n // Values\n cardId,\n cardConditionalClasses,\n cardBodyConditionalClasses,\n cardHeaderConditionalClasses,\n cardContentConditionalClasses,\n cardActionsConditionalClasses,\n cardTitleWrapperConditionalClasses,\n cardToggleConditionalClasses,\n showCardBody,\n showContent,\n tabIndex,\n showHeader,\n showTitleWrapper,\n typography,\n\n // Methods\n hasSlot,\n onClick,\n t,\n toggleExpansion,\n\n // Enums\n BentoTypographyVariant,\n BentoTypographyElement,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","_sfc_main","defineComponent","messages","ChevronUpIcon","ChevronDownIcon","BentoTypography","BentoButtonActions","BentoButtonActionsLayout","value","props","emit","slots","t","useI18n","hasSlot","useHasSlot","cardId","generateUid","showContent","ref","showHeader","computed","showTitleWrapper","showCardBody","_a","tabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","BentoTypographyElement","BentoTypographyVariant","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createElementVNode","_hoisted_2","_hoisted_3","createBlock","_component_chevron_up_icon","_component_chevron_down_icon","createCommentVNode","_component_bento_typography","mergeProps","withCtx","renderSlot","_hoisted_1"],"mappings":";;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;GCyFRE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,YAAA,EAAA,eAAAC,GAAA,iBAAAC,GAAA,iBAAAC,GAAA,oBAAAC,EAAA;AAAA,EAC4E,OAAA;AAAA;AAAA;AAAA;AAAA,IAC3E,YAAA;AAAA,MAIS,MAAA;AAAA,MACF,SAAAV,EAAA;AAAA,IACuB;AAAA;AAAA;AAAA;AAAA,IACjC,WAAA;AAAA,MAIW,MAAA;AAAA,MACD,SAAAE,EAAA;AAAA,IACsB;AAAA;AAAA;AAAA;AAAA,IAChC,YAAA;AAAA,MAIY,MAAA;AAAA,MACF,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,QAAA;AAAA,MAIQ,MAAA;AAAA,MACE,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,SAAA;AAAA,MA0BS,MAAA;AAAA,MACC,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,eAAA;AAAA,MAWe,MAAA;AAAA,MACL,SAAAS,EAAA;AAAA,MAC4B,WAAA,CA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EAAAI,GAAAC,EAAA;AAAA,cAF8C,KAAA;AAAA,cAAS,OAAA;AAAA;cAC9D,SAAAC,EAAA,MAAA;AAAA;;;;UAIO,GAAA,CAAA;AAAA,UACnBZ,EAAA,QAAA,QAAA,IAAAa,EAAAb,EAAA,QAAA,UAAA,EAAA,KAAA,EAAA,GAAA,QAAA,EAAA,IAAAS,EAAA,IAAA,EAAA;AAAA,QAKE,CAAA,KAAAA,EAAA,IAAA,EAAA;AAAA,QAMST,EAAA,QAAA,aAAA,KAAAH,EAAA,GAAAS,EAAAI,GAAA;AAAA,UALY,KAAA;AAAA,UACtB,OAAA;AAAA,UACG,IAAAV,EAAA,uBAAA;AAAA,UAEmB,SAAAA,EAAA,uBAAA;AAAA,QAAA,GAAA;AAAA;;;;;;IAM7B,GAAA,IAAAc,CAAA,KAAAL,EAAA,IAAA,EAAA;AAAA,IADVT,EAAA,gBAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,MAE4B,KAAA;AAAA,MACnB,IAAAE,EAAA,aAAAA,EAAA,SAAA;AAAA;IAGa,GAAA;AAAA;QAAmB,KAAA;AAAA;MACV,GAAA;AAAA;;MAG3BA,EAAA,WAAAH,EAAA,GAAAC,EAAA,OAAA;AAAA,QAA0B,KAAA;AAAA;MACkE,GAAA;AAAA;UAAzB,SAAAE,EAAA;AAAA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../vue2/src/components/card/card.types.ts","../../vue2/src/components/card/card.vue"],"sourcesContent":["export enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div class=\"b-card\" :class=\"cardConditionalClasses\" data-testid=\"card\" @click=\"onClick\">\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"tabIndex\"\n :aria-controls=\"expandable ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideCardContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showCardContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-card__description\"\n :el=\"BentoTypographyElement.DIV\"\n :variant=\"BentoTypographyVariant.BODY\"\n >\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <div\n v-if=\"showCardBody\"\n :id=\"expandable ? cardId : null\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, watch } from 'vue';\n\n // Components\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-card',\n components: { ChevronUpIcon, ChevronDownIcon, BentoTypography, BentoButtonActions },\n props: {\n /**\n * Defines the color of card background\n */\n background: {\n type: String as PropType<BentoCardBackground | `${BentoCardBackground}`>,\n default: BentoCardBackground.PRIMARY,\n validator: (value: BentoCardBackground) => Object.values(BentoCardBackground).includes(value),\n },\n /**\n * Defines the title size of the card header\n */\n titleSize: {\n type: String as PropType<BentoCardTitleSize | `${BentoCardTitleSize}`>,\n default: BentoCardTitleSize.DEFAULT,\n validator: (value: BentoCardTitleSize) => Object.values(BentoCardTitleSize).includes(value),\n },\n /**\n * The whole content of the card will be expandable in accordion manner\n */\n expandable: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the expandable card in a closed state\n */\n closed: {\n type: Boolean,\n default: false,\n },\n /**\n * Disables the expandable card\n */\n disabled: {\n type: Boolean,\n default: false,\n },\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 * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\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 * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n },\n emits: ['click', 'expanded'],\n setup(props, { emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': props.expandable && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header':\n isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant:\n props.titleSize === BentoCardTitleSize.DEFAULT\n ? BentoTypographyVariant.TITLE\n : BentoTypographyVariant.BODY,\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const toggleExpansion = () => {\n if (!props.disabled) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n }\n };\n\n return {\n // Values\n cardId,\n cardConditionalClasses,\n cardBodyConditionalClasses,\n cardHeaderConditionalClasses,\n cardContentConditionalClasses,\n cardActionsConditionalClasses,\n cardTitleWrapperConditionalClasses,\n cardToggleConditionalClasses,\n showCardBody,\n showContent,\n tabIndex,\n showHeader,\n showTitleWrapper,\n typography,\n\n // Methods\n hasSlot,\n onClick,\n t,\n toggleExpansion,\n\n // Enums\n BentoTypographyVariant,\n BentoTypographyElement,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","_sfc_main","defineComponent","messages","ChevronUpIcon","ChevronDownIcon","BentoTypography","BentoButtonActions","value","BentoButtonActionsLayout","props","emit","slots","t","useI18n","hasSlot","useHasSlot","cardId","generateUid","showContent","ref","watch","showHeader","computed","showTitleWrapper","showCardBody","_a","tabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","BentoTypographyElement","BentoTypographyVariant","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createElementVNode","_hoisted_2","_hoisted_3","createBlock","_component_chevron_up_icon","_component_chevron_down_icon","createCommentVNode","_component_bento_typography","mergeProps","withCtx","renderSlot","_hoisted_1"],"mappings":";;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;GCyFRE,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,YAAA,EAAA,eAAAC,GAAA,iBAAAC,GAAA,iBAAAC,GAAA,oBAAAC,EAAA;AAAA,EAC4E,OAAA;AAAA;AAAA;AAAA;AAAA,IAC3E,YAAA;AAAA,MAIS,MAAA;AAAA,MACF,SAAAV,EAAA;AAAA,MACuB,WAAA,CAAAW,MAAA,OAAA,OAAAX,CAAA,EAAA,SAAAW,CAAA;AAAA,IAC+D;AAAA;AAAA;AAAA;AAAA,IAChG,WAAA;AAAA,MAIW,MAAA;AAAA,MACD,SAAAT,EAAA;AAAA,MACsB,WAAA,CAAAS,MAAA,OAAA,OAAAT,CAAA,EAAA,SAAAS,CAAA;AAAA,IAC8D;AAAA;AAAA;AAAA;AAAA,IAC9F,YAAA;AAAA,MAIY,MAAA;AAAA,MACF,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,QAAA;AAAA,MAIQ,MAAA;AAAA,MACE,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AA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AA;AAAA;MACkE,GAAA;AAAA;UAAzB,SAAAE,EAAA;AAAA;;;;;;;"}
|
package/dist/checkbox.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { B as k, b as m } from "./chunks/checkbox.
|
|
2
|
-
import { a as J } from "./chunks/checkbox.
|
|
3
|
-
import { defineComponent as v, computed as n, toRef as E, resolveComponent as d, openBlock as s, createElementBlock as
|
|
1
|
+
import { B as k, b as m } from "./chunks/checkbox.cfb8b8df.js";
|
|
2
|
+
import { a as J } from "./chunks/checkbox.cfb8b8df.js";
|
|
3
|
+
import { defineComponent as v, computed as n, toRef as E, resolveComponent as d, openBlock as s, createElementBlock as f, createVNode as C, normalizeClass as S, withCtx as u, Fragment as B, renderList as I, createBlock as g, createSlots as G, createTextVNode as y, toDisplayString as _, createCommentVNode as M } from "vue";
|
|
4
4
|
import { g as V } from "./chunks/unique-id.a2a2b458.js";
|
|
5
|
-
import { d as x } from "./chunks/index.
|
|
6
|
-
import { C as w } from "./chunks/controls-group.
|
|
7
|
-
import { E as A } from "./chunks/error-message.
|
|
5
|
+
import { d as x } from "./chunks/index.ebf5f6cf.js";
|
|
6
|
+
import { C as w } from "./chunks/controls-group.806da9bd.js";
|
|
7
|
+
import { E as A } from "./chunks/error-message.b88bb75a.js";
|
|
8
8
|
import { _ as T } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
9
|
-
import "./assets/
|
|
9
|
+
import "./assets/index5.css";
|
|
10
10
|
var t = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(t || {});
|
|
11
11
|
const U = v({
|
|
12
12
|
name: "bento-checkbox-group",
|
|
@@ -81,9 +81,9 @@ const U = v({
|
|
|
81
81
|
setup(e, { emit: c }) {
|
|
82
82
|
const i = V("error"), p = n(
|
|
83
83
|
() => !e.disabled && !e.readonly && (!!e.errorMessage || e.hasError)
|
|
84
|
-
),
|
|
84
|
+
), h = n(
|
|
85
85
|
() => !e.disabled && !e.readonly && !!e.errorMessage
|
|
86
|
-
),
|
|
86
|
+
), b = n(() => ({
|
|
87
87
|
"b-checkbox-group__checkboxes--horizontal": e.variant === t.HORIZONTAL
|
|
88
88
|
})), o = E(e, "modelValue"), l = (a) => {
|
|
89
89
|
o.value = a, c(m.UPDATE, a);
|
|
@@ -98,8 +98,8 @@ const U = v({
|
|
|
98
98
|
// Values
|
|
99
99
|
errorId: i,
|
|
100
100
|
shouldShowGroupError: p,
|
|
101
|
-
shouldShowGroupErrorMessage:
|
|
102
|
-
conditionalClasses:
|
|
101
|
+
shouldShowGroupErrorMessage: h,
|
|
102
|
+
conditionalClasses: b,
|
|
103
103
|
inputValue: o,
|
|
104
104
|
// Methods
|
|
105
105
|
onInput: l
|
|
@@ -107,9 +107,9 @@ const U = v({
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
const L = { class: "b-checkbox-group" };
|
|
110
|
-
function N(e, c, i, p,
|
|
110
|
+
function N(e, c, i, p, h, b) {
|
|
111
111
|
const o = d("bento-checkbox"), l = d("controls-group"), a = d("error-message");
|
|
112
|
-
return s(),
|
|
112
|
+
return s(), f("div", L, [
|
|
113
113
|
C(l, {
|
|
114
114
|
class: S(["b-checkbox-group__checkboxes", e.conditionalClasses]),
|
|
115
115
|
form: e.formId,
|
|
@@ -118,7 +118,7 @@ function N(e, c, i, p, b, h) {
|
|
|
118
118
|
"aria-describedby": e.shouldShowGroupErrorMessage ? e.errorId : ""
|
|
119
119
|
}, {
|
|
120
120
|
default: u(() => [
|
|
121
|
-
(s(!0),
|
|
121
|
+
(s(!0), f(B, null, I(e.items, (r) => (s(), g(o, {
|
|
122
122
|
key: r.value,
|
|
123
123
|
"model-value": e.inputValue,
|
|
124
124
|
value: r.value,
|
|
@@ -144,7 +144,7 @@ function N(e, c, i, p, b, h) {
|
|
|
144
144
|
]),
|
|
145
145
|
_: 1
|
|
146
146
|
}, 8, ["class", "form", "disabled", "label", "aria-describedby"]),
|
|
147
|
-
e.shouldShowGroupErrorMessage ? (s(),
|
|
147
|
+
e.shouldShowGroupErrorMessage ? (s(), g(a, {
|
|
148
148
|
key: 0,
|
|
149
149
|
id: e.errorId,
|
|
150
150
|
"error-message": e.errorMessage,
|
|
@@ -152,7 +152,7 @@ function N(e, c, i, p, b, h) {
|
|
|
152
152
|
}, null, 8, ["id", "error-message"])) : M("", !0)
|
|
153
153
|
]);
|
|
154
154
|
}
|
|
155
|
-
const P = /* @__PURE__ */ T(U, [["render", N], ["__scopeId", "data-v-
|
|
155
|
+
const P = /* @__PURE__ */ T(U, [["render", N], ["__scopeId", "data-v-2ae224f1"]]);
|
|
156
156
|
export {
|
|
157
157
|
k as BentoCheckbox,
|
|
158
158
|
m as BentoCheckboxEvent,
|
package/dist/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["export enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :class=\"conditionalClasses\"\n :form=\"formId\"\n :disabled=\"disabled\"\n :label=\"label\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"readonly || item.readonly\"\n @update:model-value=\"onInput\"\n >\n {{ item.label }}\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRef } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import { BentoCheckboxGroupItems, BentoCheckboxGroupVariant } from './checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '../../checkbox.types';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-checkbox-group',\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n props: {\n /**\n * The checkbox group's items.\n */\n items: {\n type: Array as PropType<BentoCheckboxGroupItems>,\n required: true,\n },\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: Array<number | string | null>,\n default: () => [],\n },\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: {\n type: String,\n default: null,\n },\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: {\n type: String,\n default: null,\n },\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n },\n emits: [BentoCheckboxEvent.UPDATE],\n setup(props, { emit }) {\n const errorId = generateUid('error');\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !props.readonly && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !props.readonly && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n const inputValue = toRef(props, 'modelValue');\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n errorId,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","errorId","generateUid","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","inputValue","toRef","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","createVNode","_component_controls_group","normalizeClass","_ctx","Fragment","renderList","item","createBlock","_component_bento_checkbox","createSlots","_component_error_message"],"mappings":";;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;AC+DR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,eAAAC,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA;AAAA;AAAA;AAAA;AAAA,IAClD,OAAA;AAAA,MAII,MAAA;AAAA,MACG,UAAA;AAAA,IACI;AAAA;AAAA;AAAA;AAAA;AAAA,IACd,YAAA;AAAA,MAKY,MAAA;AAAA,MACF,SAAA,MAAA,CAAA;AAAA,IACU;AAAA;AAAA;AAAA;AAAA,IACpB,SAAA;AAAA,MAIS,MAAA;AAAA,MACC,SAAAN,EAAA;AAAA,MAC6B,WAAA,CAAAO,MAAA,OAAA,OAAAP,CAAA,EAAA,SAAAO,CAAA;AAAA,IAEwB;AAAA;AAAA;AAAA;AAAA,IAC/D,QAAA;AAAA,MAIQ,MAAA;AAAA,MACE,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAMU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,cAAA;AAAA,MAIc,MAAA;AAAA,MACJ,SAAA;AAAA,IACG;AAAA;AAAA;AAA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OACLT,EAAA,GAAAU,EAAAC,GAAA;AAAA,UAAuB,KAAAF,EAAA;AAAA,UAChB,eAAAH,EAAA;AAAA,UACG,OAAAG,EAAA;AAAA,UACD,UAAAH,EAAA,YAAAG,EAAA;AAAA,UACM,aAAAH,EAAA,wBAAAG,EAAA;AAAA,UACoB,iBAAAH,EAAA,uBAAA,OAAAG,EAAA;AAAA,UACR,UAAAH,EAAA,YAAAG,EAAA;AAAA,UAEZ,uBAAAH,EAAA;AAAA,QAAA,GAAAM,EAAA;AAAA;;;UACA,GAAA;AAAA,QAAA,GAAA;AAAA;;;;;;;;;MAId,GAAA;AAAA,IAAA,GAAA,GAAA,CAAA,SAAA,QAAA,YAAA,SAAA,kBAAA,CAAA;AAAA,IAIRN,EAAA,+BAAAN,EAAA,GAAAU,EAAAG,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAP,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["export enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :class=\"conditionalClasses\"\n :form=\"formId\"\n :disabled=\"disabled\"\n :label=\"label\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"readonly || item.readonly\"\n @update:model-value=\"onInput\"\n >\n {{ item.label }}\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRef } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import { BentoCheckboxGroupItems, BentoCheckboxGroupVariant } from './checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '../../checkbox.types';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-checkbox-group',\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n props: {\n /**\n * The checkbox group's items.\n */\n items: {\n type: Array as PropType<BentoCheckboxGroupItems>,\n required: true,\n },\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: Array<number | string | null>,\n default: () => [],\n },\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: {\n type: String,\n default: null,\n },\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: {\n type: String,\n default: null,\n },\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n },\n emits: [BentoCheckboxEvent.UPDATE],\n setup(props, { emit }) {\n const errorId = generateUid('error');\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !props.readonly && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !props.readonly && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n const inputValue = toRef(props, 'modelValue');\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n errorId,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","errorId","generateUid","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","inputValue","toRef","onInput","deprecate","openBlock","createElementBlock","_hoisted_1","createVNode","_component_controls_group","normalizeClass","_ctx","Fragment","renderList","item","createBlock","_component_bento_checkbox","createSlots","_component_error_message"],"mappings":";;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;AC+DR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,eAAAC,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACmD,OAAA;AAAA;AAAA;AAAA;AAAA,IAClD,OAAA;AAAA,MAII,MAAA;AAAA,MACG,UAAA;AAAA,IACI;AAAA;AAAA;AAAA;AAAA;AAAA,IACd,YAAA;AAAA,MAKY,MAAA;AAAA,MACF,SAAA,MAAA,CAAA;AAAA,IACU;AAAA;AAAA;AAAA;AAAA,IACpB,SAAA;AAAA,MAIS,MAAA;AAAA,MACC,SAAAN,EAAA;AAAA,MAC6B,WAAA,CAAAO,MAAA,OAAA,OAAAP,CAAA,EAAA,SAAAO,CAAA;AAAA,IAEwB;AAAA;AAAA;AAAA;AAAA,IAC/D,QAAA;AAAA,MAIQ,MAAA;AAAA,MACE,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAMU,MAAA;AAAA,MACA,SAAA;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EAAA,UAAA;AAAA,IAAA,GAAA;AAAA;SACfN,EAAA,EAAA,GAAAC,EAAAM,GAAA,MAAAC,EAAAF,EAAA,OAAA,CAAAG,OACLT,EAAA,GAAAU,EAAAC,GAAA;AAAA,UAAuB,KAAAF,EAAA;AAAA,UAChB,eAAAH,EAAA;AAAA,UACG,OAAAG,EAAA;AAAA,UACD,UAAAH,EAAA,YAAAG,EAAA;AAAA,UACM,aAAAH,EAAA,wBAAAG,EAAA;AAAA,UACoB,iBAAAH,EAAA,uBAAA,OAAAG,EAAA;AAAA,UACR,UAAAH,EAAA,YAAAG,EAAA;AAAA,UAEZ,uBAAAH,EAAA;AAAA,QAAA,GAAAM,EAAA;AAAA;;;UACA,GAAA;AAAA,QAAA,GAAA;AAAA;;;;;;;;;MAId,GAAA;AAAA,IAAA,GAAA,GAAA,CAAA,SAAA,QAAA,YAAA,SAAA,kBAAA,CAAA;AAAA,IAIRN,EAAA,+BAAAN,EAAA,GAAAU,EAAAG,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAP,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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.
|
|
2
|
+
import { B, a as k, b as L } from "./index.ebf5f6cf.js";
|
|
3
3
|
import { u as O } from "./use-has-slot.068222e6.js";
|
|
4
4
|
import { _ as T } from "./_plugin-vue_export-helper.dad06003.js";
|
|
5
5
|
import "../assets/base-button.css";
|
|
@@ -108,4 +108,4 @@ export {
|
|
|
108
108
|
V as B,
|
|
109
109
|
e as a
|
|
110
110
|
};
|
|
111
|
-
//# sourceMappingURL=base-button.
|
|
111
|
+
//# sourceMappingURL=base-button.4a56c2fb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.
|
|
1
|
+
{"version":3,"file":"base-button.4a56c2fb.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,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,MAAA;AAAA,MAKM,MAAA;AAAA,MACI,SAAA;AAAA,IACG;AAAA,EACb;AAAA,EACJ,OAAA;AAAA,IACOJ,EAAA;AAAA,IACkBA,EAAA;AAAA,IACAA,EAAA;AAAA,IACAA,EAAA;AAAA,EACA;AAAA,EACzB,MAAAK,GAAA,EAAA,OAAAC,GAAA,MAAAC,GAAA,OAAAC,EAAA,GAAA;AAEI,UAAAC,IAAAC,EAAA,MAAA;;AAAA;AAAA,QAAuC,kBAAAC,IAAAH,EAAA,eAAA,MAAA,gBAAAG,EAAA;AAAA,MACe;AAAA,KAAA,GAGtDC,IAAAC,EAAA,IAAA,GAEAC,IAAAJ,EAAA,OAAA;AAAA,MAA2C,CAAA,kBAAAZ,EAAA,aAAA,GAAAO,EAAA;AAAA,MAC2B,CAAA,kBAAAP,EAAA,WAAA,GAAA,CAAAQ,EAAA;AAAA,IACD,EAAA;AASrE,WAAA;AAAA;AAAA,MAAO,wBAAAS;AAAA,MAEH,wBAAAC;AAAA;AAAA,MACA,gBAAAP;AAAA,MAGA,oBAAAK;AAAA;AAAA,MACA,eAbJ,CAAAG,MAAA;AACI,QAAAZ,EAAA,YACIE,EAAAP,EAAA,OAAAiB,CAAA;AAAA,MACJ;AAAA,MAaA,SAAAC,EAAAZ,CAAA;AAAA;AAAA,MACyB,oBAAAM;AAAA,IAGzB;AAAA,EACJ;AAER,CAAA;;EA3H2C,KAAA;AAAA,EAA2B,OAAA;AAAA;;EAY1B,KAAA;AAAA,EAA4B,OAAA;AAAA;;;;AAnB/D,SAAAO,EAAA,GAAAC,EAAA,UAAA;AAAA,IACG,KAAA;AAAA,IACP,OAAAC,EAAA,CAAA,iBAAAC,EAAA,kBAAA,CAAA;AAAA,IACU,UAAAA,EAAA;AAAA,IACG,MAAAA,EAAA;AAAA,IACR,iBAAAA,EAAA,eAAA,eAAA;AAAA;EAEa,GAAA;AAAA;;IAIT,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAOSD,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAK,EAAAC,GAAA;AAAA,MANiB,KAAA;AAAA,MAC/B,IAAAH,EAAA,uBAAA;AAAA,MACO,SAAAA,EAAA,uBAAA;AAAA,MACoB,UAAA;AAAA;;;;;;IAIpB,GAAA,GAAA,CAAA,MAAA,SAAA,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAAZD,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAM,GAAA;AAAA;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as V, a as _ } from "./button.
|
|
1
|
+
import { defineComponent as b, computed as l, resolveComponent as C, openBlock as n, createElementBlock as o, createElementVNode as T, normalizeClass as B, Fragment as N, renderList as y, createVNode as A, createSlots as E, withCtx as d, createTextVNode as g, toDisplayString as S, createBlock as k, resolveDynamicComponent as I } from "vue";
|
|
2
|
+
import { B as V, a as _ } from "./button.1f630b6e.js";
|
|
3
3
|
import { _ as O } from "./_plugin-vue_export-helper.dad06003.js";
|
|
4
4
|
import "../assets/button-actions.css";
|
|
5
5
|
var p = /* @__PURE__ */ ((t) => (t.BUTTONS_END = "buttons-end", t.FILL_CONTAINER = "fill-container", t.SPACE_BETWEEN = "space-between", t.VERTICAL_STACK = "vertical-stack", t))(p || {}), v = /* @__PURE__ */ ((t) => (t.BUTTONS_START = "buttons-start", t))(v || {});
|
|
6
|
-
const u = { ...p, ...v }, R =
|
|
6
|
+
const u = { ...p, ...v }, R = b({
|
|
7
7
|
name: "bento-button-actions",
|
|
8
8
|
components: { BentoButton: V },
|
|
9
9
|
props: {
|
|
@@ -79,7 +79,7 @@ const u = { ...p, ...v }, R = f({
|
|
|
79
79
|
});
|
|
80
80
|
const x = { class: "b-button-actions" };
|
|
81
81
|
function D(t, a, s, m, r, i) {
|
|
82
|
-
const
|
|
82
|
+
const f = C("bento-button");
|
|
83
83
|
return n(), o("div", x, [
|
|
84
84
|
T("div", {
|
|
85
85
|
class: B(["b-button-actions__container-wrapper", t.conditionalClasses]),
|
|
@@ -89,7 +89,7 @@ function D(t, a, s, m, r, i) {
|
|
|
89
89
|
key: c,
|
|
90
90
|
class: "b-button-actions__button-wrapper"
|
|
91
91
|
}, [
|
|
92
|
-
A(
|
|
92
|
+
A(f, {
|
|
93
93
|
critical: e.critical,
|
|
94
94
|
disabled: e.disabled,
|
|
95
95
|
variant: e.variant || t.generateButtonVariantByIndex(c),
|
|
@@ -114,11 +114,11 @@ function D(t, a, s, m, r, i) {
|
|
|
114
114
|
], 2)
|
|
115
115
|
]);
|
|
116
116
|
}
|
|
117
|
-
const w = /* @__PURE__ */ O(R, [["render", D], ["__scopeId", "data-v-
|
|
117
|
+
const w = /* @__PURE__ */ O(R, [["render", D], ["__scopeId", "data-v-18f16af9"]]);
|
|
118
118
|
export {
|
|
119
119
|
w as B,
|
|
120
120
|
p as a,
|
|
121
121
|
v as b,
|
|
122
122
|
u as c
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=button-actions.
|
|
124
|
+
//# sourceMappingURL=button-actions.a6e541ad.js.map
|