@adyen/bento-vue2 1.44.0 → 1.46.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/index.d.ts +16661 -18847
- 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/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/focus-trap.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/info-icon-with-popover.css +1 -0
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/link.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/popper-container.css +1 -1
- package/dist/assets/radio-input.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.Dx12xlEW.js → action-bar.e_2fmyN_.js} +6 -6
- package/dist/chunks/{action-bar.Dx12xlEW.js.map → action-bar.e_2fmyN_.js.map} +1 -1
- package/dist/chunks/{alert.D2Z_aiFC.js → alert.BcfhueIA.js} +2 -2
- package/dist/chunks/{alert.D2Z_aiFC.js.map → alert.BcfhueIA.js.map} +1 -1
- package/dist/chunks/{base-button.4UYC3kp2.js → base-button.BeMKxkgK.js} +2 -2
- package/dist/chunks/base-button.BeMKxkgK.js.map +1 -0
- package/dist/chunks/{base-modal.BrqNR-ah.js → base-modal.UPLi477L.js} +15 -15
- package/dist/chunks/{base-modal.BrqNR-ah.js.map → base-modal.UPLi477L.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.ptKgeQEb.js → button-actions-with-menu.CyNvhDxN.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.ptKgeQEb.js.map → button-actions-with-menu.CyNvhDxN.js.map} +1 -1
- package/dist/chunks/{button-actions.BIQ3qA8q.js → button-actions.BaypoF5i.js} +3 -3
- package/dist/chunks/{button-actions.BIQ3qA8q.js.map → button-actions.BaypoF5i.js.map} +1 -1
- package/dist/chunks/{button.CufUNBkv.js → button.Bx8WC-dy.js} +12 -12
- package/dist/chunks/button.Bx8WC-dy.js.map +1 -0
- package/dist/chunks/{calendar.B9WZ8ub3.js → calendar.LXRuFfcw.js} +2 -2
- package/dist/chunks/{calendar.B9WZ8ub3.js.map → calendar.LXRuFfcw.js.map} +1 -1
- package/dist/chunks/{card.D9g7fZDX.js → card.INSvvGNH.js} +2 -2
- package/dist/chunks/{card.D9g7fZDX.js.map → card.INSvvGNH.js.map} +1 -1
- package/dist/chunks/{checkbox-group.Bcqac3y8.js → checkbox-group.BNVnOYKH.js} +4 -4
- package/dist/chunks/{checkbox-group.Bcqac3y8.js.map → checkbox-group.BNVnOYKH.js.map} +1 -1
- package/dist/chunks/{checkbox.B1qjI4R_.js → checkbox.CcwY2CMn.js} +4 -4
- package/dist/chunks/checkbox.CcwY2CMn.js.map +1 -0
- package/dist/chunks/{code-snippet.rmKiWrIv.js → code-snippet.Bs7wIGi8.js} +113 -83
- package/dist/chunks/code-snippet.Bs7wIGi8.js.map +1 -0
- package/dist/chunks/{codemirror.BlV6WO5w.js → codemirror.OjJ-3ixa.js} +4645 -4333
- package/dist/chunks/codemirror.OjJ-3ixa.js.map +1 -0
- package/dist/chunks/{controls-group.J8shO_JL.js → controls-group.CIdhlTk3.js} +2 -2
- package/dist/chunks/{controls-group.J8shO_JL.js.map → controls-group.CIdhlTk3.js.map} +1 -1
- package/dist/chunks/{copy.DgzxvExj.js → copy.BakPR7GI.js} +4 -4
- package/dist/chunks/{copy.DgzxvExj.js.map → copy.BakPR7GI.js.map} +1 -1
- package/dist/chunks/{country.CM5oZOyZ.js → country.BegULkAC.js} +2 -2
- package/dist/chunks/{country.CM5oZOyZ.js.map → country.BegULkAC.js.map} +1 -1
- package/dist/chunks/{country.types.Br0AjxGy.js → country.types.pilf5B3F.js} +483 -480
- package/dist/chunks/{country.types.Br0AjxGy.js.map → country.types.pilf5B3F.js.map} +1 -1
- package/dist/chunks/{dashboard-section._KVy37B0.js → dashboard-section.DUN8FB74.js} +4 -4
- package/dist/chunks/{dashboard-section._KVy37B0.js.map → dashboard-section.DUN8FB74.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DX5QlK14.js → dashed-underline.BDK3yEtw.js} +3 -3
- package/dist/chunks/{dashed-underline.DX5QlK14.js.map → dashed-underline.BDK3yEtw.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BgTUIoak.js → data-grid-template.BO2v-T1n.js} +3 -3
- package/dist/chunks/{data-grid-template.BgTUIoak.js.map → data-grid-template.BO2v-T1n.js.map} +1 -1
- package/dist/chunks/{data-grid.sAbzCVND.js → data-grid.NkQC0etq.js} +21 -21
- package/dist/chunks/{data-grid.sAbzCVND.js.map → data-grid.NkQC0etq.js.map} +1 -1
- package/dist/chunks/{date-picker.DrSWxADA.js → date-picker.DFgjvQgX.js} +5 -5
- package/dist/chunks/{date-picker.DrSWxADA.js.map → date-picker.DFgjvQgX.js.map} +1 -1
- package/dist/chunks/{date-range-picker.CFIOD59O.js → date-range-picker.BBC3TGYw.js} +9 -9
- package/dist/chunks/{date-range-picker.CFIOD59O.js.map → date-range-picker.BBC3TGYw.js.map} +1 -1
- package/dist/chunks/{dialog-page.CplkzZGZ.js → dialog-page.Da2cxzZm.js} +3 -3
- package/dist/chunks/dialog-page.Da2cxzZm.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.ZAFh7KqG.js → dropdown-default-textbox.CrylDCEX.js} +87 -75
- package/dist/chunks/dropdown-default-textbox.CrylDCEX.js.map +1 -0
- package/dist/chunks/{dropdown-tag.Ntdp7P7W.js → dropdown-tag.xVgcIWXL.js} +5 -5
- package/dist/chunks/{dropdown-tag.Ntdp7P7W.js.map → dropdown-tag.xVgcIWXL.js.map} +1 -1
- package/dist/chunks/{dropdown.DC9un4VJ.js → dropdown.BkLc07G8.js} +185 -181
- package/dist/chunks/dropdown.BkLc07G8.js.map +1 -0
- package/dist/chunks/{empty-state.B8ZeRgDi.js → empty-state.B6wjtgR0.js} +2 -2
- package/dist/chunks/{empty-state.B8ZeRgDi.js.map → empty-state.B6wjtgR0.js.map} +1 -1
- package/dist/chunks/{error-message.B7uoqQpq.js → error-message.Brg-AZjT.js} +2 -2
- package/dist/chunks/{error-message.B7uoqQpq.js.map → error-message.Brg-AZjT.js.map} +1 -1
- package/dist/chunks/{es6.C-HLzYPA.js → es6.D11bE5vq.js} +7 -7
- package/dist/chunks/{es6.C-HLzYPA.js.map → es6.D11bE5vq.js.map} +1 -1
- package/dist/chunks/file-uploader.BePx7fcJ.js +1879 -0
- package/dist/chunks/file-uploader.BePx7fcJ.js.map +1 -0
- package/dist/chunks/{filter-bar.Dowrph-Z.js → filter-bar.BbVGpEJx.js} +20 -20
- package/dist/chunks/{filter-bar.Dowrph-Z.js.map → filter-bar.BbVGpEJx.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.B880PL1J.js → fixed-scroller.BE1hWLr6.js} +2 -2
- package/dist/chunks/{fixed-scroller.B880PL1J.js.map → fixed-scroller.BE1hWLr6.js.map} +1 -1
- package/dist/chunks/focus-trap.DA_1lCcM.js +495 -0
- package/dist/chunks/focus-trap.DA_1lCcM.js.map +1 -0
- package/dist/chunks/{footer-actions.B3GJ1wNP.js → footer-actions.O24MYRgM.js} +3 -3
- package/dist/chunks/{footer-actions.B3GJ1wNP.js.map → footer-actions.O24MYRgM.js.map} +1 -1
- package/dist/chunks/{form-layout-title.BarHgyjC.js → form-layout-title.DRuBsptB.js} +2 -2
- package/dist/chunks/{form-layout-title.BarHgyjC.js.map → form-layout-title.DRuBsptB.js.map} +1 -1
- package/dist/chunks/header.Bbwnv6Ei.js +205 -0
- package/dist/chunks/header.Bbwnv6Ei.js.map +1 -0
- package/dist/chunks/{index.Gcw_BUVh.js → index.B5Tq465X.js} +2 -1
- package/dist/chunks/{index.Gcw_BUVh.js.map → index.B5Tq465X.js.map} +1 -1
- package/dist/chunks/info-icon-with-popover.Cd3RQWUu.js +71 -0
- package/dist/chunks/info-icon-with-popover.Cd3RQWUu.js.map +1 -0
- package/dist/chunks/{info-icon.p-28zHUJ.js → info-icon.BnSZeQm8.js} +3 -3
- package/dist/chunks/{info-icon.p-28zHUJ.js.map → info-icon.BnSZeQm8.js.map} +1 -1
- package/dist/chunks/{input-field-password.CgxF9jhq.js → input-field-password.CvKC9xjJ.js} +6 -6
- package/dist/chunks/{input-field-password.CgxF9jhq.js.map → input-field-password.CvKC9xjJ.js.map} +1 -1
- package/dist/chunks/input-field.Dgop3JWW.js +231 -0
- package/dist/chunks/input-field.Dgop3JWW.js.map +1 -0
- package/dist/chunks/{inspector.types.DaY6OOzz.js → inspector.types.j1usQ6FN.js} +3 -3
- package/dist/chunks/{inspector.types.DaY6OOzz.js.map → inspector.types.j1usQ6FN.js.map} +1 -1
- package/dist/chunks/{layout-row.DzS_XyyF.js → layout-row.DAeZh7Rv.js} +4 -4
- package/dist/chunks/layout-row.DAeZh7Rv.js.map +1 -0
- package/dist/chunks/{link.v-y0fKjn.js → link.B2DE2ryp.js} +6 -6
- package/dist/chunks/{link.v-y0fKjn.js.map → link.B2DE2ryp.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.BnX0H4HE.js → listbox-option-tag.drC_50fU.js} +2 -2
- package/dist/chunks/{listbox-option-tag.BnX0H4HE.js.map → listbox-option-tag.drC_50fU.js.map} +1 -1
- package/dist/chunks/{menu.B78fzH_k.js → menu.DCRfI10M.js} +4 -4
- package/dist/chunks/{menu.B78fzH_k.js.map → menu.DCRfI10M.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.DgftXCJe.js → modal-fullscreen.DgDk6uxS.js} +5 -5
- package/dist/chunks/{modal-fullscreen.DgftXCJe.js.map → modal-fullscreen.DgDk6uxS.js.map} +1 -1
- package/dist/chunks/{modal.BA745pfv.js → modal.B7giFLek.js} +5 -5
- package/dist/chunks/{modal.BA745pfv.js.map → modal.B7giFLek.js.map} +1 -1
- package/dist/chunks/{pagination.CfwtuZ7R.js → pagination.Dc0VbxFL.js} +3 -3
- package/dist/chunks/{pagination.CfwtuZ7R.js.map → pagination.Dc0VbxFL.js.map} +1 -1
- package/dist/chunks/{popover.ZlmaSYms.js → popover.D8pR_dbl.js} +4 -4
- package/dist/chunks/{popover.ZlmaSYms.js.map → popover.D8pR_dbl.js.map} +1 -1
- package/dist/chunks/{popper-container.CnWphJTN.js → popper-container.B9qZTf2V.js} +4 -4
- package/dist/chunks/popper-container.B9qZTf2V.js.map +1 -0
- package/dist/chunks/{promo-banner.cTUF9seG.js → promo-banner.Dd-JQMUD.js} +3 -3
- package/dist/chunks/{promo-banner.cTUF9seG.js.map → promo-banner.Dd-JQMUD.js.map} +1 -1
- package/dist/chunks/{radio-group.EnMXbuly.js → radio-group.D5GEIgYv.js} +5 -5
- package/dist/chunks/{radio-group.EnMXbuly.js.map → radio-group.D5GEIgYv.js.map} +1 -1
- package/dist/chunks/{radio-input.q980f8Uf.js → radio-input.C1DZbkcT.js} +5 -5
- package/dist/chunks/radio-input.C1DZbkcT.js.map +1 -0
- package/dist/chunks/{search-bar.lYuXPzBX.js → search-bar.BN4grqVO.js} +3 -3
- package/dist/chunks/{search-bar.lYuXPzBX.js.map → search-bar.BN4grqVO.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CF6WPYn4.js → secondary-nav.C8UE8xly.js} +7 -7
- package/dist/chunks/{secondary-nav.CF6WPYn4.js.map → secondary-nav.C8UE8xly.js.map} +1 -1
- package/dist/chunks/{segmented-control.CVeUROYR.js → segmented-control.C6HPgkVm.js} +2 -2
- package/dist/chunks/{segmented-control.CVeUROYR.js.map → segmented-control.C6HPgkVm.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CjuBQ2UA.js → selection-card-group.BT7FOlbF.js} +6 -6
- package/dist/chunks/{selection-card-group.CjuBQ2UA.js.map → selection-card-group.BT7FOlbF.js.map} +1 -1
- package/dist/chunks/{sidepanel.NUx7L5f1.js → sidepanel.PEMSN4Hj.js} +10 -10
- package/dist/chunks/{sidepanel.NUx7L5f1.js.map → sidepanel.PEMSN4Hj.js.map} +1 -1
- package/dist/chunks/{step.5g9BIi15.js → step.Dq4w23dP.js} +2 -2
- package/dist/chunks/{step.5g9BIi15.js.map → step.Dq4w23dP.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BEhWyaVP.js → structured-list-item.-ch3UkPz.js} +5 -5
- package/dist/chunks/{structured-list-item.BEhWyaVP.js.map → structured-list-item.-ch3UkPz.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js → summary-grid-item-custom.CLVYmhnp.js} +4 -4
- package/dist/chunks/{summary-grid-item-custom.CSXo4NjY.js.map → summary-grid-item-custom.CLVYmhnp.js.map} +1 -1
- package/dist/chunks/{tabs.Casntai-.js → tabs.B0f1qiMR.js} +3 -3
- package/dist/chunks/{tabs.Casntai-.js.map → tabs.B0f1qiMR.js.map} +1 -1
- package/dist/chunks/{tag.wTXg-O7i.js → tag.d36UYSWd.js} +2 -2
- package/dist/chunks/{tag.wTXg-O7i.js.map → tag.d36UYSWd.js.map} +1 -1
- package/dist/chunks/{textarea.F-JyRtIw.js → textarea.DORWuAZn.js} +3 -3
- package/dist/chunks/{textarea.F-JyRtIw.js.map → textarea.DORWuAZn.js.map} +1 -1
- package/dist/chunks/{timeline-item.BJyB8-Wv.js → timeline-item.CUm_n51y.js} +7 -7
- package/dist/chunks/timeline-item.CUm_n51y.js.map +1 -0
- package/dist/chunks/{toast.BEipTIrz.js → toast.DCaWC_wv.js} +2 -2
- package/dist/chunks/{toast.BEipTIrz.js.map → toast.DCaWC_wv.js.map} +1 -1
- package/dist/chunks/{toggle-button.CYplDIO-.js → toggle-button.DJqs599a.js} +2 -2
- package/dist/chunks/{toggle-button.CYplDIO-.js.map → toggle-button.DJqs599a.js.map} +1 -1
- package/dist/chunks/{tooltip.DH8TqpYV.js → tooltip.CQGwmwt9.js} +2 -2
- package/dist/chunks/{tooltip.DH8TqpYV.js.map → tooltip.CQGwmwt9.js.map} +1 -1
- package/dist/chunks/{tutorial.DFvMZAN5.js → tutorial.B_8XNKvM.js} +5 -5
- package/dist/chunks/{tutorial.DFvMZAN5.js.map → tutorial.B_8XNKvM.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BiqVX5O7.js → use-cached-selected-values.DJl7FKT5.js} +8 -8
- package/dist/chunks/use-cached-selected-values.DJl7FKT5.js.map +1 -0
- package/dist/chunks/{use-country-items.C25TI6tp.js → use-country-items.DPBbl1KK.js} +2 -2
- package/dist/chunks/{use-country-items.C25TI6tp.js.map → use-country-items.DPBbl1KK.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +2 -2
- 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/dropdown.js +4 -4
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +57 -57
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +27 -25
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/link.js +1 -1
- 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/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +1 -0
- package/dist/styles/bento-light.css +1 -0
- package/dist/styles/bento.css +1 -0
- package/dist/styles/legacy.css +6 -5
- package/dist/styles/styleguide.css +1 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +4 -4
- package/package.json +13 -8
- package/dist/chunks/base-button.4UYC3kp2.js.map +0 -1
- package/dist/chunks/button.CufUNBkv.js.map +0 -1
- package/dist/chunks/checkbox.B1qjI4R_.js.map +0 -1
- package/dist/chunks/code-snippet.rmKiWrIv.js.map +0 -1
- package/dist/chunks/codemirror.BlV6WO5w.js.map +0 -1
- package/dist/chunks/dialog-page.CplkzZGZ.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.ZAFh7KqG.js.map +0 -1
- package/dist/chunks/dropdown.DC9un4VJ.js.map +0 -1
- package/dist/chunks/file-uploader.ItCr8Ezn.js +0 -729
- package/dist/chunks/file-uploader.ItCr8Ezn.js.map +0 -1
- package/dist/chunks/focus-trap.DSkLNO_i.js +0 -443
- package/dist/chunks/focus-trap.DSkLNO_i.js.map +0 -1
- package/dist/chunks/header.BLjdXtYJ.js +0 -266
- package/dist/chunks/header.BLjdXtYJ.js.map +0 -1
- package/dist/chunks/input-field.CcjqGkLs.js +0 -228
- package/dist/chunks/input-field.CcjqGkLs.js.map +0 -1
- package/dist/chunks/layout-row.DzS_XyyF.js.map +0 -1
- package/dist/chunks/popper-container.CnWphJTN.js.map +0 -1
- package/dist/chunks/radio-input.q980f8Uf.js.map +0 -1
- package/dist/chunks/timeline-item.BJyB8-Wv.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.BiqVX5O7.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { u as R } from "./use-has-slot.C9lQZ6nz.js";
|
|
|
6
6
|
import { g as z } from "./generate-uid.D-HFI38h.js";
|
|
7
7
|
import { u as O } from "./i18n.BQkEbtPM.js";
|
|
8
8
|
import { o as W } from "./resize.Bqks3WUm.js";
|
|
9
|
-
import { c as F, B as N } from "./button-actions.
|
|
9
|
+
import { c as F, B as N } from "./button-actions.BaypoF5i.js";
|
|
10
10
|
import { n as P } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
11
11
|
import "../assets/card.css";
|
|
12
12
|
var f = /* @__PURE__ */ ((o) => (o.PRIMARY = "primary", o.SECONDARY = "secondary", o))(f || {}), c = /* @__PURE__ */ ((o) => (o.DEFAULT = "default", o.SMALL = "small", o))(c || {});
|
|
@@ -120,4 +120,4 @@ export {
|
|
|
120
120
|
c as a,
|
|
121
121
|
la as c
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=card.
|
|
123
|
+
//# sourceMappingURL=card.INSvvGNH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.D9g7fZDX.js","sources":["../../src/components/card/card.types.ts","../../src/components/card/card.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div class=\"b-card\" :class=\"cardConditionalClasses\" data-testid=\"card\" @click=\"onClick\">\n <div v-if=\"hasSlot('image')\" class=\"b-card__image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"tabIndex\"\n :aria-controls=\"expandable ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-card__description\" el=\"div\" variant=\"body\">\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <Transition name=\"b-card__animation\">\n <div v-if=\"showCardBody\" class=\"b-card__wrapper\" :style=\"contentMaxHeight\">\n <div\n :id=\"expandable ? cardId : null\"\n ref=\"contentDiv\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n // Composables\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n actions: { default: null },\n actionsLayout: { default: BentoButtonActionsLayout.BUTTONS_END },\n background: { default: BentoCardBackground.PRIMARY },\n closed: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n expandable: { type: Boolean, default: false },\n titleSize: { default: BentoCardTitleSize.DEFAULT }\n});\n\n const emit = defineEmits([\"click\", \"expanded\"]);\n\n const contentDiv = ref<HTMLDivElement>(null);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': props.expandable && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header': isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(\n () =>\n ({\n el: 'div',\n variant: props.titleSize === BentoCardTitleSize.DEFAULT ? 'title' : 'body',\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n } as InstanceType<typeof BentoTypography>['$props'])\n );\n\n // Toggle open and close logic and animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n updateContentHeight();\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-card',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/card/card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","__default__","messages","useI18n","slots","useSlots","hasSlot","useHasSlot","contentDiv","ref","cardId","generateUid","showContent","props","watch","value","showHeader","computed","showTitleWrapper","showCardBody","_a","tabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","emit"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;GCkNRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;iBA5IA,EAAA,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAcAI,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,MAAA,GACAC,IAAAH,EAAA,CAAAI,EAAA,MAAA;AACA,IAAAC;AA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A,CAAAP,EAAA,SAAA;AAEA,aAAA;AAAA,QAAO,oCAAAsB;AAAA,QACiC,oDAAAA,KAAAZ,EAAA;AAAA,MAC4D;AAAA,IACpG,CAAA,GAGJa,IAAAZ,EAAA,OAAA;AAAA,MAA2D,oCAAAX,EAAA,QAAA;AAAA,IACH,EAAA,GAGxDwB,IAAAb;AAAA,MAAmB,OAAA;AAAA,QAEV,IAAA;AAAA,QACO,SAAAJ,EAAA,cAAAd,EAAA,UAAA,UAAA;AAAA,QACgE,WAAAc,EAAA,cAAAd,EAAA;AAAA,QAClB,MAAAc,EAAA,cAAAd,EAAA;AAAA,MACL;AAAA,IACjD,GAIR,EAAA,qBAAAgC,GAAA,eAAAC,EAAA,IAAAC,EAAAzB,GAAAI,CAAA,GAEAsB,IAAAjB;AAAA,MAAyB,MAAAJ,EAAA,cAAAmB,EAAA,QAAA,EAAA,cAAAA,EAAA,MAAA,IAAA,CAAA;AAAA,IAC8D;AAGvF,WAAAlB;AAAA,MAAA,MAAAN,EAAA;AAAA,MACqB,MAAA;AAEb,YAAA2B,IAAA;AACA,QAAA,CAAAA,KAAA3B,EAAA,UACI2B,IAAAC,EAAA5B,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIuB,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,8eAGJ,MAAA;AACI,MAAA,CAAAlB,EAAA,YAAAA,EAAA,eACID,EAAA,QAAA,CAAAA,EAAA,OACAyB,EAAA,YAAAzB,EAAA,KAAA,GACAmB,EAAA;AAAA,IACJ,YAGJ,MAAA;AACI,MAAAlB,EAAA,YACIwB,EAAA,OAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"card.INSvvGNH.js","sources":["../../src/components/card/card.types.ts","../../src/components/card/card.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div class=\"b-card\" :class=\"cardConditionalClasses\" data-testid=\"card\" @click=\"onClick\">\n <div v-if=\"hasSlot('image')\" class=\"b-card__image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"tabIndex\"\n :aria-controls=\"expandable ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-card__description\" el=\"div\" variant=\"body\">\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <Transition name=\"b-card__animation\">\n <div v-if=\"showCardBody\" class=\"b-card__wrapper\" :style=\"contentMaxHeight\">\n <div\n :id=\"expandable ? cardId : null\"\n ref=\"contentDiv\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n // Composables\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = defineProps({\n actions: { default: null },\n actionsLayout: { default: BentoButtonActionsLayout.BUTTONS_END },\n background: { default: BentoCardBackground.PRIMARY },\n closed: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n expandable: { type: Boolean, default: false },\n titleSize: { default: BentoCardTitleSize.DEFAULT }\n});\n\n const emit = defineEmits([\"click\", \"expanded\"]);\n\n const contentDiv = ref<HTMLDivElement>(null);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': props.expandable && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header': isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(\n () =>\n ({\n el: 'div',\n variant: props.titleSize === BentoCardTitleSize.DEFAULT ? 'title' : 'body',\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n } as InstanceType<typeof BentoTypography>['$props'])\n );\n\n // Toggle open and close logic and animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n updateContentHeight();\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-card',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/card/card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","__default__","messages","useI18n","slots","useSlots","hasSlot","useHasSlot","contentDiv","ref","cardId","generateUid","showContent","props","watch","value","showHeader","computed","showTitleWrapper","showCardBody","_a","tabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","emit"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;GCkNRE,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;;;;;iBA5IA,EAAA,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAcAI,IAA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
-
import { B as E, a as n } from "./checkbox.
|
|
2
|
+
import { B as E, a as n } from "./checkbox.CcwY2CMn.js";
|
|
3
3
|
import { g as x } from "./generate-uid.D-HFI38h.js";
|
|
4
4
|
import { d as k } from "./typography.Bu_WAKdf.js";
|
|
5
5
|
import { u as C } from "./use-form-layout-loading.D3lALhtC.js";
|
|
6
|
-
import { C as S } from "./controls-group.
|
|
7
|
-
import { E as M } from "./error-message.
|
|
6
|
+
import { C as S } from "./controls-group.CIdhlTk3.js";
|
|
7
|
+
import { E as M } from "./error-message.Brg-AZjT.js";
|
|
8
8
|
import { n as I } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
9
9
|
import "../assets/checkbox-group.css";
|
|
10
10
|
var s = /* @__PURE__ */ ((r) => (r.HORIZONTAL = "horizontal", r.VERTICAL = "vertical", r))(s || {});
|
|
@@ -149,4 +149,4 @@ export {
|
|
|
149
149
|
s as B,
|
|
150
150
|
q as c
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=checkbox-group.
|
|
152
|
+
//# sourceMappingURL=checkbox-group.BNVnOYKH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.Bcqac3y8.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDZ,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAAA,MAAAF;AAAA,EACA,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACA,OAAA,EAAA,MAAA,aAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,QAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA,EAAA,MAAA,SAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,OAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,EAAA,MAAA,OAAA,SAAA,MAAA,CAAA,E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AC,EAAAlB,EAAA,UAAA;AACA,IAAAe;AAAA,MAAA,MAAAf,EAAA;AAAA,MACA,MAAA;AAEA,QAAAiB,EAAA,QAAAjB,EAAA;AAAA,MAAA;AAAA,IACA;AAGA,UAAAmB,IAAA,CAAArB,MAAA;AACA,MAAAmB,EAAA,QAAAnB,GACAG,EAAAF,EAAA,QAAAD,CAAA,GACAG,EAAAF,EAAA,OAAAD,CAAA;AAAA,IAAA;AAGA,WAAAE,EAAA,YACAoB;AAAA,MAAA;AAAA,MACA;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIA;AAAA;AAAA,MAAA,gBAAA5B;AAAA,MAEA,SAAAW;AAAA,MACA,YAAAE;AAAA,MACA,sBAAAG;AAAA,MACA,6BAAAE;AAAA,MACA,oBAAAC;AAAA,MACA,YAAAM;AAAA,MACA,gBAAAL;AAAA;AAAA,MACA,SAAAO;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox-group.BNVnOYKH.js","sources":["../../../core/src/components/checkbox-group/checkbox-group.types.ts","../../src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import type { BentoCheckboxTag } from '@/core/components/checkbox/checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\ninterface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from '@/core/components/checkbox-group/checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { BentoCheckboxEvent } from '@/core/components/checkbox/checkbox.types';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-checkbox-group';\n\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { BentoCheckbox, ControlsGroup, ErrorMessage },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array<number | string | null>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) =>\n Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { emit, slots }) {\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(\n () => !props.disabled && !isReadOnly.value && !!props.errorMessage\n );\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = name => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onInput = value => {\n inputValue.value = value;\n emit(BentoCheckboxEvent.UPDATE, value);\n emit(BentoCheckboxEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n return {\n // Values\n COMPONENT_NAME,\n errorId,\n isReadOnly,\n shouldShowGroupError,\n shouldShowGroupErrorMessage,\n conditionalClasses,\n inputValue,\n hasContentSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox-group/checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","_sfc_main","defineComponent","BentoCheckbox","ControlsGroup","ErrorMessage","value","BentoCheckboxEvent","props","emit","slots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onInput","deprecate"],"mappings":";;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;ACwDZ,MAAAE,IAAA,wBAqBAC,IAAAC,EAAA;AAAA,EAAA,MAAAF;AAAA,EACA,YAAA,EAAA,eAAAG,GAAA,eAAAC,GAAA,cAAAC,EAAA;AAAA,EACA,OAAA,EAAA,MAAA,aAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,aAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,QAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA,EAAA,MAAA,SAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,OAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,EAAA,MAAA,OAAA,SAAA,MAAA,CAAA,EAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,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AA,QAAAjB,EAAA;AAAA,MAAA;AAAA,IACA;AAGA,UAAAmB,IAAA,CAAArB,MAAA;AACA,MAAAmB,EAAA,QAAAnB,GACAG,EAAAF,EAAA,QAAAD,CAAA,GACAG,EAAAF,EAAA,OAAAD,CAAA;AAAA,IAAA;AAGA,WAAAE,EAAA,YACAoB;AAAA,MAAA;AAAA,MACA;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIA;AAAA;AAAA,MAAA,gBAAA5B;AAAA,MAEA,SAAAW;AAAA,MACA,YAAAE;AAAA,MACA,sBAAAG;AAAA,MACA,6BAAAE;AAAA,MACA,oBAAAC;AAAA,MACA,YAAAM;AAAA,MACA,gBAAAL;AAAA;AAAA,MACA,SAAAO;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,8 +7,8 @@ import { g as B } from "./generate-uid.D-HFI38h.js";
|
|
|
7
7
|
import { g as f } from "./get-slot-text.Cgn-E48s.js";
|
|
8
8
|
import { u as j } from "./i18n.BQkEbtPM.js";
|
|
9
9
|
import { u as F } from "./aria-label.CaUURpnB.js";
|
|
10
|
-
import { B as z } from "./tag.
|
|
11
|
-
import { E as H } from "./error-message.
|
|
10
|
+
import { B as z } from "./tag.d36UYSWd.js";
|
|
11
|
+
import { E as H } from "./error-message.Brg-AZjT.js";
|
|
12
12
|
import { n as J } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
13
13
|
import "../assets/checkbox.css";
|
|
14
14
|
var l = /* @__PURE__ */ ((a) => (a.UPDATE = "update:model-value", a.INPUT = "input", a))(l || {});
|
|
@@ -152,11 +152,11 @@ var K = function() {
|
|
|
152
152
|
Q,
|
|
153
153
|
!1,
|
|
154
154
|
null,
|
|
155
|
-
"
|
|
155
|
+
"4bbc4bc5"
|
|
156
156
|
);
|
|
157
157
|
const ue = W.exports;
|
|
158
158
|
export {
|
|
159
159
|
ue as B,
|
|
160
160
|
l as a
|
|
161
161
|
};
|
|
162
|
-
//# sourceMappingURL=checkbox.
|
|
162
|
+
//# sourceMappingURL=checkbox.CcwY2CMn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.CcwY2CMn.js","sources":["../../../core/src/components/checkbox/checkbox.types.ts","../../src/components/checkbox/checkbox.vue"],"sourcesContent":["import type { BentoTagProps } from '@/core/components/tag/tag.types';\nimport type {\n CheckboxInputType as BentoCheckboxType,\n MultiCheckboxInputType as BentoMultiCheckboxType,\n} from '@/core/components/internal/checkbox-input/checkbox-input.types';\nimport { CheckboxInputState as BentoCheckboxState } from '@/core/components/internal/checkbox-input/checkbox-input.types';\n\nexport { BentoCheckboxState, BentoCheckboxType, BentoMultiCheckboxType };\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n\nexport type BentoCheckboxTag = BentoTagProps;\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\">\n <checkbox-input\n ref=\"input\"\n v-bind=\"$attrs\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :has-error=\"shouldShowError\"\n :indeterminate=\"isIndeterminate\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :readonly=\"readonly\"\n @update:model-value=\"onChange\"\n />\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <span><slot /></span>\n <bento-typography v-if=\"optional\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('optional') }})</bento-typography\n >\n <bento-typography v-else-if=\"required\" class=\"b-checkbox__label-requirement\" el=\"span\"\n >({{ t('required') }})</bento-typography\n >\n <bento-tag v-if=\"tag\" class=\"b-checkbox__label-tag\" v-bind=\"tag\" />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"contentSlotAvailable\" class=\"b-checkbox__content\" el=\"span\" variant=\"body\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxTag,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from '@/core/components/checkbox/checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { CheckboxInput } from '@/components/internal/checkbox-input';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoTag } from '@/components/tag';\n import { BentoCheckboxGroupItems } from '@/core/components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTag,\n BentoTypography,\n CheckboxInput,\n ErrorMessage,\n },\n model: { prop: 'modelValue' },\n props: {\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Highlights the checkbox is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the checkbox is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoCheckboxTag>, default: undefined },\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // Content slot logic\n const hasContentSlot = computed(() => hasSlot('content'));\n const isCheckedOrIntermediate = computed(() => isIndeterminate?.value || isChecked?.value);\n const contentSlotAvailable = computed(\n () => hasContentSlot?.value && isCheckboxGroup?.value && isCheckedOrIntermediate?.value\n );\n\n // ARIA fields\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default') ? (getSlotText(slots)('default') as string) : t('checkbox'),\n });\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n const onChange = (newValue: BentoCheckboxType | BentoCheckboxGroupItems) => {\n if (disabled.value) {\n return;\n }\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaDescribedBy,\n computedAriaLabel,\n conditionalClass,\n defaultSlotValue,\n descriptionSlotValue,\n isIndeterminate,\n shouldShowError,\n shouldShowErrorMessage,\n contentSlotAvailable,\n hasContentSlot,\n\n // Methods\n hasSlot,\n onChange,\n\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/checkbox/checkbox.scss\" />\n"],"names":["BentoCheckboxEvent","BentoCheckboxEvent2","_sfc_main","defineComponent","messages","BentoTag","BentoTypography","CheckboxInput","ErrorMessage","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","hasContentSlot","isCheckedOrIntermediate","contentSlotAvailable","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","computedAriaLabel","useAriaLabel","conditionalClass","CheckboxInputState","newValue"],"mappings":";;;;;;;;;;;;;AASY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;GC4EZE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,MAAA,EAAA,UAAAC,EAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,EACA;AAAA,EACA,OAAA,EAAA,MAAA,aAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,WAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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C;AAAA,MACA,sBAAAG;AAAA,MACA,gBAAAF;AAAA;AAAA,MACA,SAAAnB;AAAA,MAGA,UAxBA,CAAA8B,MAAA;AACA,QAAA5B,EAAA,UAGAT,EAAAX,EAAA,QAAAgD,CAAA,GACArC,EAAAX,EAAA,OAAAgD,CAAA;AAAA,MAAA;AAAA,MAoBA,GAAAnC;AAAA,IAEA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { s as
|
|
3
|
-
import {
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import { B as
|
|
7
|
-
import { B as
|
|
8
|
-
import { u as
|
|
9
|
-
import { E as
|
|
10
|
-
import { h as
|
|
11
|
-
import { C as
|
|
12
|
-
import { B as
|
|
13
|
-
import { n as
|
|
1
|
+
import { defineComponent as B, ref as d, computed as l, shallowRef as C, onMounted as Q, watch as Y, watchEffect as H } from "vue";
|
|
2
|
+
import { s as M, H as V, t as n, L as j, a as D, b as Z, c as J, j as W, x as U, d as G, e as z, p as F, E as X, h as K, k as q, i as ee, f as S, g as L, l as te, m as ne, C as b } from "./codemirror.OjJ-3ixa.js";
|
|
3
|
+
import { b as ae, c as oe, d as se, e as ie } from "./es6.D11bE5vq.js";
|
|
4
|
+
import { B as le } from "./dropdown.BkLc07G8.js";
|
|
5
|
+
import { B as re } from "./button.Bx8WC-dy.js";
|
|
6
|
+
import { B as ce } from "./typography.Bu_WAKdf.js";
|
|
7
|
+
import { B as de } from "./loading-indicator.z8COalOc.js";
|
|
8
|
+
import { u as ge } from "./i18n.BQkEbtPM.js";
|
|
9
|
+
import { E as ue } from "./expand.CwwKq7Uc.js";
|
|
10
|
+
import { h as pe } from "./base-modal.UPLi477L.js";
|
|
11
|
+
import { C as fe } from "./copy.BakPR7GI.js";
|
|
12
|
+
import { B as me } from "./tooltip.CQGwmwt9.js";
|
|
13
|
+
import { n as he } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
14
14
|
import "../assets/code-snippet.css";
|
|
15
|
-
const
|
|
16
|
-
red:
|
|
17
|
-
orange:
|
|
18
|
-
green:
|
|
19
|
-
blue:
|
|
15
|
+
const be = {
|
|
16
|
+
red: ae,
|
|
17
|
+
orange: oe,
|
|
18
|
+
green: se,
|
|
19
|
+
blue: ie,
|
|
20
20
|
invalid: "#ffffff"
|
|
21
|
-
},
|
|
21
|
+
}, Oe = (e, t) => V.define([
|
|
22
22
|
{
|
|
23
23
|
tag: n.keyword,
|
|
24
24
|
color: e.red
|
|
@@ -85,31 +85,61 @@ const pe = {
|
|
|
85
85
|
tag: n.invalid,
|
|
86
86
|
color: e.invalid
|
|
87
87
|
}
|
|
88
|
-
]),
|
|
89
|
-
var g = /* @__PURE__ */ ((e) => (e.INLINE = "inline", e.SINGLELINE = "singleline", e.MULTILINE = "multiline", e))(g || {}), s = /* @__PURE__ */ ((e) => (e.JSON = "json", e.XML = "xml", e.JAVA = "java", e.JAVASCRIPT = "javascript", e.PYTHON = "python", e))(s || {}), r = /* @__PURE__ */ ((e) => (e.ACTION = "action", e.CHANGE = "change", e))(r || {});
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
]), _e = (e) => M(Oe(be, e));
|
|
89
|
+
var g = /* @__PURE__ */ ((e) => (e.INLINE = "inline", e.SINGLELINE = "singleline", e.MULTILINE = "multiline", e))(g || {}), s = /* @__PURE__ */ ((e) => (e.JSON = "json", e.XML = "xml", e.JAVA = "java", e.JAVASCRIPT = "javascript", e.PYTHON = "python", e.CSV = "csv", e))(s || {}), r = /* @__PURE__ */ ((e) => (e.ACTION = "action", e.CHANGE = "change", e))(r || {});
|
|
90
|
+
const ve = j.deserialize({
|
|
91
|
+
version: 14,
|
|
92
|
+
states: "nQVQPOOOOQO'#Ce'#CeOOQO'#Ca'#CaQVQPOOOOQO-E6_-E6_",
|
|
93
|
+
stateData: "g~OWOS~OQPORPOSPO~OQRSR~",
|
|
94
|
+
goto: "eYPPPPPZPPPaQRORSRTQOR",
|
|
95
|
+
nodeNames: "⚠ Program String Separator Value",
|
|
96
|
+
maxTerm: 9,
|
|
97
|
+
skippedNodes: [0],
|
|
98
|
+
repeatNodeCount: 1,
|
|
99
|
+
tokenData: "'Y~RZOYtYZ!cZrtrs!hs|t|}'T}!]t!]!^'T!^;'St;'S;=`!]<%lOt~yUS~OYtZ|t}!]t!^;'St;'S;=`!]<%lOt~!`P;=`<%lt~!hOW~~!m]S~OY!hYZ#fZr!hrs%Ss|!h|}#f}!]!h!]!^#f!^#O!h#O#P%m#P;'S!h;'S;=`&}<%lO!h~#iVOr#frs$Os#O#f#O#P$T#P;'S#f;'S;=`$|<%lO#f~$TOQ~~$WRO;'S#f;'S;=`$a;=`O#f~$dWOr#frs$Os#O#f#O#P$T#P;'S#f;'S;=`$|;=`<%l#f<%lO#f~%PP;=`<%l#f~%ZUQ~S~OYtZ|t}!]t!^;'St;'S;=`!]<%lOt~%rYS~OY!hYZ#fZ|!h|}#f}!]!h!]!^#f!^;'S!h;'S;=`&b;=`<%l#f<%lO!h~&eWOr#frs$Os#O#f#O#P$T#P;'S#f;'S;=`$|;=`<%l!h<%lO#f~'QP;=`<%l!h~'YOR~",
|
|
100
|
+
tokenizers: [0],
|
|
101
|
+
topRules: { Program: [0, 1] },
|
|
102
|
+
tokenPrec: 18
|
|
103
|
+
}), ye = D.define({
|
|
104
|
+
parser: ve.configure({
|
|
105
|
+
props: [
|
|
106
|
+
Z({
|
|
107
|
+
Separator: n.separator,
|
|
108
|
+
Value: n.string,
|
|
109
|
+
String: n.string,
|
|
110
|
+
LineComment: n.lineComment,
|
|
111
|
+
"( )": n.paren
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
function Ce() {
|
|
117
|
+
return new J(ye);
|
|
118
|
+
}
|
|
119
|
+
const Se = {
|
|
120
|
+
[s.JSON]: W,
|
|
121
|
+
[s.XML]: U,
|
|
122
|
+
[s.JAVASCRIPT]: G,
|
|
123
|
+
[s.JAVA]: z,
|
|
124
|
+
[s.PYTHON]: F,
|
|
125
|
+
[s.CSV]: Ce
|
|
126
|
+
}, Le = (e) => async () => Se[e], xe = (e, t) => {
|
|
97
127
|
const a = e.doc.lineAt(t.from), o = /^\s*/.exec(a.text);
|
|
98
128
|
return o ? o[0] : "";
|
|
99
|
-
},
|
|
129
|
+
}, Ne = {
|
|
100
130
|
key: "Enter",
|
|
101
131
|
run: ({ state: e, dispatch: t }) => {
|
|
102
132
|
const a = e.changeByRange((o) => {
|
|
103
133
|
const c = `
|
|
104
|
-
${
|
|
134
|
+
${xe(e, o)}`;
|
|
105
135
|
return {
|
|
106
136
|
changes: { from: o.from, to: o.to, insert: c },
|
|
107
|
-
range:
|
|
137
|
+
range: X.cursor(o.from + c.length)
|
|
108
138
|
};
|
|
109
139
|
});
|
|
110
140
|
return t(e.update(a, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
111
141
|
}
|
|
112
|
-
},
|
|
142
|
+
}, Pe = {
|
|
113
143
|
"en-US": {
|
|
114
144
|
expand: "Expand",
|
|
115
145
|
nothingToDisplay: "Nothing to display",
|
|
@@ -123,19 +153,19 @@ ${_e(e, o)}`;
|
|
|
123
153
|
expand: "展開",
|
|
124
154
|
nothingToDisplay: "表示するものがありません"
|
|
125
155
|
}
|
|
126
|
-
},
|
|
127
|
-
i18n: { messages:
|
|
156
|
+
}, Te = B({
|
|
157
|
+
i18n: { messages: Pe },
|
|
128
158
|
name: "bento-code-snippet",
|
|
129
159
|
components: {
|
|
130
|
-
BentoTypography:
|
|
131
|
-
BentoButton:
|
|
132
|
-
BentoDropdown:
|
|
133
|
-
Copy:
|
|
134
|
-
BaseModal:
|
|
135
|
-
BentoLoadingIndicator:
|
|
136
|
-
ExpandIcon:
|
|
160
|
+
BentoTypography: ce,
|
|
161
|
+
BentoButton: re,
|
|
162
|
+
BentoDropdown: le,
|
|
163
|
+
Copy: fe,
|
|
164
|
+
BaseModal: pe,
|
|
165
|
+
BentoLoadingIndicator: de,
|
|
166
|
+
ExpandIcon: ue
|
|
137
167
|
},
|
|
138
|
-
directives: { BentoTooltipDirective:
|
|
168
|
+
directives: { BentoTooltipDirective: me },
|
|
139
169
|
props: {
|
|
140
170
|
/**
|
|
141
171
|
* Defines the variant of code-snippet
|
|
@@ -208,36 +238,36 @@ ${_e(e, o)}`;
|
|
|
208
238
|
},
|
|
209
239
|
emits: [r.ACTION, r.CHANGE],
|
|
210
240
|
setup(e, { emit: t }) {
|
|
211
|
-
const { t: a } =
|
|
212
|
-
},
|
|
241
|
+
const { t: a } = ge(), o = d(null), O = [], c = () => {
|
|
242
|
+
}, x = l(() => e.langLabel ?? e.lang.toUpperCase()), u = l(() => e.variant === g.INLINE), N = l(() => ({
|
|
213
243
|
"b-code-snippet--inline": u.value,
|
|
214
244
|
"b-code-snippet--scrollable": !u.value
|
|
215
|
-
})),
|
|
245
|
+
})), P = l(() => ({
|
|
216
246
|
"b-code-snippet__code-area-content--editable": e.editable
|
|
217
|
-
})),
|
|
218
|
-
|
|
219
|
-
const m = await
|
|
247
|
+
})), T = Le(e.lang), _ = C(), p = C(), A = new b(), E = new b(), I = new b(), i = d(null), f = d(0);
|
|
248
|
+
Q(async () => {
|
|
249
|
+
const m = await T();
|
|
220
250
|
i.value = e.content;
|
|
221
|
-
const
|
|
222
|
-
i.value =
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
251
|
+
const $ = ({ state: h }) => {
|
|
252
|
+
i.value = h.doc.toString();
|
|
253
|
+
}, v = [
|
|
254
|
+
K(),
|
|
255
|
+
q.of([ee, Ne]),
|
|
256
|
+
A.of(m()),
|
|
257
|
+
E.of(_e(e.lang)),
|
|
258
|
+
I.of(S.readOnly.of(!e.editable)),
|
|
259
|
+
L.updateListener.of((h) => $(h))
|
|
230
260
|
];
|
|
231
|
-
e.variant === "multiline" &&
|
|
232
|
-
const
|
|
261
|
+
e.variant === "multiline" && v.push([te(), ne()]);
|
|
262
|
+
const y = S.create({
|
|
233
263
|
doc: e.content,
|
|
234
|
-
extensions: [...
|
|
264
|
+
extensions: [...v]
|
|
235
265
|
});
|
|
236
|
-
f.value =
|
|
237
|
-
state:
|
|
238
|
-
parent:
|
|
266
|
+
f.value = y.doc.length, p.value = new L({
|
|
267
|
+
state: y,
|
|
268
|
+
parent: _.value
|
|
239
269
|
});
|
|
240
|
-
}),
|
|
270
|
+
}), Y(
|
|
241
271
|
() => e.content,
|
|
242
272
|
() => {
|
|
243
273
|
if (e.content !== i.value) {
|
|
@@ -252,35 +282,35 @@ ${_e(e, o)}`;
|
|
|
252
282
|
}
|
|
253
283
|
}
|
|
254
284
|
);
|
|
255
|
-
const
|
|
285
|
+
const R = l(() => a(e.actionableText)), w = () => {
|
|
256
286
|
t(r.ACTION, i.value);
|
|
257
287
|
};
|
|
258
|
-
|
|
288
|
+
H(() => {
|
|
259
289
|
i.value !== null && t(r.CHANGE, i.value);
|
|
260
290
|
});
|
|
261
|
-
const
|
|
291
|
+
const k = d(!1);
|
|
262
292
|
return {
|
|
263
293
|
// Values
|
|
264
|
-
availableLanguages:
|
|
265
|
-
codeAreaContentConditionalClasses:
|
|
266
|
-
conditionalClasses:
|
|
267
|
-
container:
|
|
294
|
+
availableLanguages: O,
|
|
295
|
+
codeAreaContentConditionalClasses: P,
|
|
296
|
+
conditionalClasses: N,
|
|
297
|
+
container: _,
|
|
268
298
|
currentContents: i,
|
|
269
|
-
displayedLang:
|
|
299
|
+
displayedLang: x,
|
|
270
300
|
editor: p,
|
|
271
301
|
selectedLanguage: o,
|
|
272
|
-
showModal:
|
|
302
|
+
showModal: k,
|
|
273
303
|
isInlineVariant: u,
|
|
274
304
|
// Methods
|
|
275
305
|
handleChangeLanguage: c,
|
|
276
|
-
onActionClicked:
|
|
277
|
-
runText:
|
|
306
|
+
onActionClicked: w,
|
|
307
|
+
runText: R,
|
|
278
308
|
// Translations
|
|
279
309
|
t: a
|
|
280
310
|
};
|
|
281
311
|
}
|
|
282
312
|
});
|
|
283
|
-
var
|
|
313
|
+
var Ae = function() {
|
|
284
314
|
var t = this, a = t._self._c;
|
|
285
315
|
return t._self._setupProxy, a("div", { staticClass: "b-code-snippet", class: t.conditionalClasses }, [t.isInlineVariant ? t._e() : a("section", { staticClass: "b-code-snippet__action-bar" }, [a("div", { staticClass: "b-code-snippet__action-bar--start" }, [t.availableLanguages.length > 0 ? a("bento-dropdown", t._b({ staticClass: "b-code-snippet__language-picker", attrs: { disabled: t.availableLanguages.length === 1, items: t.availableLanguages }, on: { input: t.handleChangeLanguage }, model: { value: t.selectedLanguage, callback: function(o) {
|
|
286
316
|
t.selectedLanguage = o;
|
|
@@ -297,19 +327,19 @@ var xe = function() {
|
|
|
297
327
|
} }, scopedSlots: t._u([{ key: "content", fn: function() {
|
|
298
328
|
return [a("bento-code-snippet", t._b({}, "bento-code-snippet", { ...t.$props, expandable: !1 }, !1))];
|
|
299
329
|
}, proxy: !0 }], null, !1, 3343589027) }) : t._e()], 1);
|
|
300
|
-
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
330
|
+
}, Ee = [], Ie = /* @__PURE__ */ he(
|
|
331
|
+
Te,
|
|
332
|
+
Ae,
|
|
333
|
+
Ee,
|
|
304
334
|
!1,
|
|
305
335
|
null,
|
|
306
336
|
"10a1a4c8"
|
|
307
337
|
);
|
|
308
|
-
const
|
|
338
|
+
const Je = Ie.exports;
|
|
309
339
|
export {
|
|
310
340
|
g as B,
|
|
311
341
|
s as a,
|
|
312
342
|
r as b,
|
|
313
|
-
|
|
343
|
+
Je as c
|
|
314
344
|
};
|
|
315
|
-
//# sourceMappingURL=code-snippet.
|
|
345
|
+
//# sourceMappingURL=code-snippet.Bs7wIGi8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-snippet.Bs7wIGi8.js","sources":["../../src/components/code-snippet/highlight.ts","../../src/components/code-snippet/code-snippet.types.ts","../../../../node_modules/.pnpm/codemirror-lang-csv@0.1.1/node_modules/codemirror-lang-csv/dist/index.js","../../src/components/code-snippet/utils/get-lang-loader.ts","../../src/components/code-snippet/utils/indent-same-as-line-before-extension.ts","../../src/components/code-snippet/code-snippet.vue"],"sourcesContent":["import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';\nimport { tags as t } from '@lezer/highlight';\nimport {\n BCodeSnippetCodeAreaHighlightBlue,\n BCodeSnippetCodeAreaHighlightGreen,\n BCodeSnippetCodeAreaHighlightOrange,\n BCodeSnippetCodeAreaHighlightRed,\n} from '@adyen/bento-design-tokens/dist/js/bento/es6';\nimport { BentoCodeSnippetSupportedLanguage } from './code-snippet.types';\n\nconst lightThemeColors = {\n red: BCodeSnippetCodeAreaHighlightRed,\n orange: BCodeSnippetCodeAreaHighlightOrange,\n green: BCodeSnippetCodeAreaHighlightGreen,\n blue: BCodeSnippetCodeAreaHighlightBlue,\n invalid: '#ffffff',\n};\n\nconst highlightStyle = (colors, language: BentoCodeSnippetSupportedLanguage | `${BentoCodeSnippetSupportedLanguage}`) =>\n HighlightStyle.define([\n {\n tag: t.keyword,\n color: colors.red,\n },\n {\n tag: [t.name, t.deleted, t.character, t.propertyName, t.macroName],\n color: colors.green,\n },\n {\n tag: [t.function(t.variableName), t.labelName],\n color: colors.blue,\n },\n {\n tag: [t.color, t.constant(t.name), t.standard(t.name)],\n color: colors.red,\n },\n {\n tag: [t.definition(t.name), ...(language !== 'json' ? [t.separator] : [])],\n color: colors.red,\n },\n {\n tag: [t.typeName, t.className, t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace],\n color: colors.orange,\n },\n {\n tag: [t.operator, t.operatorKeyword, t.url, t.escape, t.regexp, t.link, t.special(t.string)],\n color: colors.blue,\n },\n {\n tag: [t.meta, t.comment],\n color: colors.orange,\n },\n {\n tag: t.strong,\n fontWeight: 'bold',\n },\n {\n tag: t.emphasis,\n fontStyle: 'italic',\n },\n {\n tag: t.strikethrough,\n textDecoration: 'line-through',\n },\n {\n tag: t.link,\n color: colors.orange,\n textDecoration: 'underline',\n },\n {\n tag: t.heading,\n fontWeight: 'bold',\n color: colors.blue,\n },\n {\n tag: [t.atom, t.bool, t.special(t.variableName)],\n color: colors.red,\n },\n {\n tag: [t.processingInstruction, t.string, t.inserted],\n color: colors.blue,\n },\n {\n tag: t.invalid,\n color: colors.invalid,\n },\n ]);\n\nexport const lightThemeHighlight = (\n language: BentoCodeSnippetSupportedLanguage | `${BentoCodeSnippetSupportedLanguage}`\n) => syntaxHighlighting(highlightStyle(lightThemeColors, language));\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCodeSnippetVariant {\n INLINE = 'inline',\n SINGLELINE = 'singleline',\n MULTILINE = 'multiline',\n}\n\n// These supported types need to be kept in line with the ones in packages/vue2/src/components/code-snippet/composables/useLanguage.ts function and vice-versa\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCodeSnippetSupportedLanguage {\n JSON = 'json',\n XML = 'xml',\n JAVA = 'java',\n JAVASCRIPT = 'javascript',\n PYTHON = 'python',\n CSV = 'csv',\n}\n\nexport enum BentoCodeSnippetEvent {\n ACTION = 'action',\n CHANGE = 'change',\n}\n","import { LRParser } from '@lezer/lr';\nimport { LRLanguage, LanguageSupport } from '@codemirror/language';\nimport { styleTags, tags } from '@lezer/highlight';\n\n// This file was generated by lezer-generator. You probably shouldn't edit it.\nconst parser = LRParser.deserialize({\n version: 14,\n states: \"nQVQPOOOOQO'#Ce'#CeOOQO'#Ca'#CaQVQPOOOOQO-E6_-E6_\",\n stateData: \"g~OWOS~OQPORPOSPO~OQRSR~\",\n goto: \"eYPPPPPZPPPaQRORSRTQOR\",\n nodeNames: \"⚠ Program String Separator Value\",\n maxTerm: 9,\n skippedNodes: [0],\n repeatNodeCount: 1,\n tokenData: \"'Y~RZOYtYZ!cZrtrs!hs|t|}'T}!]t!]!^'T!^;'St;'S;=`!]<%lOt~yUS~OYtZ|t}!]t!^;'St;'S;=`!]<%lOt~!`P;=`<%lt~!hOW~~!m]S~OY!hYZ#fZr!hrs%Ss|!h|}#f}!]!h!]!^#f!^#O!h#O#P%m#P;'S!h;'S;=`&}<%lO!h~#iVOr#frs$Os#O#f#O#P$T#P;'S#f;'S;=`$|<%lO#f~$TOQ~~$WRO;'S#f;'S;=`$a;=`O#f~$dWOr#frs$Os#O#f#O#P$T#P;'S#f;'S;=`$|;=`<%l#f<%lO#f~%PP;=`<%l#f~%ZUQ~S~OYtZ|t}!]t!^;'St;'S;=`!]<%lOt~%rYS~OY!hYZ#fZ|!h|}#f}!]!h!]!^#f!^;'S!h;'S;=`&b;=`<%l#f<%lO!h~&eWOr#frs$Os#O#f#O#P$T#P;'S#f;'S;=`$|;=`<%l!h<%lO#f~'QP;=`<%l!h~'YOR~\",\n tokenizers: [0],\n topRules: {\"Program\":[0,1]},\n tokenPrec: 18\n});\n\nconst csvLanguage = LRLanguage.define({\n parser: parser.configure({\n props: [\n styleTags({\n Separator: tags.separator,\n Value: tags.string,\n String: tags.string,\n LineComment: tags.lineComment,\n \"( )\": tags.paren,\n }),\n ],\n }),\n});\nfunction csv() {\n return new LanguageSupport(csvLanguage);\n}\n\nexport { csv, csvLanguage };\n","import { BentoCodeSnippetSupportedLanguage } from '@/components/code-snippet/code-snippet.types';\nimport { json } from '@codemirror/lang-json';\nimport { xml } from '@codemirror/lang-xml';\nimport { javascript } from '@codemirror/lang-javascript';\nimport { java } from '@codemirror/lang-java';\nimport { python } from '@codemirror/lang-python';\nimport { csv } from 'codemirror-lang-csv';\n\n/**\n * TODO: This should be handled with dynamic imports,\n * without relying on importing every single language/package available.\n * These supported types need to be kept in line with the ones in packages/vue2/src/components/code-snippet/code-snippet.types.ts enum\n */\nconst importsMap = {\n [BentoCodeSnippetSupportedLanguage.JSON]: json,\n [BentoCodeSnippetSupportedLanguage.XML]: xml,\n [BentoCodeSnippetSupportedLanguage.JAVASCRIPT]: javascript,\n [BentoCodeSnippetSupportedLanguage.JAVA]: java,\n [BentoCodeSnippetSupportedLanguage.PYTHON]: python,\n [BentoCodeSnippetSupportedLanguage.CSV]: csv,\n};\n\n/**\n * Returns a language loder for `CodeMirror`.\n * Supported languages: json, xml, javascript & java\n *\n * @param language Language to be used\n * @returns Language configuration loader to be used in codemirror\n */\nexport const getLangLoader = (language: BentoCodeSnippetSupportedLanguage | `${BentoCodeSnippetSupportedLanguage}`) => {\n const loadLang = async () => importsMap[language];\n\n return loadLang;\n};\n","import { EditorSelection, type EditorState, type SelectionRange } from '@codemirror/state';\n\n/**\n * Calculate indentation for a new line based on line before it.\n * @param state - The editor state\n * @param line - the selection range, in this case one line\n * @returns the indentation string to be pre-pended on a new line.\n */\nconst getIndentation = (state: EditorState, line: SelectionRange) => {\n const currentLine = state.doc.lineAt(line.from);\n const indentMatch = /^\\s*/.exec(currentLine.text);\n return indentMatch ? indentMatch[0] : '';\n};\n\n/**\n * This extension to codemirror will, upon pressing the 'Enter' key, indent the new line\n * the same as the line before it.\n */\nexport const INDENT_SAME_AS_LINE_BEFORE = {\n key: 'Enter',\n run: ({ state, dispatch }) => {\n const changes = state.changeByRange(range => {\n const indentation = getIndentation(state, range);\n const newText = `\\n${indentation}`;\n return {\n changes: { from: range.from, to: range.to, insert: newText },\n range: EditorSelection.cursor(range.from + newText.length),\n };\n });\n dispatch(state.update(changes, { scrollIntoView: true, userEvent: 'input' }));\n return true;\n },\n};\n\nexport default INDENT_SAME_AS_LINE_BEFORE;\n","<template>\n <div class=\"b-code-snippet\" :class=\"conditionalClasses\">\n <section v-if=\"!isInlineVariant\" class=\"b-code-snippet__action-bar\">\n <div class=\"b-code-snippet__action-bar--start\">\n <bento-dropdown\n v-if=\"availableLanguages.length > 0\"\n v-model=\"selectedLanguage\"\n v-bind=\"$props\"\n :disabled=\"availableLanguages.length === 1\"\n :items=\"availableLanguages\"\n class=\"b-code-snippet__language-picker\"\n @input=\"handleChangeLanguage\"\n />\n <bento-typography el=\"span\" stronger>\n {{ displayedLang }}\n </bento-typography>\n </div>\n <div class=\"b-code-snippet__action-bar--end\">\n <bento-loading-indicator v-if=\"loading\" />\n <copy v-if=\"currentContents !== null\" class=\"b-structured-list__icon\" :text=\"currentContents\" />\n <bento-button\n v-if=\"expandable\"\n variant=\"tertiary\"\n condensed\n :aria-label=\"t('expand')\"\n @click=\"showModal = true\"\n >\n <template #iconLeft>\n <expand-icon />\n </template>\n </bento-button>\n <bento-button v-if=\"actionable\" variant=\"primary\" tertiary condensed @click=\"onActionClicked\">\n <template #iconLeft>\n <bento-typography el=\"span\" class=\"b-code-snippet__action-button\">\n {{ runText }}\n </bento-typography>\n </template>\n </bento-button>\n </div>\n </section>\n <code v-if=\"content || editable\" class=\"b-code-snippet__code-area\">\n <div ref=\"container\" class=\"b-code-snippet__code-area-content\" :class=\"codeAreaContentConditionalClasses\" />\n </code>\n <section v-else>\n <slot name=\"empty-state\">\n <!-- TODO: switch with empty-state component when ready -->\n <div class=\"b-code-snippet__empty-state\">{{ t('nothingToDisplay') }}</div>\n </slot>\n </section>\n <base-modal\n v-if=\"expandable\"\n class=\"b-code-snippet__modal\"\n :hide-close-button=\"true\"\n :custom-padding=\"'0px'\"\n :is-dismissible=\"true\"\n :is-open=\"showModal\"\n size=\"large\"\n @close-modal=\"showModal = false\"\n >\n <template #content>\n <bento-code-snippet v-bind=\"{ ...$props, expandable: false }\" />\n </template>\n </base-modal>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, shallowRef, watch, watchEffect } from 'vue';\n import { EditorView, highlightActiveLine, keymap, lineNumbers } from '@codemirror/view';\n import { Compartment, EditorState } from '@codemirror/state';\n import { history, indentWithTab } from '@codemirror/commands';\n import { lightThemeHighlight } from './highlight';\n import { getLangLoader, INDENT_SAME_AS_LINE_BEFORE } from './utils';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { BentoTooltipDirective } from '@/directives';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import { Copy } from '@/internal';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import {\n BentoCodeSnippetEvent,\n BentoCodeSnippetSupportedLanguage,\n BentoCodeSnippetVariant,\n } from '@/components/code-snippet/code-snippet.types';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * A code-snippet is a container to display code in a readable way.\n * Come with added functionalities like syntax highlighting, editing and actioning the code\n *\n * @example\n * import { BentoCodeSnippet } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCodeSnippet },\n * template: `\n * <bento-code-snippet :variant=\"BentoCodeSnippetVariant.MULTILINE\" content=\"{ example: 1234 }\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-code-snippet',\n components: {\n BentoTypography,\n BentoButton,\n BentoDropdown,\n Copy,\n BaseModal,\n BentoLoadingIndicator,\n ExpandIcon,\n },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Defines the variant of code-snippet\n */\n variant: {\n type: String as PropType<BentoCodeSnippetVariant | `${BentoCodeSnippetVariant}`>,\n default: BentoCodeSnippetVariant.MULTILINE,\n validator: (value: BentoCodeSnippetVariant) => Object.values(BentoCodeSnippetVariant).includes(value),\n },\n /**\n * Language name for syntax highlighting rules\n */\n lang: {\n type: String as PropType<BentoCodeSnippetSupportedLanguage | `${BentoCodeSnippetSupportedLanguage}`>,\n default: BentoCodeSnippetSupportedLanguage.JSON,\n validator: (value: BentoCodeSnippetSupportedLanguage) =>\n Object.values(BentoCodeSnippetSupportedLanguage).includes(value),\n },\n /**\n * Label to show in the action-bar, describing the language\n */\n langLabel: {\n type: String,\n default: null,\n },\n /**\n * The code content\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * Allows editing of the code-snippet content by the user\n */\n editable: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays a button that when clicked will emit an action event\n * Leaves to the parent component the logic of what to do with it\n */\n actionable: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays a button that can expand the codeblock into a modal to easily\n * view large blocks of code.\n */\n expandable: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays a button that when clicked will emit a run event\n * Leaves to the parent component the logic of what to do with it\n */\n actionableText: {\n type: String,\n default: 'run',\n },\n /**\n * Toggles the loading indicator within the action bar\n */\n loading: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoCodeSnippetEvent.ACTION, BentoCodeSnippetEvent.CHANGE],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // language\n const selectedLanguage = ref<string | null>(null);\n const availableLanguages = []; // TODO: implement\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n const handleChangeLanguage = () => {};\n const displayedLang = computed(() => props.langLabel ?? props.lang.toUpperCase());\n\n const isInlineVariant = computed(() => props.variant === BentoCodeSnippetVariant.INLINE);\n\n const conditionalClasses = computed(() => ({\n 'b-code-snippet--inline': isInlineVariant.value,\n 'b-code-snippet--scrollable': !isInlineVariant.value,\n }));\n\n const codeAreaContentConditionalClasses = computed(() => ({\n 'b-code-snippet__code-area-content--editable': props.editable,\n }));\n\n const loadLang = getLangLoader(props.lang);\n\n const container = shallowRef<HTMLDivElement>();\n const editor = shallowRef<EditorView>();\n const languageConf = new Compartment();\n const editorTheme = new Compartment();\n const editorReadOnly = new Compartment();\n\n const currentContents = ref(null);\n const contentLength = ref(0);\n\n onMounted(async () => {\n const language = await loadLang();\n\n // alongside the updateListener plugin it acts as a watcher of changes to the editor state\n currentContents.value = props.content;\n const updateCurrentContents = ({ state }) => {\n currentContents.value = state.doc.toString();\n };\n\n const extensions = [\n highlightActiveLine(),\n keymap.of([indentWithTab, INDENT_SAME_AS_LINE_BEFORE]),\n languageConf.of(language()),\n editorTheme.of(lightThemeHighlight(props.lang)),\n\n editorReadOnly.of(EditorState.readOnly.of(!props.editable)),\n EditorView.updateListener.of(content => updateCurrentContents(content)),\n ];\n\n if (props.variant === 'multiline') {\n extensions.push([lineNumbers(), history()]);\n }\n\n const state = EditorState.create({\n doc: props.content,\n extensions: [...extensions],\n });\n contentLength.value = state.doc.length;\n\n editor.value = new EditorView({\n state,\n parent: container.value,\n });\n });\n watch(\n () => props.content,\n () => {\n if (props.content !== currentContents.value) {\n const upcomingContentLength = props.content.length;\n editor.value.dispatch({\n changes: {\n from: 0,\n to: contentLength.value,\n insert: props.content,\n },\n });\n contentLength.value = upcomingContentLength;\n }\n }\n );\n\n const runText = computed(() => t(props.actionableText as 'run'));\n const onActionClicked = () => {\n emit(BentoCodeSnippetEvent.ACTION, currentContents.value);\n };\n\n watchEffect(() => {\n if (currentContents.value !== null) {\n emit(BentoCodeSnippetEvent.CHANGE, currentContents.value);\n }\n });\n\n const showModal = ref(false);\n\n return {\n // Values\n availableLanguages,\n codeAreaContentConditionalClasses,\n conditionalClasses,\n container,\n currentContents,\n displayedLang,\n editor,\n selectedLanguage,\n showModal,\n isInlineVariant,\n\n // Methods\n handleChangeLanguage,\n onActionClicked,\n runText,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./code-snippet.scss\"></style>\n"],"names":["lightThemeColors","BCodeSnippetCodeAreaHighlightRed","BCodeSnippetCodeAreaHighlightOrange","BCodeSnippetCodeAreaHighlightGreen","BCodeSnippetCodeAreaHighlightBlue","highlightStyle","colors","language","HighlightStyle","tags","lightThemeHighlight","syntaxHighlighting","BentoCodeSnippetVariant","BentoCodeSnippetVariant2","BentoCodeSnippetSupportedLanguage","BentoCodeSnippetSupportedLanguage2","BentoCodeSnippetEvent","BentoCodeSnippetEvent2","parser","LRParser","csvLanguage","LRLanguage","styleTags","csv","LanguageSupport","importsMap","json","xml","javascript","java","python","getLangLoader","getIndentation","state","line","currentLine","indentMatch","INDENT_SAME_AS_LINE_BEFORE","dispatch","changes","range","newText","EditorSelection","_sfc_main","defineComponent","messages","BentoTypography","BentoButton","BentoDropdown","Copy","BaseModal","BentoLoadingIndicator","ExpandIcon","BentoTooltipDirective","value","props","emit","t","useI18n","selectedLanguage","ref","availableLanguages","handleChangeLanguage","displayedLang","computed","isInlineVariant","conditionalClasses","codeAreaContentConditionalClasses","loadLang","container","shallowRef","editor","languageConf","Compartment","editorTheme","editorReadOnly","currentContents","contentLength","onMounted","updateCurrentContents","state2","extensions","highlightActiveLine","keymap","indentWithTab","EditorState","EditorView","content","lineNumbers","history","watch","upcomingContentLength","runText","onActionClicked","watchEffect","showModal"],"mappings":";;;;;;;;;;;;;;AAUA,MAAAA,KAAA;AAAA,EAAyB,KAAAC;AAAA,EAChB,QAAAC;AAAA,EACG,OAAAC;AAAA,EACD,MAAAC;AAAA,EACD,SAAA;AAEV,GAEAC,KAAA,CAAAC,GAAAC,MAAAC,EAAA,OAAA;AAAA,EAC0B;AAAA,IAClB,KAAAC,EAAA;AAAA,IACW,OAAAH,EAAA;AAAA,EACO;AAAA,EAClB;AAAA,IACA,KAAA,CAAAG,EAAA,MAAAA,EAAA,SAAAA,EAAA,WAAAA,EAAA,cAAAA,EAAA,SAAA;AAAA,IACqE,OAAAH,EAAA;AAAA,EACnD;AAAA,EAClB;AAAA,IACA,KAAA,CAAAG,EAAA,SAAAA,EAAA,YAAA,GAAAA,EAAA,SAAA;AAAA,IACiD,OAAAH,EAAA;AAAA,EAC/B;AAAA,EAClB;AAAA,IACA,KAAA,CAAAG,EAAA,OAAAA,EAAA,SAAAA,EAAA,IAAA,GAAAA,EAAA,SAAAA,EAAA,IAAA,CAAA;AAAA,IACyD,OAAAH,EAAA;AAAA,EACvC;AAAA,EAClB;AAAA,IACA,KAAA,CAAAG,EAAA,WAAAA,EAAA,IAAA,GAAA,GAAAF,MAAA,SAAA,CAAAE,EAAA,SAAA,IAAA,CAAA,CAAA;AAAA,I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