@adyen/bento-vue3 1.34.0 → 1.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +7 -7
- 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 +1 -1
- 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 +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/utils/ts/get-date-locale/get-date-locale.d.ts +11 -0
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/currency.css +1 -0
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/accordion-item.C30QFxol.js +142 -0
- package/dist/chunks/accordion-item.C30QFxol.js.map +1 -0
- package/dist/chunks/{action-bar.DGQYYi8b.js → action-bar.5XBrXwYv.js} +58 -44
- package/dist/chunks/{action-bar.DGQYYi8b.js.map → action-bar.5XBrXwYv.js.map} +1 -1
- package/dist/chunks/{alert.Bz4tNKDH.js → alert.BvSx_Bi7.js} +26 -20
- package/dist/chunks/{alert.Bz4tNKDH.js.map → alert.BvSx_Bi7.js.map} +1 -1
- package/dist/chunks/{avatar.mNlMngHQ.js → avatar.8erKxh8t.js} +13 -13
- package/dist/chunks/avatar.8erKxh8t.js.map +1 -0
- package/dist/chunks/{base-modal.Bl7DBkt0.js → base-modal.BenvK-Np.js} +35 -29
- package/dist/chunks/{base-modal.Bl7DBkt0.js.map → base-modal.BenvK-Np.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BLmcwr2f.js → button-actions-with-menu.CHOjMHpd.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.BLmcwr2f.js.map → button-actions-with-menu.CHOjMHpd.js.map} +1 -1
- package/dist/chunks/{button-actions.hdK5IgrZ.js → button-actions.DyI_dSvx.js} +2 -2
- package/dist/chunks/{button-actions.hdK5IgrZ.js.map → button-actions.DyI_dSvx.js.map} +1 -1
- package/dist/chunks/{calendar.D--sOCBT.js → calendar.DzYaxc0M.js} +148 -148
- package/dist/chunks/calendar.DzYaxc0M.js.map +1 -0
- package/dist/chunks/{card.BvSoujBc.js → card.Bt8jcp9I.js} +45 -37
- package/dist/chunks/card.Bt8jcp9I.js.map +1 -0
- package/dist/chunks/{checkbox-group.CuLP3hPd.js → checkbox-group.B0wngKi6.js} +4 -4
- package/dist/chunks/{checkbox-group.CuLP3hPd.js.map → checkbox-group.B0wngKi6.js.map} +1 -1
- package/dist/chunks/{checkbox.DMMXn-h8.js → checkbox.Bk_jmkGe.js} +50 -40
- package/dist/chunks/{checkbox.DMMXn-h8.js.map → checkbox.Bk_jmkGe.js.map} +1 -1
- package/dist/chunks/{code-snippet.BWM5w4CP.js → code-snippet.1SigVnjS.js} +97 -88
- package/dist/chunks/code-snippet.1SigVnjS.js.map +1 -0
- package/dist/chunks/{controls-group.BnZVHgQK.js → controls-group.COc0kArc.js} +2 -2
- package/dist/chunks/{controls-group.BnZVHgQK.js.map → controls-group.COc0kArc.js.map} +1 -1
- package/dist/chunks/{copy.h-wVGvID.js → copy.1-HH1fz5.js} +28 -20
- package/dist/chunks/{copy.h-wVGvID.js.map → copy.1-HH1fz5.js.map} +1 -1
- package/dist/chunks/{currency.CFJy6QYU.js → currency.BdtY-UIM.js} +3 -2
- package/dist/chunks/{currency.CFJy6QYU.js.map → currency.BdtY-UIM.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BIH2wzgk.js → dashboard-section.BOrGKdY9.js} +2 -2
- package/dist/chunks/{dashboard-section.BIH2wzgk.js.map → dashboard-section.BOrGKdY9.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CFJdLuJp.js → dashed-underline.BO4BuqUM.js} +2 -2
- package/dist/chunks/{dashed-underline.CFJdLuJp.js.map → dashed-underline.BO4BuqUM.js.map} +1 -1
- package/dist/chunks/{data-grid-template.21gqdYrs.js → data-grid-template.O946JKTa.js} +2 -2
- package/dist/chunks/{data-grid-template.21gqdYrs.js.map → data-grid-template.O946JKTa.js.map} +1 -1
- package/dist/chunks/{data-grid.DUwLxtW_.js → data-grid.Bv5TA_zR.js} +578 -532
- package/dist/chunks/{data-grid.DUwLxtW_.js.map → data-grid.Bv5TA_zR.js.map} +1 -1
- package/dist/chunks/{date-picker.21z_Sw4V.js → date-picker.DvEPEMIM.js} +99 -91
- package/dist/chunks/date-picker.DvEPEMIM.js.map +1 -0
- package/dist/chunks/{date-range-picker.K2TeW8aX.js → date-range-picker.BLVlkkG_.js} +338 -316
- package/dist/chunks/date-range-picker.BLVlkkG_.js.map +1 -0
- package/dist/chunks/{date.D8rQMzMG.js → date.CYUV4seY.js} +92 -92
- package/dist/chunks/{date.D8rQMzMG.js.map → date.CYUV4seY.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BNJnscD2.js → dropdown-tag.bpKWbC_O.js} +3 -3
- package/dist/chunks/{dropdown-tag.BNJnscD2.js.map → dropdown-tag.bpKWbC_O.js.map} +1 -1
- package/dist/chunks/{dropdown.ex87AZ7s.js → dropdown.rFZp3hMb.js} +212 -193
- package/dist/chunks/dropdown.rFZp3hMb.js.map +1 -0
- package/dist/chunks/{error-message.D2Y99KjT.js → error-message.DblYEZ7E.js} +43 -29
- package/dist/chunks/{error-message.D2Y99KjT.js.map → error-message.DblYEZ7E.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
- package/dist/chunks/{filter-bar.BAmG-yML.js → filter-bar.IN7gqxsc.js} +727 -712
- package/dist/chunks/filter-bar.IN7gqxsc.js.map +1 -0
- package/dist/chunks/{footer-actions.gtxofUAa.js → footer-actions.CyoMN_ca.js} +2 -2
- package/dist/chunks/{footer-actions.gtxofUAa.js.map → footer-actions.CyoMN_ca.js.map} +1 -1
- package/dist/chunks/{form-layout-title.Boi0QQZL.js → form-layout-title.Bi_3du_6.js} +2 -2
- package/dist/chunks/{form-layout-title.Boi0QQZL.js.map → form-layout-title.Bi_3du_6.js.map} +1 -1
- package/dist/chunks/{index.B_UZQ6qF.js → get-date-locale.BN8xEjY0.js} +855 -204
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +1 -0
- package/dist/chunks/{header.BMYhkrGT.js → header.Byd6jXl6.js} +104 -98
- package/dist/chunks/{header.BMYhkrGT.js.map → header.Byd6jXl6.js.map} +1 -1
- package/dist/chunks/{index.Z84QE0E2.js → index.CrhTVr5J.js} +2 -2
- package/dist/chunks/{index.Z84QE0E2.js.map → index.CrhTVr5J.js.map} +1 -1
- package/dist/chunks/{index.xqFSZOAb.js → index.DDnf1O9p.js} +2 -2
- package/dist/chunks/{index.xqFSZOAb.js.map → index.DDnf1O9p.js.map} +1 -1
- package/dist/chunks/{index.B_EJflcs.js → index.DPafeRJa.js} +2 -2
- package/dist/chunks/{index.B_EJflcs.js.map → index.DPafeRJa.js.map} +1 -1
- package/dist/chunks/{input-field.Dely7A8G.js → input-field.CgS1AEGu.js} +3 -3
- package/dist/chunks/{input-field.Dely7A8G.js.map → input-field.CgS1AEGu.js.map} +1 -1
- package/dist/chunks/{inspector.types.t2SPyhw3.js → inspector.types.xpv2J9pJ.js} +44 -36
- package/dist/chunks/{inspector.types.t2SPyhw3.js.map → inspector.types.xpv2J9pJ.js.map} +1 -1
- package/dist/chunks/loading-button.Bntgn6Lk.js +137 -0
- package/dist/chunks/loading-button.Bntgn6Lk.js.map +1 -0
- package/dist/chunks/{menu.CLicp_2I.js → menu.BN5WGXw3.js} +2 -2
- package/dist/chunks/{menu.CLicp_2I.js.map → menu.BN5WGXw3.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Caqa7dDp.js → modal-fullscreen.zljoH4pr.js} +35 -29
- package/dist/chunks/{modal-fullscreen.Caqa7dDp.js.map → modal-fullscreen.zljoH4pr.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dzmth-oW.js → modal.vue_vue_type_script_setup_true_lang.tT8umwqG.js} +31 -25
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.tT8umwqG.js.map +1 -0
- package/dist/chunks/{pagination.I5w8bpUS.js → pagination.BMn5ryDD.js} +2 -2
- package/dist/chunks/{pagination.I5w8bpUS.js.map → pagination.BMn5ryDD.js.map} +1 -1
- package/dist/chunks/{popover.DQP3ce2x.js → popover.pDk6zsak.js} +2 -2
- package/dist/chunks/{popover.DQP3ce2x.js.map → popover.pDk6zsak.js.map} +1 -1
- package/dist/chunks/{radio-group.lOSBHghv.js → radio-group.DUtoFXmr.js} +3 -3
- package/dist/chunks/{radio-group.lOSBHghv.js.map → radio-group.DUtoFXmr.js.map} +1 -1
- package/dist/chunks/{search-bar.GCRTgBUA.js → search-bar.poJCoGD-.js} +49 -41
- package/dist/chunks/{search-bar.GCRTgBUA.js.map → search-bar.poJCoGD-.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CGH_6m7u.js → secondary-nav.Dyvd-YBg.js} +2 -2
- package/dist/chunks/{secondary-nav.CGH_6m7u.js.map → secondary-nav.Dyvd-YBg.js.map} +1 -1
- package/dist/chunks/{selection-card-group.BdTuPhEm.js → selection-card-group.CHBS81j6.js} +3 -3
- package/dist/chunks/{selection-card-group.BdTuPhEm.js.map → selection-card-group.CHBS81j6.js.map} +1 -1
- package/dist/chunks/{sidepanel.DA8nQepj.js → sidepanel.CuQCXV1E.js} +36 -30
- package/dist/chunks/{sidepanel.DA8nQepj.js.map → sidepanel.CuQCXV1E.js.map} +1 -1
- package/dist/chunks/{structured-list-item.Z-1ivOFu.js → structured-list-item.1A2sjhP4.js} +35 -29
- package/dist/chunks/{structured-list-item.Z-1ivOFu.js.map → structured-list-item.1A2sjhP4.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js → summary-grid-item-custom.CuvUVoQ8.js} +2 -2
- package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js.map → summary-grid-item-custom.CuvUVoQ8.js.map} +1 -1
- package/dist/chunks/{textarea.kYFGQFwd.js → textarea.CHnvON8G.js} +2 -2
- package/dist/chunks/{textarea.kYFGQFwd.js.map → textarea.CHnvON8G.js.map} +1 -1
- package/dist/chunks/{timeline-item.D-Yy2qQr.js → timeline-item.Dc_l5Xyy.js} +81 -75
- package/dist/chunks/{timeline-item.D-Yy2qQr.js.map → timeline-item.Dc_l5Xyy.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js → tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js} +82 -70
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js.map → tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.ClVxNmUf.js → use-cached-selected-values.CS3gHOyI.js} +86 -72
- package/dist/chunks/{use-cached-selected-values.ClVxNmUf.js.map → use-cached-selected-values.CS3gHOyI.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +43 -43
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +5 -5
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/chunks/accordion-item.CQ8DLt9l.js +0 -126
- package/dist/chunks/accordion-item.CQ8DLt9l.js.map +0 -1
- package/dist/chunks/avatar.mNlMngHQ.js.map +0 -1
- package/dist/chunks/calendar.D--sOCBT.js.map +0 -1
- package/dist/chunks/card.BvSoujBc.js.map +0 -1
- package/dist/chunks/code-snippet.BWM5w4CP.js.map +0 -1
- package/dist/chunks/date-picker.21z_Sw4V.js.map +0 -1
- package/dist/chunks/date-range-picker.K2TeW8aX.js.map +0 -1
- package/dist/chunks/dropdown.ex87AZ7s.js.map +0 -1
- package/dist/chunks/filter-bar.BAmG-yML.js.map +0 -1
- package/dist/chunks/index.B_UZQ6qF.js.map +0 -1
- package/dist/chunks/loading-button.Mx-oDIGy.js +0 -123
- package/dist/chunks/loading-button.Mx-oDIGy.js.map +0 -1
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.Dzmth-oW.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as S, openBlock as f, createBlock as T, unref as t, createSlots as
|
|
1
|
+
import { defineComponent as S, openBlock as f, createBlock as T, unref as t, createSlots as K, withCtx as n, createElementVNode as E, createVNode as c, createTextVNode as J, toDisplayString as Y, renderSlot as O, toRefs as M, ref as i, computed as C, watch as j, nextTick as z, provide as A, createElementBlock as D, normalizeClass as H, withKeys as q, withModifiers as Q, withDirectives as W, createCommentVNode as X } from "vue";
|
|
2
2
|
import { B as y, d as Z } from "./typography.z9P0Ec3Q.js";
|
|
3
|
-
import { F as ee } from "./footer-actions.
|
|
3
|
+
import { F as ee } from "./footer-actions.CyoMN_ca.js";
|
|
4
4
|
import { D as te, B as se, b as ae, a as ie } from "./dialog-page.DALFn9KR.js";
|
|
5
5
|
import { _ as N } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import { B as ne } from "./button.Br6CyG40.js";
|
|
7
7
|
import { B as oe } from "./focus-trap.CwkbHfT8.js";
|
|
8
8
|
import { C as le } from "./cross.OvPfvoqX.js";
|
|
9
9
|
import { S as re } from "./sidepanel.keys.R0DKQuYx.js";
|
|
10
|
-
import { B as
|
|
11
|
-
import { u as
|
|
10
|
+
import { B as ce } from "./directive.O3yEdalv.js";
|
|
11
|
+
import { u as ue } from "./i18n.DL9GT2-k.js";
|
|
12
12
|
import { g as de } from "./unique-id.XFfoKuc2.js";
|
|
13
13
|
import "../assets/sidepanel.css";
|
|
14
14
|
const pe = { class: "b-sidepanel-page__header" }, fe = { class: "b-sidepanel-page__content" }, ve = { class: "b-sidepanel-page__actions" }, me = {}, _e = /* @__PURE__ */ S({
|
|
@@ -78,10 +78,10 @@ const pe = { class: "b-sidepanel-page__header" }, fe = { class: "b-sidepanel-pag
|
|
|
78
78
|
class: "b-sidepanel-page",
|
|
79
79
|
"page-id": e.pageId,
|
|
80
80
|
"previous-page": e.previousPage
|
|
81
|
-
},
|
|
81
|
+
}, K({
|
|
82
82
|
header: n(() => [
|
|
83
83
|
E("div", pe, [
|
|
84
|
-
|
|
84
|
+
c(t(y), {
|
|
85
85
|
class: "b-sidepanel-page__title",
|
|
86
86
|
el: "h2",
|
|
87
87
|
variant: "title"
|
|
@@ -95,7 +95,7 @@ const pe = { class: "b-sidepanel-page__header" }, fe = { class: "b-sidepanel-pag
|
|
|
95
95
|
]),
|
|
96
96
|
content: n(() => [
|
|
97
97
|
E("div", fe, [
|
|
98
|
-
|
|
98
|
+
c(t(y), {
|
|
99
99
|
el: "div",
|
|
100
100
|
variant: "body"
|
|
101
101
|
}, {
|
|
@@ -112,7 +112,7 @@ const pe = { class: "b-sidepanel-page__header" }, fe = { class: "b-sidepanel-pag
|
|
|
112
112
|
name: "footer",
|
|
113
113
|
fn: n(() => [
|
|
114
114
|
E("div", ve, [
|
|
115
|
-
|
|
115
|
+
c(t(ee), {
|
|
116
116
|
actions: e.actions,
|
|
117
117
|
"actions-label": e.actionsLabel,
|
|
118
118
|
"destructive-actions": e.destructiveActions
|
|
@@ -128,6 +128,12 @@ var v = /* @__PURE__ */ ((e) => (e.UPDATE_ACTIVE_PAGE = "update:active-page", e.
|
|
|
128
128
|
const G = {
|
|
129
129
|
"en-US": {
|
|
130
130
|
close: "Close"
|
|
131
|
+
},
|
|
132
|
+
"pt-BR": {
|
|
133
|
+
close: "Fechar"
|
|
134
|
+
},
|
|
135
|
+
"ja-JP": {
|
|
136
|
+
close: "閉じる"
|
|
131
137
|
}
|
|
132
138
|
}, ge = {
|
|
133
139
|
key: 0,
|
|
@@ -176,55 +182,55 @@ const G = {
|
|
|
176
182
|
}
|
|
177
183
|
},
|
|
178
184
|
setup(e, { emit: m }) {
|
|
179
|
-
const s = e, _ = m, { activePage:
|
|
185
|
+
const s = e, _ = m, { activePage: h, isOpen: P } = M(s), { t: k } = ue({ messages: G }), o = i(null), u = i([]), l = i([]), w = i(se.TRANSITION_LEVEL_DEEPER), d = i(!1), b = de("sidepanel"), g = i(!1), B = i(!1), L = C(() => ({
|
|
180
186
|
"b-sidepanel--hide": d.value,
|
|
181
|
-
"b-sidepanel--animation":
|
|
187
|
+
"b-sidepanel--animation": B.value
|
|
182
188
|
})), U = () => {
|
|
183
189
|
d.value && (o.value.close(), l.value[0] && _(v.UPDATE_ACTIVE_PAGE, l.value[0]), l.value = [], d.value = !1, g.value = !1, _(v.UPDATE_IS_OPEN, !1));
|
|
184
190
|
}, p = () => {
|
|
185
191
|
o.value.open && (d.value = !0);
|
|
186
192
|
}, V = () => {
|
|
187
193
|
s.isDismissible && p();
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
-
() =>
|
|
194
|
+
}, R = C(() => s.hideCloseButton !== null ? s.hideCloseButton : !s.isDismissible);
|
|
195
|
+
j(
|
|
196
|
+
() => P.value,
|
|
191
197
|
async () => {
|
|
192
|
-
await
|
|
198
|
+
await z(), o.value && (P.value ? (g.value = !0, o.value.showModal(), l.value.length || l.value.push(h.value)) : o.value.open && p());
|
|
193
199
|
},
|
|
194
200
|
{ immediate: !0 }
|
|
195
201
|
);
|
|
196
|
-
const
|
|
202
|
+
const $ = (a) => _(v.UPDATE_ACTIVE_PAGE, a), x = (a) => () => {
|
|
197
203
|
var r;
|
|
198
|
-
|
|
199
|
-
},
|
|
204
|
+
u.value = (r = u.value) == null ? void 0 : r.filter((I) => I !== a);
|
|
205
|
+
}, F = (a) => (u.value.push(a), { unregisterPage: x(a) });
|
|
200
206
|
return A(ae, {
|
|
201
|
-
activePage:
|
|
207
|
+
activePage: h,
|
|
202
208
|
animation: w,
|
|
203
|
-
isAnimationActive:
|
|
209
|
+
isAnimationActive: B,
|
|
204
210
|
isOpen: g,
|
|
205
|
-
pages:
|
|
211
|
+
pages: u,
|
|
206
212
|
previousPages: l,
|
|
207
|
-
updatePage:
|
|
208
|
-
}), A(ie,
|
|
213
|
+
updatePage: $
|
|
214
|
+
}), A(ie, F), A(re, b), !s.isDismissible && s.hideCloseButton === null && Z(
|
|
209
215
|
'BentoSidepanel "isDismissible" property’s behavior',
|
|
210
216
|
'BentoSidepanel "isDismissible" will no longer hide the close button. Use "hideCloseButton=true" instead.',
|
|
211
217
|
"2.0.0"
|
|
212
218
|
), (a, r) => (f(), D("dialog", {
|
|
213
219
|
ref_key: "sidepanel",
|
|
214
220
|
ref: o,
|
|
215
|
-
class:
|
|
221
|
+
class: H(["b-sidepanel", L.value]),
|
|
216
222
|
onAnimationend: U,
|
|
217
|
-
onKeydown: r[0] || (r[0] = q(Q((
|
|
223
|
+
onKeydown: r[0] || (r[0] = q(Q((I) => e.isDismissible && p, ["prevent"]), ["esc"]))
|
|
218
224
|
}, [
|
|
219
|
-
W((f(), T(t(oe), { id: t(
|
|
225
|
+
W((f(), T(t(oe), { id: t(b) }, {
|
|
220
226
|
default: n(() => [
|
|
221
|
-
|
|
222
|
-
|
|
227
|
+
R.value ? X("", !0) : (f(), D("div", ge, [
|
|
228
|
+
c(t(ne), {
|
|
223
229
|
variant: "tertiary",
|
|
224
230
|
onClick: p
|
|
225
231
|
}, {
|
|
226
232
|
default: n(() => [
|
|
227
|
-
|
|
233
|
+
c(t(le), {
|
|
228
234
|
"svg-title": t(k)("close")
|
|
229
235
|
}, null, 8, ["svg-title"])
|
|
230
236
|
]),
|
|
@@ -235,7 +241,7 @@ const G = {
|
|
|
235
241
|
]),
|
|
236
242
|
_: 3
|
|
237
243
|
}, 8, ["id"])), [
|
|
238
|
-
[t(
|
|
244
|
+
[t(ce), V]
|
|
239
245
|
])
|
|
240
246
|
], 34));
|
|
241
247
|
}
|
|
@@ -245,4 +251,4 @@ export {
|
|
|
245
251
|
ke as a,
|
|
246
252
|
Ge as s
|
|
247
253
|
};
|
|
248
|
-
//# sourceMappingURL=sidepanel.
|
|
254
|
+
//# sourceMappingURL=sidepanel.CuQCXV1E.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidepanel.DA8nQepj.js","sources":["../../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../../vue2/src/components/sidepanel/sidepanel.types.ts","../../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v2.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","props","__props","emit","__emit","activePage","isOpen","toRefs","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","conditionalClasses","computed","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;4IA2IIA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IQ,IAAAC,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;GC6PRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhNA,UAAAC,IAAAC,GA0CAC,IAAAC,GAYA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAN,CAAA,GACA,EAAA,GAAAO,EAAA,IAAAC,GAAA,EAAA,UAAAT,EAAA,CAAA,GACAU,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,GAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,GAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GACAS,IAAAT,EAAA,EAAA,GAGAU,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAN,EAAA;AAAA,MACR,0BAAAI,EAAA;AAAA,IACa,EAAA,GAIhDG,IAAA,MAAA;AACI,MAAAP,EAAA,UACIN,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAAA,KACIV,EAAAN,EAAA,oBAAAgB,EAAA,MAAA,CAAA,CAAA,GAEJA,EAAA,QAAA,CAAA,GACAG,EAAA,QAAA,IACAG,EAAA,QAAA,IACAhB,EAAAN,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJ2B,IAAA,MAAA;AACI,MAAAd,EAAA,MAAA,SAGAM,EAAA,QAAA;AAAA,IAAkB,GAGtBS,IAAA,MAAA;AACI,MAAAxB,EAAA,iBACIuB,EAAA;AAAA,IACJ,GAIJE,IAAAJ,EAAA,MACIrB,EAAA,oBAAA,OACIA,EAAA,kBAGJ,CAAAA,EAAA,aAAc;AAIlB,IAAA0B;AAAA,MAAA,MAAArB,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAsB,EAAA,GAEAlB,EAAA,UAIAJ,EAAA,SACIa,EAAA,QAAA,IACAT,EAAA,MAAA,UAAA,GACAG,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAR,EAAA,KAAA,KACJK,EAAA,MAAA,QAEAc,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAK,IAAA,CAAAC,MAAA3B,EAAAN,EAAA,oBAAAiC,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAApB,EAAA,SAAAqB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACItB,EAAA,MAAA,KAAAsB,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,IAAA;AAAA,MAAqE,YAAAhC;AAAA,MACjE,WAAAS;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAgB;AAAA,IACA,CAAA,GAEJO,EAAAE,IAAAH,CAAA,GAGAC,EAAAG,IAAAtB,CAAA,GAEA,CAAAhB,EAAA,iBAAAA,EAAA,oBAAA,QACIuC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sidepanel.CuQCXV1E.js","sources":["../../../vue2/src/components/sidepanel/components/sidepanel-page.vue","../../../vue2/src/components/sidepanel/sidepanel.types.ts","../../../vue2/src/components/sidepanel/sidepanel.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-sidepanel-page\" :page-id=\"pageId\" :previous-page=\"previousPage\">\n <template #header>\n <div class=\"b-sidepanel-page__header\">\n <bento-typography class=\"b-sidepanel-page__title\" el=\"h2\" variant=\"title\">\n {{ title }}\n </bento-typography>\n </div>\n </template>\n <template #content>\n <div class=\"b-sidepanel-page__content\">\n <bento-typography el=\"div\" variant=\"body\">\n <slot />\n </bento-typography>\n </div>\n </template>\n <template v-if=\"actions && actions.length > 0\" #footer>\n <div class=\"b-sidepanel-page__actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </div>\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { PropType } from 'vue';\n\n import { BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { FooterActions } from '@/components/internal/footer-actions';\n import { DialogPage } from '@/internal';\n\n defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the sidepanel page\n */\n title: {\n type: String,\n default: null,\n },\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * SidepanelPage is used to render different pages of Sidepanel component\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./sidepanel-page.scss\" />\n","export enum BentoSidepanelEvent {\n UPDATE_ACTIVE_PAGE = 'update:active-page',\n UPDATE_IS_OPEN = 'update:is-open',\n}\n","<template>\n <dialog\n ref=\"sidepanel\"\n class=\"b-sidepanel\"\n :class=\"conditionalClasses\"\n @animationend=\"closeSidepanelAfterAnimation\"\n @keydown.esc.prevent=\"isDismissible && startCloseSidepanelAnimation\"\n >\n <bento-focus-trap :id=\"sidepanelId\" v-bento-click-outside-directive=\"closeSidepanelOnClickOutside\">\n <div v-if=\"!computedHideCloseButton\" class=\"b-sidepanel__close-button\">\n <bento-button variant=\"tertiary\" @click=\"startCloseSidepanelAnimation\">\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n <slot />\n </bento-focus-trap>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, provide, ref, toRefs, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { BentoSidepanelEvent } from './sidepanel.types';\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from './sidepanel.keys';\n\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives/click-outside';\n\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * The id of the current active page\n * Should be the same id as the BentoSidepanelPage to be displayed\n * If the component only has one page, it can be left null/undefined.\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If set to true, it allows the sidepanel to be closed.\n * Shows close button when `true` and hides close button when `false`.\n *\n * _Note: This property will not set the visibility of the close button in v2.0.0_\n */\n isDismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the sidepanel's state from the outside. Set it to true to open the sidepanel.\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Controls the visibility of close button on the sidepanel.\n * Defaults to `true` when `isDismissible=false`, and `true` when `isDimissible=true`.\n *\n * _Note: This property will be set to `false` by default, independent of `isDismissible` in v2.0.0_\n */\n hideCloseButton: {\n type: Boolean,\n default: null,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emits update event when page is changed internally\n */\n (e: BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page: string): void;\n /**\n * Emits close-sidepanel event when the sidepanel is closed\n */\n (e: BentoSidepanelEvent.UPDATE_IS_OPEN, isOpen: boolean): void;\n }>();\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const sidepanel = ref(null);\n const pages = ref<string[]>([]);\n const previousPages = ref([]);\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const isClosing = ref(false);\n const sidepanelId = generateUid('sidepanel');\n const internalIsOpen = ref(false);\n const isAnimationActive = ref(false);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-sidepanel--hide': isClosing.value,\n 'b-sidepanel--animation': isAnimationActive.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeSidepanelAfterAnimation = () => {\n if (isClosing.value) {\n sidepanel.value.close();\n if (previousPages.value[0]) {\n emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit(BentoSidepanelEvent.UPDATE_IS_OPEN, false);\n }\n };\n\n const startCloseSidepanelAnimation = () => {\n if (!sidepanel.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n const closeSidepanelOnClickOutside = () => {\n if (props.isDismissible) {\n startCloseSidepanelAnimation();\n }\n };\n\n // TODO: Remove in upcoming major. See properties `hideCloseButton` and `isDismissible`.\n const computedHideCloseButton = computed(() => {\n if (props.hideCloseButton !== null) {\n return props.hideCloseButton;\n }\n\n return !props.isDismissible;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n () => isOpen.value,\n async () => {\n // Wait for sidepanel ref to be created\n await nextTick();\n\n if (!sidepanel.value) {\n return;\n }\n\n if (isOpen.value) {\n internalIsOpen.value = true;\n sidepanel.value.showModal();\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (sidepanel.value.open) {\n startCloseSidepanelAnimation();\n }\n },\n { immediate: true }\n );\n\n // Pages\n const updatePage = page => emit(BentoSidepanelEvent.UPDATE_ACTIVE_PAGE, page);\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n pages.value.push(pageId);\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isAnimationActive,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n\n // Let's Children components know they are inside a SidePanel (dialog element)\n provide(SIDEPANEL_DIALOG_ID_INJECTION_KEY, sidepanelId);\n\n if (!props.isDismissible && props.hideCloseButton === null) {\n deprecate(\n 'BentoSidepanel \"isDismissible\" property’s behavior',\n 'BentoSidepanel \"isDismissible\" will no longer hide the close button. Use \"hideCloseButton=true\" instead.',\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Sidepanel component is a slide-in panel that should be used for presenting actions, settings or features that are directly associated with a specific task or interaction on the main screen.\n *\n * @example\n * import { BentoSidepanel, BentoSidepanelPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSidepanel, BentoSidepanelPage },\n * template: `\n * <bento-sidepanel active-page='step1' is-open='true'>\n * <bento-sidepanel-page\n * title='Step 1'\n * pageId='step1'\n * :actions=\"[\n * {\n * title: 'Next step',\n * event: () => {\n * activePage.value = 'step2';\n * },\n * }]\">\n * Step 1 info\n * </bento-sidepanel-page>\n * <bento-sidepanel-page\n * title='Step 2'\n * pageId='step2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Step 2 info\n * </bento-sidepanel-page>\n * </bento-sidepanel>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n<style lang=\"scss\" scoped src=\"./sidepanel.scss\" />\n"],"names":["__default__$1","BentoSidepanelEvent","BentoSidepanelEvent2","__default__","messages","props","__props","emit","__emit","activePage","isOpen","toRefs","t","useI18n","sidepanel","ref","pages","previousPages","animation","BentoDialogPageAnimation","isClosing","sidepanelId","generateUid","internalIsOpen","isAnimationActive","conditionalClasses","computed","closeSidepanelAfterAnimation","startCloseSidepanelAnimation","closeSidepanelOnClickOutside","computedHideCloseButton","watch","nextTick","updatePage","page","unregisterPage","pageIdToRemove","_a","pageId","registerPage","provide","DIALOG_PAGE_CONFIG_INJECTION_KEY","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","deprecate"],"mappings":";;;;;;;;;;;;;4IA2IIA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3IQ,IAAAC,IAAA,kBAAAC,OACRA,EAAA,qBAAA,sBACAA,EAAA,iBAAA,kBAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;GC6PRE,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhNA,UAAAC,IAAAC,GA0CAC,IAAAC,GAYA,EAAA,YAAAC,GAAA,QAAAC,EAAA,IAAAC,EAAAN,CAAA,GACA,EAAA,GAAAO,EAAA,IAAAC,GAAA,EAAA,UAAAT,EAAA,CAAA,GACAU,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,CAAA,CAAA,GACAE,IAAAF,EAAA,CAAA,CAAA,GACAG,IAAAH,EAAAI,GAAA,uBAAA,GACAC,IAAAL,EAAA,EAAA,GACAM,IAAAC,GAAA,WAAA,GACAC,IAAAR,EAAA,EAAA,GACAS,IAAAT,EAAA,EAAA,GAGAU,IAAAC,EAAA,OAAA;AAAA,MAA2C,qBAAAN,EAAA;AAAA,MACR,0BAAAI,EAAA;AAAA,IACa,EAAA,GAIhDG,IAAA,MAAA;AACI,MAAAP,EAAA,UACIN,EAAA,MAAA,MAAA,GACAG,EAAA,MAAA,CAAA,KACIV,EAAAN,EAAA,oBAAAgB,EAAA,MAAA,CAAA,CAAA,GAEJA,EAAA,QAAA,CAAA,GACAG,EAAA,QAAA,IACAG,EAAA,QAAA,IACAhB,EAAAN,EAAA,gBAAA,EAAA;AAAA,IACJ,GAGJ2B,IAAA,MAAA;AACI,MAAAd,EAAA,MAAA,SAGAM,EAAA,QAAA;AAAA,IAAkB,GAGtBS,IAAA,MAAA;AACI,MAAAxB,EAAA,iBACIuB,EAAA;AAAA,IACJ,GAIJE,IAAAJ,EAAA,MACIrB,EAAA,oBAAA,OACIA,EAAA,kBAGJ,CAAAA,EAAA,aAAc;AAIlB,IAAA0B;AAAA,MAAA,MAAArB,EAAA;AAAA,MACiB,YAAA;AAKT,QAFA,MAAAsB,EAAA,GAEAlB,EAAA,UAIAJ,EAAA,SACIa,EAAA,QAAA,IACAT,EAAA,MAAA,UAAA,GACAG,EAAA,MAAA,UACIA,EAAA,MAAA,KAAAR,EAAA,KAAA,KACJK,EAAA,MAAA,QAEAc,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAAK,IAAA,CAAAC,MAAA3B,EAAAN,EAAA,oBAAAiC,CAAA,GAGAC,IAAA,CAAAC,MAAA,MAAA;;AACI,MAAApB,EAAA,SAAAqB,IAAArB,EAAA,UAAA,gBAAAqB,EAAA,OAAA,CAAAC,MAAAA,MAAAF;AAAA,IAAqE,GAIzEG,IAAA,CAAAD,OACItB,EAAA,MAAA,KAAAsB,CAAA,GAEA,EAAA,gBAAAH,EAAAG,CAAA,EAAA;AAGJ,WAAAE,EAAAC,IAAA;AAAA,MAAqE,YAAAhC;AAAA,MACjE,WAAAS;AAAA,MACA,mBAAAM;AAAA,MACA,QAAAD;AAAA,MACQ,OAAAP;AAAA,MACR,eAAAC;AAAA,MACA,YAAAgB;AAAA,IACA,CAAA,GAEJO,EAAAE,IAAAH,CAAA,GAGAC,EAAAG,IAAAtB,CAAA,GAEA,CAAAhB,EAAA,iBAAAA,EAAA,oBAAA,QACIuC;AAAA,MAAA;AAAA,MACI;AAAA,MACA;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,31 +1,37 @@
|
|
|
1
|
-
import { defineComponent as h, inject as p, computed as o, provide as D, openBlock as r, createElementBlock as v, renderSlot as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { B as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { C as
|
|
1
|
+
import { defineComponent as h, inject as p, computed as o, provide as D, openBlock as r, createElementBlock as v, renderSlot as B, ref as N, normalizeClass as _, createElementVNode as f, normalizeStyle as W, createVNode as y, unref as e, withCtx as b, createTextVNode as $, toDisplayString as g, createBlock as u, createCommentVNode as d, withDirectives as U } from "vue";
|
|
2
|
+
import { _ as S } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
+
import { B as R } from "./button.Br6CyG40.js";
|
|
4
|
+
import { B as V } from "./info-icon.DIu8FeJC.js";
|
|
5
|
+
import { B as j } from "./typography.z9P0Ec3Q.js";
|
|
6
|
+
import { C as O } from "./copy.1-HH1fz5.js";
|
|
7
7
|
import { S as w } from "./search.EnLryD8V.js";
|
|
8
8
|
import { u as A } from "./i18n.DL9GT2-k.js";
|
|
9
|
-
import { B as
|
|
9
|
+
import { B as J } from "./tooltip.DvsfWV0-.js";
|
|
10
10
|
import "../assets/structured-list-item.css";
|
|
11
|
-
const C = Symbol("structured list condensed style injection key"), I = Symbol("structured list labels width injection key"),
|
|
12
|
-
...
|
|
11
|
+
const C = Symbol("structured list condensed style injection key"), I = Symbol("structured list labels width injection key"), x = ["25-75", "33-66", "42-58", "50-50"], z = { class: "b-structured-list" }, F = {}, H = /* @__PURE__ */ h({
|
|
12
|
+
...F,
|
|
13
13
|
__name: "structured-list",
|
|
14
14
|
props: {
|
|
15
15
|
labelsWidth: { default: null },
|
|
16
16
|
layout: { default: "33-66" }
|
|
17
17
|
},
|
|
18
18
|
setup(n) {
|
|
19
|
-
const s = n,
|
|
20
|
-
() =>
|
|
21
|
-
),
|
|
22
|
-
return D(I,
|
|
23
|
-
|
|
19
|
+
const s = n, c = p(C, !1), a = o(
|
|
20
|
+
() => x.includes(s.layout) ? s.layout : "33-66"
|
|
21
|
+
), l = o(() => c ? "130px" : s.labelsWidth ? `${s.labelsWidth}px` : `${a.value.split("-")[0]}%`);
|
|
22
|
+
return D(I, l), (i, m) => (r(), v("dl", z, [
|
|
23
|
+
B(i.$slots, "default", {}, void 0, !0)
|
|
24
24
|
]));
|
|
25
25
|
}
|
|
26
|
-
}), ot = /* @__PURE__ */
|
|
26
|
+
}), ot = /* @__PURE__ */ S(H, [["__scopeId", "data-v-42e8c709"]]), T = {
|
|
27
27
|
"en-US": {
|
|
28
28
|
search: "Search"
|
|
29
|
+
},
|
|
30
|
+
"pt-BR": {
|
|
31
|
+
search: "Buscar"
|
|
32
|
+
},
|
|
33
|
+
"ja-JP": {
|
|
34
|
+
search: "検索"
|
|
29
35
|
}
|
|
30
36
|
}, K = {
|
|
31
37
|
i18n: { messages: T }
|
|
@@ -41,25 +47,25 @@ const C = Symbol("structured list condensed style injection key"), I = Symbol("s
|
|
|
41
47
|
truncate: { type: Boolean }
|
|
42
48
|
},
|
|
43
49
|
setup(n) {
|
|
44
|
-
const s = "33%",
|
|
45
|
-
"b-structured-list-item--condensed":
|
|
50
|
+
const s = "33%", c = n, { t: a } = A({ messages: T }), l = p(C, !1), i = p(I, N(s)), m = o(() => `flex-basis:${i.value}`), L = o(() => ({
|
|
51
|
+
"b-structured-list-item--condensed": l
|
|
46
52
|
})), E = o(() => ({
|
|
47
|
-
"b-structured-list-item__value--truncate":
|
|
48
|
-
})), k = o(() =>
|
|
49
|
-
return (t,
|
|
53
|
+
"b-structured-list-item__value--truncate": c.truncate
|
|
54
|
+
})), k = o(() => l ? "caption" : "body");
|
|
55
|
+
return (t, P) => (r(), v("div", {
|
|
50
56
|
class: _(["b-structured-list-item", L.value])
|
|
51
57
|
}, [
|
|
52
58
|
f("dt", {
|
|
53
59
|
class: "b-structured-list-item__label",
|
|
54
60
|
style: W(m.value)
|
|
55
61
|
}, [
|
|
56
|
-
y(e(
|
|
62
|
+
y(e(j), { variant: k.value }, {
|
|
57
63
|
default: b(() => [
|
|
58
64
|
$(g(t.label), 1)
|
|
59
65
|
]),
|
|
60
66
|
_: 1
|
|
61
67
|
}, 8, ["variant"]),
|
|
62
|
-
t.labelInfo ? (r(), u(e(
|
|
68
|
+
t.labelInfo ? (r(), u(e(V), {
|
|
63
69
|
key: 0,
|
|
64
70
|
class: "b-structured-list-item__icon",
|
|
65
71
|
"tooltip-text": t.labelInfo
|
|
@@ -68,13 +74,13 @@ const C = Symbol("structured list condensed style injection key"), I = Symbol("s
|
|
|
68
74
|
f("dd", {
|
|
69
75
|
class: _(["b-structured-list-item__value", E.value])
|
|
70
76
|
}, [
|
|
71
|
-
|
|
72
|
-
t.copy ? (r(), u(
|
|
77
|
+
B(t.$slots, "default", {}, void 0, !0),
|
|
78
|
+
t.copy ? (r(), u(O, {
|
|
73
79
|
key: 0,
|
|
74
80
|
class: "b-structured-list-item__icon",
|
|
75
81
|
text: t.copy
|
|
76
82
|
}, null, 8, ["text"])) : d("", !0),
|
|
77
|
-
t.search ? U((r(), u(e(
|
|
83
|
+
t.search ? U((r(), u(e(R), {
|
|
78
84
|
key: 1,
|
|
79
85
|
class: "b-structured-list-item__icon",
|
|
80
86
|
variant: "tertiary",
|
|
@@ -82,20 +88,20 @@ const C = Symbol("structured list condensed style injection key"), I = Symbol("s
|
|
|
82
88
|
}, {
|
|
83
89
|
iconLeft: b(() => [
|
|
84
90
|
y(e(w), {
|
|
85
|
-
"svg-title": e(
|
|
91
|
+
"svg-title": e(a)("search")
|
|
86
92
|
}, null, 8, ["svg-title"])
|
|
87
93
|
]),
|
|
88
94
|
_: 1
|
|
89
95
|
}, 8, ["onClick"])), [
|
|
90
|
-
[e(
|
|
96
|
+
[e(J), t.searchTooltip ? t.searchTooltip : e(a)("search"), "top"]
|
|
91
97
|
]) : d("", !0)
|
|
92
98
|
], 2)
|
|
93
99
|
], 2));
|
|
94
100
|
}
|
|
95
|
-
}), rt = /* @__PURE__ */
|
|
101
|
+
}), rt = /* @__PURE__ */ S(Y, [["__scopeId", "data-v-a401a9ff"]]);
|
|
96
102
|
export {
|
|
97
103
|
ot as B,
|
|
98
104
|
C as S,
|
|
99
105
|
rt as a
|
|
100
106
|
};
|
|
101
|
-
//# sourceMappingURL=structured-list-item.
|
|
107
|
+
//# sourceMappingURL=structured-list-item.1A2sjhP4.js.map
|
package/dist/chunks/{structured-list-item.Z-1ivOFu.js.map → structured-list-item.1A2sjhP4.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-list-item.
|
|
1
|
+
{"version":3,"file":"structured-list-item.1A2sjhP4.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, 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 = withDefaults(\n defineProps<{\n /**\n * Width of the labels container, in pixels. Overrides layout prop.\n */\n labelsWidth?: number;\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?: BentoStructuredListLayoutOptions;\n }>(),\n {\n labelsWidth: null,\n layout: '33-66',\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=\"computedLabelStyle\">\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\" :class=\"valueConditionalClasses\">\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 setup lang=\"ts\">\n import { computed, inject, 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 // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n // Directives\n import { BentoTooltipDirective as vBentoTooltipDirective } 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 type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_LABELS_WIDTH = '33%';\n\n const props = defineProps<{\n /**\n * Label to display for the value\n */\n label: string;\n /**\n * Text to display in info icon tooltip in the label to display for the value\n */\n labelInfo?: string;\n /**\n * Text to copy when the user clicks `Copy` icon\n */\n copy?: string;\n /**\n * Function to trigger when user clicks `Search` icon\n */\n search?: (event: Event) => void;\n /**\n * Text to display when the user hovers over `Search` icon\n */\n searchTooltip?: string;\n /**\n * Truncates the value of the item\n */\n truncate?: boolean;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isCondensed = inject(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, false);\n const labelsWidth = inject<Ref<string>>(STRUCTURED_LIST_LABELS_WIDTH_INJECTION_KEY, ref(DEFAULT_LABELS_WIDTH));\n const computedLabelStyle = computed(() => `flex-basis:${labelsWidth.value}`);\n const conditionalClasses = computed(() => ({\n 'b-structured-list-item--condensed': isCondensed,\n }));\n\n const valueConditionalClasses = computed(() => ({\n 'b-structured-list-item__value--truncate': props.truncate,\n }));\n\n const labelTypographyVariant = computed(() => (isCondensed ? 'caption' : 'body'));\n</script>\n\n<script lang=\"ts\">\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 {\n i18n: { messages },\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__$1","props","__props","isCondensed","inject","computedLayout","computed","computedLabelsWidth","provide","__default__","messages","DEFAULT_LABELS_WIDTH","t","useI18n","labelsWidth","ref","computedLabelStyle","conditionalClasses","valueConditionalClasses","labelTypographyVariant"],"mappings":";;;;;;;;;;AAAa,MAAAA,IAAA,OAAA,+CAAA,GACAC,IAAA,OAAA,4CAAA,GCANC,IAAA,CAAA,SAAA,SAAA,SAAA,OAAA,uCCoFHC,IAAA,CAAA;;;;;;;;AAvEA,UAAAC,IAAAC,GA0BAC,IAAAC,EAAAP,GAAA,EAAA,GAEAQ,IAAAC;AAAA,MAAuB,MAAAP,EAAA,SAAAE,EAAA,MAAA,IAAAA,EAAA,SAAA;AAAA,IACsD,GAG7EM,IAAAD,EAAA,MACIH,IACI,UAGJF,EAAA,cACI,GAAAA,EAAA,WAAA,OAGJ,GAAAI,EAAA,MAAA,MAAA,GAAA,EAAA,CAAA,CAAA,GAA4C;AAGhD,WAAAG,EAAAV,GAAAS,CAAA;;;;;;;;;;;;;;GC8DAE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;AAxEA,UAAAC,IAAA,OAEAV,IAAAC,GA2BA,EAAA,GAAAU,EAAA,IAAAC,EAAA,EAAA,UAAAH,EAAA,CAAA,GACAP,IAAAC,EAAAP,GAAA,EAAA,GACAiB,IAAAV,EAAAN,GAAAiB,EAAAJ,CAAA,CAAA,GACAK,IAAAV,EAAA,MAAA,cAAAQ,EAAA,KAAA,EAAA,GACAG,IAAAX,EAAA,OAAA;AAAA,MAA2C,qCAAAH;AAAA,IACF,EAAA,GAGzCe,IAAAZ,EAAA,OAAA;AAAA,MAAgD,2CAAAL,EAAA;AAAA,IACK,EAAA,GAGrDkB,IAAAb,EAAA,MAAAH,IAAA,YAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js → summary-grid-item-custom.CuvUVoQ8.js}
RENAMED
|
@@ -6,7 +6,7 @@ import { _ as T } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
|
6
6
|
import { B as Y } from "./info-icon.DIu8FeJC.js";
|
|
7
7
|
import { B as W, a as V } from "./typography.z9P0Ec3Q.js";
|
|
8
8
|
import { B as X, a as L } from "./tag.RYw4OhWk.js";
|
|
9
|
-
import { C as F } from "./copy.
|
|
9
|
+
import { C as F } from "./copy.1-HH1fz5.js";
|
|
10
10
|
import "../assets/summary-grid-item-custom.css";
|
|
11
11
|
const H = S({
|
|
12
12
|
name: "bento-summary-grid",
|
|
@@ -717,4 +717,4 @@ export {
|
|
|
717
717
|
o as f,
|
|
718
718
|
_e as s
|
|
719
719
|
};
|
|
720
|
-
//# sourceMappingURL=summary-grid-item-custom.
|
|
720
|
+
//# sourceMappingURL=summary-grid-item-custom.CuvUVoQ8.js.map
|