@adyen/bento-vue3 1.55.1 → 1.56.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 +844 -289
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/dashed-underline.css +1 -1
- package/dist/assets/data-grid-template.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tabs.css +1 -1
- package/dist/assets/teleport.css +1 -1
- package/dist/assets/timeline-item.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/chunks/{accordion-item.DLyCF015.js → accordion-item.CihL7JaZ.js} +2 -2
- package/dist/chunks/{accordion-item.DLyCF015.js.map → accordion-item.CihL7JaZ.js.map} +1 -1
- package/dist/chunks/{action-bar.CDOaDenE.js → action-bar.CD5FQjE9.js} +6 -6
- package/dist/chunks/{action-bar.CDOaDenE.js.map → action-bar.CD5FQjE9.js.map} +1 -1
- package/dist/chunks/{alert.4SefwHLO.js → alert.CFb4Sejw.js} +3 -3
- package/dist/chunks/{alert.4SefwHLO.js.map → alert.CFb4Sejw.js.map} +1 -1
- package/dist/chunks/{base-modal.DZy1WuJs.js → base-modal.qhldLovE.js} +5 -5
- package/dist/chunks/{base-modal.DZy1WuJs.js.map → base-modal.qhldLovE.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DQRTu42W.js → button-actions-with-menu.CxB1fVvx.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.DQRTu42W.js.map → button-actions-with-menu.CxB1fVvx.js.map} +1 -1
- package/dist/chunks/{button-actions.N99QthUv.js → button-actions.ODJKaCW7.js} +3 -3
- package/dist/chunks/{button-actions.N99QthUv.js.map → button-actions.ODJKaCW7.js.map} +1 -1
- package/dist/chunks/{button.DEVuqLVT.js → button.BHZgsGkp.js} +43 -41
- package/dist/chunks/button.BHZgsGkp.js.map +1 -0
- package/dist/chunks/{calendar.CNt90BvO.js → calendar.Dymq4e0Y.js} +4 -4
- package/dist/chunks/{calendar.CNt90BvO.js.map → calendar.Dymq4e0Y.js.map} +1 -1
- package/dist/chunks/{card.E2xhS_6Z.js → card.DQ6g6hqK.js} +3 -3
- package/dist/chunks/{card.E2xhS_6Z.js.map → card.DQ6g6hqK.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BMzsgOeI.js → checkbox-group.DFmUrvgx.js} +4 -4
- package/dist/chunks/{checkbox-group.BMzsgOeI.js.map → checkbox-group.DFmUrvgx.js.map} +1 -1
- package/dist/chunks/{checkbox.BIaD03Bg.js → checkbox.Bti_jnp2.js} +17 -17
- package/dist/chunks/{checkbox.BIaD03Bg.js.map → checkbox.Bti_jnp2.js.map} +1 -1
- package/dist/chunks/{chip.3T0x6FuI.js → chip.DbhxDQiT.js} +2 -2
- package/dist/chunks/{chip.3T0x6FuI.js.map → chip.DbhxDQiT.js.map} +1 -1
- package/dist/chunks/code-snippet.Df5XwyWD.js +334 -0
- package/dist/chunks/code-snippet.Df5XwyWD.js.map +1 -0
- package/dist/chunks/{controls-group.DJqvAWte.js → controls-group.DgrzEh4C.js} +2 -2
- package/dist/chunks/{controls-group.DJqvAWte.js.map → controls-group.DgrzEh4C.js.map} +1 -1
- package/dist/chunks/{copy.MId-I684.js → copy.CfFh4b_c.js} +3 -3
- package/dist/chunks/{copy.MId-I684.js.map → copy.CfFh4b_c.js.map} +1 -1
- package/dist/chunks/{country.D0WFfaql.js → country.BhAcCmRx.js} +2 -2
- package/dist/chunks/{country.D0WFfaql.js.map → country.BhAcCmRx.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CrbSjoA8.js → dashboard-section.tza4iYcv.js} +3 -3
- package/dist/chunks/{dashboard-section.CrbSjoA8.js.map → dashboard-section.tza4iYcv.js.map} +1 -1
- package/dist/chunks/dashed-underline.B2cIJkg_.js +98 -0
- package/dist/chunks/dashed-underline.B2cIJkg_.js.map +1 -0
- package/dist/chunks/data-grid-template.PGPytWvk.js +111 -0
- package/dist/chunks/data-grid-template.PGPytWvk.js.map +1 -0
- package/dist/chunks/{data-grid.CsyayKK3.js → data-grid.DsZQ-F9m.js} +1328 -1299
- package/dist/chunks/data-grid.DsZQ-F9m.js.map +1 -0
- package/dist/chunks/{date-picker.CjwoOQ3B.js → date-picker.8jgg3MJm.js} +7 -7
- package/dist/chunks/{date-picker.CjwoOQ3B.js.map → date-picker.8jgg3MJm.js.map} +1 -1
- package/dist/chunks/{date-range-picker.DGY91Rwc.js → date-range-picker.uGwtO7SA.js} +10 -10
- package/dist/chunks/{date-range-picker.DGY91Rwc.js.map → date-range-picker.uGwtO7SA.js.map} +1 -1
- package/dist/chunks/{date.DoJuTLhO.js → date.CKXySBQv.js} +2 -2
- package/dist/chunks/{date.DoJuTLhO.js.map → date.CKXySBQv.js.map} +1 -1
- package/dist/chunks/{dialog-page.BRlAYf5w.js → dialog-page.MLFdqTcL.js} +3 -3
- package/dist/chunks/{dialog-page.BRlAYf5w.js.map → dialog-page.MLFdqTcL.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.CTyt2klK.js → dropdown-default-textbox.BNhy-QDH.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.CTyt2klK.js.map → dropdown-default-textbox.BNhy-QDH.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.CJtSH5cZ.js → dropdown-tag.DEAOevYN.js} +3 -3
- package/dist/chunks/{dropdown-tag.CJtSH5cZ.js.map → dropdown-tag.DEAOevYN.js.map} +1 -1
- package/dist/chunks/{dropdown.CQvyjn6d.js → dropdown.CVa4_qCe.js} +6 -6
- package/dist/chunks/{dropdown.CQvyjn6d.js.map → dropdown.CVa4_qCe.js.map} +1 -1
- package/dist/chunks/{empty-state.m0U14LVw.js → empty-state.DiXLZmQJ.js} +2 -2
- package/dist/chunks/{empty-state.m0U14LVw.js.map → empty-state.DiXLZmQJ.js.map} +1 -1
- package/dist/chunks/{error-message.CMgsMDny.js → error-message.CPw3y44N.js} +2 -2
- package/dist/chunks/{error-message.CMgsMDny.js.map → error-message.CPw3y44N.js.map} +1 -1
- package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
- package/dist/chunks/{file-uploader.D3KUe-MO.js → file-uploader.Dv4sh1IO.js} +477 -452
- package/dist/chunks/file-uploader.Dv4sh1IO.js.map +1 -0
- package/dist/chunks/filter-bar.DfIcZ5dX.js +2886 -0
- package/dist/chunks/filter-bar.DfIcZ5dX.js.map +1 -0
- package/dist/chunks/{fixed-scroller.BNP4SR5J.js → fixed-scroller.DsTyshyt.js} +3 -3
- package/dist/chunks/{fixed-scroller.BNP4SR5J.js.map → fixed-scroller.DsTyshyt.js.map} +1 -1
- package/dist/chunks/{footer-actions.DmGDpPBW.js → footer-actions.C00o4tuW.js} +3 -3
- package/dist/chunks/{footer-actions.DmGDpPBW.js.map → footer-actions.C00o4tuW.js.map} +1 -1
- package/dist/chunks/{form-layout-title.P5ajTo4C.js → form-layout-title.dcT8eXwc.js} +2 -2
- package/dist/chunks/{form-layout-title.P5ajTo4C.js.map → form-layout-title.dcT8eXwc.js.map} +1 -1
- package/dist/chunks/{header-with-views.BJIQZVAq.js → header-with-views.DEn9HFkT.js} +14 -14
- package/dist/chunks/{header-with-views.BJIQZVAq.js.map → header-with-views.DEn9HFkT.js.map} +1 -1
- package/dist/chunks/{header.vHSsdURt.js → header.hDkWwQuQ.js} +5 -5
- package/dist/chunks/{header.vHSsdURt.js.map → header.hDkWwQuQ.js.map} +1 -1
- package/dist/chunks/{i18n.D9azDLPe.js → i18n.B6g5VX0q.js} +1050 -1020
- package/dist/chunks/i18n.B6g5VX0q.js.map +1 -0
- package/dist/chunks/{info-icon-with-popover.CXaaxjeT.js → info-icon-with-popover.COJrCw_o.js} +3 -3
- package/dist/chunks/{info-icon-with-popover.CXaaxjeT.js.map → info-icon-with-popover.COJrCw_o.js.map} +1 -1
- package/dist/chunks/{input-field-password.CWr26esx.js → input-field-password._CliYJ7N.js} +86 -81
- package/dist/chunks/{input-field-password.CWr26esx.js.map → input-field-password._CliYJ7N.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.zf8WxBCn.js → input-field-phone-number.WPcQbE3z.js} +4 -4
- package/dist/chunks/{input-field-phone-number.zf8WxBCn.js.map → input-field-phone-number.WPcQbE3z.js.map} +1 -1
- package/dist/chunks/{input-field.CR262X1w.js → input-field.Cr1r2STY.js} +4 -4
- package/dist/chunks/{input-field.CR262X1w.js.map → input-field.Cr1r2STY.js.map} +1 -1
- package/dist/chunks/{inspector.types.YK45k4D_.js → inspector.types.D5QBC3-G.js} +3 -3
- package/dist/chunks/{inspector.types.YK45k4D_.js.map → inspector.types.D5QBC3-G.js.map} +1 -1
- package/dist/chunks/{menu.CVMSGvtb.js → menu.B0q9q97N.js} +17 -16
- package/dist/chunks/{menu.CVMSGvtb.js.map → menu.B0q9q97N.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Cqlf6PWo.js → modal-fullscreen.BgqNc9jE.js} +5 -5
- package/dist/chunks/{modal-fullscreen.Cqlf6PWo.js.map → modal-fullscreen.BgqNc9jE.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js → modal.vue_vue_type_script_setup_true_lang.Dr847POU.js} +6 -6
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.dXxru4S9.js.map → modal.vue_vue_type_script_setup_true_lang.Dr847POU.js.map} +1 -1
- package/dist/chunks/{pagination.C65tc-nX.js → pagination.Bi5BwIWq.js} +4 -4
- package/dist/chunks/{pagination.C65tc-nX.js.map → pagination.Bi5BwIWq.js.map} +1 -1
- package/dist/chunks/{popover.DjbACET6.js → popover.R5OM_tFu.js} +3 -3
- package/dist/chunks/{popover.DjbACET6.js.map → popover.R5OM_tFu.js.map} +1 -1
- package/dist/chunks/{promo-banner.ZCfJQh-S.js → promo-banner.DFt2dVxk.js} +3 -3
- package/dist/chunks/{promo-banner.ZCfJQh-S.js.map → promo-banner.DFt2dVxk.js.map} +1 -1
- package/dist/chunks/{radio-group.Tgf3BF5X.js → radio-group.muZVaVEm.js} +3 -3
- package/dist/chunks/{radio-group.Tgf3BF5X.js.map → radio-group.muZVaVEm.js.map} +1 -1
- package/dist/chunks/{search-bar.CTn5DIQZ.js → search-bar.DlVK3bBQ.js} +4 -4
- package/dist/chunks/{search-bar.CTn5DIQZ.js.map → search-bar.DlVK3bBQ.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CnE-aV2P.js → secondary-nav.CIEVFTYS.js} +3 -3
- package/dist/chunks/{secondary-nav.CnE-aV2P.js.map → secondary-nav.CIEVFTYS.js.map} +1 -1
- package/dist/chunks/{selection-card-group.C2OFZgKd.js → selection-card-group.BgANSy3b.js} +11 -11
- package/dist/chunks/{selection-card-group.C2OFZgKd.js.map → selection-card-group.BgANSy3b.js.map} +1 -1
- package/dist/chunks/{sidepanel.Drn-lKR3.js → sidepanel.BjR0Ab22.js} +5 -5
- package/dist/chunks/{sidepanel.Drn-lKR3.js.map → sidepanel.BjR0Ab22.js.map} +1 -1
- package/dist/chunks/{step.BGFaHGFO.js → step.7l-t-eN9.js} +2 -2
- package/dist/chunks/{step.BGFaHGFO.js.map → step.7l-t-eN9.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CWiwoP5F.js → structured-list-item.BMsATRrU.js} +4 -4
- package/dist/chunks/{structured-list-item.CWiwoP5F.js.map → structured-list-item.BMsATRrU.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DOYW579A.js → summary-grid.types.lGX16F4w.js} +126 -114
- package/dist/chunks/summary-grid.types.lGX16F4w.js.map +1 -0
- package/dist/chunks/{tabs.DZk78MLK.js → tabs.BVuOvNxx.js} +17 -17
- package/dist/chunks/{tabs.DZk78MLK.js.map → tabs.BVuOvNxx.js.map} +1 -1
- package/dist/chunks/{teleport.zSiKZmRE.js → teleport.CfGWjxe2.js} +17 -26
- package/dist/chunks/teleport.CfGWjxe2.js.map +1 -0
- package/dist/chunks/{textarea.CR7su54i.js → textarea.CAc_VYFm.js} +4 -4
- package/dist/chunks/{textarea.CR7su54i.js.map → textarea.CAc_VYFm.js.map} +1 -1
- package/dist/chunks/timeline-item.BQ4qiBii.js +567 -0
- package/dist/chunks/timeline-item.BQ4qiBii.js.map +1 -0
- package/dist/chunks/{toast.DxVfamh-.js → toast.BOpWHAfu.js} +3 -3
- package/dist/chunks/{toast.DxVfamh-.js.map → toast.BOpWHAfu.js.map} +1 -1
- package/dist/chunks/{toggle-button.D-9TFTy8.js → toggle-button.E0VQtyEX.js} +2 -2
- package/dist/chunks/{toggle-button.D-9TFTy8.js.map → toggle-button.E0VQtyEX.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js → tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js} +5 -5
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.ENhKvQLv.js.map → tutorial.vue_vue_type_script_setup_true_lang.CTx9Z9xB.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.CQKeFUJd.js → use-cached-selected-values.DHUa2Emx.js} +6 -6
- package/dist/chunks/{use-cached-selected-values.CQKeFUJd.js.map → use-cached-selected-values.DHUa2Emx.js.map} +1 -1
- package/dist/chunks/use-click-outside.BnhTgpSt.js +14 -0
- package/dist/chunks/use-click-outside.BnhTgpSt.js.map +1 -0
- package/dist/chunks/{use-country-items.BMhCqIWd.js → use-country-items.4kZgVg_l.js} +2 -2
- package/dist/chunks/{use-country-items.BMhCqIWd.js.map → use-country-items.4kZgVg_l.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +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/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +55 -55
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +11 -11
- 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/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +13 -2
- package/dist/styles/bento-light.css +13 -2
- package/dist/styles/bento.css +13 -2
- package/dist/styles/legacy.css +14 -4
- package/dist/styles/styleguide.css +13 -2
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.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 +1 -1
- package/package.json +5 -5
- package/dist/chunks/button.DEVuqLVT.js.map +0 -1
- package/dist/chunks/code-snippet.DJgiqDzZ.js +0 -422
- package/dist/chunks/code-snippet.DJgiqDzZ.js.map +0 -1
- package/dist/chunks/dashed-underline.DWhGZIhS.js +0 -80
- package/dist/chunks/dashed-underline.DWhGZIhS.js.map +0 -1
- package/dist/chunks/data-grid-template.LlK-7o84.js +0 -93
- package/dist/chunks/data-grid-template.LlK-7o84.js.map +0 -1
- package/dist/chunks/data-grid.CsyayKK3.js.map +0 -1
- package/dist/chunks/file-uploader.D3KUe-MO.js.map +0 -1
- package/dist/chunks/filter-bar.cRJmUX-v.js +0 -2771
- package/dist/chunks/filter-bar.cRJmUX-v.js.map +0 -1
- package/dist/chunks/i18n.D9azDLPe.js.map +0 -1
- package/dist/chunks/summary-grid.types.DOYW579A.js.map +0 -1
- package/dist/chunks/teleport.zSiKZmRE.js.map +0 -1
- package/dist/chunks/timeline-item.BhQp0ICP.js +0 -560
- package/dist/chunks/timeline-item.BhQp0ICP.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"summary-grid.types.DOYW579A.js","sources":["../../../vue2/src/components/summary-grid/summary-grid.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue","../../../vue2/src/components/summary-grid/components/summary-grid-item-custom/summary-grid-item-custom.vue","../../../vue2/src/components/summary-grid/summary-grid.types.ts"],"sourcesContent":["<template>\n <div class=\"b-summary-grid\">\n <grid-layout\n v-for=\"index in numberOfRows\"\n :key=\"`summary-grid-row-${index}`\"\n :data-testid=\"`summary-grid-row-${index}`\"\n :column-width=\"columnWidth?.[`row${index}`]\"\n >\n <template v-if=\"hasSlot(`cell-${index}-1`)\" #col-1>\n <slot :name=\"`cell-${index}-1`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-2`)\" #col-2>\n <slot :name=\"`cell-${index}-2`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-3`)\" #col-3>\n <slot :name=\"`cell-${index}-3`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-4`)\" #col-4>\n <slot :name=\"`cell-${index}-4`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-5`)\" #col-5>\n <slot :name=\"`cell-${index}-5`\" />\n </template>\n <template v-if=\"hasSlot(`cell-${index}-6`)\" #col-6>\n <slot :name=\"`cell-${index}-6`\" />\n </template>\n </grid-layout>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { onMounted, provide, toRef, useSlots } from 'vue';\n import type { BentoSummaryGridLayout, BentoSummaryGridProps } from './summary-grid.types';\n import { GridLayout } from '@/components/internal';\n import { useHasSlot } from '@/composables';\n import {\n SUMMARY_GRID_LAYOUT_INJECTION_KEY,\n SUMMARY_GRID_SLASHED_ZERO,\n } from '@/components/summary-grid/summary-grid.keys';\n\n const props = withDefaults(defineProps<BentoSummaryGridProps>(), {\n columnWidth: null,\n slashedZero: false,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n let numberOfRows = 1;\n if (slots) {\n const slotRows = Object.keys(slots)\n ?.filter(slotName => slotName.includes('cell-'))\n ?.map(slotName => parseInt(slotName.split('-')?.[1], 10));\n numberOfRows = Math.max(...slotRows);\n }\n\n onMounted(() => {\n if (numberOfRows > 3) {\n throw new Error(\n 'BentoSummaryGrid must only have a maximum of 3 rows. Read the documentation for more information.'\n );\n }\n });\n\n const registerComponentsInSummaryGrid: BentoSummaryGridLayout = () => {\n const isSummaryGridLayout = true;\n return { isSummaryGridLayout };\n };\n\n provide(SUMMARY_GRID_LAYOUT_INJECTION_KEY, registerComponentsInSummaryGrid);\n provide(SUMMARY_GRID_SLASHED_ZERO, toRef(props, 'slashedZero'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary grid component that displays a collection items.\n *\n * @example\n * import { BentoSummaryGrid, BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGrid, BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid>\n * <template #cell-2-2>\n * <bento-summary-grid-item-amount\n * title=\"Text Item\"\n * label=\"14\"\n * info-icon-tooltip-text=\"text for icon\"\n * copy=\"copy this to clipboard\"\n * />\n * </template>\n * </bento-summary-grid>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid.scss\" />\n","<template>\n <div class=\"b-summary-grid-item\" :class=\"conditionalClasses\" :style=\"computedStyles\">\n <div class=\"b-summary-grid-item__header\">\n <bento-typography class=\"b-summary-grid-item__title\" el=\"span\" variant=\"body\">\n <bento-dashed-underline v-if=\"withUnderline\" :tooltip-text=\"underlineTooltipText\">\n {{ title }}\n <template v-if=\"hasSlot('dashed-underline')\" #popover-content>\n <slot name=\"dashed-underline\"></slot>\n </template>\n </bento-dashed-underline>\n <template v-else>\n {{ title }}\n </template>\n </bento-typography>\n <div class=\"b-summary-grid-item__title-icons\">\n <copy v-if=\"copy\" class=\"b-structured-list__icon\" :text=\"copy\" />\n\n <bento-info-icon\n v-if=\"infoIconTooltipText\"\n :tooltip-text=\"infoIconTooltipText\"\n tooltip-position=\"top\"\n class=\"b-summary-grid-item__title-tooltip\"\n />\n </div>\n </div>\n <bento-typography\n data-testid=\"summary-grid-item-content-typography\"\n class=\"b-summary-grid-item__title\"\n v-bind=\"typographyProps\"\n el=\"span\"\n >\n <slot />\n <bento-tag\n v-if=\"trend && itemType !== 'text'\"\n :variant=\"trendVariant\"\n :label=\"trend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('secondary')\"\n class=\"b-summary-grid-item__title\"\n data-testid=\"summary-grid-item-secondary-metric-typography\"\n el=\"span\"\n variant=\"caption\"\n stronger\n >\n <slot name=\"secondary\" />\n <bento-tag\n v-if=\"secondaryTrend\"\n :variant=\"secondaryTrendVariant\"\n :label=\"secondaryTrend\"\n class=\"b-summary-grid-item__content-trend\"\n />\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, ref, toRefs, useSlots } from 'vue';\n\n // Components\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoInfoIcon } from '@/components/info-icon';\n import { BentoTypography, type BentoTypographyVariant } from '@/components/typography';\n import { BentoTag, type BentoTagVariant } from '@/components/tag';\n import { Copy } from '@/internal';\n\n // Utils\n import { useHasSlot } from '@/composables';\n\n // Types\n import { SUMMARY_GRID_SLASHED_ZERO } from '@/components/summary-grid/summary-grid.keys';\n import type { BentoSummaryGridItemTrendDirection } from '@/components/summary-grid/summary-grid.types';\n import type { BentoSummaryGridItemProps } from './summary-grid-item.types';\n\n const props = withDefaults(defineProps<BentoSummaryGridItemProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n itemType: 'custom',\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: null,\n });\n\n const { trendDirection, secondaryTrendDirection, itemType, size } = toRefs(props);\n const hasSlashedZero = inject(SUMMARY_GRID_SLASHED_ZERO, ref(false));\n\n const tagVariantColor = (direction: `${BentoSummaryGridItemTrendDirection}`): `${BentoTagVariant}` => {\n switch (direction) {\n case 'positive':\n return 'green';\n case 'negative':\n return 'red';\n default:\n return 'blue';\n }\n };\n\n // TODO implement plus or minus symbol logic\n const trendVariant = computed(() => tagVariantColor(trendDirection.value));\n const secondaryTrendVariant = computed(() => tagVariantColor(secondaryTrendDirection.value));\n\n const typographyContentElement = computed<`${BentoTypographyVariant}`>(() => {\n if (size.value === 'small') {\n return 'body';\n }\n if (itemType.value !== 'text') {\n return 'title';\n }\n\n return null;\n });\n\n const typographyProps = computed(() => ({\n medium: size.value === 'large',\n strongest: size.value === 'small',\n wide: size.value === 'small',\n variant: typographyContentElement.value,\n }));\n\n const computedStyles = computed(() => (props.fitContent ? { width: 'fit-content' } : {}));\n\n const conditionalClasses = computed(() => ({ 'b-summary-grid-item--slashed-zero': hasSlashedZero.value }));\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const withUnderline = computed(() => props.underlineTooltipText || hasSlot('dashed-underline'));\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"amount\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-amount\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <div class=\"b-summary-grid-item-amount__content\">\n <div>{{ label }}</div>\n <div v-if=\"secondaryLabel\" class=\"b-summary-grid-item-amount__secondary-label\">{{ secondaryLabel }}</div>\n </div>\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemAmountProps } from './summary-grid-item-amount.types';\n\n withDefaults(defineProps<BentoSummaryGridItemAmountProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryLabel: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display financial data, such as currency values and monetary amounts\n *\n * @example\n * import { BentoSummaryGridItemAmount } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemAmount },\n * template: `\n * <bento-summary-grid-item-amount\n * title=\"Your title\"\n * label=\"200.00 EUR\"\n * secondary-label=\"/ day\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./summary-grid-item-amount.scss\" />\n","<template>\n <summary-grid-item\n item-type=\"numeric\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-numeric\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n <template v-if=\"secondaryMetric\" #secondary>\n {{ secondaryMetric }}\n </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemNumericProps } from './summary-grid-item-numeric.types';\n\n withDefaults(defineProps<BentoSummaryGridItemNumericProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any numeric information\n *\n * @example\n * import { BentoSummaryGridItemNumeric } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemNumeric },\n * template: `\n * <bento-summary-grid-item-numeric\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"percentage\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :size=\"size\"\n :trend=\"trend\"\n :trend-direction=\"trendDirection\"\n :secondary-trend=\"secondaryTrend\"\n :secondary-trend-direction=\"secondaryTrendDirection\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-percentage\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}%\n <template v-if=\"secondaryMetric\" #secondary> {{ secondaryMetric }}% </template>\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemPercentageProps } from './summary-grid-item-percentage.types';\n\n withDefaults(defineProps<BentoSummaryGridItemPercentageProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n secondaryMetric: null,\n secondaryTrend: null,\n secondaryTrendDirection: 'positive',\n size: 'small',\n trend: null,\n trendDirection: 'positive',\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display any percentage information\n *\n * @example\n * import { BentoSummaryGridItemPercentage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemPercentage },\n * template: `\n * <bento-summary-grid-item-percentage\n * title=\"Your title\"\n * label=\"123\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * trend=\"+12%\"\n * trend-direction=\"neutral\"\n * size=\"medium\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n item-type=\"text\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :title=\"title\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-tooltip-text=\"underlineTooltipText\"\n class=\"b-summary-grid-item-text\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n {{ label }}\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import { SummaryGridItem } from '../summary-grid-item';\n import { useHasSlot } from '@/composables';\n\n import type { BentoSummaryGridItemTextProps } from './summary-grid-item-text.types';\n\n withDefaults(defineProps<BentoSummaryGridItemTextProps>(), {\n copy: undefined,\n fitContent: false,\n infoIconTooltipText: null,\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * Summary grid item component used to display text only. Can be used for references, IDs or any other text data.\n *\n * @example\n * import { BentoSummaryGridItemText } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSummaryGridItemText },\n * template: `\n * <bento-summary-grid-item-text\n * title=\"Your title\"\n * label=\"Your text here\"\n * info-icon-tooltip-text=\"Your tooltip text here will be toggled by the info icon\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <summary-grid-item\n :title=\"title\"\n :info-icon-tooltip-text=\"infoIconTooltipText\"\n :copy=\"copy\"\n :fit-content=\"fitContent\"\n :underline-tooltip-text=\"underlineTooltipText\"\n >\n <template v-if=\"hasSlot('dashed-underline')\" #dashed-underline>\n <slot name=\"dashed-underline\" />\n </template>\n <slot />\n </summary-grid-item>\n</template>\n\n<script setup lang=\"ts\">\n import { useSlots } from 'vue';\n import SummaryGridItem from '../summary-grid-item/summary-grid-item.vue';\n import { useHasSlot } from '@/composables';\n import type { BentoSummaryGridItemCustomProps } from './summary-grid-item-custom.types';\n\n withDefaults(defineProps<BentoSummaryGridItemCustomProps>(), {\n copy: undefined,\n infoIconTooltipText: null,\n fitContent: false,\n underlineTooltipText: null,\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * A summary bar item is a piece of information to be displayed in `bento-summary-bar` component\n *\n * @example\n * import { SummaryBarItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { SummaryBarItem },\n * template: `\n * <summary-grid-item :title=\"textVariable\">\n * Content of the item\n * </summary-grid-item>\n * `\n * }\n */\n export default {};\n</script>\n","import { GridLayoutColumnWidths } from '@/components/internal/grid-layout/grid-layout.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoSummaryGridItemTrendDirection {\n POSITIVE = 'positive',\n NEGATIVE = 'negative',\n NEUTRAL = 'neutral',\n}\n\nexport interface BentoSummaryGridColumnWidth {\n row1: GridLayoutColumnWidths;\n row2?: GridLayoutColumnWidths;\n row3?: GridLayoutColumnWidths;\n}\n\nexport type BentoSummaryGridLayout = () => {\n isSummaryGridLayout: boolean;\n};\n\nexport interface BentoSummaryGridProps {\n /**\n * Sets the responsive columns widths values for 1 of the 3 rows.\n */\n columnWidth?: BentoSummaryGridColumnWidth;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n}\n"],"names":["__default__$6","props","__props","slots","useSlots","hasSlot","useHasSlot","numberOfRows","slotRows","_b","_a","slotName","onMounted","provide","SUMMARY_GRID_LAYOUT_INJECTION_KEY","SUMMARY_GRID_SLASHED_ZERO","toRef","__default__$5","trendDirection","secondaryTrendDirection","itemType","size","toRefs","hasSlashedZero","inject","ref","tagVariantColor","direction","trendVariant","computed","secondaryTrendVariant","typographyContentElement","typographyProps","computedStyles","conditionalClasses","withUnderline","__default__$4","__default__$3","__default__$2","__default__$1","__default__","BentoSummaryGridItemSize","BentoSummaryGridItemSize2","BentoSummaryGridItemTrendDirection","BentoSummaryGridItemTrendDirection2"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"teleport.zSiKZmRE.js","sources":["../../../vue2/src/composables/use-click-outside/use-click-outside.ts","../../../vue2/src/components/internal/teleport/teleport.vue"],"sourcesContent":["import { onClickOutside } from '@/directives/click-outside/on-click-outside';\nimport { OnClickOutsideHandler, OnClickOutsideOptions } from '@/directives/click-outside/types';\nimport { MaybeElementRef } from '@/types';\nimport { onMounted, onUnmounted } from 'vue';\n\n/**\n * Composable to listen for clicks outside of an element ref.\n *\n * @param {MaybeElementRef} target - HTML Element or \"ref\" to an Element on which the click outside listener will be attached to\n * @param {OnClickOutsideHandler} handler - Function that will be called when the listener gets triggered\n * @param {OnClickOutsideOptions} options - Options to be passed to the listener\n */\nexport const useClickOutside = <T extends OnClickOutsideOptions>(\n target: MaybeElementRef,\n handler: OnClickOutsideHandler,\n options: T = {} as T\n) => {\n let onClickOutsideStop: () => void;\n\n onMounted(() => {\n onClickOutsideStop = onClickOutside(target, handler, options);\n });\n\n onUnmounted(() => {\n if (onClickOutsideStop) {\n onClickOutsideStop();\n\n onClickOutsideStop = null;\n }\n });\n};\n","<!-- Taken from: https://github.com/Mechazawa/vue2-teleport/blob/master/src/Teleport.vue -->\n<template>\n <div v-if=\"isVue2\" :class=\"classes\">\n <slot />\n </div>\n <Teleport v-else :to=\"defaultTo\" :where=\"where\" :disabled=\"disabled\" :class=\"classes\">\n <slot />\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\n import { isVue2 } from 'vue-demi';\n import { defineComponent, inject } from 'vue';\n import { MODAL_DIALOG_ID_INJECTION_KEY } from '@/components/modal/components/base-modal/base-modal.keys';\n import { SIDEPANEL_DIALOG_ID_INJECTION_KEY } from '@/components/sidepanel/sidepanel.keys';\n import { MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n</script>\n\n<script lang=\"ts\">\n export default defineComponent({\n name: 'teleport',\n props: {\n to: {\n type: String,\n default: '',\n },\n where: {\n type: String,\n default: 'after',\n },\n disabled: Boolean,\n },\n data: () => ({\n childObserver: null,\n nodes: [],\n waiting: false,\n observer: null,\n parent: null,\n isVue2,\n }),\n computed: {\n classes() {\n if (this.disabled) {\n return ['b-teleport'];\n }\n\n return ['b-teleport', 'b-teleport--hidden'];\n },\n defaultTo() {\n if (this.to) {\n return this.to;\n }\n\n const injectionKey =\n inject<string>(MODAL_DIALOG_ID_INJECTION_KEY, '') ||\n inject<string>(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, '') ||\n inject<string>(SIDEPANEL_DIALOG_ID_INJECTION_KEY, '');\n\n const teleportElement = injectionKey ? `#${injectionKey}` : 'body';\n return teleportElement;\n },\n },\n watch: {\n to: 'maybeMove',\n where: 'maybeMove',\n disabled(value) {\n if (value) {\n this.disable();\n // Ensure all event done.\n this.$nextTick(() => {\n this.teardownObserver();\n });\n } else {\n this.bootObserver();\n this.move();\n }\n },\n },\n mounted() {\n // Store a reference to the nodes\n this.nodes = Array.from(this.$el.childNodes);\n\n if (!this.disabled) {\n this.bootObserver();\n }\n\n // Move slot content to target\n this.maybeMove();\n },\n beforeDestroy() {\n // Fix nodes reference\n this.nodes = this.getComponentChildrenNode();\n\n // Move back\n this.disable();\n\n // Stop observing\n this.teardownObserver();\n },\n methods: {\n // Using a fragment is faster because it'll trigger only a single reflow\n // See https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment\n getFragment(): DocumentFragment {\n const fragment = document.createDocumentFragment();\n\n this.nodes.forEach(node => fragment.appendChild(node));\n\n return fragment;\n },\n disable() {\n this.$el.appendChild(this.getFragment());\n this.parent = null;\n },\n move() {\n this.waiting = false;\n\n this.parent = document.querySelector(this.defaultTo);\n\n if (!this.parent) {\n this.disable();\n\n this.waiting = true;\n\n return;\n }\n\n if (this.where === 'before') {\n this.parent.prepend(this.getFragment());\n } else {\n this.parent.appendChild(this.getFragment());\n }\n },\n maybeMove() {\n if (!this.disabled) {\n this.move();\n }\n },\n onMutations(mutations) {\n // Makes sure the move operation is only done once\n let shouldMove = false;\n\n for (let i = 0; i < mutations.length; i++) {\n const mutation = mutations[i];\n const filteredAddedNodes = Array.from(mutation.addedNodes).filter(\n node => !this.nodes.includes(node)\n );\n\n if (Array.from(mutation.removedNodes).includes(this.parent)) {\n this.disable();\n this.waiting = !this.disabled;\n } else if (this.waiting && filteredAddedNodes.length > 0) {\n shouldMove = true;\n }\n }\n\n if (shouldMove) {\n this.move();\n }\n },\n bootObserver() {\n if (this.observer) {\n return;\n }\n\n this.observer = new MutationObserver(mutations => this.onMutations(mutations));\n\n this.observer.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: false,\n characterData: false,\n });\n\n if (this.childObserver) {\n return;\n }\n // watch childNodes change\n this.childObserver = new MutationObserver(mutations => {\n const childChangeRecord = mutations.find(i => i.target === this.$el);\n if (childChangeRecord) {\n // Remove old nodes before update position.\n this.nodes.forEach(node => node.parentNode && node.parentNode.removeChild(node));\n this.nodes = this.getComponentChildrenNode();\n this.maybeMove();\n }\n });\n\n this.childObserver.observe(this.$el, {\n childList: true,\n subtree: false,\n attributes: false,\n characterData: false,\n });\n },\n teardownObserver() {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n if (this.childObserver) {\n this.childObserver.disconnect();\n this.childObserver = null;\n }\n },\n getComponentChildrenNode() {\n // Vue3\n if (!isVue2) {\n return [];\n }\n\n // Trick for Vue3 type checking\n return (this as any).$vnode.componentOptions.children.map(i => i.elm).filter(i => i);\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./teleport.scss\" />\n"],"names":["useClickOutside","target","handler","options","onClickOutsideStop","onMounted","onClickOutside","onUnmounted","__default__","defineComponent","isVue2","injectionKey","inject","MODAL_DIALOG_ID_INJECTION_KEY","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","SIDEPANEL_DIALOG_ID_INJECTION_KEY","value","fragment","node","mutations","shouldMove","i","mutation","filteredAddedNodes"],"mappings":"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"}
|
|
@@ -1,560 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ne, computed as m, ref as D, toRefs as ce, provide as z, resolveComponent as I, createElementBlock as v, openBlock as i, createCommentVNode as c, createElementVNode as g, createBlock as T, withCtx as h, createTextVNode as w, toDisplayString as y, createVNode as S, renderSlot as H, mergeProps as V, inject as K, onUnmounted as fe, normalizeClass as W, Fragment as Y, renderList as pe } from "vue";
|
|
2
|
-
import { B as oe } from "./button.DEVuqLVT.js";
|
|
3
|
-
import { B as ve } from "./textarea.CR7su54i.js";
|
|
4
|
-
import { u as ae } from "./i18n.D9azDLPe.js";
|
|
5
|
-
import { B as _e } from "./button-actions.N99QthUv.js";
|
|
6
|
-
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
|
-
import { B as be } from "./date.DoJuTLhO.js";
|
|
8
|
-
import { B as he } from "./link.D3Fq5tt_.js";
|
|
9
|
-
import { B as ge } from "./tag.CmYkknFj.js";
|
|
10
|
-
import { B as ye, d as Ne } from "./typography.DN5eC5ch.js";
|
|
11
|
-
import { a as Ie, B as Ee, S as we } from "./structured-list-item.CWiwoP5F.js";
|
|
12
|
-
/* empty css */
|
|
13
|
-
import { g as Te } from "./generate-uid.NJ8tVoha.js";
|
|
14
|
-
import { u as Se } from "./use-has-slot.B7eQSabc.js";
|
|
15
|
-
import { r as Ce, l as Me, t as B, a as Z } from "./get-date-locale.BN8xEjY0.js";
|
|
16
|
-
import { c as ke } from "./index.DD7TppDb.js";
|
|
17
|
-
import { c as Le } from "./index.BxBB1rsx.js";
|
|
18
|
-
import "../assets/timeline-item.css";
|
|
19
|
-
var G = 1e3 * 60, U = 60 * 24, Q = U * 30, X = U * 365;
|
|
20
|
-
function x(e, o) {
|
|
21
|
-
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
22
|
-
Ce(2, arguments);
|
|
23
|
-
var l = s.locale || Me;
|
|
24
|
-
if (!l.formatDistance)
|
|
25
|
-
throw new RangeError("locale must contain localize.formatDistance property");
|
|
26
|
-
var N = ke(e, o);
|
|
27
|
-
if (isNaN(N))
|
|
28
|
-
throw new RangeError("Invalid time value");
|
|
29
|
-
var r = Le(s);
|
|
30
|
-
r.addSuffix = !!s.addSuffix, r.comparison = N;
|
|
31
|
-
var a, f;
|
|
32
|
-
N > 0 ? (a = B(o), f = B(e)) : (a = B(e), f = B(o));
|
|
33
|
-
var p = s.roundingMethod == null ? "round" : String(s.roundingMethod), n;
|
|
34
|
-
if (p === "floor")
|
|
35
|
-
n = Math.floor;
|
|
36
|
-
else if (p === "ceil")
|
|
37
|
-
n = Math.ceil;
|
|
38
|
-
else if (p === "round")
|
|
39
|
-
n = Math.round;
|
|
40
|
-
else
|
|
41
|
-
throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
|
|
42
|
-
var u = f.getTime() - a.getTime(), _ = u / G, C = Z(f) - Z(a), b = (u - C) / G, t;
|
|
43
|
-
if (s.unit == null ? _ < 1 ? t = "second" : _ < 60 ? t = "minute" : _ < U ? t = "hour" : b < Q ? t = "day" : b < X ? t = "month" : t = "year" : t = String(s.unit), t === "second") {
|
|
44
|
-
var M = n(u / 1e3);
|
|
45
|
-
return l.formatDistance("xSeconds", M, r);
|
|
46
|
-
} else if (t === "minute") {
|
|
47
|
-
var k = n(_);
|
|
48
|
-
return l.formatDistance("xMinutes", k, r);
|
|
49
|
-
} else if (t === "hour") {
|
|
50
|
-
var O = n(_ / 60);
|
|
51
|
-
return l.formatDistance("xHours", O, r);
|
|
52
|
-
} else if (t === "day") {
|
|
53
|
-
var R = n(b / U);
|
|
54
|
-
return l.formatDistance("xDays", R, r);
|
|
55
|
-
} else if (t === "month") {
|
|
56
|
-
var d = n(b / Q);
|
|
57
|
-
return d === 12 && s.unit !== "month" ? l.formatDistance("xYears", 1, r) : l.formatDistance("xMonths", d, r);
|
|
58
|
-
} else if (t === "year") {
|
|
59
|
-
var E = n(b / X);
|
|
60
|
-
return l.formatDistance("xYears", E, r);
|
|
61
|
-
}
|
|
62
|
-
throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
|
|
63
|
-
}
|
|
64
|
-
var A = /* @__PURE__ */ ((e) => (e.BOTTOM = "bottom", e.AFTER_FIRST = "after-first", e.BEFORE_LAST = "before-last", e))(A || {}), Ae = /* @__PURE__ */ ((e) => (e.SECOND = "second", e.MINUTE = "minute", e.HOUR = "hour", e.DAY = "day", e.MONTH = "month", e.YEAR = "year", e))(Ae || {}), j = /* @__PURE__ */ ((e) => (e.DEFAULT = "SquareSmallIcon", e.SUCCESS = "CheckedCircleIcon", e.CRITICAL = "CrossCircleIcon", e))(j || {}), se = /* @__PURE__ */ ((e) => (e.BLACK = "black", e.BLUE = "blue", e.GREEN = "green", e.GREY = "grey", e.ORANGE = "orange", e.RED = "red", e.YELLOW = "yellow", e))(se || {});
|
|
65
|
-
const le = Symbol("timeline register entry injection key"), re = Symbol("timeline config obj injection key"), ee = {
|
|
66
|
-
"en-US": {
|
|
67
|
-
addNote: "Add note",
|
|
68
|
-
cancel: "Cancel"
|
|
69
|
-
},
|
|
70
|
-
"ja-JP": {
|
|
71
|
-
addNote: "メモを追加",
|
|
72
|
-
cancel: "キャンセル"
|
|
73
|
-
},
|
|
74
|
-
"pt-BR": {
|
|
75
|
-
addNote: "Adicionar anotação",
|
|
76
|
-
cancel: "Cancelar"
|
|
77
|
-
}
|
|
78
|
-
}, Oe = ne({
|
|
79
|
-
i18n: { messages: ee },
|
|
80
|
-
name: "bento-timeline",
|
|
81
|
-
components: { BentoButton: oe, BentoButtonActions: _e, BentoTextarea: ve },
|
|
82
|
-
props: {
|
|
83
|
-
/**
|
|
84
|
-
* If set to true, gives the possibility to manually add notes to the timeline via a textarea
|
|
85
|
-
*/
|
|
86
|
-
addNote: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: !1
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* Object that determines the max number of items to show without clicking the show more button
|
|
92
|
-
* and where in the timeline is the show more button placed
|
|
93
|
-
*/
|
|
94
|
-
showMore: {
|
|
95
|
-
type: Object,
|
|
96
|
-
default: null
|
|
97
|
-
},
|
|
98
|
-
/**
|
|
99
|
-
* Object that determines minimum amount of time for the automatic timegap indicator;
|
|
100
|
-
* Define a unit (hour, day, month) and an amount (e.g. { amount: 7, unit: 'days' }).
|
|
101
|
-
* If null, automatic timegap detection will be turned off
|
|
102
|
-
*/
|
|
103
|
-
timegapLimit: {
|
|
104
|
-
type: Object,
|
|
105
|
-
default: null
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
emits: ["add-timeline-note"],
|
|
109
|
-
setup(e, { emit: o }) {
|
|
110
|
-
const { t: s } = ae({ messages: ee }), l = m(() => s("addNote")), N = m(() => s("cancel")), r = D(), a = (d) => {
|
|
111
|
-
r.value = d;
|
|
112
|
-
}, f = D(!1), p = () => {
|
|
113
|
-
f.value = !f.value;
|
|
114
|
-
}, n = () => {
|
|
115
|
-
o("add-timeline-note", {
|
|
116
|
-
description: r.value,
|
|
117
|
-
timestamp: { date: /* @__PURE__ */ new Date() },
|
|
118
|
-
type: "note"
|
|
119
|
-
}), p();
|
|
120
|
-
}, u = D([]), _ = m(
|
|
121
|
-
() => e.showMore && u.value.length > e.showMore.limit ? u.value.length - e.showMore.limit : null
|
|
122
|
-
), C = D(!1), { timegapLimit: b } = ce(e), t = m(() => {
|
|
123
|
-
if (!e.showMore)
|
|
124
|
-
return null;
|
|
125
|
-
const d = Array.from(u.value.keys());
|
|
126
|
-
return e.showMore.placement === A.BEFORE_LAST ? [
|
|
127
|
-
...d.slice(0, e.showMore.limit - 1),
|
|
128
|
-
d[d.length - 1]
|
|
129
|
-
] : e.showMore.placement === A.AFTER_FIRST ? [d[0], ...d.slice(-(e.showMore.limit - 1))] : d.slice(0, e.showMore.limit);
|
|
130
|
-
}), M = m(() => {
|
|
131
|
-
if (!e.showMore)
|
|
132
|
-
return null;
|
|
133
|
-
switch (e.showMore.placement) {
|
|
134
|
-
case A.BEFORE_LAST:
|
|
135
|
-
return e.showMore.limit - 2;
|
|
136
|
-
case A.AFTER_FIRST:
|
|
137
|
-
return 0;
|
|
138
|
-
case A.BOTTOM:
|
|
139
|
-
default:
|
|
140
|
-
return e.showMore.limit - 1;
|
|
141
|
-
}
|
|
142
|
-
}), k = (d) => () => {
|
|
143
|
-
var E;
|
|
144
|
-
u.value = (E = u.value) == null ? void 0 : E.filter(($, L) => L !== d);
|
|
145
|
-
}, O = ({ title: d, description: E, date: $ }) => {
|
|
146
|
-
const L = u.value.length;
|
|
147
|
-
return u.value.push({ title: d, description: E, date: $ }), { timelineEntries: u, index: L, unregisterTimelineEntry: k(L) };
|
|
148
|
-
}, R = {
|
|
149
|
-
showAll: C,
|
|
150
|
-
showMoreIndex: M,
|
|
151
|
-
hiddenItems: _,
|
|
152
|
-
visibleIndexes: t,
|
|
153
|
-
timegapLimit: b
|
|
154
|
-
};
|
|
155
|
-
return z(le, O), z(re, R), {
|
|
156
|
-
addNoteLabel: l,
|
|
157
|
-
cancelLabel: N,
|
|
158
|
-
toggleAddNote: p,
|
|
159
|
-
updateNoteContent: a,
|
|
160
|
-
addNoteToTimeline: n,
|
|
161
|
-
showAddNoteTextArea: f
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}), Re = { class: "b-timeline" }, $e = {
|
|
165
|
-
key: 0,
|
|
166
|
-
class: "b-timeline__add-note-section"
|
|
167
|
-
}, De = { key: 1 }, Be = { class: "b-timeline__items" };
|
|
168
|
-
function je(e, o, s, l, N, r) {
|
|
169
|
-
const a = I("bento-button"), f = I("bento-textarea"), p = I("bento-button-actions");
|
|
170
|
-
return i(), v("div", Re, [
|
|
171
|
-
e.addNote ? (i(), v("div", $e, [
|
|
172
|
-
e.showAddNoteTextArea ? c("", !0) : (i(), T(a, {
|
|
173
|
-
key: 0,
|
|
174
|
-
variant: "tertiary",
|
|
175
|
-
onClick: e.toggleAddNote
|
|
176
|
-
}, {
|
|
177
|
-
default: h(() => [
|
|
178
|
-
w(y(e.addNoteLabel), 1)
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
}, 8, ["onClick"])),
|
|
182
|
-
e.showAddNoteTextArea ? (i(), v("div", De, [
|
|
183
|
-
S(f, {
|
|
184
|
-
label: e.addNoteLabel,
|
|
185
|
-
"character-limit": 150,
|
|
186
|
-
resizable: "vertical",
|
|
187
|
-
onInput: e.updateNoteContent
|
|
188
|
-
}, null, 8, ["label", "onInput"]),
|
|
189
|
-
S(p, {
|
|
190
|
-
actions: [
|
|
191
|
-
{ title: e.addNoteLabel, event: e.addNoteToTimeline },
|
|
192
|
-
{ title: e.cancelLabel, event: e.toggleAddNote }
|
|
193
|
-
]
|
|
194
|
-
}, null, 8, ["actions"])
|
|
195
|
-
])) : c("", !0)
|
|
196
|
-
])) : c("", !0),
|
|
197
|
-
g("ol", Be, [
|
|
198
|
-
H(e.$slots, "default", {}, void 0, !0)
|
|
199
|
-
])
|
|
200
|
-
]);
|
|
201
|
-
}
|
|
202
|
-
const bt = /* @__PURE__ */ q(Oe, [["render", je], ["__scopeId", "data-v-f844f908"]]);
|
|
203
|
-
let te = 0;
|
|
204
|
-
const Ue = {
|
|
205
|
-
beforeCreate() {
|
|
206
|
-
this.uuid = te.toString(), te += 1;
|
|
207
|
-
}
|
|
208
|
-
}, Fe = { key: 0 };
|
|
209
|
-
function Ye(e, o, s, l, N, r) {
|
|
210
|
-
return i(), v("svg", V({ role: "img" }, e.$attrs, {
|
|
211
|
-
class: "ui-assets-icons-16",
|
|
212
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
213
|
-
width: "16",
|
|
214
|
-
height: "16",
|
|
215
|
-
fill: "none"
|
|
216
|
-
}), [
|
|
217
|
-
e.$attrs["svg-title"] ? (i(), v("title", Fe, y(e.$attrs["svg-title"]), 1)) : c("", !0),
|
|
218
|
-
o[0] || (o[0] = g("path", {
|
|
219
|
-
fill: "#00112C",
|
|
220
|
-
d: "M5.5 3.25C4.25736 3.25 3.25 4.25736 3.25 5.5V10.5C3.25 11.7426 4.25736 12.75 5.5 12.75H10.5C11.7426 12.75 12.75 11.7426 12.75 10.5V5.5C12.75 4.25736 11.7426 3.25 10.5 3.25H5.5Z"
|
|
221
|
-
}, null, -1))
|
|
222
|
-
], 16);
|
|
223
|
-
}
|
|
224
|
-
const ze = /* @__PURE__ */ q(Ue, [["render", Ye]]), ie = {
|
|
225
|
-
"en-US": {
|
|
226
|
-
showLess: "Show less",
|
|
227
|
-
showMore: "Show {items} more",
|
|
228
|
-
timegap: "{timegap} passed between the timeline events"
|
|
229
|
-
},
|
|
230
|
-
"ja-JP": {
|
|
231
|
-
showLess: "表示内容を減らす"
|
|
232
|
-
},
|
|
233
|
-
"pt-BR": {
|
|
234
|
-
showLess: "Mostrar menos"
|
|
235
|
-
}
|
|
236
|
-
}, He = ne({
|
|
237
|
-
name: "bento-timeline-item",
|
|
238
|
-
components: {
|
|
239
|
-
BentoButton: oe,
|
|
240
|
-
BentoDate: be,
|
|
241
|
-
BentoLink: he,
|
|
242
|
-
BentoTag: ge,
|
|
243
|
-
BentoTypography: ye,
|
|
244
|
-
BentoStructuredList: Ee,
|
|
245
|
-
BentoStructuredListItem: Ie,
|
|
246
|
-
SquareSmallIcon: ze
|
|
247
|
-
},
|
|
248
|
-
i18n: { messages: ie },
|
|
249
|
-
props: {
|
|
250
|
-
/**
|
|
251
|
-
* Additional timestamp of the event
|
|
252
|
-
*/
|
|
253
|
-
additionalTimestamp: {
|
|
254
|
-
type: Object,
|
|
255
|
-
default: null
|
|
256
|
-
},
|
|
257
|
-
/**
|
|
258
|
-
* Relevant key-value pair data to display in the event
|
|
259
|
-
*/
|
|
260
|
-
dataList: {
|
|
261
|
-
type: Array,
|
|
262
|
-
default: null
|
|
263
|
-
},
|
|
264
|
-
/**
|
|
265
|
-
* Description of the event
|
|
266
|
-
*/
|
|
267
|
-
description: {
|
|
268
|
-
type: String,
|
|
269
|
-
default: null
|
|
270
|
-
},
|
|
271
|
-
/**
|
|
272
|
-
* Modifier that changes the color of the timeline icon
|
|
273
|
-
* @values blue, black, green, grey, orange, red, yellow
|
|
274
|
-
*/
|
|
275
|
-
status: {
|
|
276
|
-
type: String,
|
|
277
|
-
default: "black",
|
|
278
|
-
validator: (e) => Object.values(se).includes(e)
|
|
279
|
-
},
|
|
280
|
-
/**
|
|
281
|
-
* Tag props that will be passed down to inner tag component
|
|
282
|
-
*/
|
|
283
|
-
tag: {
|
|
284
|
-
type: Object,
|
|
285
|
-
default: void 0
|
|
286
|
-
},
|
|
287
|
-
/**
|
|
288
|
-
* Main timestamp of the event. Used for timegap detection.
|
|
289
|
-
*/
|
|
290
|
-
timestamp: {
|
|
291
|
-
type: Object,
|
|
292
|
-
required: !0
|
|
293
|
-
},
|
|
294
|
-
/**
|
|
295
|
-
* Title of the event
|
|
296
|
-
*/
|
|
297
|
-
title: {
|
|
298
|
-
type: [Object, String],
|
|
299
|
-
default: null
|
|
300
|
-
},
|
|
301
|
-
/**
|
|
302
|
-
* Type of the timeline item. If set to 'note', it renders a note item in the timeline. Defaults to 'milestone'.
|
|
303
|
-
* @values milestone, note
|
|
304
|
-
*/
|
|
305
|
-
type: {
|
|
306
|
-
type: String,
|
|
307
|
-
default: "milestone",
|
|
308
|
-
validator: (e) => ["milestone", "note"].includes(e)
|
|
309
|
-
},
|
|
310
|
-
/**
|
|
311
|
-
* Variant for the timeline item
|
|
312
|
-
* @values DEFAULT, SUCCESS, CRITICAL
|
|
313
|
-
*
|
|
314
|
-
* @deprecated Use "status" prop instead
|
|
315
|
-
*/
|
|
316
|
-
variant: {
|
|
317
|
-
type: String,
|
|
318
|
-
default: null,
|
|
319
|
-
validator: (e) => Object.values(j).includes(e)
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
setup(e, { slots: o }) {
|
|
323
|
-
const { t: s } = ae({ messages: ie }), l = m(() => e.type === "note"), N = m(() => e.variant === j.CRITICAL ? "red" : e.variant === j.SUCCESS ? "green" : e.status);
|
|
324
|
-
e.variant && Ne(
|
|
325
|
-
'BentoTimelineItem "variant" property',
|
|
326
|
-
`Use the BentoTimelineItem "status" modifier instead to modify the color of the timeline icon.
|
|
327
|
-
<bento-timeline-item status="red" />`,
|
|
328
|
-
"2.0.0"
|
|
329
|
-
);
|
|
330
|
-
const r = m(() => ({
|
|
331
|
-
[`b-timeline-item__icon--${N.value}`]: N.value && !l.value
|
|
332
|
-
})), a = m(() => ({
|
|
333
|
-
"b-timeline-item--note": l.value
|
|
334
|
-
}));
|
|
335
|
-
z(we, !0);
|
|
336
|
-
const f = K(le), { timelineEntries: p, index: n, unregisterTimelineEntry: u } = f({
|
|
337
|
-
title: e.title,
|
|
338
|
-
date: e.timestamp.date
|
|
339
|
-
});
|
|
340
|
-
fe(() => u());
|
|
341
|
-
const { showAll: _, showMoreIndex: C, hiddenItems: b, visibleIndexes: t, timegapLimit: M } = K(re), k = m(() => _.value || !t.value), O = m(() => k.value ? !0 : t.value.includes(n)), R = m(() => typeof e.title == "object"), d = m(() => e.title), E = m(() => {
|
|
342
|
-
var P;
|
|
343
|
-
if (!M.value)
|
|
344
|
-
return null;
|
|
345
|
-
const F = (P = p.value[n - 1]) == null ? void 0 : P.date, me = k.value || t.value.includes(n - 1);
|
|
346
|
-
if (!F || !me)
|
|
347
|
-
return null;
|
|
348
|
-
const { date: J } = p.value[n], ue = parseInt(
|
|
349
|
-
x(F, J, { unit: M.value.unit }),
|
|
350
|
-
10
|
|
351
|
-
);
|
|
352
|
-
return M.value.amount < ue ? x(F, J, { roundingMethod: "floor" }) : null;
|
|
353
|
-
}), $ = m(() => E.value ? s("timegap", { timegap: E.value }) : ""), L = m(() => b.value && C.value === n), de = m(() => n === p.value.length - 1);
|
|
354
|
-
return {
|
|
355
|
-
// Values
|
|
356
|
-
isNoteType: l,
|
|
357
|
-
iconConditionalClasses: r,
|
|
358
|
-
conditionalClasses: a,
|
|
359
|
-
displayShowMoreButton: L,
|
|
360
|
-
showAll: _,
|
|
361
|
-
hiddenItems: b,
|
|
362
|
-
isVisible: O,
|
|
363
|
-
isLinkTitle: R,
|
|
364
|
-
linkTitleProps: d,
|
|
365
|
-
timegap: E,
|
|
366
|
-
timegapAriaLabel: $,
|
|
367
|
-
isLastItem: de,
|
|
368
|
-
// Methods
|
|
369
|
-
generateUid: Te,
|
|
370
|
-
hasSlot: Se(o),
|
|
371
|
-
t: s
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
}), Ve = {
|
|
375
|
-
key: 0,
|
|
376
|
-
class: "b-timeline-item__row"
|
|
377
|
-
}, qe = { class: "b-timeline-item__content" }, Je = { class: "b-timeline-item__row" }, Pe = {
|
|
378
|
-
class: "b-timeline-item__marker",
|
|
379
|
-
"aria-hidden": "true"
|
|
380
|
-
}, Ke = {
|
|
381
|
-
key: 0,
|
|
382
|
-
class: "b-timeline-item__separator",
|
|
383
|
-
"data-testid": "last-timeline-item-separator"
|
|
384
|
-
}, We = { class: "b-timeline-item__content" }, Ze = { key: 1 }, Ge = {
|
|
385
|
-
key: 5,
|
|
386
|
-
class: "b-timeline-item__data-list"
|
|
387
|
-
}, Qe = {
|
|
388
|
-
key: 1,
|
|
389
|
-
class: "b-timeline-item__row"
|
|
390
|
-
}, Xe = { class: "b-timeline-item__content" };
|
|
391
|
-
function xe(e, o, s, l, N, r) {
|
|
392
|
-
const a = I("bento-typography"), f = I("square-small-icon"), p = I("bento-link"), n = I("bento-date"), u = I("bento-structured-list-item"), _ = I("bento-structured-list"), C = I("bento-tag"), b = I("bento-button");
|
|
393
|
-
return e.isVisible ? (i(), v("li", {
|
|
394
|
-
key: 0,
|
|
395
|
-
class: W(["b-timeline-item", e.conditionalClasses])
|
|
396
|
-
}, [
|
|
397
|
-
e.timegap ? (i(), v("div", Ve, [
|
|
398
|
-
o[1] || (o[1] = g("div", {
|
|
399
|
-
class: "b-timeline-item__marker",
|
|
400
|
-
"aria-hidden": "true"
|
|
401
|
-
}, [
|
|
402
|
-
g("div", { class: "b-timeline-item__icon b-timeline-item__icon--timegap" }),
|
|
403
|
-
g("div", { class: "b-timeline-item__separator" })
|
|
404
|
-
], -1)),
|
|
405
|
-
g("div", qe, [
|
|
406
|
-
S(a, {
|
|
407
|
-
class: "b-timeline-item__timegap",
|
|
408
|
-
"aria-label": e.timegapAriaLabel
|
|
409
|
-
}, {
|
|
410
|
-
default: h(() => [
|
|
411
|
-
w(y(e.timegap), 1)
|
|
412
|
-
]),
|
|
413
|
-
_: 1
|
|
414
|
-
}, 8, ["aria-label"])
|
|
415
|
-
])
|
|
416
|
-
])) : c("", !0),
|
|
417
|
-
g("div", Je, [
|
|
418
|
-
g("div", Pe, [
|
|
419
|
-
S(f, {
|
|
420
|
-
class: W(["b-timeline-item__icon", e.iconConditionalClasses])
|
|
421
|
-
}, null, 8, ["class"]),
|
|
422
|
-
e.isLastItem ? c("", !0) : (i(), v("div", Ke))
|
|
423
|
-
]),
|
|
424
|
-
g("div", We, [
|
|
425
|
-
e.isNoteType ? c("", !0) : (i(), T(a, {
|
|
426
|
-
key: 0,
|
|
427
|
-
el: "div",
|
|
428
|
-
variant: "body",
|
|
429
|
-
strongest: "",
|
|
430
|
-
class: "b-timeline-item__title",
|
|
431
|
-
role: "heading"
|
|
432
|
-
}, {
|
|
433
|
-
default: h(() => [
|
|
434
|
-
e.isLinkTitle ? (i(), T(p, V({ key: 0 }, e.linkTitleProps, { "disable-typography": "" }), {
|
|
435
|
-
default: h(() => [
|
|
436
|
-
w(y(e.linkTitleProps.title), 1)
|
|
437
|
-
]),
|
|
438
|
-
_: 1
|
|
439
|
-
}, 16)) : (i(), v("span", Ze, y(e.title), 1))
|
|
440
|
-
]),
|
|
441
|
-
_: 1
|
|
442
|
-
})),
|
|
443
|
-
e.isNoteType && (e.description || e.hasSlot("default")) ? (i(), T(a, {
|
|
444
|
-
key: 1,
|
|
445
|
-
el: "div",
|
|
446
|
-
variant: "body",
|
|
447
|
-
class: "b-timeline-item__description"
|
|
448
|
-
}, {
|
|
449
|
-
default: h(() => [
|
|
450
|
-
H(e.$slots, "default", {}, () => [
|
|
451
|
-
w(y(e.description), 1)
|
|
452
|
-
], !0)
|
|
453
|
-
]),
|
|
454
|
-
_: 3
|
|
455
|
-
})) : c("", !0),
|
|
456
|
-
e.timestamp ? (i(), T(a, {
|
|
457
|
-
key: 2,
|
|
458
|
-
class: "b-timeline-item__timestamp",
|
|
459
|
-
el: "div",
|
|
460
|
-
variant: "caption"
|
|
461
|
-
}, {
|
|
462
|
-
default: h(() => [
|
|
463
|
-
S(n, {
|
|
464
|
-
date: e.timestamp.date,
|
|
465
|
-
format: e.timestamp.format,
|
|
466
|
-
"disable-typography": ""
|
|
467
|
-
}, null, 8, ["date", "format"]),
|
|
468
|
-
w(" " + y(e.timestamp.value), 1)
|
|
469
|
-
]),
|
|
470
|
-
_: 1
|
|
471
|
-
})) : c("", !0),
|
|
472
|
-
!e.isNoteType && e.additionalTimestamp ? (i(), T(a, {
|
|
473
|
-
key: 3,
|
|
474
|
-
class: "b-timeline-item__timestamp",
|
|
475
|
-
el: "div",
|
|
476
|
-
variant: "caption"
|
|
477
|
-
}, {
|
|
478
|
-
default: h(() => [
|
|
479
|
-
S(n, {
|
|
480
|
-
date: e.additionalTimestamp.date,
|
|
481
|
-
format: e.additionalTimestamp.format,
|
|
482
|
-
"disable-typography": ""
|
|
483
|
-
}, null, 8, ["date", "format"]),
|
|
484
|
-
w(" " + y(e.additionalTimestamp.value), 1)
|
|
485
|
-
]),
|
|
486
|
-
_: 1
|
|
487
|
-
})) : c("", !0),
|
|
488
|
-
!e.isNoteType && (e.description || e.hasSlot("default")) ? (i(), T(a, {
|
|
489
|
-
key: 4,
|
|
490
|
-
el: "div",
|
|
491
|
-
variant: "body",
|
|
492
|
-
class: "b-timeline-item__description"
|
|
493
|
-
}, {
|
|
494
|
-
default: h(() => [
|
|
495
|
-
H(e.$slots, "default", {}, () => [
|
|
496
|
-
w(y(e.description), 1)
|
|
497
|
-
], !0)
|
|
498
|
-
]),
|
|
499
|
-
_: 3
|
|
500
|
-
})) : c("", !0),
|
|
501
|
-
!e.isNoteType && e.dataList ? (i(), v("div", Ge, [
|
|
502
|
-
S(_, null, {
|
|
503
|
-
default: h(() => [
|
|
504
|
-
(i(!0), v(Y, null, pe(e.dataList, (t) => (i(), T(u, {
|
|
505
|
-
key: e.generateUid(t.label),
|
|
506
|
-
label: t.label
|
|
507
|
-
}, {
|
|
508
|
-
default: h(() => [
|
|
509
|
-
S(a, { variant: "caption" }, {
|
|
510
|
-
default: h(() => [
|
|
511
|
-
w(y(t.value), 1)
|
|
512
|
-
]),
|
|
513
|
-
_: 2
|
|
514
|
-
}, 1024)
|
|
515
|
-
]),
|
|
516
|
-
_: 2
|
|
517
|
-
}, 1032, ["label"]))), 128))
|
|
518
|
-
]),
|
|
519
|
-
_: 1
|
|
520
|
-
})
|
|
521
|
-
])) : c("", !0),
|
|
522
|
-
!e.isNoteType && e.tag ? (i(), T(C, V({ key: 6 }, e.tag, { class: "b-timeline-item__tag" }), null, 16)) : c("", !0)
|
|
523
|
-
])
|
|
524
|
-
]),
|
|
525
|
-
e.displayShowMoreButton ? (i(), v("div", Qe, [
|
|
526
|
-
o[2] || (o[2] = g("div", {
|
|
527
|
-
class: "b-timeline-item__marker",
|
|
528
|
-
"aria-hidden": "true"
|
|
529
|
-
}, [
|
|
530
|
-
g("div", { class: "b-timeline-item__separator" })
|
|
531
|
-
], -1)),
|
|
532
|
-
g("div", Xe, [
|
|
533
|
-
S(b, {
|
|
534
|
-
class: "b-timeline__show-more",
|
|
535
|
-
variant: "tertiary",
|
|
536
|
-
onClick: o[0] || (o[0] = (t) => e.showAll = !e.showAll)
|
|
537
|
-
}, {
|
|
538
|
-
default: h(() => [
|
|
539
|
-
e.showAll ? (i(), v(Y, { key: 1 }, [
|
|
540
|
-
w(y(e.t("showLess")), 1)
|
|
541
|
-
], 64)) : (i(), v(Y, { key: 0 }, [
|
|
542
|
-
w(y(e.t("showMore", { items: e.hiddenItems })), 1)
|
|
543
|
-
], 64))
|
|
544
|
-
]),
|
|
545
|
-
_: 1
|
|
546
|
-
})
|
|
547
|
-
])
|
|
548
|
-
])) : c("", !0)
|
|
549
|
-
], 2)) : c("", !0);
|
|
550
|
-
}
|
|
551
|
-
const ht = /* @__PURE__ */ q(He, [["render", xe], ["__scopeId", "data-v-b2c79a1c"]]);
|
|
552
|
-
export {
|
|
553
|
-
A as B,
|
|
554
|
-
ht as a,
|
|
555
|
-
Ae as b,
|
|
556
|
-
j as c,
|
|
557
|
-
se as d,
|
|
558
|
-
bt as t
|
|
559
|
-
};
|
|
560
|
-
//# sourceMappingURL=timeline-item.BhQp0ICP.js.map
|