@adyen/bento-vue2 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +8 -4
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/accordion/accordion.keys.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/accordion/accordion.types.d.ts +1 -24
- package/dist/@types/packages/vue2/src/components/accordion/accordion.vue.d.ts +17 -51
- package/dist/@types/packages/vue2/src/components/accordion/components/accordion-item.vue.d.ts +24 -28
- package/dist/@types/packages/vue2/src/components/accordion/index.d.ts +2 -3
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +0 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +161 -150
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +3 -5
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +77 -15
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +4 -6
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +36 -11
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +0 -3
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +2 -22
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/components/data-grid-config-settings-column-row/data-grid-config-settings-column-row.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +0 -24
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +326 -14
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +1 -21
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +1 -21
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +277 -104
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +5 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +5 -5
- 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 +6 -6
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +7 -9
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +27 -0
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +76 -0
- package/dist/@types/packages/vue2/src/components/empty-state/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +19 -25
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +0 -26
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +0 -10
- package/dist/@types/packages/vue2/src/components/filter-bar/components/{base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts → filter-bar-button/filter-bar-button.vue.d.ts} +17 -22
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +2 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/focus-trap/focus-trap.vue.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/image/const.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/image/image.types.d.ts +19 -0
- package/dist/@types/packages/vue2/src/components/image/image.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +50 -47
- package/dist/@types/packages/vue2/src/components/internal/avatar/avatar.vue.d.ts +0 -3
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -7
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +6 -31
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +14 -9
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +4 -14
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -6
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/popover/components/popover-title/popover-title.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +9 -9
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -14
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -6
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +16 -339
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +0 -3
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +2 -23
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +2 -5
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue.d.ts +1 -4
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +4 -9
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -7
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -9
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -12
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +0 -5
- package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +4 -6
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +24 -40
- package/dist/@types/packages/vue2/src/composables/use-default-slot-validator/use-default-slot-validator.d.ts +2 -1
- package/dist/@types/packages/vue2/src/composables/use-has-slot/use-has-slot.d.ts +4 -1
- package/dist/@types/packages/vue2/src/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/utils/ts/print-development-warning.d.ts +1 -0
- package/dist/accordion.js +69 -177
- package/dist/accordion.js.map +1 -1
- package/dist/alert.js +57 -60
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/chevron-up.css +1 -0
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/footer-actions.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +2 -2
- package/dist/button.js +110 -12
- package/dist/button.js.map +1 -1
- package/dist/card.js +66 -67
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +27 -26
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.98379576.js → base-button.bd8fa976.js} +24 -27
- package/dist/chunks/base-button.bd8fa976.js.map +1 -0
- package/dist/chunks/base-modal.a365f260.js +207 -0
- package/dist/chunks/base-modal.a365f260.js.map +1 -0
- package/dist/chunks/{button.d0c9527d.js → button.fb307df3.js} +36 -39
- package/dist/chunks/button.fb307df3.js.map +1 -0
- package/dist/chunks/{calendar.0ae43a96.js → calendar.79ea42c1.js} +214 -217
- package/dist/chunks/calendar.79ea42c1.js.map +1 -0
- package/dist/chunks/checkbox.c7d791ed.js +173 -0
- package/dist/chunks/checkbox.c7d791ed.js.map +1 -0
- package/dist/chunks/{chevron-down.b851a6da.js → chevron-up.674ec2e5.js} +8 -8
- package/dist/chunks/chevron-up.674ec2e5.js.map +1 -0
- package/dist/chunks/{controls-group.b827382b.js → controls-group.5d3e04dd.js} +20 -20
- package/dist/chunks/controls-group.5d3e04dd.js.map +1 -0
- package/dist/chunks/{copy.5a4cbd4d.js → copy.ac796536.js} +37 -38
- package/dist/chunks/copy.ac796536.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.819e43f7.js → dropdown-default-textbox.109c36d2.js} +38 -40
- package/dist/chunks/dropdown-default-textbox.109c36d2.js.map +1 -0
- package/dist/chunks/{dropdown.c05678d0.js → dropdown.fd93f0ce.js} +351 -335
- package/dist/chunks/dropdown.fd93f0ce.js.map +1 -0
- package/dist/chunks/error-message.3b3c33d4.js +47 -0
- package/dist/chunks/error-message.3b3c33d4.js.map +1 -0
- package/dist/chunks/{footer-actions.67642347.js → footer-actions.f02e8699.js} +23 -23
- package/dist/chunks/footer-actions.f02e8699.js.map +1 -0
- package/dist/chunks/get-slot-text.c1114034.js +9 -0
- package/dist/chunks/get-slot-text.c1114034.js.map +1 -0
- package/dist/chunks/{grid-layout.73f23b1b.js → grid-layout.b7e0d964.js} +2 -2
- package/dist/chunks/{grid-layout.73f23b1b.js.map → grid-layout.b7e0d964.js.map} +1 -1
- package/dist/chunks/{index.56858f4e.js → index.45295dd3.js} +23 -19
- package/dist/chunks/index.45295dd3.js.map +1 -0
- package/dist/chunks/{index.10aaf539.js → index.88ff49c2.js} +136 -142
- package/dist/chunks/index.88ff49c2.js.map +1 -0
- package/dist/chunks/{index.73d50fa6.js → index.9902cae4.js} +65 -68
- package/dist/chunks/{index.73d50fa6.js.map → index.9902cae4.js.map} +1 -1
- package/dist/chunks/{index.0cf00b47.js → index.bd734551.js} +35 -37
- package/dist/chunks/index.bd734551.js.map +1 -0
- package/dist/chunks/{index.133e4da0.js → index.c85a1ab9.js} +81 -79
- package/dist/chunks/{index.133e4da0.js.map → index.c85a1ab9.js.map} +1 -1
- package/dist/chunks/{index.f0f8ed98.js → index.c8f81673.js} +23 -26
- package/dist/chunks/index.c8f81673.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.8d6cccac.js → listbox-option-tag.ec42431b.js} +32 -36
- package/dist/chunks/listbox-option-tag.ec42431b.js.map +1 -0
- package/dist/chunks/{listbox.116ed0c1.js → listbox.e792d2d6.js} +244 -251
- package/dist/chunks/listbox.e792d2d6.js.map +1 -0
- package/dist/chunks/loading-button.429c8416.js +86 -0
- package/dist/chunks/loading-button.429c8416.js.map +1 -0
- package/dist/chunks/tabs.keys.358742f2.js +7 -0
- package/dist/chunks/tabs.keys.358742f2.js.map +1 -0
- package/dist/chunks/{tooltip.2aff4fa6.js → tooltip.a47ace87.js} +49 -52
- package/dist/chunks/tooltip.a47ace87.js.map +1 -0
- package/dist/chunks/use-default-slot-validator.cbdfe693.js +13 -0
- package/dist/chunks/use-default-slot-validator.cbdfe693.js.map +1 -0
- package/dist/chunks/use-has-slot.6052d56a.js +6 -0
- package/dist/chunks/use-has-slot.6052d56a.js.map +1 -0
- package/dist/code-snippet.js +469 -413
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +492 -494
- package/dist/country.js.map +1 -1
- package/dist/currency.js +32 -35
- package/dist/currency.js.map +1 -1
- package/dist/data-grid.js +595 -603
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +76 -80
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +37 -39
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +134 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/filter-bar.js +648 -638
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +64 -64
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +61 -63
- package/dist/header.js.map +1 -1
- package/dist/image.js +82 -0
- package/dist/image.js.map +1 -0
- package/dist/index.js +216 -205
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +99 -123
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +7 -7
- package/dist/link.js +27 -26
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +96 -104
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +111 -264
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +148 -145
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +16 -18
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +58 -54
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +13 -17
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +71 -72
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +54 -66
- package/dist/search-bar.js.map +1 -1
- package/dist/segmented-control.js +68 -55
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +65 -64
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +20 -23
- package/dist/status.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +110 -141
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +68 -60
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +23 -26
- package/dist/tag.js.map +1 -1
- package/dist/textarea.js +97 -96
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +125 -125
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +44 -48
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +54 -52
- package/dist/toggle.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +651 -397
- package/package.json +9 -12
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.types.d.ts +0 -8
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/index.d.ts +0 -1
- package/dist/assets/button-actions.css +0 -1
- package/dist/assets/chevron-down.css +0 -1
- package/dist/chunks/base-button.98379576.js.map +0 -1
- package/dist/chunks/button-actions.bd397c79.js +0 -104
- package/dist/chunks/button-actions.bd397c79.js.map +0 -1
- package/dist/chunks/button.d0c9527d.js.map +0 -1
- package/dist/chunks/calendar.0ae43a96.js.map +0 -1
- package/dist/chunks/checkbox.f8457c93.js +0 -164
- package/dist/chunks/checkbox.f8457c93.js.map +0 -1
- package/dist/chunks/chevron-down.b851a6da.js.map +0 -1
- package/dist/chunks/controls-group.b827382b.js.map +0 -1
- package/dist/chunks/copy.5a4cbd4d.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.819e43f7.js.map +0 -1
- package/dist/chunks/dropdown.c05678d0.js.map +0 -1
- package/dist/chunks/error-message.0433b539.js +0 -47
- package/dist/chunks/error-message.0433b539.js.map +0 -1
- package/dist/chunks/footer-actions.67642347.js.map +0 -1
- package/dist/chunks/get-slot-text.e5c766d0.js +0 -9
- package/dist/chunks/get-slot-text.e5c766d0.js.map +0 -1
- package/dist/chunks/index.0cf00b47.js.map +0 -1
- package/dist/chunks/index.10aaf539.js.map +0 -1
- package/dist/chunks/index.56858f4e.js.map +0 -1
- package/dist/chunks/index.f0f8ed98.js.map +0 -1
- package/dist/chunks/listbox-option-tag.8d6cccac.js.map +0 -1
- package/dist/chunks/listbox.116ed0c1.js.map +0 -1
- package/dist/chunks/loading-button.1c201f87.js +0 -84
- package/dist/chunks/loading-button.1c201f87.js.map +0 -1
- package/dist/chunks/tooltip.2aff4fa6.js.map +0 -1
- package/dist/chunks/use-default-slot-validator.83d977a1.js +0 -11
- package/dist/chunks/use-default-slot-validator.83d977a1.js.map +0 -1
- package/dist/chunks/use-has-slot.068222e6.js +0 -5
- package/dist/chunks/use-has-slot.068222e6.js.map +0 -1
package/dist/focus-trap.js
CHANGED
package/dist/form-layout.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as _, useSlots as
|
|
2
|
-
import { BentoAlert as
|
|
3
|
-
import { u as
|
|
4
|
-
import { F as
|
|
1
|
+
import { defineComponent as _, useSlots as i, computed as n, provide as y, toRef as f, onMounted as v, ref as g } from "vue";
|
|
2
|
+
import { BentoAlert as p } from "./alert.js";
|
|
3
|
+
import { u as m } from "./chunks/use-has-slot.6052d56a.js";
|
|
4
|
+
import { F as b } from "./chunks/form-layout.types.a7a1438d.js";
|
|
5
5
|
import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
|
-
import { B as u,
|
|
7
|
-
import "./assets/
|
|
8
|
-
const
|
|
9
|
-
...
|
|
6
|
+
import { B as u, c as L } from "./chunks/index.45295dd3.js";
|
|
7
|
+
import "./assets/index23.css";
|
|
8
|
+
const h = {}, $ = /* @__PURE__ */ _({
|
|
9
|
+
...h,
|
|
10
10
|
__name: "form-layout",
|
|
11
11
|
props: {
|
|
12
12
|
/**
|
|
@@ -19,61 +19,61 @@ const C = {}, $ = /* @__PURE__ */ _({
|
|
|
19
19
|
*/
|
|
20
20
|
loading: { type: Boolean, default: !1 }
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const t =
|
|
24
|
-
return
|
|
22
|
+
setup(o) {
|
|
23
|
+
const t = o, e = i(), s = m(e), r = n(() => t.form ? "form" : "div"), a = n(() => s("actions-left") || s("actions-right"));
|
|
24
|
+
return y(b, f(t, "loading")), { __sfc: !0, slots: e, hasSlot: s, props: t, formLayoutElement: r, hasActions: a, BentoAlert: p };
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
var
|
|
28
|
-
var t = this, e = t._self._c,
|
|
29
|
-
return e(
|
|
27
|
+
var C = function() {
|
|
28
|
+
var t = this, e = t._self._c, s = t._self._setupProxy;
|
|
29
|
+
return e(s.formLayoutElement, { tag: "component", staticClass: "b-form-layout", attrs: { role: "form" } }, [s.hasSlot("error-message") ? e(s.BentoAlert, { staticClass: "b-form-layout__error-message", attrs: { type: "critical" }, scopedSlots: t._u([{ key: "description", fn: function() {
|
|
30
30
|
return [t._t("error-message")];
|
|
31
|
-
}, proxy: !0 }], null, !0) }) : t._e(), t._t("default"),
|
|
32
|
-
}, x = [],
|
|
31
|
+
}, proxy: !0 }], null, !0) }) : t._e(), t._t("default"), s.hasActions ? e("div", { staticClass: "b-form-layout__actions-container" }, [e("div", { staticClass: "b-form-layout__actions" }, [t._t("actions-left")], 2), e("div", { staticClass: "b-form-layout__actions" }, [t._t("actions-right")], 2)]) : t._e()], 2);
|
|
32
|
+
}, x = [], B = /* @__PURE__ */ l(
|
|
33
33
|
$,
|
|
34
|
-
|
|
34
|
+
C,
|
|
35
35
|
x,
|
|
36
36
|
!1,
|
|
37
37
|
null,
|
|
38
|
-
"
|
|
38
|
+
"178aebc7",
|
|
39
39
|
null,
|
|
40
40
|
null
|
|
41
41
|
);
|
|
42
|
-
const
|
|
43
|
-
...
|
|
42
|
+
const U = B.exports, F = {}, S = /* @__PURE__ */ _({
|
|
43
|
+
...F,
|
|
44
44
|
__name: "form-layout-field-tip",
|
|
45
|
-
setup(
|
|
46
|
-
return { __sfc: !0, BentoAlert:
|
|
45
|
+
setup(o) {
|
|
46
|
+
return { __sfc: !0, BentoAlert: p };
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
var
|
|
50
|
-
var t = this, e = t._self._c,
|
|
51
|
-
return e("div", { staticClass: "b-form-layout-field-tip" }, [t._t("default"), e(
|
|
49
|
+
var T = function() {
|
|
50
|
+
var t = this, e = t._self._c, s = t._self._setupProxy;
|
|
51
|
+
return e("div", { staticClass: "b-form-layout-field-tip" }, [t._t("default"), e(s.BentoAlert, { attrs: { variant: "tip", type: "warning" }, scopedSlots: t._u([{ key: "description", fn: function() {
|
|
52
52
|
return [t._t("message")];
|
|
53
53
|
}, proxy: !0 }], null, !0) })], 2);
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
}, A = [], E = /* @__PURE__ */ l(
|
|
55
|
+
S,
|
|
56
|
+
T,
|
|
57
|
+
A,
|
|
58
58
|
!1,
|
|
59
59
|
null,
|
|
60
|
-
"
|
|
60
|
+
"f5604b8a",
|
|
61
61
|
null,
|
|
62
62
|
null
|
|
63
63
|
);
|
|
64
|
-
const
|
|
64
|
+
const V = E.exports, G = (o, t) => {
|
|
65
65
|
const e = (r) => {
|
|
66
|
-
var
|
|
67
|
-
return (
|
|
68
|
-
},
|
|
69
|
-
|
|
66
|
+
var a;
|
|
67
|
+
return (a = r.split) == null ? void 0 : a.call(r, "-").map((c) => parseInt(c, 10));
|
|
68
|
+
}, s = n(() => e(o.value));
|
|
69
|
+
v(() => {
|
|
70
70
|
const r = t.value.classList[0];
|
|
71
|
-
t.value.querySelectorAll(`.${r} > *`).forEach((c,
|
|
72
|
-
c.classList.add(`${r}--${
|
|
71
|
+
t.value.querySelectorAll(`.${r} > *`).forEach((c, d) => {
|
|
72
|
+
c.classList.add(`${r}--${s.value[d] || "100"}`);
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
|
-
},
|
|
76
|
-
...
|
|
75
|
+
}, O = {}, P = /* @__PURE__ */ _({
|
|
76
|
+
...O,
|
|
77
77
|
__name: "form-layout-group",
|
|
78
78
|
props: {
|
|
79
79
|
/**
|
|
@@ -103,26 +103,26 @@ const X = G.exports, N = (s, t) => {
|
|
|
103
103
|
default: "100"
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
-
setup(
|
|
107
|
-
const t =
|
|
108
|
-
return
|
|
106
|
+
setup(o) {
|
|
107
|
+
const t = o, e = g(null);
|
|
108
|
+
return G(f(t, "layout"), e), { __sfc: !0, props: t, formLayoutGroup: e };
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
var
|
|
111
|
+
var R = function() {
|
|
112
112
|
var t = this, e = t._self._c;
|
|
113
113
|
return t._self._setupProxy, e("div", { ref: "formLayoutGroup", staticClass: "b-form-layout-group" }, [t._t("default")], 2);
|
|
114
|
-
},
|
|
114
|
+
}, I = [], N = /* @__PURE__ */ l(
|
|
115
|
+
P,
|
|
115
116
|
R,
|
|
116
|
-
|
|
117
|
-
k,
|
|
117
|
+
I,
|
|
118
118
|
!1,
|
|
119
119
|
null,
|
|
120
120
|
"4153ff3c",
|
|
121
121
|
null,
|
|
122
122
|
null
|
|
123
123
|
);
|
|
124
|
-
const
|
|
125
|
-
...
|
|
124
|
+
const Q = N.exports, k = {}, q = /* @__PURE__ */ _({
|
|
125
|
+
...k,
|
|
126
126
|
__name: "form-layout-title",
|
|
127
127
|
props: {
|
|
128
128
|
/**
|
|
@@ -141,34 +141,34 @@ const Z = q.exports, M = {}, Y = /* @__PURE__ */ _({
|
|
|
141
141
|
el: {
|
|
142
142
|
type: u.props.el.type,
|
|
143
143
|
required: !0,
|
|
144
|
-
validator: (
|
|
144
|
+
validator: (o) => Object.values(L).includes(o)
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
|
-
setup(
|
|
148
|
-
const t =
|
|
147
|
+
setup(o) {
|
|
148
|
+
const t = o, e = i(), s = n(() => !t.subsection), r = m(e), a = n(() => ({
|
|
149
149
|
"b-form-layout-title--subsection": t.subsection
|
|
150
150
|
}));
|
|
151
|
-
return { __sfc: !0, slots: e, props: t, isSection:
|
|
151
|
+
return { __sfc: !0, slots: e, props: t, isSection: s, hasSlot: r, conditionalClasses: a, BentoTypography: u };
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
var
|
|
155
|
-
var t = this, e = t._self._c,
|
|
156
|
-
return e("div", { staticClass: "b-form-layout-title", class:
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
j,
|
|
154
|
+
var w = function() {
|
|
155
|
+
var t = this, e = t._self._c, s = t._self._setupProxy;
|
|
156
|
+
return e("div", { staticClass: "b-form-layout-title", class: s.conditionalClasses }, [e(s.BentoTypography, { attrs: { el: t.el, variant: "title", medium: s.isSection } }, [t._t("default")], 2), s.hasSlot("description") ? e(s.BentoTypography, { staticClass: "b-form-layout-title__description", attrs: { el: "span", wide: "" } }, [t._t("description")], 2) : t._e()], 1);
|
|
157
|
+
}, M = [], Y = /* @__PURE__ */ l(
|
|
158
|
+
q,
|
|
160
159
|
w,
|
|
160
|
+
M,
|
|
161
161
|
!1,
|
|
162
162
|
null,
|
|
163
|
-
"
|
|
163
|
+
"03648a9d",
|
|
164
164
|
null,
|
|
165
165
|
null
|
|
166
166
|
);
|
|
167
|
-
const
|
|
167
|
+
const W = Y.exports;
|
|
168
168
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
U as BentoFormLayout,
|
|
170
|
+
V as BentoFormLayoutFieldTip,
|
|
171
|
+
Q as BentoFormLayoutGroup,
|
|
172
|
+
W as BentoFormLayoutTitle
|
|
173
173
|
};
|
|
174
174
|
//# sourceMappingURL=form-layout.js.map
|
package/dist/form-layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-layout.js","sources":["../src/components/form-layout/form-layout.vue","../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\">\n <bento-alert\n v-if=\"hasSlot('error-message')\"\n class=\"b-form-layout__error-message\"\n :type=\"BentoAlertTypeOption.CRITICAL\"\n >\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert, BentoAlertTypeOption } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert :variant=\"BentoAlertVariant.TIP\" :type=\"BentoAlertTypeOption.WARNING\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoAlert, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert';\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","import { computed, onMounted, Ref } from 'vue';\nimport { BentoLayoutGroupProportions } from '../form-layout-group.types';\n\n/**\n * Calculates the CSS classes based on the percentage\n * for each one of the layouts in format `##-##` or `##`.\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoLayoutGroupProportions>} layoutProp Layout string in the format `##` or `##-##`\n * @param {Ref<HTMLElement>} formLayoutGroupRef Reference to an HTML element of type BentoFormLayoutGroup\n */\nexport const useFormLayoutGroupPercentage = (\n layoutProp: Ref<BentoLayoutGroupProportions>,\n formLayoutGroupRef: Ref<HTMLElement>\n) => {\n // Split the `##-##` format into individual values [##, ##]\n const getLayoutValues = layout => layout.split?.('-').map(value => parseInt(value, 10));\n const layout = computed(() => getLayoutValues(layoutProp.value));\n\n onMounted(() => {\n // Apply class to every immediate child\n const layoutClassName = formLayoutGroupRef.value.classList[0];\n const immediateChildren = formLayoutGroupRef.value.querySelectorAll(`.${layoutClassName} > *`); // Get immediate children\n immediateChildren.forEach((child, index) => {\n child.classList.add(`${layoutClassName}--${layout.value[index] || '100'}`); // 100% default\n });\n });\n};\n","<template>\n <div ref=\"formLayoutGroup\" class=\"b-form-layout-group\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineProps, PropType, ref, toRef } from 'vue';\n import { useFormLayoutGroupPercentage } from './composable/use-form-layout-group-percentage';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n },\n });\n\n const formLayoutGroup = ref(null);\n useFormLayoutGroupPercentage(toRef(props, 'layout'), formLayoutGroup);\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" :variant=\"BentoTypographyVariant.TITLE\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-form-layout-title__description\"\n :el=\"BentoTypographyElement.SPAN\"\n wide\n >\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * An element of type @see BentoTypographyElement must always be provided\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection :el=\"BentoTypographyElement.H2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","__default__$2","useFormLayoutGroupPercentage","layoutProp","formLayoutGroupRef","getLayoutValues","layout2","_a","value","layout","onMounted","layoutClassName","child","index","__default__$1","formLayoutGroup","ref","__default__","isSection","conditionalClasses"],"mappings":";;;;;;;AA0FI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;qBCbAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;qBCzBSC,IAAA,CAAAC,GAAAC,MAAA;AAKT,QAAAC,IAAA,CAAAC,MAAA;;AAAA,YAAAC,IAAAD,EAAA,UAAA,gBAAAC,EAAA,KAAAD,GAAA,KAAA,IAAA,CAAAE,MAAA,SAAAA,GAAA,EAAA;AAAA,KACAC,IAAAd,EAAA,MAAAU,EAAAF,EAAA,KAAA,CAAA;AAEA,EAAAO,EAAA,MAAA;AAEI,UAAAC,IAAAP,EAAA,MAAA,UAAA,CAAA;AAEA,IADAA,EAAA,MAAA,iBAAA,IAAAO,OAAA,EACA,QAAA,CAAAC,GAAAC,MAAA;AACI,MAAAD,EAAA,UAAA,IAAA,GAAAD,MAAAF,EAAA,MAAAI,CAAA,KAAA,OAAA;AAAA,IAAyE,CAAA;AAAA,EAC5E,CAAA;AAET,GCoCIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzBAC,IAAAC,EAAA,IAAA;AACA,WAAAd,EAAAF,EAAAJ,GAAA,QAAA,GAAAmB,CAAA;;;;;;;;;;;;;;;;qBCoCAE,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDA3B,IAAAC,EAAA,GAyBA2B,IAAAvB,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACA6B,IAAAxB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"form-layout.js","sources":["../src/components/form-layout/form-layout.vue","../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../src/components/form-layout/components/form-layout-group/composable/use-form-layout-group-percentage.ts","../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\">\n <bento-alert v-if=\"hasSlot('error-message')\" class=\"b-form-layout__error-message\" type=\"critical\">\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert variant=\"tip\" type=\"warning\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoAlert } from '@/components/alert';\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","import { computed, onMounted, Ref } from 'vue';\nimport { BentoLayoutGroupProportions } from '../form-layout-group.types';\n\n/**\n * Calculates the CSS classes based on the percentage\n * for each one of the layouts in format `##-##` or `##`.\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoLayoutGroupProportions>} layoutProp Layout string in the format `##` or `##-##`\n * @param {Ref<HTMLElement>} formLayoutGroupRef Reference to an HTML element of type BentoFormLayoutGroup\n */\nexport const useFormLayoutGroupPercentage = (\n layoutProp: Ref<BentoLayoutGroupProportions>,\n formLayoutGroupRef: Ref<HTMLElement>\n) => {\n // Split the `##-##` format into individual values [##, ##]\n const getLayoutValues = layout => layout.split?.('-').map(value => parseInt(value, 10));\n const layout = computed(() => getLayoutValues(layoutProp.value));\n\n onMounted(() => {\n // Apply class to every immediate child\n const layoutClassName = formLayoutGroupRef.value.classList[0];\n const immediateChildren = formLayoutGroupRef.value.querySelectorAll(`.${layoutClassName} > *`); // Get immediate children\n immediateChildren.forEach((child, index) => {\n child.classList.add(`${layoutClassName}--${layout.value[index] || '100'}`); // 100% default\n });\n });\n};\n","<template>\n <div ref=\"formLayoutGroup\" class=\"b-form-layout-group\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { defineProps, PropType, ref, toRef } from 'vue';\n import { useFormLayoutGroupPercentage } from './composable/use-form-layout-group-percentage';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n },\n });\n\n const formLayoutGroup = ref(null);\n useFormLayoutGroupPercentage(toRef(props, 'layout'), formLayoutGroup);\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" variant=\"title\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-form-layout-title__description\" el=\"span\" wide>\n <slot name=\"description\" />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organise related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * One of the values provided in @see BentoTypographyElement must always be provided as a string\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection el=\"h2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","__default__$2","useFormLayoutGroupPercentage","layoutProp","formLayoutGroupRef","getLayoutValues","layout2","_a","value","layout","onMounted","layoutClassName","child","index","__default__$1","formLayoutGroup","ref","__default__","isSection","conditionalClasses"],"mappings":";;;;;;;AAsFI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;iBA1DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAeAI,IAAAC,EAAA,MAAAC,EAAA,OAAA,SAAA,KAAA,GACAC,IAAAF,EAAA,MAAAH,EAAA,cAAA,KAAAA,EAAA,eAAA,CAAA;AAEA,WAAAM,EAAAC,GAAAC,EAAAJ,GAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;qBCTAK,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;qBCzBSC,IAAA,CAAAC,GAAAC,MAAA;AAKT,QAAAC,IAAA,CAAAC,MAAA;;AAAA,YAAAC,IAAAD,EAAA,UAAA,gBAAAC,EAAA,KAAAD,GAAA,KAAA,IAAA,CAAAE,MAAA,SAAAA,GAAA,EAAA;AAAA,KACAC,IAAAd,EAAA,MAAAU,EAAAF,EAAA,KAAA,CAAA;AAEA,EAAAO,EAAA,MAAA;AAEI,UAAAC,IAAAP,EAAA,MAAA,UAAA,CAAA;AAEA,IADAA,EAAA,MAAA,iBAAA,IAAAO,OAAA,EACA,QAAA,CAAAC,GAAAC,MAAA;AACI,MAAAD,EAAA,UAAA,IAAA,GAAAD,MAAAF,EAAA,MAAAI,CAAA,KAAA,OAAA;AAAA,IAAyE,CAAA;AAAA,EAC5E,CAAA;AAET,GCoCIC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzBAC,IAAAC,EAAA,IAAA;AACA,WAAAd,EAAAF,EAAAJ,GAAA,QAAA,GAAAmB,CAAA;;;;;;;;;;;;;;;;qBC+BAE,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;iBAvDA3B,IAAAC,EAAA,GAyBA2B,IAAAvB,EAAA,MAAA,CAAAC,EAAA,UAAA,GACAJ,IAAAC,EAAAH,CAAA,GACA6B,IAAAxB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;;;"}
|
package/dist/header.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { BentoInfoIcon as
|
|
3
|
-
import { u as
|
|
4
|
-
import { B as
|
|
1
|
+
import { defineComponent as O, computed as M } from "vue";
|
|
2
|
+
import { BentoInfoIcon as E } from "./info-icon.js";
|
|
3
|
+
import { u as A } from "./chunks/use-has-slot.6052d56a.js";
|
|
4
|
+
import { B as C, c as T, a as U } from "./chunks/index.45295dd3.js";
|
|
5
5
|
import { u as X } from "./chunks/i18n.155748d6.js";
|
|
6
|
-
import { c as p, a as
|
|
7
|
-
import { r as u, t as s, e as _, g as
|
|
8
|
-
import { e as
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import "./assets/
|
|
6
|
+
import { c as p, a as H } from "./chunks/index.86453263.js";
|
|
7
|
+
import { r as u, t as s, e as _, g as D, d as R, f as Y } from "./chunks/index.f55fdc32.js";
|
|
8
|
+
import { e as w } from "./chunks/index.fdf12170.js";
|
|
9
|
+
import { BentoButtonActions as P } from "./button.js";
|
|
10
|
+
import { n as B } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
11
|
+
import "./assets/index26.css";
|
|
12
12
|
function F(t, e) {
|
|
13
13
|
u(2, arguments);
|
|
14
|
-
var a = s(t), n = s(e),
|
|
15
|
-
return
|
|
14
|
+
var a = s(t), n = s(e), l = a.getFullYear() - n.getFullYear(), r = a.getMonth() - n.getMonth();
|
|
15
|
+
return l * 12 + r;
|
|
16
16
|
}
|
|
17
17
|
function G(t, e) {
|
|
18
18
|
return u(2, arguments), s(t).getTime() - s(e).getTime();
|
|
19
19
|
}
|
|
20
|
-
var
|
|
20
|
+
var b = {
|
|
21
21
|
ceil: Math.ceil,
|
|
22
22
|
round: Math.round,
|
|
23
23
|
floor: Math.floor,
|
|
@@ -27,7 +27,7 @@ var y = {
|
|
|
27
27
|
// Math.trunc is not supported by IE
|
|
28
28
|
}, L = "trunc";
|
|
29
29
|
function z(t) {
|
|
30
|
-
return t ?
|
|
30
|
+
return t ? b[t] : b[L];
|
|
31
31
|
}
|
|
32
32
|
function j(t) {
|
|
33
33
|
u(1, arguments);
|
|
@@ -37,81 +37,81 @@ function j(t) {
|
|
|
37
37
|
function q(t) {
|
|
38
38
|
u(1, arguments);
|
|
39
39
|
var e = s(t);
|
|
40
|
-
return
|
|
40
|
+
return w(e).getTime() === j(e).getTime();
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function W(t, e) {
|
|
43
43
|
u(2, arguments);
|
|
44
|
-
var a = s(t), n = s(e),
|
|
44
|
+
var a = s(t), n = s(e), l = p(a, n), r = Math.abs(F(a, n)), i;
|
|
45
45
|
if (r < 1)
|
|
46
46
|
i = 0;
|
|
47
47
|
else {
|
|
48
|
-
a.getMonth() === 1 && a.getDate() > 27 && a.setDate(30), a.setMonth(a.getMonth() -
|
|
49
|
-
var
|
|
50
|
-
q(s(t)) && r === 1 && p(t, n) === 1 && (
|
|
48
|
+
a.getMonth() === 1 && a.getDate() > 27 && a.setDate(30), a.setMonth(a.getMonth() - l * r);
|
|
49
|
+
var f = p(a, n) === -l;
|
|
50
|
+
q(s(t)) && r === 1 && p(t, n) === 1 && (f = !1), i = l * (r - Number(f));
|
|
51
51
|
}
|
|
52
52
|
return i === 0 ? 0 : i;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function k(t, e, a) {
|
|
55
55
|
u(2, arguments);
|
|
56
56
|
var n = G(t, e) / 1e3;
|
|
57
57
|
return z(a == null ? void 0 : a.roundingMethod)(n);
|
|
58
58
|
}
|
|
59
|
-
var
|
|
60
|
-
function
|
|
59
|
+
var y = 1440, J = 2520, h = 43200, K = 86400;
|
|
60
|
+
function Q(t, e) {
|
|
61
61
|
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
62
62
|
u(2, arguments);
|
|
63
63
|
var n = a.locale || _;
|
|
64
64
|
if (!n.formatDistance)
|
|
65
65
|
throw new RangeError("locale must contain formatDistance property");
|
|
66
|
-
var
|
|
67
|
-
if (isNaN(
|
|
66
|
+
var l = p(t, e);
|
|
67
|
+
if (isNaN(l))
|
|
68
68
|
throw new RangeError("Invalid time value");
|
|
69
|
-
var r =
|
|
70
|
-
r.addSuffix = !!a.addSuffix, r.comparison =
|
|
71
|
-
var i,
|
|
72
|
-
|
|
73
|
-
var c =
|
|
69
|
+
var r = H(a);
|
|
70
|
+
r.addSuffix = !!a.addSuffix, r.comparison = l;
|
|
71
|
+
var i, f;
|
|
72
|
+
l > 0 ? (i = s(e), f = s(t)) : (i = s(t), f = s(e));
|
|
73
|
+
var c = k(f, i), I = (D(f) - D(i)) / 1e3, o = Math.round((c - I) / 60), d;
|
|
74
74
|
if (o < 2)
|
|
75
75
|
return a.includeSeconds ? c < 5 ? n.formatDistance("lessThanXSeconds", 5, r) : c < 10 ? n.formatDistance("lessThanXSeconds", 10, r) : c < 20 ? n.formatDistance("lessThanXSeconds", 20, r) : c < 40 ? n.formatDistance("halfAMinute", null, r) : c < 60 ? n.formatDistance("lessThanXMinutes", 1, r) : n.formatDistance("xMinutes", 1, r) : o === 0 ? n.formatDistance("lessThanXMinutes", 1, r) : n.formatDistance("xMinutes", o, r);
|
|
76
76
|
if (o < 45)
|
|
77
77
|
return n.formatDistance("xMinutes", o, r);
|
|
78
78
|
if (o < 90)
|
|
79
79
|
return n.formatDistance("aboutXHours", 1, r);
|
|
80
|
-
if (o <
|
|
81
|
-
var
|
|
82
|
-
return n.formatDistance("aboutXHours",
|
|
80
|
+
if (o < y) {
|
|
81
|
+
var S = Math.round(o / 60);
|
|
82
|
+
return n.formatDistance("aboutXHours", S, r);
|
|
83
83
|
} else {
|
|
84
|
-
if (o <
|
|
84
|
+
if (o < J)
|
|
85
85
|
return n.formatDistance("xDays", 1, r);
|
|
86
|
-
if (o <
|
|
87
|
-
var
|
|
88
|
-
return n.formatDistance("xDays",
|
|
89
|
-
} else if (o <
|
|
90
|
-
return d = Math.round(o /
|
|
86
|
+
if (o < h) {
|
|
87
|
+
var N = Math.round(o / y);
|
|
88
|
+
return n.formatDistance("xDays", N, r);
|
|
89
|
+
} else if (o < K)
|
|
90
|
+
return d = Math.round(o / h), n.formatDistance("aboutXMonths", d, r);
|
|
91
91
|
}
|
|
92
|
-
if (d =
|
|
93
|
-
var
|
|
94
|
-
return n.formatDistance("xMonths",
|
|
92
|
+
if (d = W(f, i), d < 12) {
|
|
93
|
+
var x = Math.round(o / h);
|
|
94
|
+
return n.formatDistance("xMonths", x, r);
|
|
95
95
|
} else {
|
|
96
|
-
var
|
|
97
|
-
return
|
|
96
|
+
var g = d % 12, v = Math.floor(d / 12);
|
|
97
|
+
return g < 3 ? n.formatDistance("aboutXYears", v, r) : g < 9 ? n.formatDistance("overXYears", v, r) : n.formatDistance("almostXYears", v + 1, r);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
return u(1, arguments),
|
|
100
|
+
function V(t, e) {
|
|
101
|
+
return u(1, arguments), Q(t, Date.now(), e);
|
|
102
102
|
}
|
|
103
103
|
var m = /* @__PURE__ */ ((t) => (t.PAGE = "page", t.COMPONENT = "component", t))(m || {});
|
|
104
104
|
const Z = {
|
|
105
105
|
"en-US": {
|
|
106
106
|
lastUpdated: "Last updated: {date} ago"
|
|
107
107
|
}
|
|
108
|
-
}, $ =
|
|
108
|
+
}, $ = O({
|
|
109
109
|
i18n: { messages: Z },
|
|
110
110
|
name: "bento-header",
|
|
111
111
|
components: {
|
|
112
|
-
BentoTypography:
|
|
113
|
-
BentoButtonActions:
|
|
114
|
-
BentoInfoIcon:
|
|
112
|
+
BentoTypography: C,
|
|
113
|
+
BentoButtonActions: P,
|
|
114
|
+
BentoInfoIcon: E
|
|
115
115
|
},
|
|
116
116
|
props: {
|
|
117
117
|
/**
|
|
@@ -144,37 +144,35 @@ const Z = {
|
|
|
144
144
|
lastUpdated: { type: [Date, Number], default: null }
|
|
145
145
|
},
|
|
146
146
|
setup(t, { slots: e }) {
|
|
147
|
-
const { t: a, locale: n } = X(),
|
|
148
|
-
el: t.variant === m.PAGE ?
|
|
149
|
-
variant:
|
|
147
|
+
const { t: a, locale: n } = X(), l = { de: R, enUS: _, fr: Y }, r = M(() => ({
|
|
148
|
+
el: t.variant === m.PAGE ? T.H1 : T.H2,
|
|
149
|
+
variant: U.TITLE,
|
|
150
150
|
medium: t.variant === m.COMPONENT,
|
|
151
151
|
large: t.variant === m.PAGE
|
|
152
|
-
})), i =
|
|
152
|
+
})), i = M(
|
|
153
153
|
() => t.lastUpdated ? a("lastUpdated", {
|
|
154
|
-
date:
|
|
155
|
-
locale:
|
|
154
|
+
date: V(t.lastUpdated, {
|
|
155
|
+
locale: l[n.value.substring(0, 2)] || _
|
|
156
156
|
})
|
|
157
157
|
}) : null
|
|
158
158
|
);
|
|
159
159
|
return {
|
|
160
|
-
hasSlot:
|
|
160
|
+
hasSlot: A(e),
|
|
161
161
|
timestamp: i,
|
|
162
|
-
typography: r
|
|
163
|
-
BentoTypographyElement: v,
|
|
164
|
-
BentoTypographyVariant: D
|
|
162
|
+
typography: r
|
|
165
163
|
};
|
|
166
164
|
}
|
|
167
165
|
});
|
|
168
166
|
var ee = function() {
|
|
169
167
|
var e = this, a = e._self._c;
|
|
170
|
-
return e._self._setupProxy, a("div", { staticClass: "b-header" }, [a("div", { staticClass: "b-header__wrapper" }, [a("div", { staticClass: "b-header__title" }, [a("div", [a("bento-typography", e._b({ staticClass: "b-header__text" }, "bento-typography", e.typography, !1), [e._v(e._s(e.title))]), e.infoIconTooltipText ? a("bento-info-icon", { staticClass: "b-header__tooltip", attrs: { "tooltip-text": e.infoIconTooltipText } }) : e._e()], 1), e.lastUpdated ? a("bento-typography", { staticClass: "b-header__timestamp", attrs: { el:
|
|
171
|
-
}, te = [], ae = /* @__PURE__ */
|
|
168
|
+
return e._self._setupProxy, a("div", { staticClass: "b-header" }, [a("div", { staticClass: "b-header__wrapper" }, [a("div", { staticClass: "b-header__title" }, [a("div", [a("bento-typography", e._b({ staticClass: "b-header__text" }, "bento-typography", e.typography, !1), [e._v(e._s(e.title))]), e.infoIconTooltipText ? a("bento-info-icon", { staticClass: "b-header__tooltip", attrs: { "tooltip-text": e.infoIconTooltipText } }) : e._e()], 1), e.lastUpdated ? a("bento-typography", { staticClass: "b-header__timestamp", attrs: { el: "div", variant: "caption" } }, [e._v(" " + e._s(e.timestamp) + " ")]) : e._e()], 1), e.actions ? a("bento-button-actions", { staticClass: "b-header__actions", attrs: { actions: e.actions } }) : e._e()], 1)]);
|
|
169
|
+
}, te = [], ae = /* @__PURE__ */ B(
|
|
172
170
|
$,
|
|
173
171
|
ee,
|
|
174
172
|
te,
|
|
175
173
|
!1,
|
|
176
174
|
null,
|
|
177
|
-
"
|
|
175
|
+
"5fa92771",
|
|
178
176
|
null,
|
|
179
177
|
null
|
|
180
178
|
);
|