@adyen/bento-vue2 1.6.1 → 1.7.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 +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +43 -0
- package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +290 -281
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +53 -70
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +20 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +20 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +45 -27
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +24 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +234 -12
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
- 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.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
- 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/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +94 -8
- package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -3
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +226 -0
- package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
- package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
- package/dist/accordion.js +41 -32
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +191 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.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/checkmark.css +1 -0
- package/dist/assets/chevron-left.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -0
- 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/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -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.css +1 -1
- package/dist/assets/refresh.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +21 -14
- package/dist/button.js.map +1 -1
- package/dist/card.js +54 -54
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.d1ba66cd.js → base-button.7886a7e6.js} +2 -2
- package/dist/chunks/{base-button.d1ba66cd.js.map → base-button.7886a7e6.js.map} +1 -1
- package/dist/chunks/{base-modal.ec74044e.js → base-modal.88e7b9d4.js} +4 -4
- package/dist/chunks/{base-modal.ec74044e.js.map → base-modal.88e7b9d4.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.a5413243.js +105 -0
- package/dist/chunks/button-actions-with-menu.a5413243.js.map +1 -0
- package/dist/chunks/button.e09d5980.js +125 -0
- package/dist/chunks/button.e09d5980.js.map +1 -0
- package/dist/chunks/{calendar.b74f8a0f.js → calendar.24d0ac04.js} +294 -272
- package/dist/chunks/calendar.24d0ac04.js.map +1 -0
- package/dist/chunks/{checkbox.96ee3f71.js → checkbox.5343e28e.js} +7 -7
- package/dist/chunks/{checkbox.96ee3f71.js.map → checkbox.5343e28e.js.map} +1 -1
- package/dist/chunks/checkmark.78f3ed9c.js +26 -0
- package/dist/chunks/checkmark.78f3ed9c.js.map +1 -0
- package/dist/chunks/{chevron-right.3b826337.js → chevron-left.c10778d3.js} +8 -8
- package/dist/chunks/chevron-left.c10778d3.js.map +1 -0
- package/dist/chunks/{controls-group.e9537e45.js → controls-group.2a21bd83.js} +2 -2
- package/dist/chunks/{controls-group.e9537e45.js.map → controls-group.2a21bd83.js.map} +1 -1
- package/dist/chunks/{copy.2ff56819.js → copy.346eadb1.js} +4 -4
- package/dist/chunks/{copy.2ff56819.js.map → copy.346eadb1.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.3df0bf23.js → dropdown-default-textbox.25134789.js} +4 -4
- package/dist/chunks/dropdown-default-textbox.25134789.js.map +1 -0
- package/dist/chunks/{dropdown.3f198167.js → dropdown.f1253a54.js} +111 -81
- package/dist/chunks/dropdown.f1253a54.js.map +1 -0
- package/dist/chunks/{error-message.f5454f19.js → error-message.8302a46c.js} +2 -2
- package/dist/chunks/{error-message.f5454f19.js.map → error-message.8302a46c.js.map} +1 -1
- package/dist/chunks/fixed-scroller.8994e30a.js +108 -0
- package/dist/chunks/fixed-scroller.8994e30a.js.map +1 -0
- package/dist/chunks/{footer-actions.00d20947.js → footer-actions.c9b2cb74.js} +3 -3
- package/dist/chunks/{footer-actions.00d20947.js.map → footer-actions.c9b2cb74.js.map} +1 -1
- package/dist/chunks/{index.c39c64c9.js → index.2625175a.js} +2 -2
- package/dist/chunks/{index.c39c64c9.js.map → index.2625175a.js.map} +1 -1
- package/dist/chunks/index.37283390.js +475 -0
- package/dist/chunks/index.37283390.js.map +1 -0
- package/dist/chunks/index.8ac70774.js +1328 -0
- package/dist/chunks/index.8ac70774.js.map +1 -0
- package/dist/chunks/{index.2fce7703.js → index.965ac1af.js} +2 -2
- package/dist/chunks/{index.2fce7703.js.map → index.965ac1af.js.map} +1 -1
- package/dist/chunks/{index.eb52e785.js → index.a201f750.js} +6 -5
- package/dist/chunks/{index.eb52e785.js.map → index.a201f750.js.map} +1 -1
- package/dist/chunks/{index.a709a6b0.js → index.b83f8b7e.js} +2 -2
- package/dist/chunks/{index.a709a6b0.js.map → index.b83f8b7e.js.map} +1 -1
- package/dist/chunks/{index.298f5eed.js → index.d6b5f5e1.js} +6 -6
- package/dist/chunks/{index.298f5eed.js.map → index.d6b5f5e1.js.map} +1 -1
- package/dist/chunks/{index.31949c1a.js → index.e566354f.js} +91 -74
- package/dist/chunks/index.e566354f.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.1362a2d7.js → listbox-option-tag.6a09e8e2.js} +8 -7
- package/dist/chunks/{listbox-option-tag.1362a2d7.js.map → listbox-option-tag.6a09e8e2.js.map} +1 -1
- package/dist/chunks/{listbox.e7bf46e4.js → listbox.73c38f38.js} +479 -385
- package/dist/chunks/listbox.73c38f38.js.map +1 -0
- package/dist/chunks/{loading-button.0ad06c99.js → loading-button.c65682d6.js} +2 -2
- package/dist/chunks/{loading-button.0ad06c99.js.map → loading-button.c65682d6.js.map} +1 -1
- package/dist/chunks/refresh.eb485c6f.js +26 -0
- package/dist/chunks/refresh.eb485c6f.js.map +1 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
- package/dist/chunks/{tooltip.68e81e9c.js → tooltip.104e5fac.js} +39 -36
- package/dist/chunks/{tooltip.68e81e9c.js.map → tooltip.104e5fac.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +537 -528
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +10 -10
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +99 -89
- 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 +4 -4
- package/dist/empty-state.js +8 -7
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +500 -486
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +104 -183
- package/dist/header.js.map +1 -1
- package/dist/image.js +3 -3
- package/dist/index.js +171 -169
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +7 -7
- package/dist/internal.js +20 -106
- package/dist/internal.js.map +1 -1
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +3 -466
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +3 -3
- package/dist/pagination.js +40 -26
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +33 -26
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +4 -4
- package/dist/popper-container.js +6 -1270
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +97 -81
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +100 -70
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +53 -51
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +109 -119
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +81 -71
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +170 -162
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +6 -6
- package/dist/tutorial.js +307 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/web-types.json +828 -122
- package/package.json +7 -4
- package/dist/assets/chevron-right.css +0 -1
- package/dist/chunks/button.eb60d460.js +0 -117
- package/dist/chunks/button.eb60d460.js.map +0 -1
- package/dist/chunks/calendar.b74f8a0f.js.map +0 -1
- package/dist/chunks/chevron-right.3b826337.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.3df0bf23.js.map +0 -1
- package/dist/chunks/dropdown.3f198167.js.map +0 -1
- package/dist/chunks/index.31949c1a.js.map +0 -1
- package/dist/chunks/listbox.e7bf46e4.js.map +0 -1
package/dist/accordion.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as p, provide as C, toRef as h, ref as
|
|
1
|
+
import { defineComponent as p, provide as C, toRef as h, ref as l, inject as y, computed as g, watch as _ } from "vue";
|
|
2
2
|
import { n as u } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
3
|
-
import { B as x } from "./chunks/index.
|
|
4
|
-
import { C as
|
|
5
|
-
import { g as
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { B as x } from "./chunks/index.965ac1af.js";
|
|
4
|
+
import { C as O, a as T } from "./chunks/chevron-up.674ec2e5.js";
|
|
5
|
+
import { g as d } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
+
import { o as E } from "./chunks/resize.a041304d.js";
|
|
7
|
+
import { u as N } from "./chunks/use-expandable-content-height.62fc84e5.js";
|
|
8
|
+
import "./assets/index13.css";
|
|
9
|
+
const m = Symbol("accordion title size injection key"), S = {}, z = /* @__PURE__ */ p({
|
|
10
|
+
...S,
|
|
10
11
|
__name: "accordion",
|
|
11
12
|
props: {
|
|
12
13
|
/**
|
|
@@ -18,26 +19,26 @@ const m = Symbol("accordion title size injection key"), E = {}, S = /* @__PURE__
|
|
|
18
19
|
default: "default"
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const e =
|
|
22
|
+
setup(i) {
|
|
23
|
+
const e = i;
|
|
23
24
|
return C(m, h(e, "titleSize")), { __sfc: !0, props: e };
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
|
-
var
|
|
27
|
+
var A = function() {
|
|
27
28
|
var e = this, n = e._self._c;
|
|
28
29
|
return e._self._setupProxy, n("div", { staticClass: "b-accordion" }, [e._t("default")], 2);
|
|
29
|
-
},
|
|
30
|
-
S,
|
|
30
|
+
}, B = [], $ = /* @__PURE__ */ u(
|
|
31
31
|
z,
|
|
32
32
|
A,
|
|
33
|
+
B,
|
|
33
34
|
!1,
|
|
34
35
|
null,
|
|
35
36
|
"fb182a1c",
|
|
36
37
|
null,
|
|
37
38
|
null
|
|
38
39
|
);
|
|
39
|
-
const
|
|
40
|
-
|
|
40
|
+
const K = $.exports, R = {}, D = /* @__PURE__ */ p({
|
|
41
|
+
...R,
|
|
41
42
|
__name: "accordion-item",
|
|
42
43
|
props: {
|
|
43
44
|
/**
|
|
@@ -56,40 +57,48 @@ const q = B.exports, $ = {}, R = /* @__PURE__ */ p({
|
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
emits: ["update:is-expanded"],
|
|
59
|
-
setup(
|
|
60
|
-
const n =
|
|
61
|
-
return
|
|
60
|
+
setup(i, { emit: e }) {
|
|
61
|
+
const n = i, t = "b-accordion-item__animation--content", o = l(null), s = l(n.isExpanded), f = d("accordionItemButton"), v = d("accordionItemContent"), I = y(m, "default"), { updateContentHeight: c, contentHeight: r } = N(o, s), b = g(() => r.value ? { "max-height": r.value } : {});
|
|
62
|
+
return _(
|
|
62
63
|
() => n.isExpanded,
|
|
63
|
-
(
|
|
64
|
-
s.value =
|
|
64
|
+
(a) => {
|
|
65
|
+
s.value = a;
|
|
65
66
|
}
|
|
66
|
-
),
|
|
67
|
+
), _(
|
|
68
|
+
() => o.value,
|
|
69
|
+
() => {
|
|
70
|
+
let a = null;
|
|
71
|
+
!a && o.value && (a = E(o.value, () => {
|
|
72
|
+
o.value && c();
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
), _(
|
|
67
76
|
s,
|
|
68
|
-
(
|
|
69
|
-
e("update:is-expanded",
|
|
77
|
+
(a) => {
|
|
78
|
+
e("update:is-expanded", a), c();
|
|
70
79
|
},
|
|
71
80
|
{ immediate: !0 }
|
|
72
|
-
), { __sfc: !0, CONTENT_TRANSITION_NAME: t, props: n, emit: e, contentDiv:
|
|
81
|
+
), { __sfc: !0, CONTENT_TRANSITION_NAME: t, props: n, emit: e, contentDiv: o, isOpen: s, buttonId: f, contentId: v, titleSize: I, updateContentHeight: c, contentHeight: r, contentMaxHeight: b, BentoTypography: x, ChevronDownIcon: O, ChevronUpIcon: T };
|
|
73
82
|
}
|
|
74
83
|
});
|
|
75
|
-
var
|
|
84
|
+
var H = function() {
|
|
76
85
|
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
77
|
-
return n("div", { staticClass: "b-accordion-item" }, [n(t.BentoTypography, { attrs: { el: "h3", variant: t.titleSize === "small" ? "body" : "title", strongest: t.titleSize === "small" } }, [n("button", { staticClass: "b-accordion-item__button", attrs: { id: t.buttonId, "aria-controls": t.contentId, "aria-expanded": `${t.isOpen}`, type: "button" }, on: { click: function(
|
|
86
|
+
return n("div", { staticClass: "b-accordion-item" }, [n(t.BentoTypography, { attrs: { el: "h3", variant: t.titleSize === "small" ? "body" : "title", strongest: t.titleSize === "small" } }, [n("button", { staticClass: "b-accordion-item__button", attrs: { id: t.buttonId, "aria-controls": t.contentId, "aria-expanded": `${t.isOpen}`, type: "button" }, on: { click: function(o) {
|
|
78
87
|
t.isOpen = !t.isOpen;
|
|
79
88
|
} } }, [t.isOpen ? n(t.ChevronUpIcon, { staticClass: "b-accordion-item__icon", attrs: { "svg-title": "collapse", "aria-hidden": "true" } }) : n(t.ChevronDownIcon, { staticClass: "b-accordion-item__icon", attrs: { "svg-title": "expand", "aria-hidden": "true" } }), e._v(" " + e._s(e.title) + " ")], 1)]), n("Transition", { attrs: { name: t.CONTENT_TRANSITION_NAME } }, [t.isOpen ? n("div", { style: t.contentMaxHeight, attrs: { id: t.contentId, "aria-labelledby": t.buttonId, role: "region" } }, [n("div", { ref: "contentDiv", staticClass: "b-accordion-item__content" }, [e._t("default")], 2)]) : e._e()])], 1);
|
|
80
|
-
},
|
|
81
|
-
R,
|
|
89
|
+
}, M = [], w = /* @__PURE__ */ u(
|
|
82
90
|
D,
|
|
83
91
|
H,
|
|
92
|
+
M,
|
|
84
93
|
!1,
|
|
85
94
|
null,
|
|
86
|
-
"
|
|
95
|
+
"01c3158a",
|
|
87
96
|
null,
|
|
88
97
|
null
|
|
89
98
|
);
|
|
90
|
-
const
|
|
99
|
+
const L = w.exports;
|
|
91
100
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
101
|
+
K as BentoAccordion,
|
|
102
|
+
L as BentoAccordionItem
|
|
94
103
|
};
|
|
95
104
|
//# sourceMappingURL=accordion.js.map
|
package/dist/accordion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sources":["../src/components/accordion/accordion.keys.ts","../src/components/accordion/accordion.vue","../src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" class=\"b-accordion-item__icon\" svg-title=\"collapse\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" svg-title=\"expand\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\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 import { generateUid } from '@/utils/ts/unique-id';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when content is toggled\n */\n (e: 'update:is-expanded', value: boolean): void;\n }>();\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","__default__","CONTENT_TRANSITION_NAME","contentDiv","ref","isOpen","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","emit"],"mappings":"
|
|
1
|
+
{"version":3,"file":"accordion.js","sources":["../src/components/accordion/accordion.keys.ts","../src/components/accordion/accordion.vue","../src/components/accordion/components/accordion-item.vue"],"sourcesContent":["export const ACCORDION_TITLE_SIZE_INJECTION_KEY = Symbol('accordion title size injection key');\n","<template>\n <div class=\"b-accordion\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType, provide, toRef } from 'vue';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from './accordion.keys';\n\n import type { BentoAccordionTitleSize } from './accordion.types';\n\n const props = defineProps({\n /**\n * Controls accordion title size.\n * @values default, small\n */\n titleSize: {\n type: String as PropType<BentoAccordionTitleSize>,\n default: 'default',\n },\n });\n\n provide(ACCORDION_TITLE_SIZE_INJECTION_KEY, toRef(props, 'titleSize'));\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion is a vertical stack of interactive headers used to reveal or hide\n * sections of content associated with these headers.\n *\n * This component must only have `BentoAccordionItem` components in its default slot.\n *\n * Accordion items should be collapsed by default.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion.scss\" />\n","<template>\n <div class=\"b-accordion-item\">\n <bento-typography\n el=\"h3\"\n :variant=\"titleSize === 'small' ? 'body' : 'title'\"\n :strongest=\"titleSize === 'small'\"\n >\n <button\n :id=\"buttonId\"\n :aria-controls=\"contentId\"\n :aria-expanded=\"`${isOpen}`\"\n type=\"button\"\n class=\"b-accordion-item__button\"\n @click=\"isOpen = !isOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" class=\"b-accordion-item__icon\" svg-title=\"collapse\" aria-hidden=\"true\" />\n <chevron-down-icon v-else class=\"b-accordion-item__icon\" svg-title=\"expand\" aria-hidden=\"true\" />\n {{ title }}\n </button>\n </bento-typography>\n\n <Transition :name=\"CONTENT_TRANSITION_NAME\">\n <div v-if=\"isOpen\" :id=\"contentId\" :aria-labelledby=\"buttonId\" role=\"region\" :style=\"contentMaxHeight\">\n <div ref=\"contentDiv\" class=\"b-accordion-item__content\">\n <slot />\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, watch } from 'vue';\n\n import { BentoTypography } from '@/components/typography';\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 import { generateUid } from '@/utils/ts/unique-id';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import { ACCORDION_TITLE_SIZE_INJECTION_KEY } from '../accordion.keys';\n\n import type { BentoAccordionTitleSize } from '../accordion.types';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n const CONTENT_TRANSITION_NAME = 'b-accordion-item__animation--content';\n\n const props = defineProps({\n /**\n * Sets the title of the accordion item.\n */\n title: {\n type: String,\n required: true,\n },\n /**\n * Controls if the content is visible or hidden.\n */\n isExpanded: {\n type: Boolean,\n default: false,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when content is toggled\n */\n (e: 'update:is-expanded', value: boolean): void;\n }>();\n\n // Refs\n const contentDiv = ref<HTMLDivElement>(null);\n const isOpen = ref(props.isExpanded);\n\n // Generating IDs\n const buttonId = generateUid('accordionItemButton');\n const contentId = generateUid('accordionItemContent');\n\n // Injecting prop from parent\n const titleSize = inject<`${BentoAccordionTitleSize}`>(ACCORDION_TITLE_SIZE_INJECTION_KEY, 'default');\n\n // Getting and setting the item height to be able to handle height animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n watch(\n () => props.isExpanded,\n value => {\n isOpen.value = value;\n }\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n watch(\n isOpen,\n value => {\n // Enable two-way data binding for `isExpanded`\n emit('update:is-expanded', value);\n\n updateContentHeight();\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An accordion item is an interactive header used to reveal or hide a\n * section of content associated with this header.\n *\n * This component must always be wrapped by a `BentoAccordion` component.\n *\n * @example\n * import { BentoAccordion, BentoAccordionItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAccordion, BentoAccordionItem },\n * template: `\n * <bento-accordion>\n * <bento-accordion-item title=\"Item 1\">\n * Content for item 1\n * </bento-accordion-item>\n * <bento-accordion-item title=\"Item 2\">\n * Content for item 2\n * </bento-accordion-item>\n * </bento-accordion>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./accordion-item.scss\" />\n"],"names":["ACCORDION_TITLE_SIZE_INJECTION_KEY","__default__$1","provide","toRef","props","__default__","CONTENT_TRANSITION_NAME","contentDiv","ref","isOpen","buttonId","generateUid","contentId","titleSize","inject","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","computed","watch","value","observer","observeSizeOfElement","emit"],"mappings":";;;;;;;;AAAa,MAAAA,IAAA,OAAA,oCAAA,GCqDTC,IAAA,CAAA;;;;;;;;;;;;;;;AA7BA,WAAAC,EAAAF,GAAAG,EAAAC,GAAA,WAAA,CAAA;;;;;;;;;;;;;;;;qBCyHAC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;iBAnGAC,IAAA,wCA2BAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAAJ,EAAA,UAAA,GAGAM,IAAAC,EAAA,qBAAA,GACAC,IAAAD,EAAA,sBAAA,GAGAE,IAAAC,EAAAd,GAAA,SAAA,GAGA,EAAA,qBAAAe,GAAA,eAAAC,EAAA,IAAAC,EAAAV,GAAAE,CAAA,GAEAS,IAAAC,EAAA,MAAAH,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA,CAAA;AAEA,WAAAI;AAAA,MAAA,MAAAhB,EAAA;AAAA,MACgB,CAAAiB,MAAA;AAER,QAAAZ,EAAA,QAAAY;AAAA,MAAe;AAAA,IACnB,GAGJD;AAAA,MAAA,MAAAb,EAAA;AAAA,MACqB,MAAA;AAEb,YAAAe,IAAA;AACA,QAAA,CAAAA,KAAAf,EAAA,UACIe,IAAAC,EAAAhB,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIQ,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,GAGJK;AAAA,MAAAX;AAAA,MACI,CAAAY,MAAA;AAGI,QAAAG,EAAA,sBAAAH,CAAA,GAEAN,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { onMounted as C, nextTick as h, getCurrentScope as W, onScopeDispose as M, unref as T, getCurrentInstance as E, ref as m, watch as S, watchEffect as N, computed as y, defineComponent as O, toRef as x } from "vue";
|
|
2
|
+
import { a as P } from "./chunks/button.e09d5980.js";
|
|
3
|
+
import { B as R } from "./chunks/index.965ac1af.js";
|
|
4
|
+
import { B as k } from "./chunks/button-actions-with-menu.a5413243.js";
|
|
5
|
+
import { C as V } from "./chunks/cross.a2cadac5.js";
|
|
6
|
+
import { u as j } from "./chunks/i18n.155748d6.js";
|
|
7
|
+
import "./chunks/index.af05ced4.js";
|
|
8
|
+
import { n as G } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
9
|
+
import "./assets/index.css";
|
|
10
|
+
function w(e) {
|
|
11
|
+
return W() ? (M(e), !0) : !1;
|
|
12
|
+
}
|
|
13
|
+
function A(e) {
|
|
14
|
+
return typeof e == "function" ? e() : T(e);
|
|
15
|
+
}
|
|
16
|
+
const z = typeof window < "u" && typeof document < "u";
|
|
17
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
18
|
+
const F = Object.prototype.toString, H = (e) => F.call(e) === "[object Object]", q = () => {
|
|
19
|
+
};
|
|
20
|
+
function D(e) {
|
|
21
|
+
return e || E();
|
|
22
|
+
}
|
|
23
|
+
function Q(e, n = !0, t) {
|
|
24
|
+
D() ? C(e, t) : n ? e() : h(e);
|
|
25
|
+
}
|
|
26
|
+
function U(e) {
|
|
27
|
+
var n;
|
|
28
|
+
const t = A(e);
|
|
29
|
+
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
30
|
+
}
|
|
31
|
+
const I = z ? window : void 0;
|
|
32
|
+
function Y(...e) {
|
|
33
|
+
let n, t, o, s;
|
|
34
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, o, s] = e, n = I) : [n, t, o, s] = e, !n)
|
|
35
|
+
return q;
|
|
36
|
+
Array.isArray(t) || (t = [t]), Array.isArray(o) || (o = [o]);
|
|
37
|
+
const r = [], a = () => {
|
|
38
|
+
r.forEach((u) => u()), r.length = 0;
|
|
39
|
+
}, l = (u, f, d, p) => (u.addEventListener(f, d, p), () => u.removeEventListener(f, d, p)), c = S(
|
|
40
|
+
() => [U(n), A(s)],
|
|
41
|
+
([u, f]) => {
|
|
42
|
+
if (a(), !u)
|
|
43
|
+
return;
|
|
44
|
+
const d = H(f) ? { ...f } : f;
|
|
45
|
+
r.push(
|
|
46
|
+
...t.flatMap((p) => o.map((v) => l(u, p, v, d)))
|
|
47
|
+
);
|
|
48
|
+
},
|
|
49
|
+
{ immediate: !0, flush: "post" }
|
|
50
|
+
), i = () => {
|
|
51
|
+
c(), a();
|
|
52
|
+
};
|
|
53
|
+
return w(i), i;
|
|
54
|
+
}
|
|
55
|
+
function $() {
|
|
56
|
+
const e = m(!1);
|
|
57
|
+
return E() && C(() => {
|
|
58
|
+
e.value = !0;
|
|
59
|
+
}), e;
|
|
60
|
+
}
|
|
61
|
+
function K(e) {
|
|
62
|
+
const n = $();
|
|
63
|
+
return y(() => (n.value, !!e()));
|
|
64
|
+
}
|
|
65
|
+
function Z(e, n = {}) {
|
|
66
|
+
const { window: t = I } = n, o = K(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
|
|
67
|
+
let s;
|
|
68
|
+
const r = m(!1), a = (i) => {
|
|
69
|
+
r.value = i.matches;
|
|
70
|
+
}, l = () => {
|
|
71
|
+
s && ("removeEventListener" in s ? s.removeEventListener("change", a) : s.removeListener(a));
|
|
72
|
+
}, c = N(() => {
|
|
73
|
+
o.value && (l(), s = t.matchMedia(A(e)), "addEventListener" in s ? s.addEventListener("change", a) : s.addListener(a), r.value = s.matches);
|
|
74
|
+
});
|
|
75
|
+
return w(() => {
|
|
76
|
+
c(), l(), s = void 0;
|
|
77
|
+
}), r;
|
|
78
|
+
}
|
|
79
|
+
function J(e = {}) {
|
|
80
|
+
const {
|
|
81
|
+
window: n = I,
|
|
82
|
+
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
83
|
+
initialHeight: o = Number.POSITIVE_INFINITY,
|
|
84
|
+
listenOrientation: s = !0,
|
|
85
|
+
includeScrollbar: r = !0
|
|
86
|
+
} = e, a = m(t), l = m(o), c = () => {
|
|
87
|
+
n && (r ? (a.value = n.innerWidth, l.value = n.innerHeight) : (a.value = n.document.documentElement.clientWidth, l.value = n.document.documentElement.clientHeight));
|
|
88
|
+
};
|
|
89
|
+
if (c(), Q(c), Y("resize", c, { passive: !0 }), s) {
|
|
90
|
+
const i = Z("(orientation: portrait)");
|
|
91
|
+
S(i, () => c());
|
|
92
|
+
}
|
|
93
|
+
return { width: a, height: l };
|
|
94
|
+
}
|
|
95
|
+
const X = {
|
|
96
|
+
"en-US": {
|
|
97
|
+
actionBar: "Action bar",
|
|
98
|
+
close: "Close",
|
|
99
|
+
selected: "selected"
|
|
100
|
+
}
|
|
101
|
+
}, ee = {
|
|
102
|
+
i18n: { messages: X }
|
|
103
|
+
}, te = /* @__PURE__ */ O({
|
|
104
|
+
...ee,
|
|
105
|
+
__name: "action-bar",
|
|
106
|
+
props: {
|
|
107
|
+
/**
|
|
108
|
+
* List of actions that will be used to render the buttons.
|
|
109
|
+
*
|
|
110
|
+
* Each object in the list should have a `title`, an `event` and,
|
|
111
|
+
* optionally, an `icon`.
|
|
112
|
+
*
|
|
113
|
+
* The component will display 4 actions and the hide the rest inside a menu.
|
|
114
|
+
*
|
|
115
|
+
* @see BentoButton for a list of all the other props supported by each button action.
|
|
116
|
+
*/
|
|
117
|
+
actions: {
|
|
118
|
+
type: Array,
|
|
119
|
+
required: !0
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* Use when there are sticky elements at the bottom, like sticky pagination
|
|
123
|
+
*/
|
|
124
|
+
extraBottomSpacing: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: !1
|
|
127
|
+
},
|
|
128
|
+
/**
|
|
129
|
+
* Show how many items are selected
|
|
130
|
+
*/
|
|
131
|
+
itemCounter: {
|
|
132
|
+
type: Number,
|
|
133
|
+
required: !0
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Label for the selection, e.g. 'selected'/'changed'
|
|
137
|
+
*/
|
|
138
|
+
selectionLabel: {
|
|
139
|
+
type: String,
|
|
140
|
+
default: null
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
emits: ["close"],
|
|
144
|
+
setup(e, { emit: n }) {
|
|
145
|
+
const t = e, { t: o } = j(), s = y(() => t.selectionLabel ? t.selectionLabel : o("selected")), r = 32, a = 100, l = 500, c = m(null), i = m(4), { width: u } = J(), f = x(t, "extraBottomSpacing"), d = y(() => ({
|
|
146
|
+
"b-action-bar--extra-spacing": f.value
|
|
147
|
+
})), p = y(() => {
|
|
148
|
+
const _ = t.actions.map((L) => ({
|
|
149
|
+
...L,
|
|
150
|
+
variant: "secondary"
|
|
151
|
+
})), g = _.slice(0, i.value).reverse(), B = _.slice(i.value);
|
|
152
|
+
return [...g, ...B];
|
|
153
|
+
}), v = async () => {
|
|
154
|
+
await h(), u.value > c.value.clientWidth + r + a && i.value < 4 && (i.value += 1, v());
|
|
155
|
+
}, b = async () => {
|
|
156
|
+
await h(), u.value < c.value.clientWidth + r && i.value > 0 && (i.value -= 1, b());
|
|
157
|
+
};
|
|
158
|
+
return S(
|
|
159
|
+
() => u.value,
|
|
160
|
+
async (_, g) => {
|
|
161
|
+
if (await h(), !c.value)
|
|
162
|
+
return;
|
|
163
|
+
const B = _ > g;
|
|
164
|
+
u.value < l ? i.value = 0 : B ? v() : b();
|
|
165
|
+
},
|
|
166
|
+
{ immediate: !0 }
|
|
167
|
+
), { __sfc: !0, props: t, emit: n, t: o, label: s, SPACING: r, AVERAGE_BUTTON_SIZE: a, RESPONSIVE_BREAKPOINT: l, actionBar: c, displayedActions: i, width: u, extraSpacingRef: f, conditionalClasses: d, actionsInternal: p, showActions: v, hideActions: b, BentoButton: P, BentoTypography: R, ButtonActionsWithMenu: k, CrossIcon: V };
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
var ne = function() {
|
|
171
|
+
var n = this, t = n._self._c, o = n._self._setupProxy;
|
|
172
|
+
return t("section", { ref: "actionBar", staticClass: "b-action-bar", class: o.conditionalClasses, attrs: { "aria-label": o.t("actionBar") } }, [t("div", { staticClass: "b-action-bar__close-button" }, [t(o.BentoButton, { attrs: { variant: "tertiary", inverse: "" }, on: { click: function(s) {
|
|
173
|
+
return o.emit("close");
|
|
174
|
+
} }, scopedSlots: n._u([{ key: "iconLeft", fn: function() {
|
|
175
|
+
return [t(o.CrossIcon, { attrs: { "svg-title": o.t("close") } })];
|
|
176
|
+
}, proxy: !0 }]) })], 1), t(o.BentoTypography, { staticClass: "b-action-bar__selection", attrs: { el: "span", stronger: "" } }, [n._v(n._s(n.itemCounter) + " " + n._s(o.label))]), t(o.ButtonActionsWithMenu, { staticClass: "b-action-bar__actions", attrs: { actions: o.actionsInternal, "displayed-actions": o.displayedActions, "menu-position": "top-end", inverse: "" } })], 1);
|
|
177
|
+
}, oe = [], se = /* @__PURE__ */ G(
|
|
178
|
+
te,
|
|
179
|
+
ne,
|
|
180
|
+
oe,
|
|
181
|
+
!1,
|
|
182
|
+
null,
|
|
183
|
+
"16449f81",
|
|
184
|
+
null,
|
|
185
|
+
null
|
|
186
|
+
);
|
|
187
|
+
const pe = se.exports;
|
|
188
|
+
export {
|
|
189
|
+
pe as BentoActionBar
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=action-bar.js.map
|