@adyen/bento-vue3 1.9.0 → 1.11.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/vue2/src/components/button/button.vue.d.ts +23 -2455
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +2 -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 +2 -0
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/code-snippet/{composables/useLanguage.d.ts → utils/get-lang-loader.d.ts} +1 -3
- package/dist/@types/packages/vue2/src/components/country/composables/index.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/country/composables/{useCountryCapital/useCountryCapital.d.ts → use-country-capital/use-country-capital.d.ts} +1 -1
- package/dist/@types/packages/vue2/src/components/country/composables/{useCountryName/useCountryName.d.ts → use-country-name/use-country-name.d.ts} +1 -1
- package/dist/@types/packages/vue2/src/components/country/composables/{useCountryPhoneCode/useCountryPhoneCode.d.ts → use-country-phone-code/use-country-phon-code.d.ts} +1 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue.d.ts +33 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns-types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +21 -4
- package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +10 -8
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/{useCalculateColumnWidth/useCalculateColumnWidth.d.ts → use-calculate-column-width/use-calculate-column-width.d.ts} +2 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-reorderer/use-column-reorderer.d.ts +121 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config-settings.d.ts +154 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/{useKeyboardNavigator/useKeyboardNavigator.d.ts → use-keyboard-navigator/use-keyboard-navigator.d.ts} +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/{useResizer.d.ts → use-resizer.d.ts} +0 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/{useScroller/useScroller.d.ts → use-scroller/use-scroller.d.ts} +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/{useSelector.d.ts → use-selector.d.ts} +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +15 -5
- package/dist/@types/packages/vue2/src/components/divider/divider.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -3
- 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/composables/useDropdownOptionsListbox.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +16 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +2355 -6
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +84 -12
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.types.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +20 -0
- package/dist/@types/packages/vue2/src/components/internal/copy/index.d.ts +1 -0
- 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.types.d.ts +2 -1
- 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 +51 -0
- 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 +10 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +11 -2
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +316 -3
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/components/secondary-nav-category/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/components/secondary-nav-category/secondary-nav-category.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/components/secondary-nav-item/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/components/secondary-nav-item/secondary-nav-item.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/secondary-nav.keys.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/secondary-nav.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/secondary-nav/secondary-nav.vue.d.ts +22 -0
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +3 -4
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +15 -2
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +15 -10
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -0
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/elements.d.ts +2 -1
- package/dist/@types/packages/vue2/src/utils/ts/deprecate.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +23 -23
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- 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/fixed-scroller.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/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 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.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/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +57 -46
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +73 -54
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/{base-button.aa085dfa.js → base-button.39fae75f.js} +2 -2
- package/dist/chunks/{base-button.aa085dfa.js.map → base-button.39fae75f.js.map} +1 -1
- package/dist/chunks/{base-modal.a629cb32.js → base-modal.161ce8f0.js} +86 -86
- package/dist/chunks/base-modal.161ce8f0.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.f6dfb14d.js → button-actions-with-menu.2ff339f6.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.f6dfb14d.js.map → button-actions-with-menu.2ff339f6.js.map} +1 -1
- package/dist/chunks/button.623a46d2.js +118 -0
- package/dist/chunks/button.623a46d2.js.map +1 -0
- package/dist/chunks/{calendar.fa7712e8.js → calendar.b1d05580.js} +4 -4
- package/dist/chunks/{calendar.fa7712e8.js.map → calendar.b1d05580.js.map} +1 -1
- package/dist/chunks/checkbox.d65694f2.js +278 -0
- package/dist/chunks/checkbox.d65694f2.js.map +1 -0
- package/dist/chunks/{controls-group.d6543674.js → controls-group.30352ce4.js} +21 -17
- package/dist/chunks/controls-group.30352ce4.js.map +1 -0
- package/dist/chunks/copy.2a9cddc1.js +145 -0
- package/dist/chunks/copy.2a9cddc1.js.map +1 -0
- package/dist/chunks/country.types.002caff2.js +5871 -0
- package/dist/chunks/country.types.002caff2.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.4108b289.js → dropdown-default-textbox.a731b5fb.js} +25 -25
- package/dist/chunks/dropdown-default-textbox.a731b5fb.js.map +1 -0
- package/dist/chunks/{dropdown.63de9aac.js → dropdown.96431c25.js} +399 -359
- package/dist/chunks/dropdown.96431c25.js.map +1 -0
- package/dist/chunks/{field-label.3c19a29a.js → field-label.b681234d.js} +5 -5
- package/dist/chunks/{field-label.3c19a29a.js.map → field-label.b681234d.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.bced60dd.js → fixed-scroller.ebfb2f80.js} +2 -2
- package/dist/chunks/{fixed-scroller.bced60dd.js.map → fixed-scroller.ebfb2f80.js.map} +1 -1
- package/dist/chunks/{footer-actions.cefaf1e2.js → footer-actions.03015ba1.js} +3 -3
- package/dist/chunks/{footer-actions.cefaf1e2.js.map → footer-actions.03015ba1.js.map} +1 -1
- package/dist/chunks/{index.98174339.js → index.03605cb0.js} +5 -5
- package/dist/chunks/{index.98174339.js.map → index.03605cb0.js.map} +1 -1
- package/dist/chunks/index.09f7f1b5.js +124 -0
- package/dist/chunks/index.09f7f1b5.js.map +1 -0
- package/dist/chunks/index.0a8ddfaa.js +168 -0
- package/dist/chunks/index.0a8ddfaa.js.map +1 -0
- package/dist/chunks/index.113137fb.js +21 -0
- package/dist/chunks/index.113137fb.js.map +1 -0
- package/dist/chunks/{index.89dfe209.js → index.1dac266a.js} +3 -3
- package/dist/chunks/{index.89dfe209.js.map → index.1dac266a.js.map} +1 -1
- package/dist/chunks/{index.0ee895e0.js → index.45d00aad.js} +2 -2
- package/dist/chunks/{index.0ee895e0.js.map → index.45d00aad.js.map} +1 -1
- package/dist/chunks/{index.4d2a13e1.js → index.80078bf9.js} +2 -2
- package/dist/chunks/{index.4d2a13e1.js.map → index.80078bf9.js.map} +1 -1
- package/dist/chunks/{index.85832db5.js → index.a4a6e52f.js} +3 -3
- package/dist/chunks/{index.85832db5.js.map → index.a4a6e52f.js.map} +1 -1
- package/dist/chunks/index.cf561336.js +622 -0
- package/dist/chunks/index.cf561336.js.map +1 -0
- package/dist/chunks/{index.c6fecf1c.js → index.ef1c4d59.js} +33 -33
- package/dist/chunks/{index.c6fecf1c.js.map → index.ef1c4d59.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.b1eb32bd.js → listbox-option-tag.ff6d6f32.js} +3 -3
- package/dist/chunks/{listbox-option-tag.b1eb32bd.js.map → listbox-option-tag.ff6d6f32.js.map} +1 -1
- package/dist/chunks/listbox.dd9883c5.js +1419 -0
- package/dist/chunks/listbox.dd9883c5.js.map +1 -0
- package/dist/chunks/{loading-button.4b88e24d.js → loading-button.30c5fede.js} +19 -19
- package/dist/chunks/{loading-button.4b88e24d.js.map → loading-button.30c5fede.js.map} +1 -1
- package/dist/chunks/{tooltip.27c32d36.js → tooltip.785993dd.js} +15 -15
- package/dist/chunks/tooltip.785993dd.js.map +1 -0
- package/dist/chunks/use-has-slot.4d98bf29.js.map +1 -1
- package/dist/chunks/useCountryItems.d2a1f224.js +29 -0
- package/dist/chunks/{useCountryItems.e83ef8f0.js.map → useCountryItems.d2a1f224.js.map} +1 -1
- package/dist/code-snippet.js +136 -138
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +51 -5912
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1325 -1021
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +20 -20
- 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 +2 -10
- package/dist/divider.js.map +1 -1
- package/dist/dropdown.js +51 -50
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +23 -23
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +759 -747
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +3 -3
- package/dist/index.js +194 -185
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +17 -15
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +67 -64
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +15 -13
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +69 -67
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +8 -8
- package/dist/secondary-nav.js +110 -0
- package/dist/secondary-nav.js.map +1 -0
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +173 -161
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +244 -237
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +5 -5
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useColumnReorderer/useColumnReorderer.d.ts +0 -67
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useConfigSettings/useConfigSettings.d.ts +0 -73
- package/dist/chunks/base-modal.a629cb32.js.map +0 -1
- package/dist/chunks/button.82ed953e.js +0 -148
- package/dist/chunks/button.82ed953e.js.map +0 -1
- package/dist/chunks/checkbox.731dc0ab.js +0 -264
- package/dist/chunks/checkbox.731dc0ab.js.map +0 -1
- package/dist/chunks/controls-group.d6543674.js.map +0 -1
- package/dist/chunks/copy.330d594e.js +0 -126
- package/dist/chunks/copy.330d594e.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.4108b289.js.map +0 -1
- package/dist/chunks/dropdown.63de9aac.js.map +0 -1
- package/dist/chunks/index.73ed22a7.js +0 -594
- package/dist/chunks/index.73ed22a7.js.map +0 -1
- package/dist/chunks/index.75f3672e.js +0 -124
- package/dist/chunks/index.75f3672e.js.map +0 -1
- package/dist/chunks/index.edcaf766.js +0 -150
- package/dist/chunks/index.edcaf766.js.map +0 -1
- package/dist/chunks/listbox.ac43f8ab.js +0 -1309
- package/dist/chunks/listbox.ac43f8ab.js.map +0 -1
- package/dist/chunks/tooltip.27c32d36.js.map +0 -1
- package/dist/chunks/useCountryItems.e83ef8f0.js +0 -29
- /package/dist/@types/packages/vue2/src/components/data-grid/composables/{useCalculateColumnWidth/useCalculateColumnWidth.types.d.ts → use-calculate-column-width/use-calculate-column-width.types.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/data-grid/composables/{useCalculateStickyElementHeight/useCalculateStickyElementHeight.d.ts → use-calculate-sticky-element-height/use-calculate-sticky-element-height.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/data-grid/composables/{useKeyboardNavigator/useKeyboardNavigator.types.d.ts → use-keyboard-navigator/use-keyboard-navigator.types.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/data-grid/composables/{useLazyLoading/useLazyLoading.d.ts → use-lazy-loading/use-lazy-loading.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/data-grid/composables/{useSorter.d.ts → use-sorter.d.ts} +0 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { defineComponent as d, computed as c, openBlock as E, createBlock as T, resolveDynamicComponent as u, normalizeClass as v, withCtx as I, renderSlot as O } from "vue";
|
|
2
|
+
import { _ as D } from "./_plugin-vue_export-helper.dad06003.js";
|
|
3
|
+
import "../assets/index22.css";
|
|
4
|
+
var a = /* @__PURE__ */ ((e) => (e.CAPTION = "caption", e.BODY = "body", e.SUBTITLE = "subtitle", e.TITLE = "title", e))(a || {}), t = /* @__PURE__ */ ((e) => (e.WIDE = "wide", e.STRONGER = "stronger", e.STRONGER_WIDE = "stronger-wide", e.STRONGEST = "strongest", e.STRONGEST_WIDE = "strongest-wide", e.MEDIUM = "m", e.LARGE = "l", e.MOBILE = "mobile", e))(t || {}), s = /* @__PURE__ */ ((e) => (e.H1 = "h1", e.H2 = "h2", e.H3 = "h3", e.H4 = "h4", e.H5 = "h5", e.H6 = "h6", e.DIV = "div", e.PARAGRAPH = "p", e.SPAN = "span", e))(s || {});
|
|
5
|
+
const $ = ["development", "DEVELOPMENT", "dev", "DEV"], S = () => $.includes(process.env.NODE_ENV);
|
|
6
|
+
function r(...e) {
|
|
7
|
+
S() && console.warn(...e);
|
|
8
|
+
}
|
|
9
|
+
const l = ["color: red", "background: yellow"].join(";"), o = /* @__PURE__ */ new Set();
|
|
10
|
+
function _(e, n, i) {
|
|
11
|
+
o.has(e) || (r(`%cDEPRECATED:\x1B[0m ${e}`, l), r(`${n.replaceAll(" ", "").replaceAll(" ", "").trim()}`), r(`To be removed in: %c${i}`, l), o.add(e));
|
|
12
|
+
}
|
|
13
|
+
const b = d({
|
|
14
|
+
name: "bento-typography",
|
|
15
|
+
inheritAttrs: !0,
|
|
16
|
+
props: {
|
|
17
|
+
/**
|
|
18
|
+
* Sets the HTML DOM element.
|
|
19
|
+
* @values h1, h2, h3, h4, h5, h6, div, p, span
|
|
20
|
+
*/
|
|
21
|
+
el: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: s.PARAGRAPH,
|
|
24
|
+
validator: (e) => Object.values(s).includes(e)
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Adds the stronger class modifier.
|
|
28
|
+
* Applicable to Caption, Body and Subtitle variants.
|
|
29
|
+
*/
|
|
30
|
+
stronger: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !1
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Adds the strongest class modifier.
|
|
36
|
+
* Applicable to Caption, Body and Subtitle variants.
|
|
37
|
+
*/
|
|
38
|
+
strongest: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Sets the type of typography variant.
|
|
44
|
+
* @values caption, body, title.
|
|
45
|
+
*/
|
|
46
|
+
variant: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: a.BODY,
|
|
49
|
+
validator: (e) => Object.values(a).includes(e)
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Adds the medium class modifier.
|
|
53
|
+
* Applicable to the Title variant.
|
|
54
|
+
*/
|
|
55
|
+
medium: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !1
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Adds the large class modifier.
|
|
61
|
+
* Applicable to the Title variant.
|
|
62
|
+
*/
|
|
63
|
+
large: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: !1
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* Adds the medium class modifier.
|
|
69
|
+
* Applicable to tje Body variant.
|
|
70
|
+
*/
|
|
71
|
+
wide: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
setup(e) {
|
|
77
|
+
return e.variant === a.SUBTITLE && _(
|
|
78
|
+
'BentoTypography "subtitle" variant (BentoTypographyVariant.SUBTITLE)',
|
|
79
|
+
`Use the "title" or "BentoTypographyVariant.TITLE" variant and (optionally) combine it with a size property. e.g. medium / large.
|
|
80
|
+
<bento-typography :variant="BentoTypographyVariant.TITLE" medium>`,
|
|
81
|
+
"2.0.0"
|
|
82
|
+
), {
|
|
83
|
+
conditionalClasses: c(() => ({
|
|
84
|
+
// Caption
|
|
85
|
+
[`b-typography--${a.CAPTION}`]: e.variant === a.CAPTION,
|
|
86
|
+
[`b-typography--${a.CAPTION}-${t.WIDE}`]: e.variant === a.CAPTION && e.wide,
|
|
87
|
+
[`b-typography--${a.CAPTION}-${t.STRONGER}`]: e.variant === a.CAPTION && e.stronger,
|
|
88
|
+
// Body
|
|
89
|
+
[`b-typography--${a.BODY}`]: e.variant === a.BODY,
|
|
90
|
+
[`b-typography--${a.BODY}-${t.WIDE}`]: e.variant === a.BODY && e.wide,
|
|
91
|
+
[`b-typography--${a.BODY}-${t.STRONGER}`]: e.variant === a.BODY && e.stronger,
|
|
92
|
+
[`b-typography--${a.BODY}-${t.STRONGEST}`]: e.variant === a.BODY && e.strongest,
|
|
93
|
+
// Subtitle
|
|
94
|
+
[`b-typography--${a.SUBTITLE}`]: e.variant === a.SUBTITLE,
|
|
95
|
+
[`b-typography--${a.SUBTITLE}-${t.STRONGER}`]: e.variant === a.SUBTITLE && e.stronger,
|
|
96
|
+
// Title
|
|
97
|
+
[`b-typography--${a.TITLE}`]: e.variant === a.TITLE && !e.medium && !e.large,
|
|
98
|
+
[`b-typography--${a.TITLE}-${t.MEDIUM}`]: e.variant === a.TITLE && e.medium,
|
|
99
|
+
[`b-typography--${a.TITLE}-${t.LARGE}`]: e.variant === a.TITLE && e.large
|
|
100
|
+
}))
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
function g(e, n, i, m, N, f) {
|
|
105
|
+
return E(), T(u(e.el), {
|
|
106
|
+
class: v(["b-typography", e.conditionalClasses]),
|
|
107
|
+
"data-testid": "typography"
|
|
108
|
+
}, {
|
|
109
|
+
default: I(() => [
|
|
110
|
+
O(e.$slots, "default", {}, void 0, !0)
|
|
111
|
+
]),
|
|
112
|
+
_: 3
|
|
113
|
+
}, 8, ["class"]);
|
|
114
|
+
}
|
|
115
|
+
const R = /* @__PURE__ */ D(b, [["render", g], ["__scopeId", "data-v-e6e88def"]]);
|
|
116
|
+
export {
|
|
117
|
+
R as B,
|
|
118
|
+
a,
|
|
119
|
+
t as b,
|
|
120
|
+
s as c,
|
|
121
|
+
_ as d,
|
|
122
|
+
r as p
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=index.09f7f1b5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.09f7f1b5.js","sources":["../../../vue2/src/components/typography/typography.types.ts","../../../vue2/src/utils/ts/dev-environment.ts","../../../vue2/src/utils/ts/print-development-warning.ts","../../../vue2/src/utils/ts/deprecate.ts","../../../vue2/src/components/typography/typography.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyVariant {\n CAPTION = 'caption',\n BODY = 'body',\n /** @deprecated Use \"TITLE\" instead. */\n SUBTITLE = 'subtitle',\n TITLE = 'title',\n}\n\nexport enum BentoTypographyModifier {\n WIDE = 'wide',\n STRONGER = 'stronger',\n STRONGER_WIDE = 'stronger-wide',\n STRONGEST = 'strongest',\n STRONGEST_WIDE = 'strongest-wide',\n MEDIUM = 'm',\n LARGE = 'l',\n MOBILE = 'mobile',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTypographyElement {\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n DIV = 'div',\n PARAGRAPH = 'p',\n SPAN = 'span',\n}\n","const DEV_ENVIROMENT_NAMES = ['development', 'DEVELOPMENT', 'dev', 'DEV'];\n\nexport const isDevelopmentEnviroment = () => DEV_ENVIROMENT_NAMES.includes(process.env.NODE_ENV);\n","import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n/**\n * Prints console.warn messages in development mode only.\n *\n * @see console.warn for what parameters you can use\n */\n\nexport function printDevelopmentWarning(...args: Parameters<typeof console.warn>) {\n if (isDevelopmentEnviroment()) {\n // eslint-disable-next-line no-console\n console.warn(...args);\n }\n}\n","import { printDevelopmentWarning } from './print-development-warning';\n\nconst DEPRECATION_STYLES = ['color: red', 'background: yellow'].join(';');\nconst shownMessages = new Set<string>();\n\n/**\n * Informs users about the deprecations in development mode only.\n *\n * @param title Indicates what is being deprecated.\n * @param deprecationMessage How to avoid the deprecation by giving an example of the alternatives. Backticks can be used to multi-line the message.\n * @param toBeRemovedInVersion The version it will be removed. Must be in X.Y.Z format.\n */\nexport function deprecate(title: string, deprecationMessage: string, toBeRemovedInVersion: string) {\n // If the message is already showing, don't show it again\n if (!shownMessages.has(title)) {\n printDevelopmentWarning(`%cDEPRECATED:\\x1b[0m ${title}`, DEPRECATION_STYLES);\n // Format multi-line descriptions with the backtick\n printDevelopmentWarning(`${deprecationMessage.replaceAll('\\t', '').replaceAll(' ', '').trim()}`);\n printDevelopmentWarning(`To be removed in: %c${toBeRemovedInVersion}`, DEPRECATION_STYLES);\n shownMessages.add(title);\n }\n}\n\n/**\n * Reset shownMessages set\n *\n * @deprecated For testing purposes only. Do not use.\n */\nexport function resetShownMessages() {\n shownMessages.clear();\n}\n","<template>\n <component :is=\"el\" class=\"b-typography\" :class=\"conditionalClasses\" data-testid=\"typography\">\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoTypographyElement, BentoTypographyModifier, BentoTypographyVariant } from './typography.types';\n import { deprecate } from '@/utils/ts/deprecate';\n\n /**\n * The Typography component makes it easy to apply a default set of font weights, sizes and other text styles\n * easily to text. The variants and properties match with those found in Figma.\n *\n * For example, seeing text with the typography styling of\n *\n * @example\n * import { BentoTypography } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTypography },\n * template: `\n * <bento-typography>\n * ... text content\n * </bento-typography>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-typography',\n inheritAttrs: true,\n props: {\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: String as PropType<BentoTypographyElement | `${BentoTypographyElement}`>,\n default: BentoTypographyElement.PARAGRAPH,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n\n /**\n * Adds the stronger class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n stronger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds the strongest class modifier.\n * Applicable to Caption, Body and Subtitle variants.\n */\n strongest: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the type of typography variant.\n * @values caption, body, title.\n */\n variant: {\n type: String as PropType<BentoTypographyVariant | `${BentoTypographyVariant}`>,\n default: BentoTypographyVariant.BODY,\n validator: (value: BentoTypographyVariant) => Object.values(BentoTypographyVariant).includes(value),\n },\n\n /**\n * Adds the medium class modifier.\n * Applicable to the Title variant.\n */\n medium: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds the large class modifier.\n * Applicable to the Title variant.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds the medium class modifier.\n * Applicable to tje Body variant.\n */\n wide: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n if (props.variant === BentoTypographyVariant.SUBTITLE) {\n deprecate(\n 'BentoTypography \"subtitle\" variant (BentoTypographyVariant.SUBTITLE)',\n `Use the \"title\" or \"BentoTypographyVariant.TITLE\" variant and (optionally) combine it with a size property. e.g. medium / large.\n <bento-typography :variant=\"BentoTypographyVariant.TITLE\" medium>`,\n '2.0.0'\n );\n }\n\n const conditionalClasses = computed(() => ({\n // Caption\n [`b-typography--${BentoTypographyVariant.CAPTION}`]: props.variant === BentoTypographyVariant.CAPTION,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.wide,\n [`b-typography--${BentoTypographyVariant.CAPTION}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.CAPTION && props.stronger,\n\n // Body\n [`b-typography--${BentoTypographyVariant.BODY}`]: props.variant === BentoTypographyVariant.BODY,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.WIDE}`]:\n props.variant === BentoTypographyVariant.BODY && props.wide,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.BODY && props.stronger,\n [`b-typography--${BentoTypographyVariant.BODY}-${BentoTypographyModifier.STRONGEST}`]:\n props.variant === BentoTypographyVariant.BODY && props.strongest,\n\n // Subtitle\n [`b-typography--${BentoTypographyVariant.SUBTITLE}`]: props.variant === BentoTypographyVariant.SUBTITLE,\n [`b-typography--${BentoTypographyVariant.SUBTITLE}-${BentoTypographyModifier.STRONGER}`]:\n props.variant === BentoTypographyVariant.SUBTITLE && props.stronger,\n\n // Title\n [`b-typography--${BentoTypographyVariant.TITLE}`]:\n props.variant === BentoTypographyVariant.TITLE && !props.medium && !props.large,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.MEDIUM}`]:\n props.variant === BentoTypographyVariant.TITLE && props.medium,\n [`b-typography--${BentoTypographyVariant.TITLE}-${BentoTypographyModifier.LARGE}`]:\n props.variant === BentoTypographyVariant.TITLE && props.large,\n }));\n\n return {\n conditionalClasses,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./typography.scss\" />\n"],"names":["BentoTypographyVariant","BentoTypographyVariant2","BentoTypographyModifier","BentoTypographyModifier2","BentoTypographyElement","BentoTypographyElement2","DEV_ENVIROMENT_NAMES","isDevelopmentEnviroment","printDevelopmentWarning","args","DEPRECATION_STYLES","shownMessages","deprecate","title","deprecationMessage","toBeRemovedInVersion","_sfc_main","defineComponent","value","props","computed","openBlock","createBlock","resolveDynamicComponent","_ctx","normalizeClass"],"mappings":";;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,OAAA,QAEAA,EAAA,WAAA,YACAA,EAAA,QAAA,SALQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,WAAA,YACAA,EAAA,gBAAA,iBACAA,EAAA,YAAA,aACAA,EAAA,iBAAA,kBACAA,EAAA,SAAA,KACAA,EAAA,QAAA,KACAA,EAAA,SAAA,UARQA,IAAAD,KAAA,CAAA,CAAA,GAcAE,IAAA,kBAAAC,OACRA,EAAA,KAAA,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A,YAAAE,EAAA,UAAA,GAAAiB,EAAA,YAAAnB,EAAA,YAAAmB,EAAA;AAAA;AAAA,QAEhC,CAAA,iBAAAnB,EAAA,OAAA,GAAAmB,EAAA,YAAAnB,EAAA,SAAA,CAAAmB,EAAA,UAAA,CAAAA,EAAA;AAAA,QAIe,CAAA,iBAAAnB,EAAA,SAAAE,EAAA,QAAA,GAAAiB,EAAA,YAAAnB,EAAA,SAAAmB,EAAA;AAAA,QAElB,CAAA,iBAAAnB,EAAA,SAAAE,EAAA,OAAA,GAAAiB,EAAA,YAAAnB,EAAA,SAAAmB,EAAA;AAAA,MAEA,EAAA;AAAA,IAI5D;AAAA,EACJ;AAER,CAAA;;AA9IqE,SAAAE,EAAA,GAAAC,EAAAC,EAAAC,EAAA,EAAA,GAAA;AAAA,IAAwB,OAAAC,EAAA,CAAA,gBAAAD,EAAA,kBAAA,CAAA;AAAA;;;;;;;;;"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { defineComponent as f, inject as a, computed as i, provide as $, openBlock as s, createElementBlock as h, renderSlot as v, ref as D, resolveComponent as o, resolveDirective as N, normalizeClass as k, createElementVNode as _, normalizeStyle as W, createVNode as m, withCtx as y, createTextVNode as U, toDisplayString as V, createBlock as c, createCommentVNode as l, withDirectives as O } from "vue";
|
|
2
|
+
import { _ as S } from "./_plugin-vue_export-helper.dad06003.js";
|
|
3
|
+
import { a as R } from "./button.623a46d2.js";
|
|
4
|
+
import { BentoInfoIcon as j } from "../info-icon.js";
|
|
5
|
+
import { B as w } from "./index.09f7f1b5.js";
|
|
6
|
+
import { C as A } from "./copy.2a9cddc1.js";
|
|
7
|
+
import { S as z } from "./search.ade93bda.js";
|
|
8
|
+
import { b as F } from "./tooltip.785993dd.js";
|
|
9
|
+
import "../assets/index34.css";
|
|
10
|
+
const T = Symbol("structured list condensed style injection key"), C = Symbol("structured list labels width injection key"), b = ["25-75", "33-66", "42-58", "50-50"], H = { class: "b-structured-list" }, J = {}, K = /* @__PURE__ */ f({
|
|
11
|
+
...J,
|
|
12
|
+
__name: "structured-list",
|
|
13
|
+
props: {
|
|
14
|
+
/**
|
|
15
|
+
* Width of the labels container, in pixels. Overrides layout prop.
|
|
16
|
+
*/
|
|
17
|
+
labelsWidth: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* The layout of the label value pair in percentage.
|
|
23
|
+
* If labelsWidth is set, layout will be overriden by the static pixel value.
|
|
24
|
+
*
|
|
25
|
+
* If the value entered is not listed in the example
|
|
26
|
+
* list below '33-66' will be applied
|
|
27
|
+
* @example
|
|
28
|
+
* '25-75'
|
|
29
|
+
* '33-66'
|
|
30
|
+
* '42-58'
|
|
31
|
+
* '50-50'
|
|
32
|
+
*/
|
|
33
|
+
layout: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "33-66",
|
|
36
|
+
validator: (t) => b.includes(t)
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
setup(t) {
|
|
40
|
+
const e = t, n = a(T, !1), r = i(
|
|
41
|
+
() => b.includes(e.layout) ? e.layout : "33-66"
|
|
42
|
+
), d = i(() => n ? "130px" : e.labelsWidth ? `${e.labelsWidth}px` : `${r.value.split("-")[0]}%`);
|
|
43
|
+
return $(C, d), (u, p) => (s(), h("dl", H, [
|
|
44
|
+
v(u.$slots, "default", {}, void 0, !0)
|
|
45
|
+
]));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const nt = /* @__PURE__ */ S(K, [["__scopeId", "data-v-ee87e115"]]), Y = {
|
|
49
|
+
"en-US": {
|
|
50
|
+
search: "Search"
|
|
51
|
+
}
|
|
52
|
+
}, q = "33%", G = f({
|
|
53
|
+
i18n: { messages: Y },
|
|
54
|
+
name: "bento-structured-list-item",
|
|
55
|
+
components: {
|
|
56
|
+
BentoButton: R,
|
|
57
|
+
BentoInfoIcon: j,
|
|
58
|
+
BentoTypography: w,
|
|
59
|
+
Copy: A,
|
|
60
|
+
SearchIcon: z
|
|
61
|
+
},
|
|
62
|
+
directives: { BentoTooltipDirective: F },
|
|
63
|
+
props: {
|
|
64
|
+
/**
|
|
65
|
+
* Label to display for the value
|
|
66
|
+
*/
|
|
67
|
+
label: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: !0
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* Text to display in info icon tooltip in the label to display for the value
|
|
73
|
+
*/
|
|
74
|
+
labelInfo: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: void 0
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Text to copy when the user clicks `Copy` icon
|
|
80
|
+
*/
|
|
81
|
+
copy: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: void 0
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Function to trigger when user clicks `Search` icon
|
|
87
|
+
*/
|
|
88
|
+
search: {
|
|
89
|
+
type: Function,
|
|
90
|
+
default: void 0
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Text to display when the user hovers over `Search` icon
|
|
94
|
+
*/
|
|
95
|
+
searchTooltip: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: void 0
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
setup() {
|
|
101
|
+
const t = a(T, !1), e = a(
|
|
102
|
+
C,
|
|
103
|
+
D(q)
|
|
104
|
+
), n = i(() => ({
|
|
105
|
+
"b-structured-list-item--condensed": t
|
|
106
|
+
})), r = i(() => t ? "caption" : "body");
|
|
107
|
+
return {
|
|
108
|
+
// Values
|
|
109
|
+
conditionalClasses: n,
|
|
110
|
+
labelTypographyVariant: r,
|
|
111
|
+
labelsWidth: e
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const M = { class: "b-structured-list-item__value" };
|
|
116
|
+
function P(t, e, n, r, d, u) {
|
|
117
|
+
const p = o("bento-typography"), I = o("bento-info-icon"), g = o("copy"), L = o("search-icon"), B = o("bento-button"), E = N("bento-tooltip-directive");
|
|
118
|
+
return s(), h("div", {
|
|
119
|
+
class: k(["b-structured-list-item", t.conditionalClasses])
|
|
120
|
+
}, [
|
|
121
|
+
_("dt", {
|
|
122
|
+
class: "b-structured-list-item__label",
|
|
123
|
+
style: W(`flex-basis:${t.labelsWidth}`)
|
|
124
|
+
}, [
|
|
125
|
+
m(p, { variant: t.labelTypographyVariant }, {
|
|
126
|
+
default: y(() => [
|
|
127
|
+
U(V(t.label), 1)
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
}, 8, ["variant"]),
|
|
131
|
+
t.labelInfo ? (s(), c(I, {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: "b-structured-list-item__icon",
|
|
134
|
+
"tooltip-text": t.labelInfo
|
|
135
|
+
}, null, 8, ["tooltip-text"])) : l("", !0)
|
|
136
|
+
], 4),
|
|
137
|
+
_("dd", M, [
|
|
138
|
+
v(t.$slots, "default", {}, void 0, !0),
|
|
139
|
+
t.copy ? (s(), c(g, {
|
|
140
|
+
key: 0,
|
|
141
|
+
class: "b-structured-list-item__icon",
|
|
142
|
+
text: t.copy
|
|
143
|
+
}, null, 8, ["text"])) : l("", !0),
|
|
144
|
+
t.search ? O((s(), c(B, {
|
|
145
|
+
key: 1,
|
|
146
|
+
class: "b-structured-list-item__icon",
|
|
147
|
+
variant: "tertiary",
|
|
148
|
+
onClick: t.search
|
|
149
|
+
}, {
|
|
150
|
+
iconLeft: y(() => [
|
|
151
|
+
m(L, {
|
|
152
|
+
"svg-title": t.$t("search")
|
|
153
|
+
}, null, 8, ["svg-title"])
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 8, ["onClick"])), [
|
|
157
|
+
[E, t.searchTooltip ? t.searchTooltip : t.$t("search"), "top"]
|
|
158
|
+
]) : l("", !0)
|
|
159
|
+
])
|
|
160
|
+
], 2);
|
|
161
|
+
}
|
|
162
|
+
const rt = /* @__PURE__ */ S(G, [["render", P], ["__scopeId", "data-v-55ace1b2"]]);
|
|
163
|
+
export {
|
|
164
|
+
nt as B,
|
|
165
|
+
T as S,
|
|
166
|
+
rt as a
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=index.0a8ddfaa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.0a8ddfaa.js","sources":["../../../vue2/src/components/structured-list/structured-list.keys.ts","../../../vue2/src/components/structured-list/structured-list.types.ts","../../../vue2/src/components/structured-list/structured-list.vue","../../../vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue"],"sourcesContent":["export const STRUCTURED_LIST_CONDENSED_INJECTION_KEY = Symbol('structured list condensed style injection key');\nexport const STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY = Symbol('structured list labels width injection key');\n","export type BentoStructuredListLayoutOptions = '25-75' | '33-66' | '42-58' | '50-50';\nexport const BentoStructuredListLayoutOptions = ['25-75', '33-66', '42-58', '50-50'];\n","<template>\n <dl class=\"b-structured-list\">\n <slot />\n </dl>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, PropType, provide } from 'vue';\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '@/components/structured-list/structured-list.keys';\n import { BentoStructuredListLayoutOptions } from './structured-list.types';\n\n const props = defineProps({\n /**\n * Width of the labels container, in pixels. Overrides layout prop.\n */\n labelsWidth: {\n type: Number,\n default: null,\n },\n /**\n * The layout of the label value pair in percentage.\n * If labelsWidth is set, layout will be overriden by the static pixel value.\n *\n * If the value entered is not listed in the example\n * list below '33-66' will be applied\n * @example\n * '25-75'\n * '33-66'\n * '42-58'\n * '50-50'\n */\n layout: {\n type: String as PropType<BentoStructuredListLayoutOptions>,\n default: '33-66',\n validator: (value: BentoStructuredListLayoutOptions) => BentoStructuredListLayoutOptions.includes(value),\n },\n });\n\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n\n const computedLayout = computed(() =>\n BentoStructuredListLayoutOptions.includes(props.layout) ? props.layout : '33-66'\n );\n\n const computedLabelsWidth = computed(() => {\n if (isCondensed) {\n return '130px';\n }\n\n if (props.labelsWidth) {\n return `${props.labelsWidth}px`;\n }\n\n return `${computedLayout.value.split('-')[0]}%`;\n });\n\n provide(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, computedLabelsWidth);\n</script>\n\n<script lang=\"ts\">\n /**\n * This is a list used to display pairs of information in a clear and organized manner.\n * `BentoStructureListItem` should be used to pass the label/value pairs to the list.\n *\n * @example\n * import { BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredList, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Payment\">\n * <bento-payment-method label=\"Klarna\" type=\"Klarna\" />\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\">\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\">\n * 123456\n * </bento-currency>\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list.scss\" />\n","<template>\n <div class=\"b-structured-list-item\" :class=\"conditionalClasses\">\n <dt class=\"b-structured-list-item__label\" :style=\"`flex-basis:${labelsWidth}`\">\n <bento-typography :variant=\"labelTypographyVariant\">{{ label }}</bento-typography>\n <bento-info-icon v-if=\"labelInfo\" class=\"b-structured-list-item__icon\" :tooltip-text=\"labelInfo\" />\n </dt>\n <dd class=\"b-structured-list-item__value\">\n <slot />\n <copy v-if=\"copy\" class=\"b-structured-list-item__icon\" :text=\"copy\" />\n <bento-button\n v-if=\"search\"\n v-bento-tooltip-directive:top=\"searchTooltip ? searchTooltip : $t('search')\"\n class=\"b-structured-list-item__icon\"\n variant=\"tertiary\"\n @click=\"search\"\n >\n <template #iconLeft>\n <search-icon :svg-title=\"$t('search')\" />\n </template>\n </bento-button>\n </dd>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, PropType, ref, Ref } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography } from '@/components/typography';\n import Copy from '@/components/internal/copy/copy.vue';\n import SearchIcon from '@adyen/ui-assets-icons-16/vue/search';\n\n // Directives\n import { BentoTooltipDirective } from '@/directives';\n\n // Keys\n import {\n STRUCTURED_LIST_CONDENSED_INJECTION_KEY,\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n } from '../../structured-list.keys';\n\n import messages from '../../messages.json';\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n /**\n * This is an item of the `BentoStructuredList` meant to be used only with that component.\n * It consists of a label/value pair, and also the optional copy and search modifiers.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoStructuredListItem, BentoStructuredListItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoStructuredListItem, BentoStructuredListItem },\n * template: `\n * <bento-structured-list>\n * <bento-structured-list-item label=\"Shopper\" search='searchShopper' search-tooltip='Find shopper'>\n * <bento-typography>\n * 143442642\n * </bento-status>\n * </bento-structured-list-item>\n * <bento-structured-list-item label=\"Amount\" copy='123456'>\n * <bento-currency :currency=\"BentoCurrencyISOCode.USD\">\n * 123456\n * </bento-currency>\n * </bento-structured-list-item>\n * </bento-structured-list>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-structured-list-item',\n components: {\n BentoButton,\n BentoInfoIcon,\n BentoTypography,\n Copy,\n SearchIcon,\n },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Label to display for the value\n */\n label: {\n type: String,\n required: true,\n },\n /**\n * Text to display in info icon tooltip in the label to display for the value\n */\n labelInfo: {\n type: String,\n default: undefined,\n },\n /**\n * Text to copy when the user clicks `Copy` icon\n */\n copy: {\n type: String,\n default: undefined,\n },\n /**\n * Function to trigger when user clicks `Search` icon\n */\n search: {\n type: Function as PropType<(event: Event) => void>,\n default: undefined,\n },\n /**\n * Text to display when the user hovers over `Search` icon\n */\n searchTooltip: {\n type: String,\n default: undefined,\n },\n },\n setup() {\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(\n STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY,\n ref(DEFAULT_LABELS_WIDTH)\n );\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n\n return {\n // Values\n conditionalClasses,\n labelTypographyVariant,\n labelsWidth,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./structured-list-item.scss\" />\n"],"names":["STRUCTURED_LIST_CONDENSED_INJECTION_KEY","STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY","BentoStructuredListLayoutOptions","__default__","isCondensed","inject","computedLayout","computed","props","computedLabelsWidth","provide","DEFAULT_LABELS_WIDTH","_sfc_main","defineComponent","messages","BentoButton","BentoInfoIcon","BentoTypography","Copy","SearchIcon","BentoTooltipDirective","labelsWidth","ref","conditionalClasses","labelTypographyVariant","_directive_bento_tooltip_directive","resolveDirective","createElementVNode","normalizeStyle","_ctx","withCtx","createCommentVNode","_hoisted_1","renderSlot","openBlock","createBlock","_component_copy","createVNode","_component_search_icon"],"mappings":";;;;;;;;;AAAa,MAAAA,IAAA,OAAA,+CAAA,GACAC,IAAA,OAAA,4CAAA,GCANC,IAAA,CAAA,SAAA,SAAA,SAAA,OAAA,uCCqFHC,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7CAC,IAAAC,EAAAL,GAAA,EAAA,GAEAM,IAAAC;AAAA,MAAuB,MAAAL,EAAA,SAAAM,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EC,IAAAF,EAAA,MACIH,IACI,UAGJI,EAAA,cACI,GAAAA,EAAA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,OAAA;AAAA,MAC5C,OAAAC,EAAA,cAAAC,EAAA,aAAA;AAAA,IAA4B,GAAA;AAAA;QAAgC,SAAAC,EAAA,MAAA;AAAA;;QACrC,GAAA;AAAA,MAAA,GAAA,GAAA,CAAA,SAAA,CAAA;AAAA;QAA+C,KAAA;AAAA,QAAE,OAAA;AAAA;MAE5E,GAAA,MAAA,GAAA,CAAA,cAAA,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,CAAA;AAAA,IACIJ,EAAA,MAAAK,GAAA;AAAA,MACgBC,EAAAJ,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAsDA,EAAA,QAAAK,EAAA,GAAAC,EAAAC,GAAA;AAAA,QAAhB,KAAA;AAAA,QAAM,OAAA;AAAA;;;QAIpB,KAAA;AAAA,QACpC,OAAA;AAAA,QACM,SAAA;AAAA;MAEa,GAAA;AAAA,QACD,UAAAN,EAAA,MAAA;AAAA,UAAaO,EAAAC,GAAA;AAAA;;;;;;;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as o, inject as _, ref as n, computed as t, openBlock as r, createElementBlock as i, normalizeClass as c, unref as a } from "vue";
|
|
2
|
+
import { _ as d } from "./_plugin-vue_export-helper.dad06003.js";
|
|
3
|
+
import "../assets/index.css";
|
|
4
|
+
const l = Symbol("divider inverse style injection key"), p = {}, f = /* @__PURE__ */ o({
|
|
5
|
+
...p,
|
|
6
|
+
__name: "divider",
|
|
7
|
+
setup(m) {
|
|
8
|
+
const e = _(l, n(!1)), s = t(() => ({
|
|
9
|
+
"b-divider--inverse": e.value
|
|
10
|
+
}));
|
|
11
|
+
return (v, u) => (r(), i("hr", {
|
|
12
|
+
class: c(["b-divider", a(s)])
|
|
13
|
+
}, null, 2));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const E = /* @__PURE__ */ d(f, [["__scopeId", "data-v-1b3f07a8"]]);
|
|
17
|
+
export {
|
|
18
|
+
E as B,
|
|
19
|
+
l as D
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.113137fb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.113137fb.js","sources":["../../../vue2/src/components/divider/divider.keys.ts","../../../vue2/src/components/divider/divider.vue"],"sourcesContent":["export const DIVIDER_INVERSE_INJECTION_KEY = Symbol('divider inverse style injection key');\n","<template>\n <hr class=\"b-divider\" :class=\"conditionalClasses\" />\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue';\n import { DIVIDER_INVERSE_INJECTION_KEY } from './divider.keys';\n\n const isInverseColorSet = inject(DIVIDER_INVERSE_INJECTION_KEY, ref(false));\n\n const conditionalClasses = computed(() => ({\n 'b-divider--inverse': isInverseColorSet.value,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Divider component is a thin line that helps separate content and group them visually into sections.\n *\n * @example\n * import { BentoDivider } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDivider },\n * template: `<bento-divider />`\n * }\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./divider.scss\" />\n"],"names":["DIVIDER_INVERSE_INJECTION_KEY","__default__","isInverseColorSet","inject","ref","conditionalClasses","computed"],"mappings":";;;AAAa,MAAAA,IAAA,OAAA,qCAAA,GC4BTC,IAAA,CAAA;;;;AApBA,UAAAC,IAAAC,EAAAH,GAAAI,EAAA,EAAA,CAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,sBAAAJ,EAAA;AAAA,IACC,EAAA;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as d, computed as i, defineComponent as u, toRefs as p, resolveComponent as _, openBlock as s, createElementBlock as n, normalizeClass as m, createVNode as v, withCtx as g, createTextVNode as f, toDisplayString as y } from "vue";
|
|
2
|
-
import { B as L } from "./index.
|
|
2
|
+
import { B as L } from "./index.09f7f1b5.js";
|
|
3
3
|
import { _ as b } from "./_plugin-vue_export-helper.dad06003.js";
|
|
4
|
-
import "../assets/
|
|
4
|
+
import "../assets/index9.css";
|
|
5
5
|
const h = (e) => {
|
|
6
6
|
const a = d(e);
|
|
7
7
|
return i(() => a.value ? a.value.trim().charAt(0).toUpperCase() : null);
|
|
@@ -98,4 +98,4 @@ export {
|
|
|
98
98
|
t as a,
|
|
99
99
|
h as u
|
|
100
100
|
};
|
|
101
|
-
//# sourceMappingURL=index.
|
|
101
|
+
//# sourceMappingURL=index.1dac266a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.
|
|
1
|
+
{"version":3,"file":"index.1dac266a.js","sources":["../../../vue2/src/composables/initials.ts","../../../vue2/src/components/avatar-image/avatar-image.types.ts","../../../vue2/src/components/avatar-image/avatar-image.vue"],"sourcesContent":["import { computed, ComputedRef, ref } from 'vue';\nimport { MaybeRef } from '@/types';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"Profile picture\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n export default defineComponent({\n name: 'avatar-image',\n components: { BentoTypography },\n props: {\n /**\n * Image src to load the profile picture.\n */\n src: {\n type: String,\n default: null,\n },\n /**\n * Name of the user that will be used to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: {\n type: String,\n default: null,\n },\n /**\n * Variants supported for small and large.\n * Default - large\n */\n variant: {\n type: String as PropType<BentoAvatarImageVariant>,\n default: BentoAvatarImageVariant.LARGE,\n validator: (value: BentoAvatarImageVariant) => Object.values(BentoAvatarImageVariant).includes(value),\n },\n /**\n * Avatar color. Defaults to yellow.\n */\n color: {\n type: String as PropType<BentoAvatarImageColor>,\n default: BentoAvatarImageColor.YELLOW,\n validator: (value: BentoAvatarImageColor) => Object.values(BentoAvatarImageColor).includes(value),\n },\n },\n setup(props) {\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n\n return {\n // Values\n conditionalClasses,\n initials,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","_sfc_main","defineComponent","BentoTypography","value","props","toRefs","initials","openBlock","createElementBlock","normalizeClass","_ctx","_hoisted_1","_hoisted_2","createVNode","_component_bento_typography"],"mappings":";;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,SAAAG,EAAA,MAAAF,EAAA,QAAAA,EAAA,MAAA,KAAA,EAAA,OAAA,CAAA,EAAA,YAAA,IAAA,IAAA;AACJ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AAAA;;;;AAFQ,SAAAC,EAAA,GAAAC,EAAA,OAAA;AAAA,IAAkB,OAAAC,EAAA,CAAA,kBAAAC,EAAA,kBAAA,CAAA;AAAA,IAAqB,eAAA;AAAA,IAC7E,eAAA;AAAA,EAAA,GAAA;AAAA;MAAW,KAAA;AAAA,MAAO,KAAAA,EAAA;AAAA,MAA6B,OAAA;AAAA,MAAkB,KAAA;AAAA,MAC/E,eAAA;AAAA,IAAA,GAAA,MAAA,GAAAC,CAAA,MAAAJ,EAAA,GAAAC,EAAA,OAAAI,GAAA;AAAA,MAC+BC,EAAAC,GAAA;AAAA,QAAe,IAAA;AAAA,QAAC,SAAA;AAAA;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as X, computed as G, resolveComponent as F, openBlock as _, createElementBlock as L, createBlock as Q, withCtx as $, createTextVNode as x, toDisplayString as W, Fragment as B } from "vue";
|
|
2
2
|
import { r as c, t as h, e as b, g as j, d as Z, f as K } from "./index.f55fdc32.js";
|
|
3
|
-
import { B as V } from "./index.
|
|
3
|
+
import { B as V } from "./index.09f7f1b5.js";
|
|
4
4
|
import { u as J } from "./i18n.6c402773.js";
|
|
5
5
|
import { _ as z } from "./_plugin-vue_export-helper.dad06003.js";
|
|
6
6
|
function ee(e) {
|
|
@@ -929,4 +929,4 @@ export {
|
|
|
929
929
|
Ue as f,
|
|
930
930
|
f as t
|
|
931
931
|
};
|
|
932
|
-
//# sourceMappingURL=index.
|
|
932
|
+
//# sourceMappingURL=index.45d00aad.js.map
|