@adyen/bento-vue2 1.88.1 → 1.89.2
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/index.d.ts +266 -70
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.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-actions.css +1 -1
- package/dist/assets/card.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/inspector.css +1 -1
- package/dist/assets/list-item.css +1 -0
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/sidepanel.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.Cv6kG2N3.js → accordion-item.BZDSJamR.js} +4 -13
- package/dist/chunks/{accordion-item.Cv6kG2N3.js.map → accordion-item.BZDSJamR.js.map} +1 -1
- package/dist/chunks/{action-bar.rHHYcsRV.js → action-bar.CYGUYI0V.js} +7 -33
- package/dist/chunks/{action-bar.rHHYcsRV.js.map → action-bar.CYGUYI0V.js.map} +1 -1
- package/dist/chunks/{ai-button.BTi18ipD.js → ai-button.CR_ePQRR.js} +2 -2
- package/dist/chunks/{ai-button.BTi18ipD.js.map → ai-button.CR_ePQRR.js.map} +1 -1
- package/dist/chunks/{ai-tag.D5fCswAm.js → ai-tag.Cjf38mjR.js} +5 -14
- package/dist/chunks/{ai-tag.D5fCswAm.js.map → ai-tag.Cjf38mjR.js.map} +1 -1
- package/dist/chunks/{alert.BESCd8iS.js → alert.QVQ6Zjbm.js} +5 -23
- package/dist/chunks/{alert.BESCd8iS.js.map → alert.QVQ6Zjbm.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.Cb22EJiL.js → anchor-scroller.CjJ26PJS.js} +6 -12
- package/dist/chunks/{anchor-scroller.Cb22EJiL.js.map → anchor-scroller.CjJ26PJS.js.map} +1 -1
- package/dist/chunks/{base-modal.CUSvvYnk.js → base-modal.DmWkavtf.js} +8 -17
- package/dist/chunks/{base-modal.CUSvvYnk.js.map → base-modal.DmWkavtf.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.D14S1pym.js → button-actions-with-menu.Bi_HXopk.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.D14S1pym.js.map → button-actions-with-menu.Bi_HXopk.js.map} +1 -1
- package/dist/chunks/{button-actions.DyPS54Yi.js → button-actions.BLk114As.js} +8 -26
- package/dist/chunks/{button-actions.DyPS54Yi.js.map → button-actions.BLk114As.js.map} +1 -1
- package/dist/chunks/{button.Ctj3rkxw.js → button.DxhJNOtr.js} +2 -2
- package/dist/chunks/{button.Ctj3rkxw.js.map → button.DxhJNOtr.js.map} +1 -1
- package/dist/chunks/{calendar.BNg7mSj5.js → calendar.CXKhBF2f.js} +8 -26
- package/dist/chunks/{calendar.BNg7mSj5.js.map → calendar.CXKhBF2f.js.map} +1 -1
- package/dist/chunks/{card.9oGLUzev.js → card.GjhsXOT0.js} +5 -14
- package/dist/chunks/{card.9oGLUzev.js.map → card.GjhsXOT0.js.map} +1 -1
- package/dist/chunks/{checkbox-group.ntiYZadA.js → checkbox-group.B2BjU3ZN.js} +4 -4
- package/dist/chunks/{checkbox-group.ntiYZadA.js.map → checkbox-group.B2BjU3ZN.js.map} +1 -1
- package/dist/chunks/{checkbox.DfB3ZeA-.js → checkbox.CIv8WgGp.js} +21 -30
- package/dist/chunks/{checkbox.DfB3ZeA-.js.map → checkbox.CIv8WgGp.js.map} +1 -1
- package/dist/chunks/chevron-right-small.BKeb_dRX.js +24 -0
- package/dist/chunks/chevron-right-small.BKeb_dRX.js.map +1 -0
- package/dist/chunks/{chip.D_XQ8ReC.js → chip.DTpENaGC.js} +4 -10
- package/dist/chunks/{chip.D_XQ8ReC.js.map → chip.DTpENaGC.js.map} +1 -1
- package/dist/chunks/{code-snippet.D5ET8Yc1.js → code-snippet.YIm2oO_o.js} +8 -23
- package/dist/chunks/{code-snippet.D5ET8Yc1.js.map → code-snippet.YIm2oO_o.js.map} +1 -1
- package/dist/chunks/{controls-group.BCKGkHVl.js → controls-group.CqotnNEF.js} +2 -2
- package/dist/chunks/{controls-group.BCKGkHVl.js.map → controls-group.CqotnNEF.js.map} +1 -1
- package/dist/chunks/{copy.DSNuoLZf.js → copy.BVGQcf22.js} +5 -17
- package/dist/chunks/{copy.DSNuoLZf.js.map → copy.BVGQcf22.js.map} +1 -1
- package/dist/chunks/{country.BywHth0L.js → country.D20NCLLG.js} +3 -3
- package/dist/chunks/{country.BywHth0L.js.map → country.D20NCLLG.js.map} +1 -1
- package/dist/chunks/country.types.DxKjyd0S.js +20 -0
- package/dist/chunks/{country.types.BBQbWkTY.js.map → country.types.DxKjyd0S.js.map} +1 -1
- package/dist/chunks/{dashboard-section.DIesvnBa.js → dashboard-section.BubZyu8i.js} +3 -3
- package/dist/chunks/{dashboard-section.DIesvnBa.js.map → dashboard-section.BubZyu8i.js.map} +1 -1
- package/dist/chunks/{dashed-underline.DauOBhSD.js → dashed-underline.pjYTS0m1.js} +2 -2
- package/dist/chunks/{dashed-underline.DauOBhSD.js.map → dashed-underline.pjYTS0m1.js.map} +1 -1
- package/dist/chunks/{data-grid-template.T-6_zLby.js → data-grid-template.D8RhngPj.js} +4 -4
- package/dist/chunks/{data-grid-template.T-6_zLby.js.map → data-grid-template.D8RhngPj.js.map} +1 -1
- package/dist/chunks/{data-grid.u3f__x8_.js → data-grid.DJG8Ty0A.js} +48 -246
- package/dist/chunks/{data-grid.u3f__x8_.js.map → data-grid.DJG8Ty0A.js.map} +1 -1
- package/dist/chunks/{date-picker.BLOqU7Z9.js → date-picker.CnazYcSX.js} +9 -27
- package/dist/chunks/{date-picker.BLOqU7Z9.js.map → date-picker.CnazYcSX.js.map} +1 -1
- package/dist/chunks/{date-range-picker.B9XHHv9W.js → date-range-picker.Bf9pRNL7.js} +14 -83
- package/dist/chunks/{date-range-picker.B9XHHv9W.js.map → date-range-picker.Bf9pRNL7.js.map} +1 -1
- package/dist/chunks/{dialog-page.4deowaF2.js → dialog-page.oyG153fC.js} +5 -11
- package/dist/chunks/{dialog-page.4deowaF2.js.map → dialog-page.oyG153fC.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.CKnrDQ2z.js → dropdown-default-textbox.Dvzg0StF.js} +4 -10
- package/dist/chunks/{dropdown-default-textbox.CKnrDQ2z.js.map → dropdown-default-textbox.Dvzg0StF.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Dmq73cu9.js → dropdown-tag.BRB-emd1.js} +4 -4
- package/dist/chunks/{dropdown-tag.Dmq73cu9.js.map → dropdown-tag.BRB-emd1.js.map} +1 -1
- package/dist/chunks/{dropdown.Do5c4SST.js → dropdown.Ct7uhPr6.js} +11 -35
- package/dist/chunks/{dropdown.Do5c4SST.js.map → dropdown.Ct7uhPr6.js.map} +1 -1
- package/dist/chunks/{empty-state.IiG1LXa2.js → empty-state.D_Ac-XXH.js} +2 -2
- package/dist/chunks/{empty-state.IiG1LXa2.js.map → empty-state.D_Ac-XXH.js.map} +1 -1
- package/dist/chunks/{error-message.CYfT0Qsi.js → error-message.RxdStT3S.js} +7 -19
- package/dist/chunks/{error-message.CYfT0Qsi.js.map → error-message.RxdStT3S.js.map} +1 -1
- package/dist/chunks/{file-uploader.BSX-zpyP.js → file-uploader.D5Rjsx4k.js} +14 -90
- package/dist/chunks/{file-uploader.BSX-zpyP.js.map → file-uploader.D5Rjsx4k.js.map} +1 -1
- package/dist/chunks/filter-bar.zD_ctViU.js +3030 -0
- package/dist/chunks/{filter-bar.B_RHM9kR.js.map → filter-bar.zD_ctViU.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.BueAsyGk.js → fixed-scroller.MerESbd_.js} +5 -14
- package/dist/chunks/{fixed-scroller.BueAsyGk.js.map → fixed-scroller.MerESbd_.js.map} +1 -1
- package/dist/chunks/{footer-actions.Dq82H1Oc.js → footer-actions.CiPj7hZG.js} +3 -3
- package/dist/chunks/{footer-actions.Dq82H1Oc.js.map → footer-actions.CiPj7hZG.js.map} +1 -1
- package/dist/chunks/{form-layout-title.vF9Bmbre.js → form-layout-title.Bw7VgOO5.js} +3 -5
- package/dist/chunks/{form-layout-title.vF9Bmbre.js.map → form-layout-title.Bw7VgOO5.js.map} +1 -1
- package/dist/chunks/{header-meta.ByA0tkZw.js → header-meta.Dq6TlNPw.js} +8 -20
- package/dist/chunks/{header-meta.ByA0tkZw.js.map → header-meta.Dq6TlNPw.js.map} +1 -1
- package/dist/chunks/{header-with-views.F1h5e4Wn.js → header-with-views.DaEhkSS8.js} +18 -144
- package/dist/chunks/{header-with-views.F1h5e4Wn.js.map → header-with-views.DaEhkSS8.js.map} +1 -1
- package/dist/chunks/{header.BG6XUNEs.js → header.DkC-KKWa.js} +3 -3
- package/dist/chunks/{header.BG6XUNEs.js.map → header.DkC-KKWa.js.map} +1 -1
- package/dist/chunks/{input-field-password.nYiBJRzJ.js → input-field-password.BKT1mYUw.js} +8 -50
- package/dist/chunks/{input-field-password.nYiBJRzJ.js.map → input-field-password.BKT1mYUw.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.BhLVrf55.js → input-field-phone-number.BjRKjQOQ.js} +7 -13
- package/dist/chunks/{input-field-phone-number.BhLVrf55.js.map → input-field-phone-number.BjRKjQOQ.js.map} +1 -1
- package/dist/chunks/{input-field.CFdpdjK5.js → input-field.m1PMwa4C.js} +6 -15
- package/dist/chunks/{input-field.CFdpdjK5.js.map → input-field.m1PMwa4C.js.map} +1 -1
- package/dist/chunks/{inspector.DgI3voTk.js → inspector.Bnm0hl_D.js} +5 -23
- package/dist/chunks/{inspector.DgI3voTk.js.map → inspector.Bnm0hl_D.js.map} +1 -1
- package/dist/chunks/{link.DKimL08z.js → link.MhoM3zQj.js} +4 -10
- package/dist/chunks/{link.DKimL08z.js.map → link.MhoM3zQj.js.map} +1 -1
- package/dist/chunks/list-item.BnzU1LIu.js +76 -0
- package/dist/chunks/list-item.BnzU1LIu.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.DJtDO8TR.js → modal-fullscreen.CXOq6_Cv.js} +8 -14
- package/dist/chunks/{modal-fullscreen.DJtDO8TR.js.map → modal-fullscreen.CXOq6_Cv.js.map} +1 -1
- package/dist/chunks/{modal.BbsIM3qp.js → modal.o0KddMiG.js} +8 -14
- package/dist/chunks/{modal.BbsIM3qp.js.map → modal.o0KddMiG.js.map} +1 -1
- package/dist/chunks/pagination.ZISqB4M_.js +274 -0
- package/dist/chunks/pagination.ZISqB4M_.js.map +1 -0
- package/dist/chunks/{promo-banner.BQreywWK.js → promo-banner.Db2kh2qK.js} +5 -11
- package/dist/chunks/{promo-banner.BQreywWK.js.map → promo-banner.Db2kh2qK.js.map} +1 -1
- package/dist/chunks/{radio-group.DhDhTbZp.js → radio-group.DnMy7brs.js} +3 -3
- package/dist/chunks/{radio-group.DhDhTbZp.js.map → radio-group.DnMy7brs.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.BjjQ0hue.js → rich-text-editor.Cbv1DxXn.js} +1355 -1357
- package/dist/chunks/{rich-text-editor.BjjQ0hue.js.map → rich-text-editor.Cbv1DxXn.js.map} +1 -1
- package/dist/chunks/{search-bar.k0tIoWcb.js → search-bar.DPjYDhja.js} +6 -15
- package/dist/chunks/{search-bar.k0tIoWcb.js.map → search-bar.DPjYDhja.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CV6EiZPL.js → secondary-nav.CwJjkJkj.js} +5 -11
- package/dist/chunks/{secondary-nav.CV6EiZPL.js.map → secondary-nav.CwJjkJkj.js.map} +1 -1
- package/dist/chunks/{selection-card-group.CMTwk1iJ.js → selection-card-group.IPiouuot.js} +10 -10
- package/dist/chunks/{selection-card-group.CMTwk1iJ.js.map → selection-card-group.IPiouuot.js.map} +1 -1
- package/dist/chunks/{sidepanel.CSA5e8AF.js → sidepanel.BGMjjB3F.js} +8 -14
- package/dist/chunks/{sidepanel.CSA5e8AF.js.map → sidepanel.BGMjjB3F.js.map} +1 -1
- package/dist/chunks/status.CKb07vxI.js +34 -0
- package/dist/chunks/status.CKb07vxI.js.map +1 -0
- package/dist/chunks/status.types.Dx8MDhEH.js +5 -0
- package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -0
- package/dist/chunks/{step.BEbWkprZ.js → step.QFER3tSj.js} +2 -4
- package/dist/chunks/{step.BEbWkprZ.js.map → step.QFER3tSj.js.map} +1 -1
- package/dist/chunks/{structured-list-item.C7W3zYcT.js → structured-list-item.BDJKRC_8.js} +6 -12
- package/dist/chunks/{structured-list-item.C7W3zYcT.js.map → structured-list-item.BDJKRC_8.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.nrVagy9s.js → summary-grid.types.CIkArZf5.js} +3 -3
- package/dist/chunks/{summary-grid.types.nrVagy9s.js.map → summary-grid.types.CIkArZf5.js.map} +1 -1
- package/dist/chunks/{tab.BqSNoefU.js → tab.CaXF0dho.js} +2 -2
- package/dist/chunks/{tab.BqSNoefU.js.map → tab.CaXF0dho.js.map} +1 -1
- package/dist/chunks/{textarea.CpVhEv6I.js → textarea.D4X6Ss9q.js} +4 -8
- package/dist/chunks/{textarea.CpVhEv6I.js.map → textarea.D4X6Ss9q.js.map} +1 -1
- package/dist/chunks/{timeline-item.CSDdHboz.js → timeline-item.C8BxWdy1.js} +67 -83
- package/dist/chunks/timeline-item.C8BxWdy1.js.map +1 -0
- package/dist/chunks/{toast.Wuy6VuOT.js → toast.BRI3G7TL.js} +5 -11
- package/dist/chunks/{toast.Wuy6VuOT.js.map → toast.BRI3G7TL.js.map} +1 -1
- package/dist/chunks/{tutorial.3dTfBKtZ.js → tutorial.BzV6bHQJ.js} +5 -23
- package/dist/chunks/{tutorial.3dTfBKtZ.js.map → tutorial.BzV6bHQJ.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DiIjmiF_.js → use-cached-selected-values.DqX2qsMC.js} +13 -46
- package/dist/chunks/{use-cached-selected-values.DiIjmiF_.js.map → use-cached-selected-values.DqX2qsMC.js.map} +1 -1
- package/dist/chunks/{use-country-items.CQnldpqM.js → use-country-items.CI8C7MLU.js} +3 -3
- package/dist/chunks/{use-country-items.CQnldpqM.js.map → use-country-items.CI8C7MLU.js.map} +1 -1
- package/dist/chunks/use-country-phon-code.C6orQNnM.js +291 -0
- package/dist/chunks/use-country-phon-code.C6orQNnM.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.Dcjry8op.js → use-date-input-formatter.BYaTO3vz.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.Dcjry8op.js.map → use-date-input-formatter.BYaTO3vz.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +3 -3
- 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/draggable-handle.js +4 -28
- package/dist/draggable-handle.js.map +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 +210 -206
- package/dist/index.js.map +1 -1
- 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 +10 -10
- package/dist/link.js +1 -1
- package/dist/list.js +6 -0
- package/dist/list.js.map +1 -0
- 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/rich-text-editor.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/status.js +4 -3
- package/dist/status.js.map +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- 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 +152 -2
- package/package.json +10 -10
- package/dist/chunks/country.types.BBQbWkTY.js +0 -773
- package/dist/chunks/filter-bar.B_RHM9kR.js +0 -3229
- package/dist/chunks/pagination.BKIqR6O6.js +0 -357
- package/dist/chunks/pagination.BKIqR6O6.js.map +0 -1
- package/dist/chunks/status.types.BTsaLHQ6.js +0 -36
- package/dist/chunks/status.types.BTsaLHQ6.js.map +0 -1
- package/dist/chunks/timeline-item.CSDdHboz.js.map +0 -1
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js +0 -5621
- package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.CpVhEv6I.js","sources":["../../src/components/textarea/textarea.types.ts","../../src/components/textarea/textarea.vue"],"sourcesContent":["import type { FormField } from '../../types/form-field';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTextareaResizeOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n BOTH = 'both',\n NONE = 'none',\n}\n\nexport enum BentoTextareaStateClass {\n CLEARABLE = 'clearable',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoTextareaEvent {\n BLUR = 'blur',\n CHANGE = 'change',\n CLEAR = 'clear',\n ESCAPE_PRESSED = 'escape-pressed',\n FOCUS = 'focus',\n INPUT = 'input',\n UPDATE_MODEL_VALUE = 'update:model-value',\n KEYDOWN = 'keydown',\n KEYUP = 'keyup',\n}\n\nexport interface BentoTextareaProps extends FormField {\n /**\n * Text that labels the input element\n * @default undefined\n */\n ariaLabel?: string;\n\n /**\n * Text that shows number of characters in textarea\n * @default undefined\n */\n characterLimit?: number;\n\n /**\n * If set to true, shows a button to clear all the text\n * @default false\n */\n clearable?: boolean;\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n * @default null\n */\n height?: string | null;\n\n /**\n * Indicates the possibility of resize the textarea.\n * Accepts the Enum or the string literal version.\n * @default BentoTextareaResizeOption.BOTH\n */\n resizable?: BentoTextareaResizeOption | `${BentoTextareaResizeOption}`;\n\n /**\n * Text displayed as the value of the textarea\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: string;\n\n /**\n * Text displayed as the value of the textarea\n */\n modelValue?: string;\n}\n","<template>\n <div ref=\"textareaComponent\" class=\"b-textarea\" :class=\"conditionalClasses\">\n <div :style=\"{ width: textareaWrapperWidth }\">\n <div class=\"b-textarea__label-box\" :class=\"conditionalClassesLabelBox\">\n <field-label\n v-if=\"label\"\n :for=\"textareaId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <bento-typography\n v-if=\"characterLimit\"\n el=\"span\"\n class=\"b-textarea__label-item\"\n :class=\"conditionalClassesLabelItem\"\n >\n {{ counter }}\n </bento-typography>\n </div>\n <bento-typography el=\"div\" class=\"b-textarea__input-box\" :aria-disabled=\"disabled\">\n <textarea\n :id=\"textareaId\"\n ref=\"textareaElement\"\n :value=\"textareaValue\"\n class=\"b-textarea__input\"\n :class=\"conditionalClassesInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-invalid=\"invalidInput\"\n :readonly=\"isReadOnly\"\n :required=\"required\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :style=\"{ resize: resizable, height: textareaHeight }\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n @keydown.esc=\"onPressEscape\"\n @keydown=\"onKeyDown\"\n @keyup=\"onKeyUp\"\n @mousedown=\"onMouseDown\"\n @mouseup=\"onMouseUp\"\n >\n </textarea>\n\n <div v-if=\"showClearButton\" class=\"b-textarea__clear-button\">\n <bento-button\n variant=\"tertiary\"\n :disabled=\"disabled\"\n @click=\"onClear\"\n @keypress.enter=\"onClear\"\n @keyup.space=\"onClear\"\n >\n <template #iconLeft>\n <cross-circle-fill-small-icon :svg-title=\"t('clearText')\" />\n </template>\n </bento-button>\n </div>\n </bento-typography>\n\n <error-message v-if=\"isOverCharacterLimit\" :error-message=\"counterErrorText\" />\n\n <error-message v-if=\"errorMessage\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"description\" class=\"b-textarea__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, onUnmounted, ref, toRef, toRefs, useAttrs, watch } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n\n // Utils\n import { generateUid } from '@/core/utils/ts';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n // Composables\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n // Constants\n import { BBorderWidthAttention } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n // Types\n import { BentoTextareaEvent, type BentoTextareaProps, BentoTextareaStateClass } from './textarea.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n\n const props = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: '' },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: undefined },\n characterLimit: { default: undefined },\n clearable: { type: Boolean, default: false },\n height: { default: null },\n resizable: { default: 'both' },\n value: { default: '' },\n modelValue: { default: '' }\n});\n\n const emit = defineEmits([]);\n\n const { height } = toRefs(props);\n\n const textareaId = generateUid('textarea');\n const textareaElement = ref<HTMLTextAreaElement>(null);\n const textareaComponent = ref<HTMLDivElement>(null);\n const textareaValue = ref(props.modelValue || props.value);\n const defaultTextareaHeight = 44;\n const textareaHeight = ref(props.height || `${defaultTextareaHeight}px`);\n const userSetHeight = ref<number>(0);\n const textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n const isUserResizing = ref(false);\n let textareaElementObserver: ResizeObserver | null = null;\n let textareaComponentObserver: ResizeObserver | null = null;\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const { emitValue } = useFormFieldEmits<string>(emit);\n\n const counter = computed(() => `${n(textareaValue?.value?.length ?? 0)} / ${n(props.characterLimit)}`);\n const isDynamicHeight = computed(() => !height.value);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n /**\n * Calculates and sets the height of the textarea.\n * The height is determined by the maximum of the following values:\n *\n * 1. The content's scroll height (with a minimum of `defaultTextareaHeight`) + the border width.\n * 2. The height set by the user manually resizing the textarea (`userSetHeight`).\n * 3. The default minimum height (`defaultTextareaHeight`).\n *\n * This ensures the textarea grows with content, shrinks when content is removed,\n * but never goes below the manually set height or the default height.\n */\n const calculateHeight = () => {\n if (textareaElement.value) {\n const newHeight = Math.max(\n textareaElement.value.scrollHeight <= defaultTextareaHeight\n ? defaultTextareaHeight\n : textareaElement.value.scrollHeight + TEXTAREA_BORDER_WIDTH * 2,\n userSetHeight.value,\n defaultTextareaHeight\n );\n textareaHeight.value = `${newHeight}px`;\n }\n };\n\n watch(height, () => {\n if (isDynamicHeight.value) {\n calculateHeight();\n } else {\n textareaHeight.value = height.value;\n }\n });\n\n watch(\n () => [props.value, props.modelValue],\n () => {\n textareaValue.value = props.modelValue || props.value;\n },\n { immediate: true }\n );\n\n watch(\n () => textareaValue.value,\n async () => {\n if (isDynamicHeight.value) {\n // Hack to make the textarea calculate its height properly\n // Set the textarea back to the original value before calculating the height\n textareaHeight.value = `${defaultTextareaHeight}px`;\n if (!textareaValue.value) {\n return;\n }\n\n await nextTick();\n calculateHeight();\n }\n },\n { immediate: true }\n );\n\n const invalidInput = computed(() => !!props.errorMessage || isOverCharacterLimit.value);\n\n const conditionalClasses = computed(() => ({\n [`b-textarea--${BentoTextareaStateClass.DISABLED}`]: props.disabled,\n }));\n\n const conditionalClassesInput = computed(() => ({\n [`b-textarea__input--${BentoTextareaStateClass.CLEARABLE}`]: props.clearable,\n [`b-textarea__input--${BentoTextareaStateClass.READONLY}`]: isReadOnly.value,\n [`b-textarea__input--${BentoTextareaStateClass.ERROR}`]: invalidInput.value,\n [`b-textarea__input--dynamic-height`]: isDynamicHeight.value,\n }));\n\n const conditionalClassesLabelBox = computed(() => ({\n [`b-textarea__label-box--no-label`]: !props.label,\n }));\n\n const conditionalClassesLabelItem = computed(() => ({\n [`b-textarea__label-item--${BentoTextareaStateClass.ERROR}`]: isOverCharacterLimit.value,\n }));\n\n const counterErrorText = computed(() => t('yourTextCanBenAtMost', { characterLimit: props.characterLimit }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = 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: label,\n });\n\n const showClearButton = computed(\n () => props.clearable && textareaValue.value && !props.disabled && !isReadOnly.value\n );\n\n const onClear = () => {\n textareaValue.value = '';\n emit(BentoTextareaEvent.CLEAR);\n emitValue('');\n };\n\n const onInput = (event: InputEvent) => {\n event.stopImmediatePropagation();\n\n if (!props.disabled && !isReadOnly.value) {\n textareaValue.value = (event.target as HTMLInputElement).value;\n /**\n * Triggered when input value is changed\n *\n * @event input\n * @property {String} inputValue - the updated textarea value\n */\n emitValue(textareaValue.value);\n }\n };\n\n const onBlur = () => {\n textareaElement.value.scrollTop = 0;\n emit(BentoTextareaEvent.BLUR);\n };\n\n const onFocus = () => {\n textareaElement.value.focus();\n emit(BentoTextareaEvent.FOCUS);\n };\n\n const onChange = () => {\n emit(BentoTextareaEvent.CHANGE);\n };\n\n const onPressEscape = () => {\n emit(BentoTextareaEvent.ESCAPE_PRESSED);\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYDOWN, event);\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYUP, event);\n };\n\n const onMouseDown = () => {\n isUserResizing.value = true;\n };\n\n const onMouseUp = () => {\n isUserResizing.value = false;\n };\n\n /**\n * Updates the textarea width depending if the container or the user update its size.\n * @param isTextareaElement - sets to true if the element being observed is the textarea HTML element.\n */\n const resizeTextareaWrapper = (isTextareaElement = false) => {\n // Width assigned by the browser whenever the textarea is manually resized. String of the format `<value>px`.\n const textareaStyleWidth = textareaElement.value.style.width;\n\n // Make sure the tracked textareaHeight is always in sync with the height size in case we manually resize the textarea\n if (textareaElement.value.style.height) {\n if (isUserResizing.value) {\n userSetHeight.value = parseInt(textareaElement.value.style.height, 10);\n }\n textareaHeight.value = textareaElement.value.style.height;\n }\n\n // If the textarea element observer is being triggered, but there's no textareaStyleWidth, we want to ignore it, as no manual resize as happened yet\n // The component wrapper will handle the resizing logic instead\n if (isTextareaElement && !textareaStyleWidth) {\n return;\n }\n\n // Width of the whole bento-textarea component\n const textareaComponentWidth = textareaComponent?.value?.offsetWidth;\n\n // If there is no textareaStyleWidth or the textareaStyleWidth is larger than the component container, the wrapper should be 100% of the container\n if (!textareaStyleWidth || parseInt(textareaStyleWidth, 10) > textareaComponentWidth) {\n textareaWrapperWidth.value = '100%';\n } else {\n // Else the wrapper should always be as wide as the textarea element itself\n textareaWrapperWidth.value = textareaStyleWidth;\n }\n };\n\n const focus = () => {\n textareaElement.value.focus();\n };\n\n defineExpose({\n focus,\n });\n\n onMounted(() => {\n textareaElementObserver = observeSizeOfElement(textareaElement.value, () => {\n resizeTextareaWrapper(true);\n });\n\n textareaComponentObserver = observeSizeOfElement(textareaComponent.value, () => {\n resizeTextareaWrapper();\n });\n\n if (isDynamicHeight.value) {\n calculateHeight();\n }\n\n if (props.value) {\n deprecate(\n 'BentoTextarea \"value\" property',\n `The use of \"value\" prop in \"BentoTextarea\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n });\n\n onUnmounted(() => {\n textareaElementObserver?.disconnect();\n textareaComponentObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n const TEXTAREA_BORDER_WIDTH = parseFloat(BBorderWidthAttention);\n\n export default {\n i18n: { messages },\n name: 'bento-textarea',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["BentoTextareaStateClass","BentoTextareaStateClass2","BentoTextareaEvent","BentoTextareaEvent2","TEXTAREA_BORDER_WIDTH","BBorderWidthAttention","__default__","messages","attrs","useAttrs","height","toRefs","props","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","userSetHeight","textareaWrapperWidth","isUserResizing","textareaElementObserver","textareaComponentObserver","t","n","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","counter","computed","_a","isDynamicHeight","isOverCharacterLimit","calculateHeight","newHeight","watch","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","onInput","event","onBlur","onFocus","onChange","onPressEscape","onKeyDown","onKeyUp","onMouseDown","onMouseUp","resizeTextareaWrapper","isTextareaElement","textareaStyleWidth","textareaComponentWidth","focus","expose","onMounted","observeSizeOfElement","deprecate","onUnmounted"],"mappings":";;;;;;;;;;;;;;AAYO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,qBAAA,sBACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SATQA,IAAAD,KAAA,CAAA,CAAA;;;;;;;GCqWRE,IAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAAA,EACM,MAAA;AAAA,EACX,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;iBAtRAC,IAAAC,GAAA,GAuBA,EAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,GAAA,UAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAAJ,EAAA,cAAAA,EAAA,KAAA,GACAO,IAAA,IACAC,IAAAJ,EAAAJ,EAAA,UAAA,GAAAO,CAAA,IAAA,GACAE,IAAAL,EAAA,CAAA,GACAM,IAAA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JE,IAAA,MAAA;AACI,MAAAxD,EAAA,MAAA,MAAA;AAAA,IAA4B;AAGhC,WAAAyD,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA,GAGJE,GAAA,MAAA;AACI,MAAAjD,IAAAkD,EAAA3D,EAAA,OAAA,MAAA;AACI,QAAAoD,EAAA,EAAA;AAAA,MAA0B,CAAA,GAG9B1C,IAAAiD,EAAAzD,EAAA,OAAA,MAAA;AACI,QAAAkD,EAAA;AAAA,MAAsB,CAAA,GAG1B7B,EAAA,SACIE,EAAA,GAGJ5B,EAAA,SACI+D;AAAA,QAAA;AAAA,QACI;AAAA;AAAA,QACA;AAAA,MAEA;AAAA,IAER,CAAA,GAGJC,GAAA,MAAA;AACI,MAAApD,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"textarea.D4X6Ss9q.js","sources":["../../src/components/textarea/textarea.types.ts","../../src/components/textarea/textarea.vue"],"sourcesContent":["import type { FormField } from '../../types/form-field';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoTextareaResizeOption {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n BOTH = 'both',\n NONE = 'none',\n}\n\nexport enum BentoTextareaStateClass {\n CLEARABLE = 'clearable',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoTextareaEvent {\n BLUR = 'blur',\n CHANGE = 'change',\n CLEAR = 'clear',\n ESCAPE_PRESSED = 'escape-pressed',\n FOCUS = 'focus',\n INPUT = 'input',\n UPDATE_MODEL_VALUE = 'update:model-value',\n KEYDOWN = 'keydown',\n KEYUP = 'keyup',\n}\n\nexport interface BentoTextareaProps extends FormField {\n /**\n * Text that labels the input element\n * @default undefined\n */\n ariaLabel?: string;\n\n /**\n * Text that shows number of characters in textarea\n * @default undefined\n */\n characterLimit?: number;\n\n /**\n * If set to true, shows a button to clear all the text\n * @default false\n */\n clearable?: boolean;\n\n /**\n * Sets the height of the textarea, e.g 200px OR 20vh\n * @default null\n */\n height?: string | null;\n\n /**\n * Indicates the possibility of resize the textarea.\n * Accepts the Enum or the string literal version.\n * @default BentoTextareaResizeOption.BOTH\n */\n resizable?: BentoTextareaResizeOption | `${BentoTextareaResizeOption}`;\n\n /**\n * Text displayed as the value of the textarea\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: string;\n\n /**\n * Text displayed as the value of the textarea\n */\n modelValue?: string;\n}\n","<template>\n <div ref=\"textareaComponent\" class=\"b-textarea\" :class=\"conditionalClasses\">\n <div :style=\"{ width: textareaWrapperWidth }\">\n <div class=\"b-textarea__label-box\" :class=\"conditionalClassesLabelBox\">\n <field-label\n v-if=\"label\"\n :for=\"textareaId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n <bento-typography\n v-if=\"characterLimit\"\n el=\"span\"\n class=\"b-textarea__label-item\"\n :class=\"conditionalClassesLabelItem\"\n >\n {{ counter }}\n </bento-typography>\n </div>\n <bento-typography el=\"div\" class=\"b-textarea__input-box\" :aria-disabled=\"disabled\">\n <textarea\n :id=\"textareaId\"\n ref=\"textareaElement\"\n :value=\"textareaValue\"\n class=\"b-textarea__input\"\n :class=\"conditionalClassesInput\"\n :aria-label=\"computedAriaLabel\"\n :aria-invalid=\"invalidInput\"\n :readonly=\"isReadOnly\"\n :required=\"required\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :style=\"{ resize: resizable, height: textareaHeight }\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n @keydown.esc=\"onPressEscape\"\n @keydown=\"onKeyDown\"\n @keyup=\"onKeyUp\"\n @mousedown=\"onMouseDown\"\n @mouseup=\"onMouseUp\"\n >\n </textarea>\n\n <div v-if=\"showClearButton\" class=\"b-textarea__clear-button\">\n <bento-button\n variant=\"tertiary\"\n :disabled=\"disabled\"\n @click=\"onClear\"\n @keypress.enter=\"onClear\"\n @keyup.space=\"onClear\"\n >\n <template #iconLeft>\n <cross-circle-fill-small-icon :svg-title=\"t('clearText')\" />\n </template>\n </bento-button>\n </div>\n </bento-typography>\n\n <error-message v-if=\"isOverCharacterLimit\" :error-message=\"counterErrorText\" />\n\n <error-message v-if=\"errorMessage\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"description\" class=\"b-textarea__description\" el=\"span\">\n {{ description }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, onUnmounted, ref, toRef, toRefs, useAttrs, watch } from 'vue';\n\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n import CrossCircleFillSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-circle-fill-small';\n\n // Utils\n import { generateUid } from '@/core/utils/ts';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n // Composables\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n // Constants\n import { BBorderWidthAttention } from '@adyen/bento-design-tokens/dist/js/bento/es6';\n\n // Types\n import { BentoTextareaEvent, type BentoTextareaProps, BentoTextareaStateClass } from './textarea.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n\n const props = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: '' },\n label: { default: '' },\n optional: { type: Boolean, default: false },\n placeholder: { default: '' },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n tooltipText: { default: null },\n ariaLabel: { default: undefined },\n characterLimit: { default: undefined },\n clearable: { type: Boolean, default: false },\n height: { default: null },\n resizable: { default: 'both' },\n value: { default: '' },\n modelValue: { default: '' }\n});\n\n const emit = defineEmits([]);\n\n const { height } = toRefs(props);\n\n const textareaId = generateUid('textarea');\n const textareaElement = ref<HTMLTextAreaElement>(null);\n const textareaComponent = ref<HTMLDivElement>(null);\n const textareaValue = ref(props.modelValue || props.value);\n const defaultTextareaHeight = 44;\n const textareaHeight = ref(props.height || `${defaultTextareaHeight}px`);\n const userSetHeight = ref<number>(0);\n const textareaWrapperWidth = ref('100%'); // The width set to the wrapper of the label, textarea and description\n const isUserResizing = ref(false);\n let textareaElementObserver: ResizeObserver | null = null;\n let textareaComponentObserver: ResizeObserver | null = null;\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const { emitValue } = useFormFieldEmits<string>(emit);\n\n const counter = computed(() => `${n(textareaValue?.value?.length ?? 0)} / ${n(props.characterLimit)}`);\n const isDynamicHeight = computed(() => !height.value);\n const isOverCharacterLimit = computed(\n () => props.characterLimit && textareaValue.value.length > props.characterLimit\n );\n\n /**\n * Calculates and sets the height of the textarea.\n * The height is determined by the maximum of the following values:\n *\n * 1. The content's scroll height (with a minimum of `defaultTextareaHeight`) + the border width.\n * 2. The height set by the user manually resizing the textarea (`userSetHeight`).\n * 3. The default minimum height (`defaultTextareaHeight`).\n *\n * This ensures the textarea grows with content, shrinks when content is removed,\n * but never goes below the manually set height or the default height.\n */\n const calculateHeight = () => {\n if (textareaElement.value) {\n const newHeight = Math.max(\n textareaElement.value.scrollHeight <= defaultTextareaHeight\n ? defaultTextareaHeight\n : textareaElement.value.scrollHeight + TEXTAREA_BORDER_WIDTH * 2,\n userSetHeight.value,\n defaultTextareaHeight\n );\n textareaHeight.value = `${newHeight}px`;\n }\n };\n\n watch(height, () => {\n if (isDynamicHeight.value) {\n calculateHeight();\n } else {\n textareaHeight.value = height.value;\n }\n });\n\n watch(\n () => [props.value, props.modelValue],\n () => {\n textareaValue.value = props.modelValue || props.value;\n },\n { immediate: true }\n );\n\n watch(\n () => textareaValue.value,\n async () => {\n if (isDynamicHeight.value) {\n // Hack to make the textarea calculate its height properly\n // Set the textarea back to the original value before calculating the height\n textareaHeight.value = `${defaultTextareaHeight}px`;\n if (!textareaValue.value) {\n return;\n }\n\n await nextTick();\n calculateHeight();\n }\n },\n { immediate: true }\n );\n\n const invalidInput = computed(() => !!props.errorMessage || isOverCharacterLimit.value);\n\n const conditionalClasses = computed(() => ({\n [`b-textarea--${BentoTextareaStateClass.DISABLED}`]: props.disabled,\n }));\n\n const conditionalClassesInput = computed(() => ({\n [`b-textarea__input--${BentoTextareaStateClass.CLEARABLE}`]: props.clearable,\n [`b-textarea__input--${BentoTextareaStateClass.READONLY}`]: isReadOnly.value,\n [`b-textarea__input--${BentoTextareaStateClass.ERROR}`]: invalidInput.value,\n [`b-textarea__input--dynamic-height`]: isDynamicHeight.value,\n }));\n\n const conditionalClassesLabelBox = computed(() => ({\n [`b-textarea__label-box--no-label`]: !props.label,\n }));\n\n const conditionalClassesLabelItem = computed(() => ({\n [`b-textarea__label-item--${BentoTextareaStateClass.ERROR}`]: isOverCharacterLimit.value,\n }));\n\n const counterErrorText = computed(() => t('yourTextCanBenAtMost', { characterLimit: props.characterLimit }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, label } = 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: label,\n });\n\n const showClearButton = computed(\n () => props.clearable && textareaValue.value && !props.disabled && !isReadOnly.value\n );\n\n const onClear = () => {\n textareaValue.value = '';\n emit(BentoTextareaEvent.CLEAR);\n emitValue('');\n };\n\n const onInput = (event: InputEvent) => {\n event.stopImmediatePropagation();\n\n if (!props.disabled && !isReadOnly.value) {\n textareaValue.value = (event.target as HTMLInputElement).value;\n /**\n * Triggered when input value is changed\n *\n * @event input\n * @property {String} inputValue - the updated textarea value\n */\n emitValue(textareaValue.value);\n }\n };\n\n const onBlur = () => {\n textareaElement.value.scrollTop = 0;\n emit(BentoTextareaEvent.BLUR);\n };\n\n const onFocus = () => {\n textareaElement.value.focus();\n emit(BentoTextareaEvent.FOCUS);\n };\n\n const onChange = () => {\n emit(BentoTextareaEvent.CHANGE);\n };\n\n const onPressEscape = () => {\n emit(BentoTextareaEvent.ESCAPE_PRESSED);\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYDOWN, event);\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.stopPropagation();\n emit(BentoTextareaEvent.KEYUP, event);\n };\n\n const onMouseDown = () => {\n isUserResizing.value = true;\n };\n\n const onMouseUp = () => {\n isUserResizing.value = false;\n };\n\n /**\n * Updates the textarea width depending if the container or the user update its size.\n * @param isTextareaElement - sets to true if the element being observed is the textarea HTML element.\n */\n const resizeTextareaWrapper = (isTextareaElement = false) => {\n // Width assigned by the browser whenever the textarea is manually resized. String of the format `<value>px`.\n const textareaStyleWidth = textareaElement.value.style.width;\n\n // Make sure the tracked textareaHeight is always in sync with the height size in case we manually resize the textarea\n if (textareaElement.value.style.height) {\n if (isUserResizing.value) {\n userSetHeight.value = parseInt(textareaElement.value.style.height, 10);\n }\n textareaHeight.value = textareaElement.value.style.height;\n }\n\n // If the textarea element observer is being triggered, but there's no textareaStyleWidth, we want to ignore it, as no manual resize as happened yet\n // The component wrapper will handle the resizing logic instead\n if (isTextareaElement && !textareaStyleWidth) {\n return;\n }\n\n // Width of the whole bento-textarea component\n const textareaComponentWidth = textareaComponent?.value?.offsetWidth;\n\n // If there is no textareaStyleWidth or the textareaStyleWidth is larger than the component container, the wrapper should be 100% of the container\n if (!textareaStyleWidth || parseInt(textareaStyleWidth, 10) > textareaComponentWidth) {\n textareaWrapperWidth.value = '100%';\n } else {\n // Else the wrapper should always be as wide as the textarea element itself\n textareaWrapperWidth.value = textareaStyleWidth;\n }\n };\n\n const focus = () => {\n textareaElement.value.focus();\n };\n\n defineExpose({\n focus,\n });\n\n onMounted(() => {\n textareaElementObserver = observeSizeOfElement(textareaElement.value, () => {\n resizeTextareaWrapper(true);\n });\n\n textareaComponentObserver = observeSizeOfElement(textareaComponent.value, () => {\n resizeTextareaWrapper();\n });\n\n if (isDynamicHeight.value) {\n calculateHeight();\n }\n\n if (props.value) {\n deprecate(\n 'BentoTextarea \"value\" property',\n `The use of \"value\" prop in \"BentoTextarea\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n });\n\n onUnmounted(() => {\n textareaElementObserver?.disconnect();\n textareaComponentObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n const TEXTAREA_BORDER_WIDTH = parseFloat(BBorderWidthAttention);\n\n export default {\n i18n: { messages },\n name: 'bento-textarea',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./textarea.scss\" />\n"],"names":["BentoTextareaStateClass","BentoTextareaStateClass2","BentoTextareaEvent","BentoTextareaEvent2","TEXTAREA_BORDER_WIDTH","BBorderWidthAttention","__default__","messages","attrs","useAttrs","height","toRefs","props","textareaId","generateUid","textareaElement","ref","textareaComponent","textareaValue","defaultTextareaHeight","textareaHeight","userSetHeight","textareaWrapperWidth","isUserResizing","textareaElementObserver","textareaComponentObserver","t","n","useI18n","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","emit","counter","computed","_a","isDynamicHeight","isOverCharacterLimit","calculateHeight","newHeight","watch","nextTick","invalidInput","conditionalClasses","conditionalClassesInput","conditionalClassesLabelBox","conditionalClassesLabelItem","counterErrorText","ariaLabelAttribute","ariaLabel","label","computedAriaLabel","useAriaLabel","showClearButton","onClear","onInput","event","onBlur","onFocus","onChange","onPressEscape","onKeyDown","onKeyUp","onMouseDown","onMouseUp","resizeTextareaWrapper","isTextareaElement","textareaStyleWidth","textareaComponentWidth","focus","expose","onMounted","observeSizeOfElement","deprecate","onUnmounted"],"mappings":";;;;;;;;;;;;;;AAYO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,OAAA,QACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,qBAAA,sBACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SATQA,IAAAD,KAAA,CAAA,CAAA;;;GCqWRE,IAAA,WAAAC,EAAA,GAEAC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAAA,EACM,MAAA;AAAA,EACX,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;iBAtRAC,IAAAC,GAAA,GAuBA,EAAA,QAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,GAAA,UAAA,GACAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAAJ,EAAA,cAAAA,EAAA,KAAA,GACAO,IAAA,IACAC,IAAAJ,EAAAJ,EAAA,UAAA,GAAAO,CAAA,IAAA,GACAE,IAAAL,EAAA,CAAA,GACAM,IAAAN,EAAA,MAAA,GACAO,IAAAP,EAAA,EAAA;AACA,QAAAQ,IAAA,MACAC,IAAA;AAEA,UAAA,EAAA,GAAAC,GAAA,GAAAC,EAAA,IAAAC,GAAA,GAEA,EAAA,YAAAC,EAAA,IAAAC,GAAAC,GAAAnB,GAAA,UAAA,CAAA,GAEA,EAAA,WAAAoB,EAAA,IAAAC,GAAAC,CAAA,GAEAC,IAAAC,EAAA,MAAA;;AAAA,gBAAAT,IAAAU,IAAAnB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,MAAsB,CAAA,GAG1B7B,EAAA,SACIE,EAAA,GAGJ5B,EAAA,SACI+D;AAAA,QAAA;AAAA,QACI;AAAA;AAAA,QACA;AAAA,MAEA;AAAA,IAER,CAAA,GAGJC,GAAA,MAAA;AACI,MAAApD,KAAA,QAAAA,EAAA,cACAC,KAAA,QAAAA,EAAA;AAAA,IAAsC,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { defineComponent as L, computed as o, ref as N, toRefs as G, watch as Q, provide as x, nextTick as X, useSlots as ee, inject as k, onUnmounted as te } from "vue";
|
|
2
|
-
import { B as H } from "./button.
|
|
3
|
-
import { B as se } from "./textarea.
|
|
2
|
+
import { B as H } from "./button.DxhJNOtr.js";
|
|
3
|
+
import { B as se } from "./textarea.D4X6Ss9q.js";
|
|
4
4
|
import { u as J } from "./index.B6WW_F-J.js";
|
|
5
|
-
import { B as ae } from "./button-actions.
|
|
5
|
+
import { B as ae } from "./button-actions.BLk114As.js";
|
|
6
6
|
import { n as R } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
|
-
import { B as ie } from "./
|
|
8
|
-
import { B as ne } from "./
|
|
9
|
-
import { B as oe } from "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { B as ie } from "./dashed-underline.pjYTS0m1.js";
|
|
8
|
+
import { B as ne } from "./date.B0m0sFP6.js";
|
|
9
|
+
import { B as oe } from "./link.MhoM3zQj.js";
|
|
10
|
+
import { B as le } from "./tag.CocLKztJ.js";
|
|
11
|
+
import { d as re, B as ce } from "./typography.C8lPlsbD.js";
|
|
12
|
+
import { S as me, a as de, B as ue } from "./structured-list-item.BDJKRC_8.js";
|
|
12
13
|
/* empty css */
|
|
13
|
-
import { g as
|
|
14
|
-
import { u as
|
|
15
|
-
import { j as
|
|
16
|
-
import { g as
|
|
14
|
+
import { g as _e } from "./generate-uid.NJ8tVoha.js";
|
|
15
|
+
import { u as fe } from "./use-has-slot.C9lQZ6nz.js";
|
|
16
|
+
import { j as ve, d as pe, n as he, k as $, o as U, p as F, q as Y, g as ge, r as j } from "./en-US.YeSsZuOc.js";
|
|
17
|
+
import { g as be } from "./getRoundingMethod.C3eaeGLR.js";
|
|
17
18
|
import "../assets/timeline-item.css";
|
|
18
19
|
function P(a, e, t) {
|
|
19
|
-
const s =
|
|
20
|
+
const s = ge(), r = (t == null ? void 0 : t.locale) ?? s.locale ?? ve, p = pe(a, e);
|
|
20
21
|
if (isNaN(p))
|
|
21
22
|
throw new RangeError("Invalid time value");
|
|
22
23
|
const c = Object.assign({}, t, {
|
|
23
24
|
addSuffix: t == null ? void 0 : t.addSuffix,
|
|
24
25
|
comparison: p
|
|
25
|
-
}), [y, b] =
|
|
26
|
+
}), [y, b] = he(
|
|
26
27
|
t == null ? void 0 : t.in,
|
|
27
28
|
...p > 0 ? [e, a] : [a, e]
|
|
28
|
-
), d =
|
|
29
|
+
), d = be((t == null ? void 0 : t.roundingMethod) ?? "round"), f = b.getTime() - y.getTime(), m = f / j, T = $(b) - $(y), i = (f - T) / j, h = t == null ? void 0 : t.unit;
|
|
29
30
|
let l;
|
|
30
|
-
if (h ? l = h : m < 1 ? l = "second" : m < 60 ? l = "minute" : m <
|
|
31
|
+
if (h ? l = h : m < 1 ? l = "second" : m < 60 ? l = "minute" : m < U ? l = "hour" : i < F ? l = "day" : i < Y ? l = "month" : l = "year", l === "second") {
|
|
31
32
|
const n = d(f / 1e3);
|
|
32
33
|
return r.formatDistance("xSeconds", n, c);
|
|
33
34
|
} else if (l === "minute") {
|
|
@@ -37,35 +38,26 @@ function P(a, e, t) {
|
|
|
37
38
|
const n = d(m / 60);
|
|
38
39
|
return r.formatDistance("xHours", n, c);
|
|
39
40
|
} else if (l === "day") {
|
|
40
|
-
const n = d(i /
|
|
41
|
+
const n = d(i / U);
|
|
41
42
|
return r.formatDistance("xDays", n, c);
|
|
42
43
|
} else if (l === "month") {
|
|
43
|
-
const n = d(i /
|
|
44
|
+
const n = d(i / F);
|
|
44
45
|
return n === 12 && h !== "month" ? r.formatDistance("xYears", 1, c) : r.formatDistance("xMonths", n, c);
|
|
45
46
|
} else {
|
|
46
47
|
const n = d(i / Y);
|
|
47
48
|
return r.formatDistance("xYears", n, c);
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
var I = /* @__PURE__ */ ((a) => (a.BOTTOM = "bottom", a.AFTER_FIRST = "after-first", a.BEFORE_LAST = "before-last", a))(I || {}),
|
|
51
|
+
var I = /* @__PURE__ */ ((a) => (a.BOTTOM = "bottom", a.AFTER_FIRST = "after-first", a.BEFORE_LAST = "before-last", a))(I || {}), ye = /* @__PURE__ */ ((a) => (a.SECOND = "second", a.MINUTE = "minute", a.HOUR = "hour", a.DAY = "day", a.MONTH = "month", a.YEAR = "year", a))(ye || {}), A = /* @__PURE__ */ ((a) => (a.DEFAULT = "SquareSmallIcon", a.SUCCESS = "CheckedCircleIcon", a.CRITICAL = "CrossCircleIcon", a))(A || {}), Te = /* @__PURE__ */ ((a) => (a.BLACK = "black", a.BLUE = "blue", a.GREEN = "green", a.GREY = "grey", a.ORANGE = "orange", a.RED = "red", a.YELLOW = "yellow", a))(Te || {});
|
|
51
52
|
const q = /* @__PURE__ */ Symbol("timeline register entry injection key"), K = /* @__PURE__ */ Symbol("timeline config obj injection key"), Ce = {
|
|
52
|
-
"en-US": {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"ja-JP": {
|
|
57
|
-
addNote: "メモを追加",
|
|
58
|
-
cancel: "キャンセル"
|
|
59
|
-
},
|
|
60
|
-
"pt-BR": {
|
|
61
|
-
addNote: "Adicionar anotação",
|
|
62
|
-
cancel: "Cancelar"
|
|
63
|
-
}
|
|
64
|
-
}, Te = L({
|
|
53
|
+
"en-US": { addNote: "Add note", cancel: "Cancel" },
|
|
54
|
+
"ja-JP": { addNote: "メモを追加", cancel: "キャンセル" },
|
|
55
|
+
"pt-BR": { addNote: "Adicionar anotação", cancel: "Cancelar" }
|
|
56
|
+
}, we = L({
|
|
65
57
|
i18n: { messages: Ce },
|
|
66
58
|
name: "bento-timeline"
|
|
67
|
-
}),
|
|
68
|
-
...
|
|
59
|
+
}), Ne = /* @__PURE__ */ L({
|
|
60
|
+
...we,
|
|
69
61
|
props: {
|
|
70
62
|
addNote: { type: Boolean, default: !1 },
|
|
71
63
|
showMore: { default: null },
|
|
@@ -78,7 +70,7 @@ const q = /* @__PURE__ */ Symbol("timeline register entry injection key"), K = /
|
|
|
78
70
|
}, b = N(null), d = N(null), f = N(!1), m = async () => {
|
|
79
71
|
var u, g;
|
|
80
72
|
f.value = !f.value, await X(), f.value ? (u = b.value.$refs.textareaElement) == null || u.focus() : (g = d.value.$el) == null || g.focus();
|
|
81
|
-
},
|
|
73
|
+
}, T = () => {
|
|
82
74
|
e("add-timeline-note", {
|
|
83
75
|
description: c.value,
|
|
84
76
|
timestamp: { date: /* @__PURE__ */ new Date() },
|
|
@@ -89,7 +81,7 @@ const q = /* @__PURE__ */ Symbol("timeline register entry injection key"), K = /
|
|
|
89
81
|
), l = N(!1), { timegapLimit: n } = G(t), _ = o(() => Array.from(i.value.keys())), v = o(() => t.showMore ? t.showMore.placement === I.BEFORE_LAST ? [
|
|
90
82
|
..._.value.slice(0, t.showMore.limit - 1),
|
|
91
83
|
_.value[_.value.length - 1]
|
|
92
|
-
] : t.showMore.placement === I.AFTER_FIRST ? [_.value[0], ..._.value.slice(-(t.showMore.limit - 1))] : _.value.slice(0, t.showMore.limit) : null),
|
|
84
|
+
] : t.showMore.placement === I.AFTER_FIRST ? [_.value[0], ..._.value.slice(-(t.showMore.limit - 1))] : _.value.slice(0, t.showMore.limit) : null), C = o(() => {
|
|
93
85
|
if (!t.showMore)
|
|
94
86
|
return null;
|
|
95
87
|
switch (t.showMore.placement) {
|
|
@@ -103,74 +95,66 @@ const q = /* @__PURE__ */ Symbol("timeline register entry injection key"), K = /
|
|
|
103
95
|
}
|
|
104
96
|
}), E = () => {
|
|
105
97
|
i.value.sort((u, g) => new Date(g.date).getTime() - new Date(u.date).getTime());
|
|
106
|
-
},
|
|
98
|
+
}, B = (u) => () => {
|
|
107
99
|
const g = i.value.indexOf(u);
|
|
108
100
|
g > -1 && i.value.splice(g, 1);
|
|
109
|
-
},
|
|
101
|
+
}, S = (u) => (i.value.push(u), { timelineEntries: i, unregisterTimelineEntry: B(u) });
|
|
110
102
|
Q(
|
|
111
103
|
() => i.value.length,
|
|
112
104
|
() => E()
|
|
113
105
|
);
|
|
114
106
|
const w = {
|
|
115
107
|
showAll: l,
|
|
116
|
-
showMoreIndex:
|
|
108
|
+
showMoreIndex: C,
|
|
117
109
|
hiddenItems: h,
|
|
118
110
|
visibleIndexes: v,
|
|
119
111
|
timegapLimit: n,
|
|
120
112
|
timelineEntries: i
|
|
121
113
|
};
|
|
122
|
-
return x(q,
|
|
114
|
+
return x(q, S), x(K, w), { __sfc: !0, props: t, emit: e, t: s, addNoteLabel: r, cancelLabel: p, newNoteContent: c, updateNoteContent: y, addNoteTextareaRef: b, addNoteButtonRef: d, showAddNoteTextArea: f, toggleAddNote: m, addNoteToTimeline: T, timelineEntries: i, hiddenItems: h, showAll: l, timegapLimit: n, timelineIndexes: _, visibleIndexes: v, showMoreIndex: C, sortEntries: E, unregisterTimelineEntry: B, registerTimelineEntry: S, configData: w, BentoButton: H, BentoButtonActions: ae, BentoTextarea: se };
|
|
123
115
|
}
|
|
124
116
|
});
|
|
125
|
-
var
|
|
117
|
+
var Ie = function() {
|
|
126
118
|
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
127
119
|
return t("div", { staticClass: "b-timeline" }, [e.addNote ? t("div", { staticClass: "b-timeline__add-note-section" }, [s.showAddNoteTextArea ? e._e() : t(s.BentoButton, { ref: "addNoteButtonRef", attrs: { variant: "tertiary" }, on: { click: s.toggleAddNote } }, [e._v(e._s(s.addNoteLabel))]), s.showAddNoteTextArea ? t("div", [t(s.BentoTextarea, { ref: "addNoteTextareaRef", attrs: { label: s.addNoteLabel, "character-limit": 150, resizable: "vertical" }, on: { "update:model-value": s.updateNoteContent } }), t(s.BentoButtonActions, { attrs: { actions: [
|
|
128
120
|
{ title: s.addNoteLabel, event: s.addNoteToTimeline },
|
|
129
121
|
{ title: s.cancelLabel, event: s.toggleAddNote }
|
|
130
122
|
] } })], 1) : e._e()], 1) : e._e(), t("ol", { staticClass: "b-timeline__items" }, [e._t("default")], 2)]);
|
|
131
|
-
},
|
|
132
|
-
we,
|
|
123
|
+
}, Ee = [], Be = /* @__PURE__ */ R(
|
|
133
124
|
Ne,
|
|
134
125
|
Ie,
|
|
126
|
+
Ee,
|
|
135
127
|
!1,
|
|
136
128
|
null,
|
|
137
129
|
"4acaf49e"
|
|
138
130
|
);
|
|
139
|
-
const
|
|
131
|
+
const st = Be.exports;
|
|
140
132
|
let z = 0;
|
|
141
133
|
const Se = {
|
|
142
134
|
beforeCreate() {
|
|
143
135
|
this.uuid = z.toString(), z += 1;
|
|
144
136
|
}
|
|
145
137
|
};
|
|
146
|
-
var
|
|
138
|
+
var Le = function() {
|
|
147
139
|
var e = this, t = e._self._c;
|
|
148
140
|
return t("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? t("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), t("path", { attrs: { fill: "#001222", d: "M10 3.25C11.5188 3.25 12.75 4.48122 12.75 6V10C12.75 11.5188 11.5188 12.75 10 12.75H6C4.48122 12.75 3.25 11.5188 3.25 10V6C3.25 4.48122 4.48122 3.25 6 3.25H10Z" } })]);
|
|
149
|
-
},
|
|
141
|
+
}, Me = [], xe = /* @__PURE__ */ R(
|
|
150
142
|
Se,
|
|
151
|
-
Be,
|
|
152
143
|
Le,
|
|
144
|
+
Me,
|
|
153
145
|
!1,
|
|
154
146
|
null,
|
|
155
147
|
null
|
|
156
148
|
);
|
|
157
|
-
const
|
|
158
|
-
"en-US": {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
},
|
|
163
|
-
"ja-JP": {
|
|
164
|
-
showLess: "表示内容を減らす"
|
|
165
|
-
},
|
|
166
|
-
"pt-BR": {
|
|
167
|
-
showLess: "Mostrar menos"
|
|
168
|
-
}
|
|
169
|
-
}, Re = L({
|
|
149
|
+
const Ae = xe.exports, Re = {
|
|
150
|
+
"en-US": { showLess: "Show less", showMore: "Show {items} more", timegap: "{timegap} passed between the timeline events" },
|
|
151
|
+
"ja-JP": { showLess: "表示内容を減らす" },
|
|
152
|
+
"pt-BR": { showLess: "Mostrar menos" }
|
|
153
|
+
}, De = L({
|
|
170
154
|
name: "bento-timeline-item",
|
|
171
|
-
i18n: { messages:
|
|
172
|
-
}),
|
|
173
|
-
...
|
|
155
|
+
i18n: { messages: Re }
|
|
156
|
+
}), Oe = /* @__PURE__ */ L({
|
|
157
|
+
...De,
|
|
174
158
|
props: {
|
|
175
159
|
additionalTimestamp: { default: null },
|
|
176
160
|
dataList: { default: null },
|
|
@@ -183,8 +167,8 @@ const xe = Me.exports, Ae = {
|
|
|
183
167
|
variant: { default: null }
|
|
184
168
|
},
|
|
185
169
|
setup(a) {
|
|
186
|
-
const e = a, { t } = J(), s = ee(), r =
|
|
187
|
-
e.variant &&
|
|
170
|
+
const e = a, { t } = J(), s = ee(), r = fe(s), p = o(() => e.type === "note"), c = o(() => e.variant === A.CRITICAL ? "red" : e.variant === A.SUCCESS ? "green" : e.status);
|
|
171
|
+
e.variant && re(
|
|
188
172
|
'BentoTimelineItem "variant" property',
|
|
189
173
|
`Use the BentoTimelineItem "status" modifier instead to modify the color of the timeline icon.
|
|
190
174
|
<bento-timeline-item status="red" />`,
|
|
@@ -195,17 +179,17 @@ const xe = Me.exports, Ae = {
|
|
|
195
179
|
})), b = o(() => ({
|
|
196
180
|
"b-timeline-item--note": p.value
|
|
197
181
|
}));
|
|
198
|
-
x(
|
|
182
|
+
x(me, !0);
|
|
199
183
|
const d = {
|
|
200
184
|
title: e.title,
|
|
201
185
|
date: e.timestamp.date
|
|
202
|
-
}, f = k(q), { timelineEntries: m, unregisterTimelineEntry:
|
|
203
|
-
te(() =>
|
|
204
|
-
const { showAll: i, showMoreIndex: h, hiddenItems: l, visibleIndexes: n, timegapLimit: _ } = k(K), v = o(() => m.value.indexOf(d)),
|
|
186
|
+
}, f = k(q), { timelineEntries: m, unregisterTimelineEntry: T } = f(d);
|
|
187
|
+
te(() => T());
|
|
188
|
+
const { showAll: i, showMoreIndex: h, hiddenItems: l, visibleIndexes: n, timegapLimit: _ } = k(K), v = o(() => m.value.indexOf(d)), C = o(() => i.value || !n.value), E = o(() => C.value ? !0 : n.value.includes(v.value)), B = o(() => typeof e.title == "object"), S = o(() => e.title), w = o(() => {
|
|
205
189
|
var O;
|
|
206
190
|
if (!_.value)
|
|
207
191
|
return null;
|
|
208
|
-
const M = (O = m.value[v.value - 1]) == null ? void 0 : O.date, W =
|
|
192
|
+
const M = (O = m.value[v.value - 1]) == null ? void 0 : O.date, W = C.value || n.value.includes(v.value - 1);
|
|
209
193
|
if (!M || !W)
|
|
210
194
|
return null;
|
|
211
195
|
const { date: D } = m.value[v.value], Z = parseInt(
|
|
@@ -214,41 +198,41 @@ const xe = Me.exports, Ae = {
|
|
|
214
198
|
);
|
|
215
199
|
return _.value.amount < Z ? P(M, D, { roundingMethod: "floor" }) : null;
|
|
216
200
|
}), u = o(() => w.value ? t("timegap", { timegap: w.value }) : ""), g = o(() => l.value && h.value === v.value), V = o(() => v.value !== -1 && v.value === m.value.length - 1);
|
|
217
|
-
return { __sfc: !0, props: e, t, slots: s, hasSlot: r, isNoteType: p, computedStatus: c, iconConditionalClasses: y, conditionalClasses: b, entry: d, registerTimelineEntry: f, timelineEntries: m, unregisterTimelineEntry:
|
|
201
|
+
return { __sfc: !0, props: e, t, slots: s, hasSlot: r, isNoteType: p, computedStatus: c, iconConditionalClasses: y, conditionalClasses: b, entry: d, registerTimelineEntry: f, timelineEntries: m, unregisterTimelineEntry: T, showAll: i, showMoreIndex: h, hiddenItems: l, visibleIndexes: n, timegapLimit: _, index: v, allItemsShowing: C, isVisible: E, isLinkTitle: B, linkTitleProps: S, timegap: w, timegapAriaLabel: u, displayShowMoreButton: g, isLastItem: V, BentoButton: H, BentoDashedUnderline: ie, BentoDate: ne, BentoLink: oe, BentoTag: le, BentoTypography: ce, BentoStructuredList: ue, BentoStructuredListItem: de, SquareSmallIcon: Ae, generateUid: _e };
|
|
218
202
|
}
|
|
219
203
|
});
|
|
220
|
-
var
|
|
204
|
+
var ke = function() {
|
|
221
205
|
var e = this, t = e._self._c, s = e._self._setupProxy;
|
|
222
206
|
return s.isVisible ? t("li", { staticClass: "b-timeline-item", class: s.conditionalClasses }, [s.timegap ? t("div", { staticClass: "b-timeline-item__row" }, [e._m(0), t("div", { staticClass: "b-timeline-item__content" }, [t(s.BentoTypography, { staticClass: "b-timeline-item__timegap", attrs: { "aria-label": s.timegapAriaLabel } }, [e._v(" " + e._s(s.timegap) + " ")])], 1)]) : e._e(), t("div", { staticClass: "b-timeline-item__row" }, [t("div", { staticClass: "b-timeline-item__marker", attrs: { "aria-hidden": "true" } }, [t(s.SquareSmallIcon, { staticClass: "b-timeline-item__icon", class: s.iconConditionalClasses }), s.isLastItem ? e._e() : t("div", { staticClass: "b-timeline-item__separator", attrs: { "data-testid": "last-timeline-item-separator" } })], 1), t("div", { staticClass: "b-timeline-item__content" }, [s.isNoteType ? e._e() : t(s.BentoTypography, { staticClass: "b-timeline-item__title", attrs: { el: "div", variant: "body", strongest: "", role: "heading", "aria-level": "2" } }, [s.isLinkTitle ? t(s.BentoLink, e._b({ attrs: { "disable-typography": "" } }, "bento-link", s.linkTitleProps, !1), [e._v(e._s(s.linkTitleProps.title))]) : t("span", [e._v(e._s(e.title))])], 1), s.isNoteType && (e.description || s.hasSlot("default")) ? t(s.BentoTypography, { staticClass: "b-timeline-item__description", attrs: { el: "div", variant: "body" } }, [e._t("default", function() {
|
|
223
207
|
return [e._v(e._s(e.description))];
|
|
224
|
-
})], 2) : e._e(), e.timestamp ? t(s.BentoTypography, { staticClass: "b-timeline-item__timestamp", attrs: { el: "div", variant: "caption" } }, [t(s.BentoDate, { attrs: { date: e.timestamp.date, format: e.timestamp.format, "disable-typography": "" } }), e._v(" " + e._s(e.timestamp.value) + " ")], 1) : e._e(), !s.isNoteType && e.additionalTimestamp ? t(s.BentoTypography, { staticClass: "b-timeline-item__timestamp", attrs: { el: "div", variant: "caption" } }, [t(s.BentoDate, { attrs: { date: e.additionalTimestamp.date, format: e.additionalTimestamp.format, "disable-typography": "" } }), e._v(" " + e._s(e.additionalTimestamp.value) + " ")], 1) : e._e(), !s.isNoteType && (e.description || s.hasSlot("default")) ? t(s.BentoTypography, { staticClass: "b-timeline-item__description", attrs: { el: "div", variant: "body" } }, [e._t("default", function() {
|
|
208
|
+
})], 2) : e._e(), e.timestamp ? t(s.BentoTypography, { staticClass: "b-timeline-item__timestamp", attrs: { el: "div", variant: "caption" } }, [t(s.BentoDate, { attrs: { date: e.timestamp.date, format: e.timestamp.format, "disable-typography": "" } }), e.timestamp.description ? t(s.BentoDashedUnderline, e._b({}, "bento-dashed-underline", e.timestamp.description, !1), [e._v(" " + e._s(e.timestamp.value) + " ")]) : t("span", [e._v(e._s(e.timestamp.value))])], 1) : e._e(), !s.isNoteType && e.additionalTimestamp ? t(s.BentoTypography, { staticClass: "b-timeline-item__timestamp", attrs: { el: "div", variant: "caption" } }, [t(s.BentoDate, { attrs: { date: e.additionalTimestamp.date, format: e.additionalTimestamp.format, "disable-typography": "" } }), e.additionalTimestamp.description ? t(s.BentoDashedUnderline, e._b({}, "bento-dashed-underline", e.additionalTimestamp.description, !1), [e._v(" " + e._s(e.additionalTimestamp.value) + " ")]) : t("span", [e._v(" " + e._s(e.additionalTimestamp.value) + " ")])], 1) : e._e(), !s.isNoteType && (e.description || s.hasSlot("default")) ? t(s.BentoTypography, { staticClass: "b-timeline-item__description", attrs: { el: "div", variant: "body" } }, [e._t("default", function() {
|
|
225
209
|
return [e._v(e._s(e.description))];
|
|
226
210
|
})], 2) : e._e(), !s.isNoteType && e.dataList ? t("div", { staticClass: "b-timeline-item__data-list" }, [t(s.BentoStructuredList, e._l(e.dataList, function(r) {
|
|
227
211
|
return t(s.BentoStructuredListItem, { key: s.generateUid(r.label), attrs: { label: r.label } }, [t(s.BentoTypography, { attrs: { variant: "caption" } }, [e._v(e._s(r.value))])], 1);
|
|
228
212
|
}), 1)], 1) : e._e(), !s.isNoteType && e.tag ? t(s.BentoTag, e._b({ staticClass: "b-timeline-item__tag" }, "bento-tag", e.tag, !1)) : e._e()], 1)]), s.displayShowMoreButton ? t("div", { staticClass: "b-timeline-item__row" }, [e._m(1), t("div", { staticClass: "b-timeline-item__content" }, [t(s.BentoButton, { staticClass: "b-timeline__show-more", attrs: { variant: "tertiary" }, on: { click: function(r) {
|
|
229
213
|
s.showAll = !s.showAll;
|
|
230
214
|
} } }, [s.showAll ? [e._v(e._s(s.t("showLess")))] : [e._v(e._s(s.t("showMore", { items: s.hiddenItems })))]], 2)], 1)]) : e._e()]) : e._e();
|
|
231
|
-
},
|
|
215
|
+
}, $e = [function() {
|
|
232
216
|
var a = this, e = a._self._c;
|
|
233
217
|
return a._self._setupProxy, e("div", { staticClass: "b-timeline-item__marker", attrs: { "aria-hidden": "true" } }, [e("div", { staticClass: "b-timeline-item__icon b-timeline-item__icon--timegap" }), e("div", { staticClass: "b-timeline-item__separator" })]);
|
|
234
218
|
}, function() {
|
|
235
219
|
var a = this, e = a._self._c;
|
|
236
220
|
return a._self._setupProxy, e("div", { staticClass: "b-timeline-item__marker", attrs: { "aria-hidden": "true" } }, [e("div", { staticClass: "b-timeline-item__separator" })]);
|
|
237
|
-
}],
|
|
238
|
-
De,
|
|
221
|
+
}], Ue = /* @__PURE__ */ R(
|
|
239
222
|
Oe,
|
|
240
223
|
ke,
|
|
224
|
+
$e,
|
|
241
225
|
!1,
|
|
242
226
|
null,
|
|
243
|
-
"
|
|
227
|
+
"ee733813"
|
|
244
228
|
);
|
|
245
|
-
const
|
|
229
|
+
const at = Ue.exports;
|
|
246
230
|
export {
|
|
247
|
-
|
|
248
|
-
|
|
231
|
+
ye as B,
|
|
232
|
+
at as a,
|
|
249
233
|
A as b,
|
|
250
234
|
I as c,
|
|
251
|
-
|
|
252
|
-
|
|
235
|
+
Te as d,
|
|
236
|
+
st as t
|
|
253
237
|
};
|
|
254
|
-
//# sourceMappingURL=timeline-item.
|
|
238
|
+
//# sourceMappingURL=timeline-item.C8BxWdy1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-item.C8BxWdy1.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/formatDistanceStrict.js","../../src/components/timeline/timeline.types.ts","../../src/components/timeline/timeline.keys.ts","../../src/components/timeline/timeline.vue","../../../ui-assets/icons-16/dist/vue/square-small-fill.vue","../../src/components/timeline/components/timeline-item/timeline-item.vue"],"sourcesContent":["import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport {\n millisecondsInMinute,\n minutesInDay,\n minutesInMonth,\n minutesInYear,\n} from \"./constants.js\";\n\n/**\n * The {@link formatDistanceStrict} function options.\n */\n\n/**\n * The unit used to format the distance in {@link formatDistanceStrict}.\n */\n\n/**\n * @name formatDistanceStrict\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `formatDistance`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param laterDate - The date\n * @param earlierDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year'\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * const result = formatDistanceStrict(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0)\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), {\n * unit: 'minute'\n * })\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2015\n * // to 28 January 2015, in months, rounded up?\n * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), {\n * unit: 'month',\n * roundingMethod: 'ceil'\n * })\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> '1 jaro'\n */\n\nexport function formatDistanceStrict(laterDate, earlierDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const comparison = compareAsc(laterDate, earlierDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n ...(comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]),\n );\n\n const roundingMethod = getRoundingMethod(options?.roundingMethod ?? \"round\");\n\n const milliseconds = earlierDate_.getTime() - laterDate_.getTime();\n const minutes = milliseconds / millisecondsInMinute;\n\n const timezoneOffset =\n getTimezoneOffsetInMilliseconds(earlierDate_) -\n getTimezoneOffsetInMilliseconds(laterDate_);\n\n // Use DST-normalized difference in minutes for years, months and days;\n // use regular difference in minutes for hours, minutes and seconds.\n const dstNormalizedMinutes =\n (milliseconds - timezoneOffset) / millisecondsInMinute;\n\n const defaultUnit = options?.unit;\n let unit;\n if (!defaultUnit) {\n if (minutes < 1) {\n unit = \"second\";\n } else if (minutes < 60) {\n unit = \"minute\";\n } else if (minutes < minutesInDay) {\n unit = \"hour\";\n } else if (dstNormalizedMinutes < minutesInMonth) {\n unit = \"day\";\n } else if (dstNormalizedMinutes < minutesInYear) {\n unit = \"month\";\n } else {\n unit = \"year\";\n }\n } else {\n unit = defaultUnit;\n }\n\n // 0 up to 60 seconds\n if (unit === \"second\") {\n const seconds = roundingMethod(milliseconds / 1000);\n return locale.formatDistance(\"xSeconds\", seconds, localizeOptions);\n\n // 1 up to 60 mins\n } else if (unit === \"minute\") {\n const roundedMinutes = roundingMethod(minutes);\n return locale.formatDistance(\"xMinutes\", roundedMinutes, localizeOptions);\n\n // 1 up to 24 hours\n } else if (unit === \"hour\") {\n const hours = roundingMethod(minutes / 60);\n return locale.formatDistance(\"xHours\", hours, localizeOptions);\n\n // 1 up to 30 days\n } else if (unit === \"day\") {\n const days = roundingMethod(dstNormalizedMinutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 up to 12 months\n } else if (unit === \"month\") {\n const months = roundingMethod(dstNormalizedMinutes / minutesInMonth);\n return months === 12 && defaultUnit !== \"month\"\n ? locale.formatDistance(\"xYears\", 1, localizeOptions)\n : locale.formatDistance(\"xMonths\", months, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const years = roundingMethod(dstNormalizedMinutes / minutesInYear);\n return locale.formatDistance(\"xYears\", years, localizeOptions);\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistanceStrict;\n","import { type BentoDashedUnderlineProps } from '@/components/dashed-underline/dashed-underline.types';\nimport { type BentoDateFormat } from '@/components/date/date.types';\nimport { type BentoTag } from '@/components/tag';\nimport { type Ref } from 'vue';\nimport type { RouterLinkProps } from 'vue-router/types/router.d.ts';\n\nexport enum BentoTimelineShowMorePlacement {\n BOTTOM = 'bottom',\n AFTER_FIRST = 'after-first',\n BEFORE_LAST = 'before-last',\n}\n\nexport interface BentoTimelineShowMoreObject {\n limit: number;\n placement?: BentoTimelineShowMorePlacement;\n}\n\nexport enum BentoTimelineGapUnit {\n SECOND = 'second',\n MINUTE = 'minute',\n HOUR = 'hour',\n DAY = 'day',\n MONTH = 'month',\n YEAR = 'year',\n}\n\nexport interface BentoTimelineGapObject {\n amount: number;\n unit: BentoTimelineGapUnit;\n}\n\n/**\n * @deprecated \"variant\" prop was deprecated. Use \"status\" modifier instead.\n */\nexport enum BentoTimelineItemVariant {\n DEFAULT = 'SquareSmallIcon',\n SUCCESS = 'CheckedCircleIcon',\n CRITICAL = 'CrossCircleIcon',\n}\n\nexport enum BentoTimelineStatus {\n BLACK = 'black',\n BLUE = 'blue',\n GREEN = 'green',\n GREY = 'grey',\n ORANGE = 'orange',\n RED = 'red',\n YELLOW = 'yellow',\n}\n\nexport interface BentoTimelineItemTitle extends RouterLinkProps {\n /**\n * Link label.\n */\n title: string;\n /**\n * Set the rendered link to a regular external anchor link.\n */\n external?: boolean;\n\n /**\n * Sets the target of the rendered link.\n */\n target?: string;\n\n // This has been added to allow users to add HTML and Aria attribute\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [name: string]: any;\n}\n\nexport interface BentoTimelineTimestamp {\n date: Date | number;\n format?: BentoDateFormat;\n value?: string;\n description?: BentoDashedUnderlineProps;\n}\n\nexport interface BentoTimelineDataListObject {\n label: string;\n value: string;\n}\n\nexport type BentoTimelineDataList = Array<BentoTimelineDataListObject>;\n\nexport type BentoTimelineTagProps = InstanceType<typeof BentoTag>['$props'];\n\nexport interface BentoTimelineEntry {\n title?: string | BentoTimelineItemTitle;\n description?: string;\n date: Date | number;\n}\n\n/**\n * @deprecated from version 2.0.0.\n */\nexport type BentoTimelineRegisterEntry = (props: {\n title?: string | BentoTimelineItemTitle;\n description?: string;\n date: Date | number;\n}) => { timelineEntries: Ref<Array<BentoTimelineEntry>>; index: number; unregisterTimelineEntry: () => void };\n\n/**\n * @private\n */\nexport type BentoInternalTimelineRegisterEntry = (\n entry: BentoTimelineEntry\n) => { timelineEntries: Ref<Array<BentoTimelineEntry>>; unregisterTimelineEntry: () => void };\n\nexport interface BentoTimelineConfigData {\n showAll: Ref<boolean>;\n showMoreIndex: Ref<number>;\n hiddenItems: Ref<number>;\n visibleIndexes: Ref<Array<number>>;\n timegapLimit: Ref<BentoTimelineGapObject>;\n timelineEntries: Ref<Array<BentoTimelineEntry>>;\n}\n\nexport interface BentoTimelineProps {\n /**\n * If set to true, gives the possibility to manually add notes to the timeline via a textarea\n */\n addNote?: boolean;\n /**\n * Object that determines the max number of items to show without clicking the show more button\n * and where in the timeline is the show more button placed\n */\n showMore?: BentoTimelineShowMoreObject;\n /**\n * Object that determines minimum amount of time for the automatic timegap indicator;\n * Define a unit (hour, day, month) and an amount (e.g. { amount: 7, unit: 'days' }).\n * If null, automatic timegap detection will be turned off\n */\n timegapLimit?: BentoTimelineGapObject;\n}\n\nexport interface BentoTimelineItemProps {\n /**\n * Additional timestamp of the event\n */\n additionalTimestamp?: BentoTimelineTimestamp;\n /**\n * Relevant key-value pair data to display in the event\n */\n dataList?: BentoTimelineDataList;\n /**\n * Description of the event\n */\n description?: string;\n /**\n * Modifier that changes the color of the timeline icon\n * @values blue, black, green, grey, orange, red, yellow\n */\n status?: string;\n /**\n * Tag props that will be passed down to inner tag component\n */\n tag?: BentoTimelineTagProps;\n /**\n * Main timestamp of the event. Used for timegap detection.\n */\n timestamp: BentoTimelineTimestamp;\n /**\n * Title of the event\n */\n title?: BentoTimelineItemTitle | string;\n /**\n * Type of the timeline item. If set to 'note', it renders a note item in the timeline. Defaults to 'milestone'.\n * @values milestone, note\n */\n type?: string;\n /**\n * Variant for the timeline item\n * @values DEFAULT, SUCCESS, CRITICAL\n *\n * @deprecated Use \"status\" prop instead\n */\n variant?: BentoTimelineItemVariant | `${BentoTimelineItemVariant}`;\n}\n","export const TIMELINE_REGISTER_ENTRY_INJECTION_KEY = Symbol('timeline register entry injection key');\nexport const TIMELINE_CONFIG_INJECTION_KEY = Symbol('timeline config obj injection key');\n","<template>\n <div class=\"b-timeline\">\n <div v-if=\"addNote\" class=\"b-timeline__add-note-section\">\n <bento-button\n v-if=\"!showAddNoteTextArea\"\n ref=\"addNoteButtonRef\"\n variant=\"tertiary\"\n @click=\"toggleAddNote\"\n >{{ addNoteLabel }}</bento-button\n >\n <div v-if=\"showAddNoteTextArea\">\n <bento-textarea\n ref=\"addNoteTextareaRef\"\n :label=\"addNoteLabel\"\n :character-limit=\"150\"\n resizable=\"vertical\"\n @update:model-value=\"updateNoteContent\"\n />\n <bento-button-actions\n :actions=\"[\n { title: addNoteLabel, event: addNoteToTimeline },\n { title: cancelLabel, event: toggleAddNote },\n ]\"\n />\n </div>\n </div>\n <ol class=\"b-timeline__items\">\n <slot />\n </ol>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, nextTick, provide, ref, type Ref, toRefs, watch } from 'vue';\n import { BentoButton, BentoButtonActions } from '@/components/button';\n import { BentoTextarea } from '@/components/textarea';\n import {\n type BentoInternalTimelineRegisterEntry,\n type BentoTimelineConfigData,\n type BentoTimelineEntry,\n type BentoTimelineProps,\n BentoTimelineShowMorePlacement,\n } from './timeline.types';\n import { TIMELINE_CONFIG_INJECTION_KEY, TIMELINE_REGISTER_ENTRY_INJECTION_KEY } from './timeline.keys';\n import messages from './messages.json';\n import { useI18n } from '@/utils/ts/i18n';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n addNote: { type: Boolean, default: false },\n showMore: { default: null },\n timegapLimit: { default: null }\n});\n\n const emit = defineEmits(['add-timeline-note']);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const addNoteLabel = computed(() => t('addNote') as string);\n const cancelLabel = computed(() => t('cancel') as string);\n\n const newNoteContent: Ref<string> = ref();\n const updateNoteContent = (newTimelineNoteContent: string): void => {\n newNoteContent.value = newTimelineNoteContent;\n };\n\n const addNoteTextareaRef: Ref<InstanceType<typeof BentoTextarea>> = ref(null);\n const addNoteButtonRef: Ref<InstanceType<typeof BentoButton>> = ref(null);\n const showAddNoteTextArea = ref(false);\n const toggleAddNote = async () => {\n showAddNoteTextArea.value = !showAddNoteTextArea.value;\n\n await nextTick();\n\n if (showAddNoteTextArea.value) {\n (addNoteTextareaRef.value.$refs.textareaElement as HTMLTextAreaElement)?.focus();\n } else {\n (addNoteButtonRef.value.$el as HTMLButtonElement)?.focus();\n }\n };\n const addNoteToTimeline = () => {\n emit('add-timeline-note', {\n description: newNoteContent.value,\n timestamp: { date: new Date() },\n type: 'note',\n });\n toggleAddNote();\n };\n\n const timelineEntries = ref<Array<BentoTimelineEntry>>([]);\n const hiddenItems = computed(() =>\n props.showMore && timelineEntries.value.length > props.showMore.limit\n ? timelineEntries.value.length - props.showMore.limit\n : null\n );\n const showAll = ref(false);\n const { timegapLimit } = toRefs(props);\n\n const timelineIndexes = computed(() => Array.from(timelineEntries.value.keys()));\n\n const visibleIndexes = computed(() => {\n if (!props.showMore) {\n return null;\n }\n\n if (props.showMore.placement === BentoTimelineShowMorePlacement.BEFORE_LAST) {\n return [\n ...timelineIndexes.value.slice(0, props.showMore.limit - 1),\n timelineIndexes.value[timelineIndexes.value.length - 1],\n ];\n }\n\n if (props.showMore.placement === BentoTimelineShowMorePlacement.AFTER_FIRST) {\n return [timelineIndexes.value[0], ...timelineIndexes.value.slice(-(props.showMore.limit - 1))];\n }\n\n return timelineIndexes.value.slice(0, props.showMore.limit);\n });\n\n const showMoreIndex = computed(() => {\n if (!props.showMore) {\n return null;\n }\n\n switch (props.showMore.placement) {\n case BentoTimelineShowMorePlacement.BEFORE_LAST:\n return props.showMore.limit - 2;\n case BentoTimelineShowMorePlacement.AFTER_FIRST:\n return 0;\n case BentoTimelineShowMorePlacement.BOTTOM:\n default:\n return props.showMore.limit - 1;\n }\n });\n\n const sortEntries = () => {\n // Sorts timeline entries based on date in reverse chronological order (newest first).\n timelineEntries.value.sort((a, b) => {\n return new Date(b.date).getTime() - new Date(a.date).getTime();\n });\n };\n\n const unregisterTimelineEntry = (entryToRemove: BentoTimelineEntry) => () => {\n const index = timelineEntries.value.indexOf(entryToRemove);\n // The index can be -1 if the entry has already been removed by a parent re-render.\n if (index > -1) {\n timelineEntries.value.splice(index, 1);\n }\n };\n\n const registerTimelineEntry: BentoInternalTimelineRegisterEntry = entry => {\n timelineEntries.value.push(entry);\n return { timelineEntries, unregisterTimelineEntry: unregisterTimelineEntry(entry) };\n };\n\n watch(\n () => timelineEntries.value.length,\n () => sortEntries()\n );\n\n const configData: BentoTimelineConfigData = {\n showAll,\n showMoreIndex,\n hiddenItems,\n visibleIndexes,\n timegapLimit,\n timelineEntries,\n };\n\n // provide register timeline entry and config data timeline items\n provide(TIMELINE_REGISTER_ENTRY_INJECTION_KEY, registerTimelineEntry);\n provide(TIMELINE_CONFIG_INJECTION_KEY, configData);\n</script>\n<script lang=\"ts\">\n /**\n * Timeline displays a collection of events in a reverse chronological order (newest event is displayed on the top).\n *\n * @example\n * import { BentoDateFormat, BentoTimeline } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTimeline },\n * template: `\n * <bento-timeline>\n * <bento-timeline-item\n * title=\"Milestone 1\"\n * :timestamp=\"{ date: new Date(), value: 'Created at' }\"\n * :additional-timestamp=\"{ date: new Date(), value: 'Modified at' }\"\n * description=\"Milestone description\"\n * :tag=\"{ label: 'Tag'}\"\n * />\n * <bento-timeline-item\n * title=\"Milestone 2\"\n * :timestamp=\"{\n * date: new Date(),\n * value: 'Created at',\n * format: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD\n * }\"\n * description=\"Milestone description\"\n * :data-list=\"[\n * { label: 'Label', value: 'Value' },\n * { label: 'Label', value: 'Value' },\n * ]\"\n * />\n * </bento-timeline>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-timeline',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./timeline.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M10 3.25C11.5188 3.25 12.75 4.48122 12.75 6V10C12.75 11.5188 11.5188 12.75 10 12.75H6C4.48122 12.75 3.25 11.5188 3.25 10V6C3.25 4.48122 4.48122 3.25 6 3.25H10Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <li v-if=\"isVisible\" class=\"b-timeline-item\" :class=\"conditionalClasses\">\n <div v-if=\"timegap\" class=\"b-timeline-item__row\">\n <div class=\"b-timeline-item__marker\" aria-hidden=\"true\">\n <div class=\"b-timeline-item__icon b-timeline-item__icon--timegap\"></div>\n <div class=\"b-timeline-item__separator\"></div>\n </div>\n <div class=\"b-timeline-item__content\">\n <bento-typography class=\"b-timeline-item__timegap\" :aria-label=\"timegapAriaLabel\">\n {{ timegap }}\n </bento-typography>\n </div>\n </div>\n <div class=\"b-timeline-item__row\">\n <div class=\"b-timeline-item__marker\" aria-hidden=\"true\">\n <square-small-icon class=\"b-timeline-item__icon\" :class=\"iconConditionalClasses\" />\n <div\n v-if=\"!isLastItem\"\n class=\"b-timeline-item__separator\"\n data-testid=\"last-timeline-item-separator\"\n ></div>\n </div>\n <div class=\"b-timeline-item__content\">\n <bento-typography\n v-if=\"!isNoteType\"\n el=\"div\"\n variant=\"body\"\n strongest\n class=\"b-timeline-item__title\"\n role=\"heading\"\n aria-level=\"2\"\n >\n <bento-link v-if=\"isLinkTitle\" v-bind=\"linkTitleProps\" disable-typography>{{\n linkTitleProps.title\n }}</bento-link>\n <span v-else>{{ title }}</span>\n </bento-typography>\n\n <bento-typography\n v-if=\"isNoteType && (description || hasSlot('default'))\"\n el=\"div\"\n variant=\"body\"\n class=\"b-timeline-item__description\"\n >\n <slot>{{ description }}</slot>\n </bento-typography>\n\n <bento-typography v-if=\"timestamp\" class=\"b-timeline-item__timestamp\" el=\"div\" variant=\"caption\">\n <bento-date :date=\"timestamp.date\" :format=\"timestamp.format\" disable-typography />\n\n <bento-dashed-underline v-if=\"timestamp.description\" v-bind=\"timestamp.description\">\n {{ timestamp.value }}\n </bento-dashed-underline>\n\n <span v-else>{{ timestamp.value }}</span>\n </bento-typography>\n\n <bento-typography\n v-if=\"!isNoteType && additionalTimestamp\"\n class=\"b-timeline-item__timestamp\"\n el=\"div\"\n variant=\"caption\"\n >\n <bento-date\n :date=\"additionalTimestamp.date\"\n :format=\"additionalTimestamp.format\"\n disable-typography\n />\n\n <bento-dashed-underline\n v-if=\"additionalTimestamp.description\"\n v-bind=\"additionalTimestamp.description\"\n >\n {{ additionalTimestamp.value }}\n </bento-dashed-underline>\n\n <span v-else>\n {{ additionalTimestamp.value }}\n </span>\n </bento-typography>\n\n <bento-typography\n v-if=\"!isNoteType && (description || hasSlot('default'))\"\n el=\"div\"\n variant=\"body\"\n class=\"b-timeline-item__description\"\n >\n <slot>{{ description }}</slot>\n </bento-typography>\n\n <div v-if=\"!isNoteType && dataList\" class=\"b-timeline-item__data-list\">\n <bento-structured-list>\n <bento-structured-list-item\n v-for=\"listEntry in dataList\"\n :key=\"generateUid(listEntry.label)\"\n :label=\"listEntry.label\"\n >\n <bento-typography variant=\"caption\">{{ listEntry.value }}</bento-typography>\n </bento-structured-list-item>\n </bento-structured-list>\n </div>\n <bento-tag v-if=\"!isNoteType && tag\" v-bind=\"tag\" class=\"b-timeline-item__tag\" />\n </div>\n </div>\n <div v-if=\"displayShowMoreButton\" class=\"b-timeline-item__row\">\n <div class=\"b-timeline-item__marker\" aria-hidden=\"true\">\n <div class=\"b-timeline-item__separator\"></div>\n </div>\n <div class=\"b-timeline-item__content\">\n <bento-button class=\"b-timeline__show-more\" variant=\"tertiary\" @click=\"showAll = !showAll\">\n <template v-if=\"!showAll\">{{ t('showMore', { items: hiddenItems }) }}</template>\n <template v-else>{{ t('showLess') }}</template>\n </bento-button>\n </div>\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, inject, onUnmounted, provide, useSlots } from 'vue';\n // Components\n import { BentoButton } from '@/components/button';\n import { BentoDashedUnderline } from '@/components/dashed-underline';\n import { BentoDate } from '@/components/date';\n import { BentoLink } from '@/components/link';\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { BentoStructuredList, BentoStructuredListItem } from '@/components/structured-list';\n import SquareSmallIcon from '@adyen/ui-assets-icons-16/vue/square-small-fill';\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useHasSlot } from '@/composables';\n import { formatDistanceStrict } from 'date-fns/formatDistanceStrict';\n // Types\n import {\n type BentoTimelineConfigData,\n type BentoTimelineEntry,\n type BentoTimelineItemProps,\n type BentoTimelineItemTitle,\n BentoTimelineItemVariant,\n type BentoTimelineRegisterEntry,\n } from '../../timeline.types';\n // Keys\n import { TIMELINE_CONFIG_INJECTION_KEY, TIMELINE_REGISTER_ENTRY_INJECTION_KEY } from '../../timeline.keys';\n import { STRUCTURED_LIST_CONDENSED_INJECTION_KEY } from '@/components/structured-list/structured-list.keys';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n additionalTimestamp: { default: null },\n dataList: { default: null },\n description: { default: null },\n status: { default: 'black' },\n tag: { default: undefined },\n timestamp: null,\n title: { default: null },\n type: { default: 'milestone' },\n variant: { default: null }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const isNoteType = computed(() => props.type === 'note');\n\n // Handle variant deprecation, by setting `critical` and `success` variants to their respective colors\n const computedStatus = computed(() => {\n if (props.variant === BentoTimelineItemVariant.CRITICAL) {\n return 'red';\n }\n\n if (props.variant === BentoTimelineItemVariant.SUCCESS) {\n return 'green';\n }\n\n return props.status;\n });\n\n if (props.variant) {\n deprecate(\n 'BentoTimelineItem \"variant\" property',\n `Use the BentoTimelineItem \"status\" modifier instead to modify the color of the timeline icon.\n <bento-timeline-item status=\"red\" />`,\n '2.0.0'\n );\n }\n\n const iconConditionalClasses = computed(() => ({\n [`b-timeline-item__icon--${computedStatus.value}`]: computedStatus.value && !isNoteType.value,\n }));\n const conditionalClasses = computed(() => ({\n 'b-timeline-item--note': isNoteType.value,\n }));\n\n // Provide STRUCTURED_LIST_CONDENSED_INJECTION_KEY as true, to set the internal condensed style in the BentoStructuredList comp\n provide(STRUCTURED_LIST_CONDENSED_INJECTION_KEY, true);\n\n const entry: BentoTimelineEntry = {\n title: props.title,\n date: props.timestamp.date,\n };\n\n // Register timeline entry to the timeline entries array\n const registerTimelineEntry: BentoTimelineRegisterEntry = inject(TIMELINE_REGISTER_ENTRY_INJECTION_KEY);\n const { timelineEntries, unregisterTimelineEntry } = registerTimelineEntry(entry);\n\n // On unmounting timeline item, unregister it from the parent timeline component\n onUnmounted(() => unregisterTimelineEntry());\n\n // Get timeline config data from the parent Timeline comp\n const { showAll, showMoreIndex, hiddenItems, visibleIndexes, timegapLimit }: BentoTimelineConfigData =\n inject(TIMELINE_CONFIG_INJECTION_KEY);\n\n const index = computed(() => timelineEntries.value.indexOf(entry));\n\n const allItemsShowing = computed(() => showAll.value || !visibleIndexes.value);\n const isVisible = computed(() => (allItemsShowing.value ? true : visibleIndexes.value.includes(index.value)));\n const isLinkTitle = computed(() => typeof props.title === 'object');\n const linkTitleProps = computed(() => props.title as BentoTimelineItemTitle);\n const timegap = computed(() => {\n if (!timegapLimit.value) {\n return null;\n }\n const previousDate = timelineEntries.value[index.value - 1]?.date;\n const isPreviousItemVisible = allItemsShowing.value || visibleIndexes.value.includes(index.value - 1);\n if (!previousDate || !isPreviousItemVisible) {\n return null;\n }\n const { date } = timelineEntries.value[index.value];\n const timegapInSelectedUnit = parseInt(\n formatDistanceStrict(previousDate, date, { unit: timegapLimit.value.unit }),\n 10\n );\n return timegapLimit.value.amount < timegapInSelectedUnit\n ? formatDistanceStrict(previousDate, date, { roundingMethod: 'floor' })\n : null;\n });\n const timegapAriaLabel = computed(() => (timegap.value ? t('timegap', { timegap: timegap.value }) : ''));\n const displayShowMoreButton = computed(() => hiddenItems.value && showMoreIndex.value === index.value);\n const isLastItem = computed(() => {\n // The index can be -1 before the parent has had a chance to sort the array.\n return index.value !== -1 && index.value === timelineEntries.value.length - 1;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * BentoTimelineItem renders each event in the Timeline component\n *\n * @example\n * import { BentoDateFormat, BentoTimelineItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTimelineItem },\n * template: `\n * <bento-timeline-item\n * title=\"Milestone\"\n * :timestamp=\"{ date: new Date(), value: 'Created at', format: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD }\"\n * :additional-timestamp=\"{ date: new Date(), value: 'Modified at' }\"\n * description=\"Milestone description\"\n * :data-list=\"[\n * { label: 'Label', value: 'Value' },\n * { label: 'Label', value: 'Value' },\n * ]\"\n * :tag=\"{ label: 'Tag'}\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-timeline-item',\n i18n: { messages },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./timeline-item.scss\" />\n"],"names":["formatDistanceStrict","laterDate","earlierDate","options","defaultOptions","getDefaultOptions","locale","enUS","comparison","compareAsc","localizeOptions","laterDate_","earlierDate_","normalizeDates","roundingMethod","getRoundingMethod","milliseconds","minutes","millisecondsInMinute","timezoneOffset","getTimezoneOffsetInMilliseconds","dstNormalizedMinutes","defaultUnit","unit","minutesInDay","minutesInMonth","minutesInYear","seconds","roundedMinutes","hours","days","months","years","BentoTimelineShowMorePlacement","BentoTimelineShowMorePlacement2","BentoTimelineGapUnit","BentoTimelineGapUnit2","BentoTimelineItemVariant","BentoTimelineItemVariant2","BentoTimelineStatus","BentoTimelineStatus2","TIMELINE_REGISTER_ENTRY_INJECTION_KEY","TIMELINE_CONFIG_INJECTION_KEY","__default__$1","defineComponent","messages$1","t","useI18n","addNoteLabel","computed","cancelLabel","newNoteContent","ref","updateNoteContent","newTimelineNoteContent","addNoteTextareaRef","addNoteButtonRef","showAddNoteTextArea","toggleAddNote","nextTick","_a","_b","addNoteToTimeline","emit","timelineEntries","hiddenItems","props","showAll","timegapLimit","toRefs","timelineIndexes","visibleIndexes","showMoreIndex","sortEntries","a","b","unregisterTimelineEntry","entryToRemove","index","registerTimelineEntry","entry","watch","configData","provide","uuid","_sfc_main$1","__default__","messages","slots","useSlots","hasSlot","useHasSlot","isNoteType","computedStatus","deprecate","iconConditionalClasses","conditionalClasses","STRUCTURED_LIST_CONDENSED_INJECTION_KEY","inject","onUnmounted","allItemsShowing","isVisible","isLinkTitle","linkTitleProps","timegap","previousDate","isPreviousItemVisible","date","timegapInSelectedUnit","timeg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ACA8B,IAAApD,EAAA,MAAAmD,EAAA,QAAA,KAAA7B,EAAA,MAAA,SAAAO,EAAA,KAAA,CAAA,GACAwB,IAAArD,EAAA,MAAA,OAAAiB,EAAA,SAAA,QAAA,GACAqC,IAAAtD,EAAA,MAAAiB,EAAA,KAAA,GACAsC,IAAAvD,EAAA,MAAA;;AACI,UAAA,CAAAmB,EAAA;AACI,eAAA;AAEJ,YAAAqC,KAAA7C,IAAAI,EAAA,MAAAc,EAAA,QAAA,CAAA,MAAA,gBAAAlB,EAAA,MACA8C,IAAAN,EAAA,SAAA7B,EAAA,MAAA,SAAAO,EAAA,QAAA,CAAA;AACA,UAAA,CAAA2B,KAAA,CAAAC;AACI,eAAA;AAEJ,YAAA,EAAA,MAAAC,EAAA,IAAA3C,EAAA,MAAAc,EAAA,KAAA,GACA8B,IAAA;AAAA,QAA8B5G,EAAAyG,GAAAE,GAAA,EAAA,MAAAvC,EAAA,MAAA,KAAA,CAAA;AAAA,QACgD;AAAA,MAC1E;AAEJ,aAAAA,EAAA,MAAA,SAAAwC,IAAA5G,EAAAyG,GAAAE,GAAA,EAAA,gBAAA,QAAA,CAAA,IAAA;AAAA,IAEM,CAAA,GAEVE,IAAA5D,EAAA,MAAAuD,EAAA,QAAA,EAAA,WAAA,EAAA,SAAAA,EAAA,MAAA,CAAA,IAAA,EAAA,GACAM,IAAA7D,EAAA,MAAAgB,EAAA,SAAAO,EAAA,UAAAM,EAAA,KAAA,GACAiC,IAAA9D,EAAA,MAEI6B,EAAA,UAAA,MAAAA,EAAA,UAAAd,EAAA,MAAA,SAAA,CAA4E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -2,21 +2,15 @@ import { defineComponent as S, ref as c, computed as d, watch as k, onMounted as
|
|
|
2
2
|
import "./index.Cl4_42j5.js";
|
|
3
3
|
import { C as q } from "./cross-small.CoQUe8SS.js";
|
|
4
4
|
import { u as L } from "./index.B6WW_F-J.js";
|
|
5
|
-
import { B as N } from "./button.
|
|
5
|
+
import { B as N } from "./button.DxhJNOtr.js";
|
|
6
6
|
import { B as U } from "./typography.C8lPlsbD.js";
|
|
7
7
|
import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
8
8
|
import { u as O } from "./use-bento-toast-controller.CB6Qbf3R.js";
|
|
9
9
|
import "../assets/toast.css";
|
|
10
10
|
const M = {
|
|
11
|
-
"en-US": {
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
"ja-JP": {
|
|
15
|
-
dismiss: "却下"
|
|
16
|
-
},
|
|
17
|
-
"pt-BR": {
|
|
18
|
-
dismiss: "Descartar"
|
|
19
|
-
}
|
|
11
|
+
"en-US": { dismiss: "Dismiss" },
|
|
12
|
+
"ja-JP": { dismiss: "却下" },
|
|
13
|
+
"pt-BR": { dismiss: "Descartar" }
|
|
20
14
|
}, W = {
|
|
21
15
|
i18n: { messages: M }
|
|
22
16
|
}, z = /* @__PURE__ */ S({
|
|
@@ -168,4 +162,4 @@ const mt = st.exports;
|
|
|
168
162
|
export {
|
|
169
163
|
mt as B
|
|
170
164
|
};
|
|
171
|
-
//# sourceMappingURL=toast.
|
|
165
|
+
//# sourceMappingURL=toast.BRI3G7TL.js.map
|