@adyen/bento-vue3 1.28.1 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +4 -0
- package/dist/@types/packages/core/src/types/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/{internal/avatar → avatar}/avatar.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/{avatar-image → avatar/components/avatar-image}/avatar-image.vue.d.ts +15 -4
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +10 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +6 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/inspector.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/inspector.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/inspector/inspector.vue.d.ts +110 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +0 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +12 -1
- package/dist/@types/packages/vue2/src/components/secondary-nav/secondary-nav.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/types/index.d.ts +1 -1
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.css +1 -0
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/code-snippet.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/error-message.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -0
- package/dist/assets/listbox-option-tag.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/segmented-control.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/avatar.js +5 -0
- package/dist/avatar.js.map +1 -0
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.BvAtk-jI.js → action-bar.UcSSukRr.js} +5 -5
- package/dist/chunks/{action-bar.BvAtk-jI.js.map → action-bar.UcSSukRr.js.map} +1 -1
- package/dist/chunks/avatar.IHx0kN0u.js +94 -0
- package/dist/chunks/avatar.IHx0kN0u.js.map +1 -0
- package/dist/chunks/{base-modal.BgYlnM_Q.js → base-modal.CY-t-QYh.js} +2 -2
- package/dist/chunks/{base-modal.BgYlnM_Q.js.map → base-modal.CY-t-QYh.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.C14zvgVo.js → button-actions-with-menu.Dnyh1m51.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.C14zvgVo.js.map → button-actions-with-menu.Dnyh1m51.js.map} +1 -1
- package/dist/chunks/{button-actions.hGhRdgC2.js → button-actions.BpLFzJJY.js} +2 -2
- package/dist/chunks/{button-actions.hGhRdgC2.js.map → button-actions.BpLFzJJY.js.map} +1 -1
- package/dist/chunks/{card.C7zLKdcy.js → card.DOQt8sH5.js} +2 -2
- package/dist/chunks/{card.C7zLKdcy.js.map → card.DOQt8sH5.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BcT-eZ2p.js → checkbox-group.DS_f6k8E.js} +4 -4
- package/dist/chunks/{checkbox-group.BcT-eZ2p.js.map → checkbox-group.DS_f6k8E.js.map} +1 -1
- package/dist/chunks/{checkbox.xjIFibII.js → checkbox.C5cMvVMm.js} +3 -3
- package/dist/chunks/{checkbox.xjIFibII.js.map → checkbox.C5cMvVMm.js.map} +1 -1
- package/dist/chunks/{code-snippet.e8bxDBCO.js → code-snippet.68epWI-z.js} +184 -208
- package/dist/chunks/code-snippet.68epWI-z.js.map +1 -0
- package/dist/chunks/{controls-group.DWu8NqKL.js → controls-group.fAwpZLvA.js} +2 -2
- package/dist/chunks/{controls-group.DWu8NqKL.js.map → controls-group.fAwpZLvA.js.map} +1 -1
- package/dist/chunks/{copy.BhO7oRgC.js → copy.B6CXENok.js} +3 -3
- package/dist/chunks/{copy.BhO7oRgC.js.map → copy.B6CXENok.js.map} +1 -1
- package/dist/chunks/cross-circle-fill-small.DiZWEd7W.js +29 -0
- package/dist/chunks/cross-circle-fill-small.DiZWEd7W.js.map +1 -0
- package/dist/chunks/{dashboard-section.DKeDjvkB.js → dashboard-section.Bzj5vzTE.js} +3 -3
- package/dist/chunks/{dashboard-section.DKeDjvkB.js.map → dashboard-section.Bzj5vzTE.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DGTW7Y_-.js → dashed-underline.SEXinixe.js} +3 -3
- package/dist/chunks/{dashed-underline.DGTW7Y_-.js.map → dashed-underline.SEXinixe.js.map} +1 -1
- package/dist/chunks/{data-grid-template.6Nls-D4o.js → data-grid-template.BRRSej-5.js} +2 -2
- package/dist/chunks/{data-grid-template.6Nls-D4o.js.map → data-grid-template.BRRSej-5.js.map} +1 -1
- package/dist/chunks/{data-grid.CTLlk_RW.js → data-grid.D0dri6Lc.js} +15 -15
- package/dist/chunks/{data-grid.CTLlk_RW.js.map → data-grid.D0dri6Lc.js.map} +1 -1
- package/dist/chunks/{date-picker.CoPmllNh.js → date-picker.NKXc916N.js} +15 -15
- package/dist/chunks/{date-picker.CoPmllNh.js.map → date-picker.NKXc916N.js.map} +1 -1
- package/dist/chunks/{date-range-picker.C36PxTCQ.js → date-range-picker.DXdh7SCV.js} +13 -13
- package/dist/chunks/{date-range-picker.C36PxTCQ.js.map → date-range-picker.DXdh7SCV.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.-Oy2eT40.js → dropdown-default-textbox.Bx0-dxhU.js} +112 -96
- package/dist/chunks/dropdown-default-textbox.Bx0-dxhU.js.map +1 -0
- package/dist/chunks/{dropdown-tag.C-LxVWlt.js → dropdown-tag.DPTV12uX.js} +14 -13
- package/dist/chunks/dropdown-tag.DPTV12uX.js.map +1 -0
- package/dist/chunks/{dropdown.CxBlK83Q.js → dropdown.CoVT4i0B.js} +360 -349
- package/dist/chunks/dropdown.CoVT4i0B.js.map +1 -0
- package/dist/chunks/{error-message.DyjHMyEZ.js → error-message.oV0CXm1m.js} +3 -3
- package/dist/chunks/{error-message.DyjHMyEZ.js.map → error-message.oV0CXm1m.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js +9 -0
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -0
- package/dist/chunks/expand.D1DTqaBO.js +33 -0
- package/dist/chunks/expand.D1DTqaBO.js.map +1 -0
- package/dist/chunks/{filter-bar.DmPkRBf4.js → filter-bar.d1IKC-Nr.js} +329 -320
- package/dist/chunks/filter-bar.d1IKC-Nr.js.map +1 -0
- package/dist/chunks/{footer-actions.D9nQFagi.js → footer-actions.Cuiq9UJH.js} +2 -2
- package/dist/chunks/{footer-actions.D9nQFagi.js.map → footer-actions.Cuiq9UJH.js.map} +1 -1
- package/dist/chunks/{header.Cr7115vM.js → header.B4il13uF.js} +3 -3
- package/dist/chunks/{header.Cr7115vM.js.map → header.B4il13uF.js.map} +1 -1
- package/dist/chunks/index.DKQuLmwu.js +182 -0
- package/dist/chunks/{index.Dytpif0G.js.map → index.DKQuLmwu.js.map} +1 -1
- package/dist/chunks/{info-icon.DvL1e5Iu.js → info-icon.B8AL324x.js} +3 -3
- package/dist/chunks/{info-icon.DvL1e5Iu.js.map → info-icon.B8AL324x.js.map} +1 -1
- package/dist/chunks/{input-field.iH1ICJkQ.js → input-field.CKh69yj2.js} +119 -113
- package/dist/chunks/input-field.CKh69yj2.js.map +1 -0
- package/dist/chunks/inspector.types.88WOdYA6.js +116 -0
- package/dist/chunks/inspector.types.88WOdYA6.js.map +1 -0
- package/dist/chunks/listbox-option-tag.m6aNQTJN.js +55 -0
- package/dist/chunks/listbox-option-tag.m6aNQTJN.js.map +1 -0
- package/dist/chunks/loading-button.BxDrDxmI.js +123 -0
- package/dist/chunks/loading-button.BxDrDxmI.js.map +1 -0
- package/dist/chunks/{menu.DN-xhDQU.js → menu.PtOT_BKl.js} +2 -2
- package/dist/chunks/{menu.DN-xhDQU.js.map → menu.PtOT_BKl.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CeogBGfr.js → modal-fullscreen.BkuEaCdO.js} +2 -2
- package/dist/chunks/{modal-fullscreen.CeogBGfr.js.map → modal-fullscreen.BkuEaCdO.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BBef1Rl9.js → modal.vue_vue_type_script_setup_true_lang.CQXfT4eW.js} +4 -4
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BBef1Rl9.js.map → modal.vue_vue_type_script_setup_true_lang.CQXfT4eW.js.map} +1 -1
- package/dist/chunks/{pagination.BwG1MF4j.js → pagination.DeOBHgWf.js} +2 -2
- package/dist/chunks/{pagination.BwG1MF4j.js.map → pagination.DeOBHgWf.js.map} +1 -1
- package/dist/chunks/{popover.DRb2GW7t.js → popover.CvUTNkQG.js} +3 -3
- package/dist/chunks/{popover.DRb2GW7t.js.map → popover.CvUTNkQG.js.map} +1 -1
- package/dist/chunks/{popper-container.B76aE-3-.js → popper-container.50jF-_VU.js} +487 -435
- package/dist/chunks/popper-container.50jF-_VU.js.map +1 -0
- package/dist/chunks/{radio-group.B9HCffiZ.js → radio-group.r5U1kQIe.js} +95 -93
- package/dist/chunks/radio-group.r5U1kQIe.js.map +1 -0
- package/dist/chunks/search-bar.DmXr-0Ax.js +116 -0
- package/dist/chunks/search-bar.DmXr-0Ax.js.map +1 -0
- package/dist/chunks/secondary-nav.DnQPIiYO.js +137 -0
- package/dist/chunks/secondary-nav.DnQPIiYO.js.map +1 -0
- package/dist/chunks/{segmented-control.DyINOWUl.js → segmented-control.ClihHHOR.js} +2 -2
- package/dist/chunks/{segmented-control.DyINOWUl.js.map → segmented-control.ClihHHOR.js.map} +1 -1
- package/dist/chunks/{selection-card-group.C-YLePO4.js → selection-card-group.AkttDBv5.js} +3 -3
- package/dist/chunks/{selection-card-group.C-YLePO4.js.map → selection-card-group.AkttDBv5.js.map} +1 -1
- package/dist/chunks/{sidepanel.B-LtA15e.js → sidepanel.Dv73FrCn.js} +2 -2
- package/dist/chunks/{sidepanel.B-LtA15e.js.map → sidepanel.Dv73FrCn.js.map} +1 -1
- package/dist/chunks/{structured-list-item.DQiPKhOI.js → structured-list-item.DrYz5IsA.js} +4 -4
- package/dist/chunks/{structured-list-item.DQiPKhOI.js.map → structured-list-item.DrYz5IsA.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.B941Kdvq.js → summary-grid-item-custom.MloQOKnI.js} +4 -4
- package/dist/chunks/{summary-grid-item-custom.B941Kdvq.js.map → summary-grid-item-custom.MloQOKnI.js.map} +1 -1
- package/dist/chunks/{tag.CPhtHjDD.js → tag.D0imyBj_.js} +2 -2
- package/dist/chunks/{tag.CPhtHjDD.js.map → tag.D0imyBj_.js.map} +1 -1
- package/dist/chunks/textarea.meOoBSoa.js +267 -0
- package/dist/chunks/textarea.meOoBSoa.js.map +1 -0
- package/dist/chunks/{timeline-item.Cap9MXkH.js → timeline-item.BF6w6sUT.js} +181 -168
- package/dist/chunks/timeline-item.BF6w6sUT.js.map +1 -0
- package/dist/chunks/{tooltip.CTR3s-Rm.js → tooltip.C0jTO2wt.js} +2 -2
- package/dist/chunks/{tooltip.CTR3s-Rm.js.map → tooltip.C0jTO2wt.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.WNVsOZdp.js → tutorial.vue_vue_type_script_setup_true_lang.PX3UIJgR.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.WNVsOZdp.js.map → tutorial.vue_vue_type_script_setup_true_lang.PX3UIJgR.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BQBWFTvi.js → use-cached-selected-values.Bh2VFRA-.js} +3 -3
- package/dist/chunks/use-cached-selected-values.Bh2VFRA-.js.map +1 -0
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +11 -10
- package/dist/dropdown.js.map +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +241 -236
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +6 -0
- package/dist/inspector.js.map +1 -0
- package/dist/internal.js +30 -31
- 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/radio-group.js +1 -1
- 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/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/assets/avatar-image.css +0 -1
- package/dist/avatar-image.js +0 -7
- package/dist/avatar-image.js.map +0 -1
- package/dist/chunks/avatar-image.DO4w_loj.js +0 -61
- package/dist/chunks/avatar-image.DO4w_loj.js.map +0 -1
- package/dist/chunks/code-snippet.e8bxDBCO.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.-Oy2eT40.js.map +0 -1
- package/dist/chunks/dropdown-tag.C-LxVWlt.js.map +0 -1
- package/dist/chunks/dropdown.CxBlK83Q.js.map +0 -1
- package/dist/chunks/filter-bar.DmPkRBf4.js.map +0 -1
- package/dist/chunks/index.Dytpif0G.js +0 -125
- package/dist/chunks/input-field.iH1ICJkQ.js.map +0 -1
- package/dist/chunks/listbox-option-tag.Bv4-hXnG.js +0 -94
- package/dist/chunks/listbox-option-tag.Bv4-hXnG.js.map +0 -1
- package/dist/chunks/loading-button.BI32pZiW.js +0 -117
- package/dist/chunks/loading-button.BI32pZiW.js.map +0 -1
- package/dist/chunks/popper-container.B76aE-3-.js.map +0 -1
- package/dist/chunks/radio-group.B9HCffiZ.js.map +0 -1
- package/dist/chunks/search-bar.DxskyM4e.js +0 -107
- package/dist/chunks/search-bar.DxskyM4e.js.map +0 -1
- package/dist/chunks/secondary-nav.D66nxbU-.js +0 -112
- package/dist/chunks/secondary-nav.D66nxbU-.js.map +0 -1
- package/dist/chunks/textarea.CJ8xiMjv.js +0 -288
- package/dist/chunks/textarea.CJ8xiMjv.js.map +0 -1
- package/dist/chunks/timeline-item.Cap9MXkH.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.BQBWFTvi.js.map +0 -1
- /package/dist/@types/packages/{vue2/src/components/button → core/src}/components/loading-button/loading-button.types.d.ts +0 -0
- /package/dist/@types/packages/{vue2 → core}/src/types/omit-strict.d.ts +0 -0
- /package/dist/@types/packages/vue2/src/components/{avatar-image → avatar/components/avatar-image}/avatar-image.types.d.ts +0 -0
- /package/dist/@types/packages/vue2/src/components/{avatar-image → avatar/components/avatar-image}/index.d.ts +0 -0
- /package/dist/@types/packages/vue2/src/components/{internal/avatar → avatar}/index.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as n, resolveComponent as r, resolveDirective as s, withDirectives as p, openBlock as c, createElementBlock as a, createVNode as l } from "vue";
|
|
2
|
-
import { d as t } from "./popper-container.
|
|
3
|
-
import { B as d } from "./tooltip.
|
|
2
|
+
import { d as t } from "./popper-container.50jF-_VU.js";
|
|
3
|
+
import { B as d } from "./tooltip.C0jTO2wt.js";
|
|
4
4
|
import { I as f } from "./info.CNegCnli.js";
|
|
5
5
|
import { _ as m } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
6
|
import "../assets/info-icon.css";
|
|
@@ -42,4 +42,4 @@ const D = /* @__PURE__ */ m(_, [["render", b], ["__scopeId", "data-v-ded345b1"]]
|
|
|
42
42
|
export {
|
|
43
43
|
D as B
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=info-icon.
|
|
45
|
+
//# sourceMappingURL=info-icon.B8AL324x.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-icon.
|
|
1
|
+
{"version":3,"file":"info-icon.B8AL324x.js","sources":["../../../vue2/src/components/info-icon/info-icon.vue"],"sourcesContent":["<template>\n <span\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n :aria-label=\"tooltipText\"\n class=\"b-info-icon\"\n tabindex=\"0\"\n >\n <info-icon :svg-title=\"tooltipText\" class=\"b-info-icon__svg\" />\n </span>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, PropType } from 'vue';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import InfoIcon from '@adyen/ui-assets-icons-16/vue/info';\n\n /**\n * @example\n * import { BentoInfoIcon } from '@adyen/adl-vue-components';\n *\n * export default {\n * components: { BentoInfoIcon },\n * template: `\n * <bento-info-icon tooltip-text=\"Text on hover\" />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-info-icon',\n components: { InfoIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Text showed in the info-icon tooltip on hover\n */\n tooltipText: { type: String, required: true },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'auto'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition | `${PopperContainerPosition}`>,\n default: PopperContainerPosition.AUTO,\n validator: (value: PopperContainerPosition) => Object.values(PopperContainerPosition).includes(value),\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./info-icon.scss\" />\n"],"names":["_sfc_main","defineComponent","InfoIcon","BentoTooltipDirective","PopperContainerPosition","value","_ctx"],"mappings":";;;;;;AA4BI,MAAAA,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,UAAAC,EAAA;AAAA,EACiB,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACa,OAAA;AAAA;AAAA;AAAA;AAAA,IAC7B,aAAA,EAAA,MAAA,QAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIyC,iBAAA;AAAA,MAK3B,MAAA;AAAA,MACP,SAAAC,EAAA;AAAA,MAC2B,WAAA,CAAAC,MAAA,OAAA,OAAAD,CAAA,EAAA,SAAAC,CAAA;AAAA,IACmE;AAAA,EACxG;AAER,CAAA;;;;IA3CuB,cAAAC,EAAA;AAAA,IACP,OAAA;AAAA,IAEZ,UAAA;AAAA,EAAA,GAAA;AAAA;MAA4D,aAAAA,EAAA;AAAA;;;;;;;"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { I as
|
|
3
|
-
import { p as
|
|
1
|
+
import { defineComponent as re, useAttrs as ne, useSlots as le, ref as V, provide as se, toRef as ue, computed as o, toRefs as pe, openBlock as n, createBlock as c, unref as t, normalizeClass as ce, withCtx as w, renderSlot as p, createCommentVNode as d, createElementVNode as F, createElementBlock as y, withModifiers as H, mergeProps as L, withKeys as fe, createVNode as be } from "vue";
|
|
2
|
+
import { I as ye, B as x } from "./dropdown.CoVT4i0B.js";
|
|
3
|
+
import { p as ve, d as W, B as T } from "./typography.D7onlQ9v.js";
|
|
4
4
|
import { g as D } from "./unique-id.XFfoKuc2.js";
|
|
5
|
-
import { g as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { F as
|
|
11
|
-
import { _ as
|
|
5
|
+
import { g as me } from "./get-slot-text.D5WBGjic.js";
|
|
6
|
+
import { u as we } from "./aria-label.CaUURpnB.js";
|
|
7
|
+
import { u as De } from "./i18n.DY5YXG5f.js";
|
|
8
|
+
import { u as he } from "./use-form-layout-loading.D3lALhtC.js";
|
|
9
|
+
import { u as ge } from "./use-has-slot.B7eQSabc.js";
|
|
10
|
+
import { F as Ee, E as Se } from "./error-message.oV0CXm1m.js";
|
|
11
|
+
import { _ as Ae } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
12
12
|
import "../assets/input-field.css";
|
|
13
|
-
var
|
|
14
|
-
const
|
|
13
|
+
var f = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.PAYMENT_METHOD = "payment-method", e.STATIC_VALUE = "static-value", e.DROPDOWN = "dropdown", e))(f || {}), s = /* @__PURE__ */ ((e) => (e.START = "start", e.END = "end", e))(s || {}), h = /* @__PURE__ */ ((e) => (e.CONDENSED = "condensed", e.DISABLED = "disabled", e.READONLY = "readonly", e.ERROR = "error", e))(h || {}), O = /* @__PURE__ */ ((e) => (e.SEARCH = "search", e.TEXT = "text", e.NUMBER = "number", e))(O || {}), ke = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.ESCAPE_PRESSED = "escape-pressed", e.UPDATE_DROPDOWN = "update:dropdown", e.DROPDOWN_INPUT = "dropdown-input", e.FOCUS = "focus", e.CHANGE = "change", e.BLUR = "blur", e.KEYDOWN = "keydown", e))(ke || {});
|
|
14
|
+
const Y = {
|
|
15
15
|
"en-US": {
|
|
16
|
-
ariaLabelFallback: "Input field"
|
|
16
|
+
ariaLabelFallback: "Input field",
|
|
17
|
+
ariaLabelDropdownFallback: "{inputLabel} Dropdown"
|
|
17
18
|
}
|
|
18
|
-
},
|
|
19
|
-
i18n: { messages:
|
|
20
|
-
},
|
|
21
|
-
...
|
|
19
|
+
}, Te = ["aria-disabled"], Ne = ["aria-hidden"], Le = ["aria-hidden"], Oe = ["id"], Re = ["id", "aria-label", "aria-describedby", "aria-owns", "aria-invalid", "placeholder", "type", "value", "disabled", "readonly"], _e = ["aria-hidden"], $e = ["id"], Be = ["id"], Pe = {
|
|
20
|
+
i18n: { messages: Y }
|
|
21
|
+
}, Ce = /* @__PURE__ */ re({
|
|
22
|
+
...Pe,
|
|
22
23
|
__name: "input-field",
|
|
23
24
|
props: {
|
|
24
25
|
/**
|
|
@@ -46,6 +47,7 @@ const x = {
|
|
|
46
47
|
*
|
|
47
48
|
* - `value`: Selected value of the dropdown
|
|
48
49
|
* - `items`: List of available items
|
|
50
|
+
* - `aria-label`: Text that labels the dropdown element
|
|
49
51
|
*
|
|
50
52
|
*/
|
|
51
53
|
dropdown: {
|
|
@@ -111,7 +113,7 @@ const x = {
|
|
|
111
113
|
*/
|
|
112
114
|
type: {
|
|
113
115
|
type: String,
|
|
114
|
-
default:
|
|
116
|
+
default: O.TEXT
|
|
115
117
|
},
|
|
116
118
|
/**
|
|
117
119
|
* Text displayed as the value of the input-field
|
|
@@ -122,54 +124,59 @@ const x = {
|
|
|
122
124
|
*/
|
|
123
125
|
variant: {
|
|
124
126
|
type: String,
|
|
125
|
-
default:
|
|
126
|
-
validator: (e) => Object.values(
|
|
127
|
+
default: f.DEFAULT,
|
|
128
|
+
validator: (e) => Object.values(f).includes(e)
|
|
127
129
|
}
|
|
128
130
|
},
|
|
129
131
|
emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "input"],
|
|
130
|
-
setup(e, { expose:
|
|
131
|
-
const a = e,
|
|
132
|
-
|
|
133
|
-
const { isReadOnly: b } =
|
|
134
|
-
() => a.variant ===
|
|
135
|
-
),
|
|
132
|
+
setup(e, { expose: j, emit: u }) {
|
|
133
|
+
const a = e, R = ne(), N = le(), { t: _ } = De({ messages: Y }), l = ge(N), $ = V(null), B = D("input"), v = D("input-dropdown"), g = D("input-static-value"), P = D("input-description"), C = D("input-error");
|
|
134
|
+
se(ye, !0);
|
|
135
|
+
const { isReadOnly: b } = he(ue(a, "readonly")), E = o(
|
|
136
|
+
() => a.variant === f.STATIC_VALUE && !!N.staticValue
|
|
137
|
+
), q = o(() => a.variant === f.DEFAULT), K = o(() => a.variant === f.PAYMENT_METHOD), X = o(
|
|
136
138
|
() => E.value && a.staticValuePosition === s.START
|
|
137
|
-
),
|
|
139
|
+
), z = o(
|
|
138
140
|
() => E.value && a.staticValuePosition === s.END
|
|
139
|
-
), S =
|
|
141
|
+
), S = o(() => a.variant === f.DROPDOWN && !!a.dropdown), G = o(
|
|
140
142
|
() => S.value && a.dropdownPosition === s.START
|
|
141
|
-
),
|
|
143
|
+
), J = o(
|
|
142
144
|
() => S.value && a.dropdownPosition === s.END
|
|
143
|
-
), A =
|
|
145
|
+
), A = o(
|
|
144
146
|
() => !a.disabled && !b.value && (!!a.errorMessage || a.error)
|
|
145
|
-
),
|
|
146
|
-
|
|
147
|
+
), Q = o(() => S.value === !0 && E.value === !0 ? `${g} ${v}` : S.value === !0 ? `${v}` : E.value === !0 ? `${g}` : null), Z = o(() => _("ariaLabelFallback")), ee = o(
|
|
148
|
+
() => _("ariaLabelDropdownFallback", { inputLabel: M.value })
|
|
149
|
+
), te = V(R["aria-label"]), { ariaLabel: ae } = pe(a), M = we({
|
|
150
|
+
ariaLabel: te.value,
|
|
147
151
|
// TODO: take this line away when the aria-label props is removed
|
|
148
|
-
label:
|
|
149
|
-
defaultFallback:
|
|
150
|
-
}),
|
|
151
|
-
() => `${
|
|
152
|
-
),
|
|
153
|
-
[`b-input-field--${
|
|
154
|
-
[`b-input-field--${
|
|
155
|
-
[`b-input-field--${
|
|
156
|
-
[`b-input-field--${
|
|
157
|
-
})),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
152
|
+
label: ae,
|
|
153
|
+
defaultFallback: l("default") ? me(N)("default") : Z
|
|
154
|
+
}), oe = o(
|
|
155
|
+
() => `${l("description") ? P : ""} ${A.value && a.errorMessage ? C : ""}`
|
|
156
|
+
), ie = o(() => ({
|
|
157
|
+
[`b-input-field--${h.CONDENSED}`]: a.condensed,
|
|
158
|
+
[`b-input-field--${h.DISABLED}`]: a.disabled,
|
|
159
|
+
[`b-input-field--${h.READONLY}`]: b.value,
|
|
160
|
+
[`b-input-field--${h.ERROR}`]: A.value
|
|
161
|
+
})), I = o(() => ({
|
|
162
|
+
"aria-label": ee.value,
|
|
163
|
+
...a.dropdown
|
|
164
|
+
})), de = (r) => {
|
|
165
|
+
!a.disabled && !b.value && u("input", r.target.value);
|
|
166
|
+
}, U = (r) => {
|
|
167
|
+
u("dropdown-input", r), u("update:dropdown", { ...a == null ? void 0 : a.dropdown, value: r });
|
|
168
|
+
}, k = () => {
|
|
169
|
+
$.value.focus();
|
|
163
170
|
};
|
|
164
|
-
return
|
|
165
|
-
focusInput:
|
|
166
|
-
}),
|
|
171
|
+
return j({
|
|
172
|
+
focusInput: k
|
|
173
|
+
}), Object.values(O).includes(a.type) || ve(`"bento-input-field" dropdown does not support the type ${a.type}`), a.error && W(
|
|
167
174
|
'BentoInputField "error" property',
|
|
168
175
|
`Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
|
|
169
176
|
Having the field as "undefined" will hide/remove the error.
|
|
170
177
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
171
178
|
"2.0.0"
|
|
172
|
-
),
|
|
179
|
+
), l("defaultIconBefore") && W(
|
|
173
180
|
'BentoInputField "defaultIconBefore" slot',
|
|
174
181
|
`Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
|
|
175
182
|
<bento-input-field>
|
|
@@ -178,167 +185,166 @@ const x = {
|
|
|
178
185
|
</template>
|
|
179
186
|
</bento-input-field>`,
|
|
180
187
|
"2.0.0"
|
|
181
|
-
), (
|
|
182
|
-
class:
|
|
188
|
+
), (r, i) => (n(), c(t(T), {
|
|
189
|
+
class: ce(["b-input-field", t(ie)]),
|
|
183
190
|
"data-testid": "input-text-container",
|
|
184
191
|
el: "div",
|
|
185
192
|
variant: "body"
|
|
186
193
|
}, {
|
|
187
194
|
default: w(() => [
|
|
188
|
-
t(
|
|
195
|
+
t(l)("default") ? (n(), c(t(Ee), {
|
|
189
196
|
key: 0,
|
|
190
197
|
for: t(B),
|
|
191
198
|
"data-testid": "input-field-label",
|
|
192
199
|
"tooltip-text": e.tooltipText,
|
|
193
200
|
optional: e.optional,
|
|
194
201
|
required: e.required,
|
|
195
|
-
onClick:
|
|
202
|
+
onClick: k
|
|
196
203
|
}, {
|
|
197
204
|
default: w(() => [
|
|
198
|
-
p(
|
|
205
|
+
p(r.$slots, "default", {}, void 0, !0)
|
|
199
206
|
]),
|
|
200
207
|
_: 3
|
|
201
208
|
}, 8, ["for", "tooltip-text", "optional", "required"])) : d("", !0),
|
|
202
|
-
|
|
209
|
+
F("div", {
|
|
203
210
|
class: "b-input-field__input-box",
|
|
204
211
|
"data-testid": "input-box",
|
|
205
212
|
"aria-disabled": e.disabled,
|
|
206
|
-
onClick:
|
|
213
|
+
onClick: k
|
|
207
214
|
}, [
|
|
208
|
-
t(
|
|
215
|
+
t(q) && (t(l)("defaultIconBefore") || t(l)("iconBefore")) ? (n(), y("span", {
|
|
209
216
|
key: 0,
|
|
210
217
|
"aria-hidden": e.ariaHidden ? "true" : void 0,
|
|
211
218
|
class: "b-input-field__icon-before"
|
|
212
219
|
}, [
|
|
213
|
-
t(
|
|
214
|
-
t(
|
|
215
|
-
], 8,
|
|
216
|
-
t(
|
|
220
|
+
t(l)("iconBefore") ? p(r.$slots, "iconBefore", { key: 0 }, void 0, !0) : d("", !0),
|
|
221
|
+
t(l)("defaultIconBefore") && !t(l)("iconBefore") ? p(r.$slots, "defaultIconBefore", { key: 1 }, void 0, !0) : d("", !0)
|
|
222
|
+
], 8, Ne)) : d("", !0),
|
|
223
|
+
t(K) && t(l)("paymentMethod") ? (n(), y("span", {
|
|
217
224
|
key: 1,
|
|
218
225
|
"aria-hidden": e.ariaHidden ? "true" : void 0,
|
|
219
226
|
class: "b-input-field__payment-method"
|
|
220
227
|
}, [
|
|
221
|
-
p(
|
|
222
|
-
], 8,
|
|
223
|
-
t(
|
|
228
|
+
p(r.$slots, "paymentMethod", {}, void 0, !0)
|
|
229
|
+
], 8, Le)) : d("", !0),
|
|
230
|
+
t(G) ? (n(), y("div", {
|
|
224
231
|
key: 2,
|
|
225
232
|
id: t(v),
|
|
226
233
|
class: "b-input-field__dropdown b-input-field__dropdown--start",
|
|
227
|
-
onClick:
|
|
234
|
+
onClick: i[0] || (i[0] = H(() => {
|
|
228
235
|
}, ["stop"]))
|
|
229
236
|
}, [
|
|
230
|
-
e.dropdown ? (
|
|
237
|
+
e.dropdown ? (n(), c(t(x), L({ key: 0 }, t(I), {
|
|
231
238
|
disabled: e.disabled,
|
|
232
239
|
readonly: t(b),
|
|
233
|
-
onInput:
|
|
240
|
+
onInput: U
|
|
234
241
|
}), null, 16, ["disabled", "readonly"])) : d("", !0)
|
|
235
|
-
], 8,
|
|
236
|
-
t(
|
|
242
|
+
], 8, Oe)) : d("", !0),
|
|
243
|
+
t(X) ? (n(), c(t(T), {
|
|
237
244
|
key: 3,
|
|
238
|
-
id: t(
|
|
245
|
+
id: t(g),
|
|
239
246
|
class: "b-input-field__static-value b-input-field__static-value--start",
|
|
240
247
|
el: "span",
|
|
241
248
|
variant: "body"
|
|
242
249
|
}, {
|
|
243
250
|
default: w(() => [
|
|
244
|
-
p(
|
|
251
|
+
p(r.$slots, "staticValue", {}, void 0, !0)
|
|
245
252
|
]),
|
|
246
253
|
_: 3
|
|
247
254
|
}, 8, ["id"])) : d("", !0),
|
|
248
|
-
|
|
255
|
+
F("input", L({ id: t(B) }, t(R), {
|
|
249
256
|
ref_key: "inputFieldElement",
|
|
250
|
-
ref:
|
|
257
|
+
ref: $,
|
|
251
258
|
class: "b-input-field__input",
|
|
252
|
-
"aria-label": t(
|
|
253
|
-
"aria-describedby": t(
|
|
254
|
-
"aria-owns": t(
|
|
259
|
+
"aria-label": t(M),
|
|
260
|
+
"aria-describedby": t(oe),
|
|
261
|
+
"aria-owns": t(Q),
|
|
255
262
|
"aria-invalid": t(A),
|
|
256
263
|
placeholder: e.placeholder,
|
|
257
264
|
type: e.type,
|
|
258
265
|
value: e.value,
|
|
259
266
|
disabled: e.disabled,
|
|
260
267
|
readonly: t(b),
|
|
261
|
-
onInput:
|
|
262
|
-
onChange:
|
|
263
|
-
onFocus:
|
|
264
|
-
onBlur:
|
|
268
|
+
onInput: de,
|
|
269
|
+
onChange: i[1] || (i[1] = (m) => u("change")),
|
|
270
|
+
onFocus: i[2] || (i[2] = (m) => u("focus")),
|
|
271
|
+
onBlur: i[3] || (i[3] = (m) => u("blur")),
|
|
265
272
|
onKeydown: [
|
|
266
|
-
|
|
267
|
-
|
|
273
|
+
i[4] || (i[4] = (m) => u("keydown", m)),
|
|
274
|
+
i[5] || (i[5] = fe((m) => u("escape-pressed"), ["esc"]))
|
|
268
275
|
]
|
|
269
|
-
}), null, 16,
|
|
270
|
-
t(
|
|
276
|
+
}), null, 16, Re),
|
|
277
|
+
t(l)("iconAfter") ? (n(), y("span", {
|
|
271
278
|
key: 4,
|
|
272
279
|
"aria-hidden": e.ariaHidden ? "true" : void 0,
|
|
273
280
|
class: "b-input-field__icon-after",
|
|
274
281
|
"data-testid": "input-text__icon-after"
|
|
275
282
|
}, [
|
|
276
|
-
p(
|
|
277
|
-
], 8,
|
|
278
|
-
t(
|
|
283
|
+
p(r.$slots, "iconAfter", {}, void 0, !0)
|
|
284
|
+
], 8, _e)) : d("", !0),
|
|
285
|
+
t(z) ? (n(), c(t(T), {
|
|
279
286
|
key: 5,
|
|
280
|
-
id: t(
|
|
287
|
+
id: t(g),
|
|
281
288
|
class: "b-input-field__static-value b-input-field__static-value--end",
|
|
282
289
|
el: "span",
|
|
283
290
|
variant: "body"
|
|
284
291
|
}, {
|
|
285
292
|
default: w(() => [
|
|
286
|
-
p(
|
|
293
|
+
p(r.$slots, "staticValue", {}, void 0, !0)
|
|
287
294
|
]),
|
|
288
295
|
_: 3
|
|
289
296
|
}, 8, ["id"])) : d("", !0),
|
|
290
|
-
t(
|
|
297
|
+
t(J) ? (n(), y("div", {
|
|
291
298
|
key: 6,
|
|
292
299
|
id: t(v),
|
|
293
300
|
"data-testid": "input-field-dropdown-container-end",
|
|
294
301
|
class: "b-input-field__dropdown b-input-field__dropdown--end",
|
|
295
|
-
onClick:
|
|
302
|
+
onClick: i[6] || (i[6] = H(() => {
|
|
296
303
|
}, ["stop"]))
|
|
297
304
|
}, [
|
|
298
|
-
e.dropdown ? (
|
|
305
|
+
e.dropdown ? (n(), c(t(x), L({
|
|
299
306
|
key: 0,
|
|
300
307
|
id: t(v)
|
|
301
|
-
},
|
|
302
|
-
"dynamic-filtering": !1,
|
|
308
|
+
}, t(I), {
|
|
303
309
|
disabled: e.disabled,
|
|
304
310
|
readonly: t(b),
|
|
305
|
-
onInput:
|
|
311
|
+
onInput: U
|
|
306
312
|
}), null, 16, ["id", "disabled", "readonly"])) : d("", !0)
|
|
307
|
-
], 8,
|
|
308
|
-
], 8,
|
|
309
|
-
t(A) && e.errorMessage ? (
|
|
313
|
+
], 8, $e)) : d("", !0)
|
|
314
|
+
], 8, Te),
|
|
315
|
+
t(A) && e.errorMessage ? (n(), c(t(Se), {
|
|
310
316
|
key: 1,
|
|
311
|
-
id: t(
|
|
317
|
+
id: t(C),
|
|
312
318
|
"error-message": e.errorMessage,
|
|
313
319
|
class: "b-input-field__error-message"
|
|
314
320
|
}, null, 8, ["id", "error-message"])) : d("", !0),
|
|
315
|
-
t(
|
|
321
|
+
t(l)("description") ? (n(), y("span", {
|
|
316
322
|
key: 2,
|
|
317
323
|
id: t(P),
|
|
318
324
|
class: "b-input-field__description",
|
|
319
|
-
onClick:
|
|
325
|
+
onClick: k
|
|
320
326
|
}, [
|
|
321
|
-
|
|
327
|
+
be(t(T), {
|
|
322
328
|
el: "span",
|
|
323
329
|
variant: "body"
|
|
324
330
|
}, {
|
|
325
331
|
default: w(() => [
|
|
326
|
-
p(
|
|
332
|
+
p(r.$slots, "description", { id: "description" }, void 0, !0)
|
|
327
333
|
]),
|
|
328
334
|
_: 3
|
|
329
335
|
})
|
|
330
|
-
], 8,
|
|
336
|
+
], 8, Be)) : d("", !0)
|
|
331
337
|
]),
|
|
332
338
|
_: 3
|
|
333
339
|
}, 8, ["class"]));
|
|
334
340
|
}
|
|
335
|
-
}),
|
|
341
|
+
}), Ke = /* @__PURE__ */ Ae(Ce, [["__scopeId", "data-v-e521f00f"]]);
|
|
336
342
|
export {
|
|
337
|
-
|
|
338
|
-
|
|
343
|
+
Ke as B,
|
|
344
|
+
f as a,
|
|
339
345
|
s as b,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
346
|
+
h as c,
|
|
347
|
+
O as d,
|
|
348
|
+
ke as e
|
|
343
349
|
};
|
|
344
|
-
//# sourceMappingURL=input-field.
|
|
350
|
+
//# sourceMappingURL=input-field.CKh69yj2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-field.CKh69yj2.js","sources":["../../../vue2/src/components/input-field/input-field.types.ts","../../../vue2/src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\nimport type { HTMLAttributes } from 'vue/types/jsx';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n items: DropdownProps['items'];\n value: DropdownProps['value'];\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n 'aria-label'?: HTMLAttributes['aria-label'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @keydown=\"emit('keydown', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span v-if=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoListboxSelectedValue } from '@/types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden: { type: Boolean, default: true },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Reduces height of the input\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `value`: Selected value of the dropdown\n * - `items`: List of available items\n * - `aria-label`: Text that labels the dropdown element\n *\n */\n dropdown: {\n type: Object as PropType<BentoInputDropdownProps>,\n default: undefined,\n },\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue: { type: String, default: '' },\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type']>,\n default: BentoInputFieldType.TEXT,\n },\n\n /**\n * Text displayed as the value of the input-field\n */\n value: { type: [String, Number] as PropType<BentoInputFieldValue>, default: undefined },\n\n /**\n * Describes the different variants for the input element\n */\n variant: {\n type: String as PropType<BentoInputFieldVariant | `${BentoInputFieldVariant}`>,\n default: BentoInputFieldVariant.DEFAULT,\n validator: (value: BentoInputFieldVariant) => Object.values(BentoInputFieldVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the Input Field's internal dropdown changes it's value. Contains every dropdown prop passed with the updated selected value as 'value'\n */\n (e: 'update:dropdown', updatedDropdownProps: BentoInputDropdownProps): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: 'change'): void;\n\n /**\n * Emitted when the Input Field's internal dropdown changes it's value\n */\n (e: 'dropdown-input', selectedValue: BentoListboxSelectedValue): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emitted when a key is pressed\n */\n (e: 'keydown', event: KeyboardEvent): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: 'input', inputValue: string): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\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')\n ? (getSlotText(slots)('default') as string)\n : computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n if (!props.disabled && !isReadOnly.value) {\n emit('input', (event.target as HTMLInputElement).value);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n });\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType)) {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type ${props.type}`);\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","isReadOnly","useFormLayoutFieldLoading","toRef","props","shouldShowStaticValue","computed","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","emit","onDropdownInput","selectedValue","focusInput","expose","printDevelopmentWarning","deprecate"],"mappings":"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"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { defineComponent as C, ref as k, computed as E, openBlock as r, createElementBlock as u, normalizeClass as h, unref as e, createElementVNode as s, renderSlot as f, createVNode as t, Transition as I, withCtx as a, createTextVNode as T, toDisplayString as $, createBlock as v, createCommentVNode as b } from "vue";
|
|
2
|
+
import { B as z } from "./typography.D7onlQ9v.js";
|
|
3
|
+
import { B as g } from "./button.DoqHEvPh.js";
|
|
4
|
+
import { B as L } from "./focus-trap.CwkbHfT8.js";
|
|
5
|
+
import { B as N } from "./loading-indicator.BFMEf39U.js";
|
|
6
|
+
import { E as O } from "./expand.D1DTqaBO.js";
|
|
7
|
+
import { C as S } from "./cross.BlL0FyHo.js";
|
|
8
|
+
import { g as V } from "./unique-id.XFfoKuc2.js";
|
|
9
|
+
import { u as w } from "./i18n.DY5YXG5f.js";
|
|
10
|
+
import { _ as F } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
11
|
+
import "../assets/inspector.css";
|
|
12
|
+
const B = {
|
|
13
|
+
"en-US": {
|
|
14
|
+
close: "Close",
|
|
15
|
+
expand: "Expand"
|
|
16
|
+
}
|
|
17
|
+
}, U = { class: "b-inspector__page-wrapper" }, A = { class: "b-inspector__page" }, D = ["aria-labelledby"], j = { class: "b-inspector__header" }, q = { class: "b-inspector__icons" }, G = { class: "b-inspector__content" }, H = { i18n: { messages: B } }, J = /* @__PURE__ */ C({
|
|
18
|
+
...H,
|
|
19
|
+
__name: "inspector",
|
|
20
|
+
props: {
|
|
21
|
+
expandable: { type: Boolean, default: !1 },
|
|
22
|
+
isOpen: { type: Boolean, default: !1 },
|
|
23
|
+
loading: { type: Boolean, default: !1 },
|
|
24
|
+
size: { default: "small" },
|
|
25
|
+
title: null
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:is-open", "expand"],
|
|
28
|
+
setup(o, { emit: l }) {
|
|
29
|
+
const c = o, { t: d } = w({ messages: B }), p = V("inspectorTitle"), m = k(null), y = E(() => ({
|
|
30
|
+
[`b-inspector--${c.size}`]: !0
|
|
31
|
+
})), _ = () => {
|
|
32
|
+
var n;
|
|
33
|
+
c.isOpen ? m.value = document.activeElement : (n = m.value) == null || n.focus();
|
|
34
|
+
};
|
|
35
|
+
return (n, i) => (r(), u("div", {
|
|
36
|
+
class: h(["b-inspector", e(y)])
|
|
37
|
+
}, [
|
|
38
|
+
s("div", U, [
|
|
39
|
+
s("div", A, [
|
|
40
|
+
f(n.$slots, "page", {}, void 0, !0)
|
|
41
|
+
])
|
|
42
|
+
]),
|
|
43
|
+
t(I, {
|
|
44
|
+
name: "b-inspector__animation",
|
|
45
|
+
mode: "out-in",
|
|
46
|
+
onBeforeEnter: _,
|
|
47
|
+
onAfterLeave: _
|
|
48
|
+
}, {
|
|
49
|
+
default: a(() => [
|
|
50
|
+
o.isOpen ? (r(), u("aside", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "b-inspector__container-wrapper",
|
|
53
|
+
"aria-labelledby": e(p)
|
|
54
|
+
}, [
|
|
55
|
+
t(e(L), { class: "b-inspector__container" }, {
|
|
56
|
+
default: a(() => [
|
|
57
|
+
s("div", j, [
|
|
58
|
+
t(e(z), {
|
|
59
|
+
id: e(p),
|
|
60
|
+
el: "h2",
|
|
61
|
+
variant: "title",
|
|
62
|
+
class: "b-inspector__title"
|
|
63
|
+
}, {
|
|
64
|
+
default: a(() => [
|
|
65
|
+
T($(o.title), 1)
|
|
66
|
+
]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["id"]),
|
|
69
|
+
s("div", q, [
|
|
70
|
+
o.expandable ? (r(), v(e(g), {
|
|
71
|
+
key: 0,
|
|
72
|
+
variant: "tertiary",
|
|
73
|
+
onClick: i[0] || (i[0] = (x) => l("expand"))
|
|
74
|
+
}, {
|
|
75
|
+
iconLeft: a(() => [
|
|
76
|
+
t(e(O), {
|
|
77
|
+
"svg-title": e(d)("expand")
|
|
78
|
+
}, null, 8, ["svg-title"])
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})) : b("", !0),
|
|
82
|
+
t(e(g), {
|
|
83
|
+
variant: "tertiary",
|
|
84
|
+
onClick: i[1] || (i[1] = (x) => l("update:is-open", !1))
|
|
85
|
+
}, {
|
|
86
|
+
iconLeft: a(() => [
|
|
87
|
+
t(e(S), {
|
|
88
|
+
"svg-title": e(d)("close")
|
|
89
|
+
}, null, 8, ["svg-title"])
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
})
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
s("div", G, [
|
|
96
|
+
o.loading ? (r(), v(e(N), {
|
|
97
|
+
key: 0,
|
|
98
|
+
large: "",
|
|
99
|
+
class: "b-inspector__loading-indicator"
|
|
100
|
+
})) : f(n.$slots, "content", { key: 1 }, void 0, !0)
|
|
101
|
+
])
|
|
102
|
+
]),
|
|
103
|
+
_: 3
|
|
104
|
+
})
|
|
105
|
+
], 8, D)) : b("", !0)
|
|
106
|
+
]),
|
|
107
|
+
_: 3
|
|
108
|
+
})
|
|
109
|
+
], 2));
|
|
110
|
+
}
|
|
111
|
+
}), te = /* @__PURE__ */ F(J, [["__scopeId", "data-v-d920598e"]]), oe = ["small", "large"];
|
|
112
|
+
export {
|
|
113
|
+
oe as B,
|
|
114
|
+
te as i
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=inspector.types.88WOdYA6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector.types.88WOdYA6.js","sources":["../../../vue2/src/components/inspector/inspector.vue","../../../vue2/src/components/inspector/inspector.types.ts"],"sourcesContent":["<template>\n <div class=\"b-inspector\" :class=\"conditionalClass\">\n <div class=\"b-inspector__page-wrapper\">\n <div class=\"b-inspector__page\">\n <slot name=\"page\" />\n </div>\n </div>\n <Transition name=\"b-inspector__animation\" mode=\"out-in\" @before-enter=\"setFocus\" @after-leave=\"setFocus\">\n <aside v-if=\"isOpen\" class=\"b-inspector__container-wrapper\" :aria-labelledby=\"titleId\">\n <bento-focus-trap class=\"b-inspector__container\">\n <div class=\"b-inspector__header\">\n <bento-typography :id=\"titleId\" el=\"h2\" variant=\"title\" class=\"b-inspector__title\">\n {{ title }}\n </bento-typography>\n <div class=\"b-inspector__icons\">\n <bento-button v-if=\"expandable\" variant=\"tertiary\" @click=\"emit('expand')\">\n <template #iconLeft><expand-icon :svg-title=\"t('expand')\"></expand-icon></template>\n </bento-button>\n <bento-button variant=\"tertiary\" @click=\"emit('update:is-open', false)\">\n <template #iconLeft><cross-icon :svg-title=\"t('close')\"></cross-icon></template>\n </bento-button>\n </div>\n </div>\n <div class=\"b-inspector__content\">\n <bento-loading-indicator v-if=\"loading\" large class=\"b-inspector__loading-indicator\" />\n <slot v-else name=\"content\" />\n </div>\n </bento-focus-trap>\n </aside>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import ExpandIcon from '@adyen/ui-assets-icons-16/vue/expand';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoInspectorSize } from './inspector.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = withDefaults(\n defineProps<{\n /**\n * Shows the Expand icon in the inspector\n */\n expandable?: boolean;\n /**\n * Opens and closes the inspector\n */\n isOpen?: boolean;\n\n /**\n * Shows loading indicator for the content\n */\n loading?: boolean;\n\n /**\n * Determines the size of the inspector\n */\n size?: BentoInspectorSize;\n\n /**\n * The title of the component\n */\n title: string;\n }>(),\n {\n expandable: false,\n isOpen: false,\n loading: false,\n size: 'small',\n }\n );\n\n const emit = defineEmits<{\n /**\n * Emits update to keep isOpen prop in sync\n */\n (e: 'update:is-open', value: boolean): void;\n /**\n * Emits event when user click expand button\n */\n (e: 'expand'): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const titleId = generateUid('inspectorTitle');\n const lastFocusedElement = ref<HTMLElement>(null);\n\n const conditionalClass = computed(() => ({\n [`b-inspector--${props.size}`]: true,\n }));\n\n const setFocus = () => {\n if (props.isOpen) {\n lastFocusedElement.value = document.activeElement as HTMLElement;\n } else {\n // This doesn't work with data grid cell actions, as the button gets destroyed once is not being hovered.\n // To be reviewed after LevelAccess revision\n lastFocusedElement.value?.focus();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Inspector allows users to access additional information or details of an object/item. The inspector opens adjacent to the main content, pushing it aside to maintain visibility and accessibility to both the main content and inspector.\n *\n * @example\n * import { BentoInspector } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoInspector },\n * template: `\n * <bento-inspector\n * title=\"Inspector\"\n * size=\"large\"\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * >\n * <template #page>Content of the page</template>\n * <template #content>Content of the inspector</template>\n * </bento-inspector>\n * `\n * }\n */\n export default { i18n: { messages } };\n</script>\n\n<style lang=\"scss\" scoped src=\"./inspector.scss\" />\n","export const BentoInspectorSizeOptions = ['small', 'large'] as const;\n\nexport type BentoInspectorSize = (typeof BentoInspectorSizeOptions)[number];\n"],"names":["__default__","messages","t","useI18n","titleId","generateUid","lastFocusedElement","ref","conditionalClass","computed","props","setFocus","_a","BentoInspectorSizeOptions"],"mappings":";;;;;;;;;;;;;;;;8NAsIIA,IAAA,EAAA,MAAA,EAAA,UAAAC,EAAA,EAAA;;;;;;;;;;;;iBAzCA,EAAA,GAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAF,EAAA,CAAA,GACAG,IAAAC,EAAA,gBAAA,GACAC,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAAyC,CAAA,gBAAAC,EAAA,IAAA,EAAA,GAAA;AAAA,IACL,EAAA,GAGpCC,IAAA,MAAA;;AACI,MAAAD,EAAA,SACIJ,EAAA,QAAA,SAAA,iBAIAM,IAAAN,EAAA,UAAA,QAAAM,EAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEC5GKC,KAAA,CAAA,SAAA,OAAA;"}
|