@adyen/bento-vue2 1.90.0 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/index.d.ts +254 -109
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.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.css +1 -1
- package/dist/assets/date-picker.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/input-time.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.B63qIiiH.js → action-bar.Dj830k6L.js} +3 -3
- package/dist/chunks/{action-bar.B63qIiiH.js.map → action-bar.Dj830k6L.js.map} +1 -1
- package/dist/chunks/{ai-tag.CCJCOdXu.js → ai-tag.AyG2UWCB.js} +2 -2
- package/dist/chunks/{ai-tag.CCJCOdXu.js.map → ai-tag.AyG2UWCB.js.map} +1 -1
- package/dist/chunks/{base-modal.DpmeDmq-.js → base-modal.C52VMtnd.js} +4 -4
- package/dist/chunks/{base-modal.DpmeDmq-.js.map → base-modal.C52VMtnd.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js → button-actions-with-menu.OsPQ-POD.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.ChTUOsZl.js.map → button-actions-with-menu.OsPQ-POD.js.map} +1 -1
- package/dist/chunks/{button-actions.BmU1DngD.js → button-actions.Bdbu0bvt.js} +2 -2
- package/dist/chunks/{button-actions.BmU1DngD.js.map → button-actions.Bdbu0bvt.js.map} +1 -1
- package/dist/chunks/{calendar.uvIGF_jU.js → calendar.CqsfThnC.js} +271 -253
- package/dist/chunks/calendar.CqsfThnC.js.map +1 -0
- package/dist/chunks/{card.WWUfBkqf.js → card.8z7UQeVK.js} +2 -2
- package/dist/chunks/{card.WWUfBkqf.js.map → card.8z7UQeVK.js.map} +1 -1
- package/dist/chunks/{checkbox-group.CI0xDnql.js → checkbox-group.Dur2Edtw.js} +4 -4
- package/dist/chunks/{checkbox-group.CI0xDnql.js.map → checkbox-group.Dur2Edtw.js.map} +1 -1
- package/dist/chunks/{checkbox.TsWA6O3Z.js → checkbox.vNjt6QDJ.js} +18 -18
- package/dist/chunks/{checkbox.TsWA6O3Z.js.map → checkbox.vNjt6QDJ.js.map} +1 -1
- package/dist/chunks/{click-outside.CDz_x8mN.js → click-outside.BG01Sm0A.js} +2 -2
- package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BG01Sm0A.js.map} +1 -1
- package/dist/chunks/{code-snippet.4DX9iUV8.js → code-snippet.BVpFBhKq.js} +3 -3
- package/dist/chunks/{code-snippet.4DX9iUV8.js.map → code-snippet.BVpFBhKq.js.map} +1 -1
- package/dist/chunks/{controls-group.D_KE99mg.js → controls-group.DSm2Ujwt.js} +2 -2
- package/dist/chunks/{controls-group.D_KE99mg.js.map → controls-group.DSm2Ujwt.js.map} +1 -1
- package/dist/chunks/{dashboard-section.TWlLdQHG.js → dashboard-section.DNxNVV44.js} +2 -2
- package/dist/chunks/{dashboard-section.TWlLdQHG.js.map → dashboard-section.DNxNVV44.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js → dashed-underline.DL2_sik5.js} +2 -2
- package/dist/chunks/{dashed-underline.CpDuQ3Fo.js.map → dashed-underline.DL2_sik5.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DZaE-kOS.js → data-grid-template.BFv1zr6g.js} +2 -2
- package/dist/chunks/{data-grid-template.DZaE-kOS.js.map → data-grid-template.BFv1zr6g.js.map} +1 -1
- package/dist/chunks/{data-grid.x6cEW0az.js → data-grid.ZHY5EzP3.js} +318 -316
- package/dist/chunks/{data-grid.x6cEW0az.js.map → data-grid.ZHY5EzP3.js.map} +1 -1
- package/dist/chunks/date-picker.kl6aFlr1.js +237 -0
- package/dist/chunks/date-picker.kl6aFlr1.js.map +1 -0
- package/dist/chunks/{date-range-picker.DPGy2h-9.js → date-range-picker.LCWVAa5R.js} +412 -391
- package/dist/chunks/date-range-picker.LCWVAa5R.js.map +1 -0
- package/dist/chunks/{directive.rXUeDb8p.js → directive.Bfr4fuOy.js} +2 -2
- package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Bfr4fuOy.js.map} +1 -1
- package/dist/{draggable-handle.js → chunks/draggable-handle.Ba28eM8o.js} +49 -40
- package/dist/chunks/draggable-handle.Ba28eM8o.js.map +1 -0
- package/dist/chunks/{dropdown-tag.t3FlJUSy.js → dropdown-tag.B61hPq5n.js} +2 -2
- package/dist/chunks/{dropdown-tag.t3FlJUSy.js.map → dropdown-tag.B61hPq5n.js.map} +1 -1
- package/dist/chunks/dropdown.Ca-f8tdX.js +1140 -0
- package/dist/chunks/dropdown.Ca-f8tdX.js.map +1 -0
- package/dist/chunks/error-message.CyERcfdt.js +72 -0
- package/dist/chunks/error-message.CyERcfdt.js.map +1 -0
- package/dist/chunks/field-label.DjjjkcO6.js +97 -0
- package/dist/chunks/field-label.DjjjkcO6.js.map +1 -0
- package/dist/chunks/{file-uploader.Cig5gDXT.js → file-uploader.DeWmLpfp.js} +5 -4
- package/dist/chunks/{file-uploader.Cig5gDXT.js.map → file-uploader.DeWmLpfp.js.map} +1 -1
- package/dist/chunks/{filter-bar.x445KK3y.js → filter-bar.Bd4ghW_B.js} +888 -871
- package/dist/chunks/filter-bar.Bd4ghW_B.js.map +1 -0
- package/dist/chunks/{footer-actions.CIkul1OD.js → footer-actions.CvUaoMzj.js} +2 -2
- package/dist/chunks/{footer-actions.CIkul1OD.js.map → footer-actions.CvUaoMzj.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DR5M7GP3.js → form-layout-title.DzGajv4U.js} +70 -61
- package/dist/chunks/form-layout-title.DzGajv4U.js.map +1 -0
- package/dist/chunks/{header-meta.BC5fdpD1.js → header-meta.AXUGoqDd.js} +2 -2
- package/dist/chunks/{header-meta.BC5fdpD1.js.map → header-meta.AXUGoqDd.js.map} +1 -1
- package/dist/chunks/{header-with-views.-cvdi9-L.js → header-with-views.Ba4dswJF.js} +10 -10
- package/dist/chunks/{header-with-views.-cvdi9-L.js.map → header-with-views.Ba4dswJF.js.map} +1 -1
- package/dist/chunks/{header.DtmZjxiU.js → header.C7B7RBib.js} +3 -3
- package/dist/chunks/{header.DtmZjxiU.js.map → header.C7B7RBib.js.map} +1 -1
- package/dist/chunks/{input-field-password.Bdlw4dzr.js → input-field-password.BNAtIn_D.js} +4 -4
- package/dist/chunks/{input-field-password.Bdlw4dzr.js.map → input-field-password.BNAtIn_D.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js → input-field-phone-number.CEYx1s4b.js} +3 -3
- package/dist/chunks/{input-field-phone-number.DPuWxBBz.js.map → input-field-phone-number.CEYx1s4b.js.map} +1 -1
- package/dist/chunks/{input-field.DH25CU_G.js → input-field.Dh5W0Az-.js} +74 -70
- package/dist/chunks/input-field.Dh5W0Az-.js.map +1 -0
- package/dist/chunks/input-time.BLuMfakv.js +135 -0
- package/dist/chunks/input-time.BLuMfakv.js.map +1 -0
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js → modal-fullscreen.DTvg2NLk.js} +2 -2
- package/dist/chunks/{modal-fullscreen.CaxuXW-H.js.map → modal-fullscreen.DTvg2NLk.js.map} +1 -1
- package/dist/chunks/{modal.Brif0vAy.js → modal.D_TcWTkf.js} +4 -4
- package/dist/chunks/{modal.Brif0vAy.js.map → modal.D_TcWTkf.js.map} +1 -1
- package/dist/chunks/on-click-outside.Cy1eFULD.js +109 -0
- package/dist/chunks/on-click-outside.Cy1eFULD.js.map +1 -0
- package/dist/chunks/{pagination.BmrU_sn_.js → pagination.D6BxMw5L.js} +37 -37
- package/dist/chunks/{pagination.BmrU_sn_.js.map → pagination.D6BxMw5L.js.map} +1 -1
- package/dist/chunks/{radio-group.5oS-AeYN.js → radio-group.Bb-L-0io.js} +3 -3
- package/dist/chunks/{radio-group.5oS-AeYN.js.map → radio-group.Bb-L-0io.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js → rich-text-editor.Dtdfh-0V.js} +6 -5
- package/dist/chunks/{rich-text-editor.DSGTe8Zt.js.map → rich-text-editor.Dtdfh-0V.js.map} +1 -1
- package/dist/chunks/{search-bar.CNfoeLLt.js → search-bar.MVJS9-Mh.js} +4 -4
- package/dist/chunks/{search-bar.CNfoeLLt.js.map → search-bar.MVJS9-Mh.js.map} +1 -1
- package/dist/chunks/{secondary-nav.IF5CgeIP.js → secondary-nav.C-nPZR-2.js} +2 -2
- package/dist/chunks/{secondary-nav.IF5CgeIP.js.map → secondary-nav.C-nPZR-2.js.map} +1 -1
- package/dist/chunks/{selection-card-group.DZjFeQKR.js → selection-card-group.CLJPaknG.js} +10 -10
- package/dist/chunks/{selection-card-group.DZjFeQKR.js.map → selection-card-group.CLJPaknG.js.map} +1 -1
- package/dist/chunks/{sidepanel.DZDXuyzg.js → sidepanel.BTRfwGiS.js} +4 -4
- package/dist/chunks/{sidepanel.DZDXuyzg.js.map → sidepanel.BTRfwGiS.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js → summary-grid.types.DUIqCmwg.js} +2 -2
- package/dist/chunks/{summary-grid.types.CrPNQbX0.js.map → summary-grid.types.DUIqCmwg.js.map} +1 -1
- package/dist/chunks/{textarea.Bi53QF5Q.js → textarea.CJS-1I41.js} +5 -4
- package/dist/chunks/{textarea.Bi53QF5Q.js.map → textarea.CJS-1I41.js.map} +1 -1
- package/dist/chunks/{timeline-item.C6Bi0eam.js → timeline-item.BOUWkLi1.js} +4 -4
- package/dist/chunks/{timeline-item.C6Bi0eam.js.map → timeline-item.BOUWkLi1.js.map} +1 -1
- package/dist/chunks/{tutorial.BCiZMLJE.js → tutorial.CZt_mcuT.js} +2 -2
- package/dist/chunks/{tutorial.BCiZMLJE.js.map → tutorial.CZt_mcuT.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.Bn3Y8Iuq.js → use-cached-selected-values.BJbWbkEQ.js} +180 -175
- package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +1 -0
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js → use-date-input-formatter.Djf8AoLr.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.DRMt9yR2.js.map → use-date-input-formatter.Djf8AoLr.js.map} +1 -1
- package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
- package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
- package/dist/click-outside.js +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/draggable.js +1396 -0
- package/dist/draggable.js.map +1 -0
- package/dist/dropdown.js +11 -12
- package/dist/dropdown.js.map +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 +274 -271
- 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/input-time.js +1 -1
- package/dist/internal.js +24 -23
- package/dist/internal.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/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/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +100 -4
- package/package.json +8 -13
- package/dist/assets/dropdown-default-textbox.css +0 -1
- package/dist/chunks/calendar.uvIGF_jU.js.map +0 -1
- package/dist/chunks/date-picker.Dln8ocL4.js +0 -222
- package/dist/chunks/date-picker.Dln8ocL4.js.map +0 -1
- package/dist/chunks/date-range-picker.DPGy2h-9.js.map +0 -1
- package/dist/chunks/debounce.DUTu11PS.js +0 -10
- package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js +0 -364
- package/dist/chunks/dropdown-default-textbox.CjhLIxVq.js.map +0 -1
- package/dist/chunks/dropdown.CvNI2V33.js +0 -790
- package/dist/chunks/dropdown.CvNI2V33.js.map +0 -1
- package/dist/chunks/error-message.BUNKRa_w.js +0 -160
- package/dist/chunks/error-message.BUNKRa_w.js.map +0 -1
- package/dist/chunks/filter-bar.x445KK3y.js.map +0 -1
- package/dist/chunks/form-layout-title.DR5M7GP3.js.map +0 -1
- package/dist/chunks/input-field.DH25CU_G.js.map +0 -1
- package/dist/chunks/input-time.6eJ4-QdU.js +0 -92
- package/dist/chunks/input-time.6eJ4-QdU.js.map +0 -1
- package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
- package/dist/chunks/on-click-outside.BW4rkhzG.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.Bn3Y8Iuq.js.map +0 -1
- package/dist/draggable-handle.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-layout-title.DR5M7GP3.js","sources":["../../src/components/form-layout/form-layout.vue","../../src/components/form-layout/components/form-layout-field-tip/form-layout-tip.types.ts","../../src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue","../../src/components/form-layout/components/form-layout-group/form-layout-group.types.ts","../../src/components/form-layout/components/form-layout-group/form-layout-group.vue","../../src/components/form-layout/components/form-layout-title/form-layout-title.vue"],"sourcesContent":["<template>\n <component :is=\"formLayoutElement\" class=\"b-form-layout\" role=\"form\" @submit=\"emit('submit', $event)\">\n <bento-alert v-if=\"hasSlot('error-message')\" class=\"b-form-layout__error-message\" type=\"critical\">\n <template #description>\n <slot name=\"error-message\" />\n </template>\n </bento-alert>\n\n <slot />\n\n <div v-if=\"hasActions\" class=\"b-form-layout__actions-container\">\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-left\" />\n </div>\n\n <div class=\"b-form-layout__actions\">\n <slot name=\"actions-right\" />\n </div>\n </div>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, toRef, useSlots } from 'vue';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables';\n import { FORM_LAYOUT_LOADING_INJECTION_KEY } from './form-layout.types';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"submit\"]);\n\n const props = defineProps({\n /**\n * Renders the form layout as an HTML `form`\n */\n form: { type: Boolean, default: false },\n\n /**\n * Sets the state of the form and its fields to\n * a read only status.\n */\n loading: { type: Boolean, default: false },\n });\n\n const formLayoutElement = computed(() => (props.form ? 'form' : 'div'));\n const hasActions = computed(() => hasSlot('actions-left') || hasSlot('actions-right'));\n\n provide(FORM_LAYOUT_LOADING_INJECTION_KEY, toRef(props, 'loading'));\n</script>\n\n<script lang=\"ts\">\n /**\n * Form layout component is a pre-designed layout that serves\n * as a starting point for creating a form.\n *\n * It can include various common form components:\n * input field, dropdown, date picker, checkbox group, radio group,\n * textarea, etc.\n *\n * Form layout is context agnostic and can be dropped in different\n * places, for example in modals, side panels or pages.\n *\n * @example\n * import { BentoFormLayout, BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayout, BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout>\n * <template #error-message>There is an error. Correct the highlighted field.</template>\n *\n * <bento-input-field>Input field</bento-input-field>\n *\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n *\n * <bento-form-layout-title subsection>\n * Section title\n * <template #description>Optional section description</template>\n * </bento-form-layout-title>\n * </bento-form-layout>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout.scss\" />\n","import { type BentoAlertTypeOption } from '@/components/alert/alert.types';\n\nexport type BentoFormLayoutFieldTipTypeOption = `${BentoAlertTypeOption}`;\nexport const BentoFormLayoutFieldTipTypeOptions = ['warning', 'critical', 'highlight', 'success'];\n","<template>\n <div class=\"b-form-layout-field-tip\">\n <slot />\n <bento-alert v-if=\"hasSlot('message')\" :id=\"id\" variant=\"tip\" :type=\"type\">\n <template #description>\n <slot name=\"message\" />\n </template>\n </bento-alert>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { type PropType, useSlots } from 'vue';\n import {\n type BentoFormLayoutFieldTipTypeOption,\n BentoFormLayoutFieldTipTypeOptions,\n } from './form-layout-tip.types';\n import { BentoAlert } from '@/components/alert';\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n\n defineProps({\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values highlight, success, critical, warning\n */\n type: {\n type: String as PropType<BentoFormLayoutFieldTipTypeOption>,\n default: 'highlight',\n validator: (value: BentoFormLayoutFieldTipTypeOption) => BentoFormLayoutFieldTipTypeOptions.includes(value),\n },\n /**\n * Unique identifier to the form field. Used for accessibility.\n */\n id: {\n type: String,\n default: undefined,\n },\n });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n</script>\n\n<script lang=\"ts\">\n /**\n * You can help users provide accurate and well formatted information\n * by using various elements that come with an input field.\n *\n * Use description/supporting text to add additional context to the\n * field or guidance how to format the input correctly.\n * Because description is always visible it should be the first\n * choice in providing guidance.\n *\n * @example\n * import { BentoFormLayoutFieldTip } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutFieldTip },\n * template: `\n * <bento-form-layout-field-tip>\n * <bento-dropdown label=\"Dropdown\" :items=\"dropdownItems\" placeholder=\"Select an animal\" />\n *\n * <template #message>This is a small tip that can be used in small spaces</template>\n * </bento-form-layout-field-tip>\n * `\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-field-tip.scss\" />\n","export type BentoLayoutGroupProportions =\n | '33-33-33'\n | '50-50'\n | '25-75'\n | '75-25'\n | '33-66'\n | '66-33'\n | '25'\n | '33'\n | '50'\n | '100';\n\nexport const BentoLayoutGroupProportions = [\n '100',\n '50',\n '33',\n '25',\n '66-33',\n '33-66',\n '75-25',\n '25-75',\n '50-50',\n '33-33-33',\n];\n","<template>\n <div class=\"b-form-layout-group\" :class=\"conditionalClasses\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType } from 'vue';\n import { BentoLayoutGroupProportions } from './form-layout-group.types';\n\n // Default proportion\n const DEFAULT_PROPORTION = 100;\n\n const props = defineProps({\n /**\n * The layout of the pair group of components.\n * This will render the components within the width of the proportions.\n * Only two colums are available.\n *\n * If only one value is entered, then it will assume there's only one child in the group.\n * If two values are entered, the first value will be use for the first child and the second\n * value for the second child.\n *\n * If the value entered is not listed in the example\n * list below it will use 100% by default.\n * @example\n * '33-33-33'\n * '50-50'\n * '25-75'\n * '75-25'\n * '33-66'\n * '66-33'\n * '25'\n * '33'\n * '50'\n * '100'\n */\n layout: {\n type: String as PropType<BentoLayoutGroupProportions>,\n default: '100',\n validator: (value: BentoLayoutGroupProportions) => BentoLayoutGroupProportions.includes(value),\n },\n });\n\n // Sets DEFAULT_PROPORTION by default if `layout` is not in the list\n const computedLayout = computed(() =>\n BentoLayoutGroupProportions.includes(props.layout) ? props.layout : DEFAULT_PROPORTION\n );\n\n const conditionalClasses = computed(() => ({\n // Transform into column if the layout is unsupported\n 'b-form-layout-group--column': !BentoLayoutGroupProportions.includes(props.layout),\n // Assings the correct layout class\n [`b-form-layout-group--${computedLayout.value}`]: true,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Use to provide horizontal layouts to build forms\n * with two fields per line.\n *\n * These can be used for field combinations,\n * such as post code and city or title and first name.\n *\n * @example\n * import { BentoFormLayoutGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutGroup },\n * template: `\n * <bento-form-layout-group>\n * <first-element />\n * <second-element />\n * </bento-form-layout-group>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-group.scss\" />\n","<template>\n <div class=\"b-form-layout-title\" :class=\"conditionalClasses\">\n <bento-typography :el=\"el\" variant=\"title\" :medium=\"isSection\">\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description') || allFieldsRequired\"\n class=\"b-form-layout-title__description\"\n el=\"span\"\n wide\n >\n <slot name=\"description\" />\n <template v-if=\"allFieldsRequired\">\n {{ hasSlot('description') ? ` ${t('requiredFields')}` : t('requiredFields') }}\n </template>\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, useSlots } from 'vue';\n import { BentoTypography, BentoTypographyElement } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n /**\n * Defines if the Form Layout title is\n * a \"section\" or a \"subsection\".\n * Default is \"section\" (false). Turn into \"true\" for \"subsection\"\n */\n subsection: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the HTML DOM element.\n * @values h1, h2, h3, h4, h5, h6, div, p, span\n */\n el: {\n type: BentoTypography.props.el.type,\n required: true,\n validator: (value: BentoTypographyElement) => Object.values(BentoTypographyElement).includes(value),\n },\n\n /**\n * Defines if the Form Layout title displays\n * a message indicating that all fields are required.\n */\n allFieldsRequired: {\n type: Boolean,\n default: false,\n },\n });\n\n // Uses \"medium\" typography if it is a section title\n const isSection = computed(() => !props.subsection);\n const hasSlot = useHasSlot(slots);\n const conditionalClasses = computed(() => ({\n 'b-form-layout-title--subsection': props.subsection,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * If you’re building a lengthy form, organize related\n * fields into sections and, if needed, subsections.\n *\n * A form can have a \"Section Title\" and multiple \"Subsection titles\".\n *\n * One of the values provided in @see BentoTypographyElement must always be provided as a string\n * to define correct HTML sementic from the application's context\n *\n * @example\n * import { BentoFormLayoutTitle } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoFormLayoutTitle },\n * template: `\n * <bento-form-layout-title subsection el=\"h2\">\n * Title\n * <template #description>Description text</template>\n * </bento-form-layout-title>\n * `\n * }\n */\n export default {\n name: 'bento-form-layout-title',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./form-layout-title.scss\" />\n"],"names":["__default__$3","slots","useSlots","hasSlot","useHasSlot","formLayoutElement","computed","props","hasActions","provide","FORM_LAYOUT_LOADING_INJECTION_KEY","toRef","BentoFormLayoutFieldTipTypeOptions","__default__$2","BentoLayoutGroupProportions","__default__$1","DEFAULT_PROPORTION","computedLayout","conditionalClasses","__default__","messages","t","useI18n","isSection"],"mappings":";;;;;;;;AAwFI,MAAAA,IAAA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A;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.DH25CU_G.js","sources":["../../src/components/input-field/input-field.types.ts","../../src/components/input-field/input-field.vue"],"sourcesContent":["import { type BentoDropdownProps } from '../dropdown/dropdown.types';\nimport { 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 BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = BentoDropdownProps;\nexport interface BentoInputDropdownProps {\n /**\n * Text that labels the dropdown element\n */\n 'aria-label'?: string;\n /**\n * Enables dynamic filtering\n */\n dynamicFiltering?: DropdownProps['dynamicFiltering'];\n /**\n * List of available items\n */\n items: DropdownProps['items'];\n /**\n * Sets the dropdown in read-only mode\n */\n readonly?: DropdownProps['readonly'];\n /**\n * Selected value of the dropdown\n * @deprecated Use `model-value` instead.\n */\n value?: DropdownProps['value'];\n /**\n * Selected value of the dropdown\n */\n modelValue?: DropdownProps['modelValue'];\n}\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n\nexport interface BentoInputFieldProps extends FormField {\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden?: boolean;\n\n /**\n * Text that labels an the input element\n *\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Reduces height of the input\n */\n condensed?: boolean;\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * Properties supported:\n *\n * - `aria-label`: Text that labels the dropdown element\n * - `dynamicFiltering`: Enables dynamic filtering\n * - `items`: List of available items\n * - `readonly`: Sets the dropdown in read-only mode\n * - `value`: Selected value of the dropdown\n */\n dropdown?: BentoInputDropdownProps;\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error?: boolean;\n\n /**\n * Text displayed as the value of the input-field\n */\n modelValue?: BentoInputFieldValue;\n\n /**\n * Renders a font numeric style with slashed zeros instead of normal ones.\n */\n slashedZero?: boolean;\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue?: string;\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n\n /**\n * A string specifying the type of control to render.\n * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type?: BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type'];\n\n /**\n * Text displayed as the value of the input-field\n * @deprecated for usage with properties since version 2.0. Use `v-model` or `model-value` instead.\n */\n value?: BentoInputFieldValue;\n\n /**\n * Describes the different variants for the input element\n */\n variant?: BentoInputFieldVariant | `${BentoInputFieldVariant}`;\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default') || label\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n :label=\"label\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && (hasSlot('defaultIconBefore') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n <div class=\"b-input-field__input-container\">\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :aria-required=\"required\"\n :type=\"type\"\n :value=\"modelValue ?? value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"emit('keydown', $event)\"\n @keyup=\"emit('keyup', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n @click=\"emit('click', $event)\"\n />\n\n <!-- Hint at the end -->\n <bento-typography\n v-if=\"hint && isFocused && (modelValue || value)\"\n el=\"span\"\n class=\"b-input-field__hint\"\n >\n {{ hint }}\n </bento-typography>\n </div>\n\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n data-testid=\"input-field-dropdown-container-end\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n ref=\"inputDropdownElement\"\n v-bind=\"inputFieldDropdownProps\"\n :disabled=\"disabled\"\n :readonly=\"isDropdownReadOnly\"\n @update:model-value=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span\n v-if=\"hasSlot('description') || description\"\n :id=\"descriptionId\"\n class=\"b-input-field__description\"\n @click=\"focusInput\"\n >\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\">\n {{ description }}\n </slot>\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, type Ref, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n import { generateUid } from '@/core/utils/ts';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import {\n INPUT_FIELD_COMPONENT_INJECTION_KEY,\n INPUT_FIELD_HINT_INJECTION_KEY,\n INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY,\n } from '@/components/input-field/input-field.keys';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import {\n type BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n type BentoInputFieldProps,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n type BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n description: { default: '' },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\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 ariaHidden: { type: Boolean, default: true },\n ariaLabel: { default: undefined },\n condensed: { type: Boolean, default: false },\n dropdown: { default: undefined },\n dropdownPosition: { default: BentoInputFieldElementPosition.START },\n error: { type: Boolean, default: false },\n modelValue: { default: undefined },\n slashedZero: { type: Boolean, default: false },\n staticValue: { default: '' },\n staticValuePosition: { default: BentoInputFieldElementPosition.START },\n type: { default: BentoInputFieldType.TEXT },\n value: { default: undefined },\n variant: { default: BentoInputFieldVariant.DEFAULT }\n});\n\n const emit = defineEmits([\"blur\", \"click\", \"change\", \"dropdown-input\", \"escape-pressed\", \"focus\", \"keydown\", \"keyup\", \"input\", \"update:dropdown\", \"update:model-value\"]);\n\n const { emitValue } = useFormFieldEmits<BentoInputFieldValue>(emit);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputDropdownElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n const isFocused = ref(false);\n\n // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\n // Renders the input with a hint if a string is provided\n const hint = inject<Ref<string | undefined>>(INPUT_FIELD_HINT_INJECTION_KEY, ref(undefined));\n\n const onFocus = () => {\n isFocused.value = true;\n emit('focus');\n };\n\n const onBlur = () => {\n isFocused.value = false;\n emit('blur');\n };\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const isDropdownReadOnly = computed<BentoInputDropdownProps['readonly']>(\n () => isReadOnly.value || props.dropdown?.readonly\n );\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedLabel = computed(() => (getSlotText(slots)('default') as string) || props.label);\n const computedDescription = computed(() => (getSlotText(slots)('description') as string) || props.description);\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n // vue-i18n issue with t() used in script - direct usage in template works\n // requires either createI18n({ legacy: false }) or to be wrapped in computed()\n const computedAriaLabelFallbackMessage = computed(() => t('ariaLabelFallback'));\n const computedAriaLabelDropdowFallback = computed(() =>\n t('ariaLabelDropdownFallback', { inputLabel: computedAriaLabel.value })\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: computedLabel.value || computedAriaLabelFallbackMessage,\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${computedDescription.value ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--slashed-zero`]: props.slashedZero,\n }));\n\n const inputFieldDropdownProps = computed(() => ({\n 'aria-label': computedAriaLabelDropdowFallback.value,\n ...props.dropdown,\n }));\n\n const onInput = (event: Event) => {\n const inputValue = (event.target as HTMLInputElement).value;\n if (!props.disabled && !isReadOnly.value) {\n emitValue(inputValue);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n const focus = () => {\n if (props.variant === 'dropdown') {\n inputDropdownElement.value.focus();\n } else {\n focusInput();\n }\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n focus,\n });\n\n const inputFieldParentComponent = inject(INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY, '');\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType) && !inputFieldParentComponent) {\n if (props.type === 'tel') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-phone-number\" instead.`\n );\n } else if (props.type === 'password') {\n printDevelopmentWarning(\n `\"bento-input-field\" dropdown does not support the type '${props.type}', use \"bento-input-field-password\" instead.`\n );\n } else {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type '${props.type}'`);\n }\n }\n\n /**\n * Deprecations\n */\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\n '2.0.0'\n );\n }\n\n if (props.value) {\n deprecate(\n 'BentoInputField \"value\" property',\n `The use of \"value\" prop in \"BentoInputField\" is no longer supported.\n Use the \"v-model\" or \"model-value\" property instead.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :model-value=\"inputValue\"\n * :@update:model-value=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n name: 'bento-input-field',\n model: { prop: 'modelValue' },\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","emitValue","useFormFieldEmits","emit","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputDropdownElement","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isFocused","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","hint","inject","INPUT_FIELD_HINT_INJECTION_KEY","onFocus","onBlur","isReadOnly","useFormLayoutFieldLoading","toRef","props","isDropdownReadOnly","computed","_a","shouldShowStaticValue","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedLabel","getSlotText","computedDescription","computedAriaOwns","computedAriaLabelFallbackMessage","computedAriaLabelDropdowFallback","computedAriaLabel","ariaLabelAttribute","ariaLabel","toRefs","useAriaLabel","computedAriaDescribedBy","inputFieldConditionalClasses","inputFieldDropdownProps","onInput","event","inputValue","onDropdownInput","selectedValue","focusInput","focus","expose","inputFieldParentComponent","INPUT_FIELD_PARENT_COMPONENT_INJECTION_KEY","printDevelopmentWarning","deprecate"],"mappings":";;;;;;;;;;;;;AAMO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAULE,IAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKLE,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAULE,IAAA,kBAAAC,OACHA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GA0CLE,KAAA,kBAAAC,OACHA,EAAA,QAAA,SACAA,EAAA,iBAAA,kBACAA,EAAA,kBAAA,mBACAA,EAAA,iBAAA,kBACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,UAAA,WARQA,IAAAD,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GC0XRE,KAAA;AAAA,EAAe,M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,EAAA,IAAA,GAAA,IAORA,EAAA,SACIsC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR5D,EAAA,mBAAA,KACI4D;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA,GAIRtC,EAAA,SACIsC;AAAA,MAAA;AAAA,MACI;AAAA;AAAA,MACA;AAAA,IAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, useSlots as _, ref as y, computed as g, watch as v } from "vue";
|
|
2
|
-
import { B as h } from "./input-field.DH25CU_G.js";
|
|
3
|
-
import { d as b } from "./debounce.DUTu11PS.js";
|
|
4
|
-
import { u as I } from "./index.B6WW_F-J.js";
|
|
5
|
-
import { u as T } from "./use-has-slot.C9lQZ6nz.js";
|
|
6
|
-
import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
7
|
-
import "../assets/input-time.css";
|
|
8
|
-
const B = /[\d]/, S = /^\d{2}$/, x = /^\d{2}:\d{2}$/, p = (o) => /^(?:[01]\d|2[0-4]):(?:[0-5]\d):(?:[0-5]\d)$/.test(o), V = (o) => {
|
|
9
|
-
const { selectionStart: e } = o.target, n = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], t = B.test(o.key) || n.includes(o.key), a = [1, 2, 4, 5].includes(e) && o.key === ":";
|
|
10
|
-
!t && !a && o.preventDefault();
|
|
11
|
-
}, w = (o) => {
|
|
12
|
-
if (!o)
|
|
13
|
-
return o;
|
|
14
|
-
let e = o;
|
|
15
|
-
if (e.length === 1 && parseInt(o, 10) > 2)
|
|
16
|
-
return `0${e}:`;
|
|
17
|
-
const [n, t] = e.slice(-2);
|
|
18
|
-
return [2, 5].includes(e.length) && t === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (S.test(e) || x.test(e)) && (e += ":"), e;
|
|
19
|
-
}, k = {
|
|
20
|
-
"en-US": {
|
|
21
|
-
invalidTimeFormat: "Invalid time format",
|
|
22
|
-
timeFormatDescription: "HH:MM:SS"
|
|
23
|
-
}
|
|
24
|
-
}, $ = {
|
|
25
|
-
i18n: { messages: k },
|
|
26
|
-
name: "bento-input-time",
|
|
27
|
-
inheritAttrs: !1,
|
|
28
|
-
model: { prop: "modelValue" }
|
|
29
|
-
}, F = /* @__PURE__ */ m({
|
|
30
|
-
...$,
|
|
31
|
-
props: {
|
|
32
|
-
description: { default: void 0 },
|
|
33
|
-
disabled: { type: Boolean, default: !1 },
|
|
34
|
-
errorMessage: { default: null },
|
|
35
|
-
label: { default: "" },
|
|
36
|
-
optional: { type: Boolean, default: !1 },
|
|
37
|
-
placeholder: { default: "" },
|
|
38
|
-
readonly: { type: Boolean, default: !1 },
|
|
39
|
-
required: { type: Boolean, default: !1 },
|
|
40
|
-
tooltipText: { default: null },
|
|
41
|
-
condensed: { type: Boolean, default: !1 },
|
|
42
|
-
modelValue: { default: void 0 }
|
|
43
|
-
},
|
|
44
|
-
emits: ["update:model-value", "keydown", "input:valid", "input:error"],
|
|
45
|
-
setup(o, { emit: e }) {
|
|
46
|
-
const n = o, t = 300, a = _(), c = T(a), { t: i } = I(), l = y(!1), f = g(() => n.errorMessage ? n.errorMessage : l.value ? i("invalidTimeFormat") : null), d = (r) => {
|
|
47
|
-
if (!r) {
|
|
48
|
-
l.value = !1;
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const s = p(r);
|
|
52
|
-
l.value = !s, e(s ? "input:valid" : "input:error");
|
|
53
|
-
}, u = b(d, t);
|
|
54
|
-
return v(
|
|
55
|
-
() => n.modelValue,
|
|
56
|
-
(r) => {
|
|
57
|
-
const s = String(r ?? "");
|
|
58
|
-
s.length === 8 && p(s) && (l.value = !1);
|
|
59
|
-
}
|
|
60
|
-
), { __sfc: !0, VALIDATION_DEBOUNCE_TIME: t, slots: a, hasSlot: c, t: i, props: n, emit: e, internalError: l, computedErrorMessage: f, validateTime: d, validateTimeWithDebounce: u, onInput: (r) => {
|
|
61
|
-
if (n.disabled || n.readonly)
|
|
62
|
-
return;
|
|
63
|
-
const s = w(String(r ?? ""));
|
|
64
|
-
e("update:model-value", s), u(s);
|
|
65
|
-
}, onKeyDown: (r) => {
|
|
66
|
-
V(r), e("keydown", r);
|
|
67
|
-
}, BentoInputField: h };
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
var M = function() {
|
|
71
|
-
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
72
|
-
return n(t.BentoInputField, e._b({ staticClass: "b-input-time", attrs: { condensed: t.props.condensed, disabled: t.props.disabled, "error-message": t.computedErrorMessage, label: t.props.label, "model-value": t.props.modelValue, optional: t.props.optional, placeholder: t.props.placeholder, readonly: t.props.readonly, required: t.props.required, "tooltip-text": t.props.tooltipText }, on: { "update:model-value": t.onInput, keydown: t.onKeyDown }, scopedSlots: e._u([t.hasSlot("default") ? { key: "default", fn: function() {
|
|
73
|
-
return [e._t("default")];
|
|
74
|
-
}, proxy: !0 } : null, { key: "description", fn: function() {
|
|
75
|
-
return [e._t("description", function() {
|
|
76
|
-
return [e._v(e._s(t.props.description ? `${t.props.description} ${t.t("timeFormatDescription")}` : t.t("timeFormatDescription")))];
|
|
77
|
-
})];
|
|
78
|
-
}, proxy: !0 }], null, !0) }, "bento-input-field", e.$attrs, !1));
|
|
79
|
-
}, E = [], A = /* @__PURE__ */ D(
|
|
80
|
-
F,
|
|
81
|
-
M,
|
|
82
|
-
E,
|
|
83
|
-
!1,
|
|
84
|
-
null,
|
|
85
|
-
"cc5689e0"
|
|
86
|
-
);
|
|
87
|
-
const U = A.exports;
|
|
88
|
-
export {
|
|
89
|
-
U as B,
|
|
90
|
-
p as i
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=input-time.6eJ4-QdU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-time.6eJ4-QdU.js","sources":["../../src/utils/ts/time-input.ts","../../src/components/input-time/input-time.vue"],"sourcesContent":["const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\n/**\n * Validates a complete time string in HH:MM:SS format.\n * Hours: 00-24, Minutes: 00-59, Seconds: 00-59\n * @param timeText The time string to validate\n * @returns True if the time string is valid, false otherwise\n */\nexport const isValidTimeString = (timeText: string): boolean =>\n /^(?:[01]\\d|2[0-4]):(?:[0-5]\\d):(?:[0-5]\\d)$/.test(timeText);\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart } = event.target as HTMLInputElement;\n\n const allowedKeys = ['Backspace', 'Tab', 'ArrowLeft', 'ArrowRight'];\n const isValidKey = validDigitRegex.test(event.key) || allowedKeys.includes(event.key);\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n\n if (!isValidKey && !isValidColon) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <bento-input-field\n class=\"b-input-time\"\n :condensed=\"props.condensed\"\n :disabled=\"props.disabled\"\n :error-message=\"computedErrorMessage\"\n :label=\"props.label\"\n :model-value=\"props.modelValue\"\n :optional=\"props.optional\"\n :placeholder=\"props.placeholder\"\n :readonly=\"props.readonly\"\n :required=\"props.required\"\n :tooltip-text=\"props.tooltipText\"\n v-bind=\"$attrs\"\n @update:model-value=\"onInput\"\n @keydown=\"onKeyDown\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template #description>\n <slot name=\"description\">{{\n props.description ? `${props.description} ${t('timeFormatDescription')}` : t('timeFormatDescription')\n }}</slot>\n </template>\n </bento-input-field>\n</template>\n\n<script setup lang=\"ts\">\n // Components\n import { BentoInputField } from '@/components/input-field';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { useI18n } from '@/utils/ts/i18n';\n import { formatTimeInputValue, isValidTimeString, validateTimeInput } from '@/utils/ts/time-input';\n\n // Types\n import type { BentoInputFieldValue } from '@/components/input-field/input-field.types';\n import { type BentoInputTimeProps } from './input-time.types';\n\n // Localization\n import messages from './messages.json';\n\n import { computed, ref, useSlots, watch } from 'vue';\n import { useHasSlot } from '@/composables';\n\n const VALIDATION_DEBOUNCE_TIME = 300;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const props = defineProps({\n description: { default: undefined },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\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 condensed: { type: Boolean, default: false },\n modelValue: { default: undefined }\n});\n\n const emit = defineEmits([\"update:model-value\", \"keydown\", \"input:valid\", \"input:error\"]);\n\n const internalError = ref(false);\n\n const computedErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return internalError.value ? t('invalidTimeFormat') : null;\n });\n\n const validateTime = (timeText: string) => {\n if (!timeText) {\n internalError.value = false;\n return;\n }\n\n const isValid = isValidTimeString(timeText);\n internalError.value = !isValid;\n\n if (isValid) {\n emit('input:valid');\n } else {\n emit('input:error');\n }\n };\n\n const validateTimeWithDebounce = debounce(validateTime, VALIDATION_DEBOUNCE_TIME);\n\n // Watch for external modelValue changes (e.g., when parent resets the value)\n watch(\n () => props.modelValue,\n newValue => {\n const timeText = String(newValue ?? '');\n // Clear the error only when the new value is a complete, valid time string\n if (timeText.length === 8 && isValidTimeString(timeText)) {\n internalError.value = false;\n }\n }\n );\n\n const onInput = (value: BentoInputFieldValue) => {\n if (props.disabled || props.readonly) {\n return;\n }\n const formatted = formatTimeInputValue(String(value ?? ''));\n emit('update:model-value', formatted);\n validateTimeWithDebounce(formatted);\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n validateTimeInput(event);\n emit('keydown', event);\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Input time component for entering time values in HH:MM:SS format.\n * This is an extension of the `bento-input-field` component with built-in\n * time formatting and validation logic.\n *\n * @usage\n * import { BentoInputTime } from '@adyen/bento-vue2';\n *\n * const timeValue = ref('');\n *\n * export default {\n * components: { BentoInputTime },\n * template: `\n * <bento-input-time\n * label=\"Start time\"\n * :model-value=\"timeValue\"\n * @update:model-value=\"newValue => timeValue.value = newValue\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-input-time',\n inheritAttrs: false,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-time.scss\" />\n"],"names":["validDigitRegex","hourRegex","minuteRegex","isValidTimeString","timeText","validateTimeInput","event","selectionStart","allowedKeys","isValidKey","isValidColon","formatTimeInputValue","value","formattedValue","secondToLastDigit","lastDigit","__default__","messages","VALIDATION_DEBOUNCE_TIME","slots","useSlots","hasSlot","useHasSlot","t","useI18n","internalError","ref","computedErrorMessage","computed","props","validateTime","isValid","emit","validateTimeWithDebounce","debounce","watch","newValue","formatted"],"mappings":";;;;;;;AAAA,MAAAA,IAAA,QAEAC,IAAA,WACAC,IAAA,iBAQOC,IAAA,CAAAC,MAAA,8CAAA,KAAAA,CAAA,GAGAC,IAAA,CAAAC,MAAA;AACH,QAAA,EAAA,gBAAAC,EAAA,IAAAD,EAAA,QAEAE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D,IACI,gBAEA,aAFA;AAAA,IAGJ,GAGJE,IAAAC,EAAAJ,GAAAZ,CAAA;AAGA,WAAAiB;AAAA,MAAA,MAAAN,EAAA;AAAA,MACgB,CAAAO,MAAA;AAER,cAAAhC,IAAA,OAAAgC,KAAA,EAAA;AAEA,QAAAhC,EAAA,WAAA,KAAAD,EAAAC,CAAA,MACIqB,EAAA,QAAA;AAAA,MACJ;AAAA,IACJ,8LAGJ,CAAAb,MAAA;AACI,UAAAiB,EAAA,YAAAA,EAAA;AACI;AAEJ,YAAAQ,IAAA1B,EAAA,OAAAC,KAAA,EAAA,CAAA;AACA,MAAAoB,EAAA,sBAAAK,CAAA,GACAJ,EAAAI,CAAA;AAAA,IAAkC,cAGtC,CAAA/B,MAAA;AACI,MAAAD,EAAAC,CAAA,GACA0B,EAAA,WAAA1B,CAAA;AAAA,IAAqB;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { watch as P } from "vue";
|
|
2
|
-
import { n as A, u as a, r as k, d as w, i as v } from "./utils.BzUwtTXc.js";
|
|
3
|
-
const I = (o) => typeof o == "string";
|
|
4
|
-
function h(...o) {
|
|
5
|
-
let c, n, r, l;
|
|
6
|
-
if (I(o[0]) || Array.isArray(o[0]) ? ([n, r, l] = o, c = w) : [c, n, r, l] = o, !c)
|
|
7
|
-
return A;
|
|
8
|
-
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
9
|
-
const f = [], m = () => {
|
|
10
|
-
f.forEach((s) => s()), f.length = 0;
|
|
11
|
-
}, i = (s, p, t, e) => (s.addEventListener(p, t, e), () => s.removeEventListener(p, t, e)), d = P(
|
|
12
|
-
() => [a(c), k(l)],
|
|
13
|
-
([s, p]) => {
|
|
14
|
-
m(), s && f.push(
|
|
15
|
-
...n.flatMap(
|
|
16
|
-
(t) => r.map(
|
|
17
|
-
(e) => i(
|
|
18
|
-
s,
|
|
19
|
-
t,
|
|
20
|
-
e,
|
|
21
|
-
p
|
|
22
|
-
)
|
|
23
|
-
)
|
|
24
|
-
)
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
{ immediate: !0, flush: "post" }
|
|
28
|
-
);
|
|
29
|
-
return () => {
|
|
30
|
-
d(), m();
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
let E = !1;
|
|
34
|
-
function W(o, c, n = {}) {
|
|
35
|
-
const { window: r = w, ignore: l = [], capture: f = !0, detectIframe: m = !1 } = n;
|
|
36
|
-
if (!r)
|
|
37
|
-
return;
|
|
38
|
-
v && !E && (E = !0, Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", A)));
|
|
39
|
-
let i = !0;
|
|
40
|
-
const d = (t) => (
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
42
|
-
l.some((e) => {
|
|
43
|
-
if (typeof e == "string")
|
|
44
|
-
return Array.from(r.document.querySelectorAll(e)).some(
|
|
45
|
-
(y) => y === t.target || t.composedPath().includes(y)
|
|
46
|
-
);
|
|
47
|
-
const u = a(e);
|
|
48
|
-
return u && (t.target === u || t.composedPath().includes(u));
|
|
49
|
-
})
|
|
50
|
-
), s = [
|
|
51
|
-
h(r, "click", (t) => {
|
|
52
|
-
const e = a(o);
|
|
53
|
-
if (!(!e || e === t.target || t.composedPath().includes(e))) {
|
|
54
|
-
if (t.detail === 0 && (i = !d(t)), !i) {
|
|
55
|
-
i = !0;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
c(t);
|
|
59
|
-
}
|
|
60
|
-
}, { passive: !0, capture: f }),
|
|
61
|
-
h(
|
|
62
|
-
r,
|
|
63
|
-
"pointerdown",
|
|
64
|
-
(t) => {
|
|
65
|
-
const e = a(o);
|
|
66
|
-
e && (i = !t.composedPath().includes(e) && !d(t));
|
|
67
|
-
},
|
|
68
|
-
{ passive: !0 }
|
|
69
|
-
),
|
|
70
|
-
h(
|
|
71
|
-
r,
|
|
72
|
-
"pointerup",
|
|
73
|
-
(t) => {
|
|
74
|
-
const e = a(o);
|
|
75
|
-
e && (i = i && !t.composedPath().includes(e) && !d(t));
|
|
76
|
-
},
|
|
77
|
-
{ passive: !0 }
|
|
78
|
-
),
|
|
79
|
-
m && h(r, "blur", (t) => {
|
|
80
|
-
var u;
|
|
81
|
-
const e = a(o);
|
|
82
|
-
((u = r.document.activeElement) == null ? void 0 : u.tagName) === "IFRAME" && !(e != null && e.contains(r.document.activeElement)) && c(t);
|
|
83
|
-
})
|
|
84
|
-
].filter(Boolean);
|
|
85
|
-
return () => s.forEach((t) => t());
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
W as o,
|
|
89
|
-
h as u
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=on-click-outside.BW4rkhzG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"on-click-outside.BW4rkhzG.js","sources":["../../src/directives/click-outside/useEventListener/index.ts","../../src/directives/click-outside/on-click-outside.ts"],"sourcesContent":["import type { Fn } from '@/types/functions';\nimport type { MaybeComputedRef } from '@/types/refs';\nimport type { Arrayable, GeneralEventListener } from './types';\nimport { watch } from 'vue';\nimport { defaultWindow, noop, resolveUnref, unrefElement } from '../utils';\n\n/**\n * Verify type of input value\n * @param val Value to be evaluated as string\n * @returns {boolean} true if the value is a \"string\", false if it's something else\n */\nconst isString = (val: unknown): val is string => typeof val === 'string';\n\n/**\n * Register using addEventListener on mounted, and removeEventListener automatically on unmounted.\n *\n * Overload 1: Omitted Window target\n *\n * @see https://vueuse.org/useEventListener\n * @param event\n * @param listener\n * @param options\n */\nexport function useEventListener<E extends keyof WindowEventMap>(\n event: Arrayable<E>,\n listener: Arrayable<(this: Window, ev: WindowEventMap[E]) => unknown>,\n options?: MaybeComputedRef<boolean | AddEventListenerOptions>\n): Fn;\n\n/**\n * Register using addEventListener on mounted, and removeEventListener automatically on unmounted.\n *\n * Overload 2: Explicitly Window target\n *\n * @see https://vueuse.org/useEventListener\n * @param target\n * @param event\n * @param listener\n * @param options\n */\nexport function useEventListener<E extends keyof WindowEventMap>(\n target: Window,\n event: Arrayable<E>,\n listener: Arrayable<(this: Window, ev: WindowEventMap[E]) => unknown>,\n options?: MaybeComputedRef<boolean | AddEventListenerOptions>\n): Fn;\n\n/**\n * Register using addEventListener on mounted, and removeEventListener automatically on unmounted.\n *\n * Overload 3: Explicitly Document target\n *\n * @see https://vueuse.org/useEventListener\n * @param target\n * @param event\n * @param listener\n * @param options\n */\nexport function useEventListener<E extends keyof DocumentEventMap>(\n target: DocumentOrShadowRoot,\n event: Arrayable<E>,\n listener: Arrayable<(this: Document, ev: DocumentEventMap[E]) => unknown>,\n options?: MaybeComputedRef<boolean | AddEventListenerOptions>\n): Fn;\n\n/**\n * Register using addEventListener on mounted, and removeEventListener automatically on unmounted.\n *\n * Overload 4: Custom event target with event type infer\n *\n * @see https://vueuse.org/useEventListener\n * @param target\n * @param event\n * @param listener\n * @param options\n */\nexport function useEventListener<Names extends string, EventType = Event>(\n target: EventTarget,\n event: Arrayable<Names>,\n listener: Arrayable<GeneralEventListener<EventType>>,\n options?: MaybeComputedRef<boolean | AddEventListenerOptions>\n): Fn;\n\n/**\n * Register using addEventListener on mounted, and removeEventListener automatically on unmounted.\n *\n * Overload 5: Custom event target fallback\n *\n * @see https://vueuse.org/useEventListener\n * @param target\n * @param event\n * @param listener\n * @param options\n */\nexport function useEventListener<EventType = Event>(\n target: MaybeComputedRef<EventTarget | null | undefined>,\n event: Arrayable<string>,\n listener: Arrayable<GeneralEventListener<EventType>>,\n options?: MaybeComputedRef<boolean | AddEventListenerOptions>\n): Fn;\n\nexport function useEventListener(...args) {\n let target: MaybeComputedRef<EventTarget> | undefined;\n let events: Arrayable<string>;\n let listeners: Arrayable<EventListenerOrEventListenerObject>;\n let options: MaybeComputedRef<boolean | AddEventListenerOptions> | undefined;\n\n if (isString(args[0]) || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n\n if (!target) {\n return noop;\n }\n\n if (!Array.isArray(events)) {\n events = [events];\n }\n\n if (!Array.isArray(listeners)) {\n listeners = [listeners];\n }\n\n const cleanups: Array<() => void> = [];\n const cleanup = () => {\n cleanups.forEach(fn => fn());\n cleanups.length = 0;\n };\n\n const register = (\n el: EventTarget,\n event: string,\n listener: EventListenerOrEventListenerObject,\n registerOptions: boolean | AddEventListenerOptions\n ) => {\n // eslint-disable-next-line scanjs-rules/call_addEventListener\n el.addEventListener(event, listener, registerOptions);\n return () => el.removeEventListener(event, listener, registerOptions);\n };\n\n const stopWatch = watch(\n () => [unrefElement(target as any), resolveUnref(options)],\n ([el, stopWatchOptions]) => {\n cleanup();\n\n if (!el) {\n return;\n }\n\n cleanups.push(\n ...(events as Array<string>).flatMap(event =>\n (listeners as Array<EventListenerOrEventListenerObject>).map(listener =>\n register(\n el as EventTarget,\n event,\n listener as EventListenerOrEventListenerObject,\n stopWatchOptions as boolean | AddEventListenerOptions\n )\n )\n )\n );\n },\n { immediate: true, flush: 'post' }\n );\n\n const stop = () => {\n stopWatch();\n cleanup();\n };\n\n return stop;\n}\n","import type { Fn } from '@/types/functions';\nimport type { MaybeElementRef } from '@/types/elements';\nimport type { OnClickOutsideHandler, OnClickOutsideOptions } from './types';\nimport { useEventListener } from './useEventListener';\nimport { defaultWindow, isIOS, noop, unrefElement } from './utils';\n\n// eslint-disable-next-line no-underscore-dangle\nlet _iOSWorkaround = false;\n\n/**\n * Listen for clicks outside of an element.\n *\n * @see https://vueuse.org/onClickOutside\n * @param target\n * @param handler\n * @param options\n */\nexport function onClickOutside<T extends OnClickOutsideOptions>(\n target: MaybeElementRef,\n handler: OnClickOutsideHandler,\n options: T = {} as T\n) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n\n if (!window) {\n return;\n }\n\n // Fixes \"onClickOutside not working on Safari iOS\": https://github.com/vueuse/vueuse/issues/1520\n // How it works: https://stackoverflow.com/a/39712411\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n // eslint-disable-next-line scanjs-rules/call_addEventListener\n Array.from(window.document.body.children).forEach((el: Element) => el.addEventListener('click', noop));\n }\n\n let shouldListen = true;\n\n const shouldIgnore = (event: PointerEvent) =>\n // eslint-disable-next-line @typescript-eslint/no-shadow\n ignore.some(target => {\n if (typeof target === 'string') {\n return Array.from(window.document.querySelectorAll(target)).some(\n (el: Element) => el === event.target || event.composedPath().includes(el)\n );\n }\n\n const el = unrefElement(target as any) as EventTarget;\n return el && (event.target === el || event.composedPath().includes(el));\n });\n\n const listener = (event: PointerEvent) => {\n const el = unrefElement(target as any) as EventTarget;\n\n if (!el || el === event.target || event.composedPath().includes(el)) {\n return;\n }\n\n if (event.detail === 0) {\n shouldListen = !shouldIgnore(event);\n }\n\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n\n handler(event);\n };\n\n const cleanup = [\n useEventListener(window, 'click', listener, { passive: true, capture }),\n useEventListener(\n window,\n 'pointerdown',\n e => {\n const el = unrefElement(target as any) as EventTarget;\n if (el) {\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }\n },\n { passive: true }\n ),\n useEventListener(\n window,\n 'pointerup',\n e => {\n const el = unrefElement(target as any) as EventTarget;\n if (el) {\n shouldListen = shouldListen && !e.composedPath().includes(el) && !shouldIgnore(e);\n }\n },\n { passive: true }\n ),\n detectIframe &&\n useEventListener(window, 'blur', event => {\n const el: Element = unrefElement(target as any);\n if (\n window.document.activeElement?.tagName === 'IFRAME' &&\n !el?.contains(window.document.activeElement)\n ) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handler(event as any);\n }\n }),\n ].filter(Boolean) as Array<Fn>;\n\n const stop = () => cleanup.forEach(fn => fn());\n\n // eslint-disable-next-line consistent-return\n return stop;\n}\n"],"names":["isString","val","useEventListener","args","target","events","listeners","options","defaultWindow","noop","cleanups","cleanup","fn","register","el","event","listener","registerOptions","stopWatch","watch","unrefElement","resolveUnref","stopWatchOptions","_iOSWorkaround","onClickOutside","handler","window","ignore","capture","detectIframe","isIOS","shouldListen","shouldIgnore","e","_a"],"mappings":";;AAWA,MAAMA,IAAW,CAACC,MAAgC,OAAOA,KAAQ;AA0F1D,SAASC,KAAoBC,GAAM;AACtC,MAAIC,GACAC,GACAC,GACAC;AASJ,MAPIP,EAASG,EAAK,CAAC,CAAC,KAAK,MAAM,QAAQA,EAAK,CAAC,CAAC,KAC1C,CAACE,GAAQC,GAAWC,CAAO,IAAIJ,GAC/BC,IAASI,KAET,CAACJ,GAAQC,GAAQC,GAAWC,CAAO,IAAIJ,GAGvC,CAACC;AACD,WAAOK;AAGX,EAAK,MAAM,QAAQJ,CAAM,MACrBA,IAAS,CAACA,CAAM,IAGf,MAAM,QAAQC,CAAS,MACxBA,IAAY,CAACA,CAAS;AAG1B,QAAMI,IAA8B,CAAA,GAC9BC,IAAU,MAAM;AAClB,IAAAD,EAAS,QAAQ,CAAAE,MAAMA,EAAA,CAAI,GAC3BF,EAAS,SAAS;AAAA,EACtB,GAEMG,IAAW,CACbC,GACAC,GACAC,GACAC,OAGAH,EAAG,iBAAiBC,GAAOC,GAAUC,CAAe,GAC7C,MAAMH,EAAG,oBAAoBC,GAAOC,GAAUC,CAAe,IAGlEC,IAAYC;AAAA,IACd,MAAM,CAACC,EAAahB,CAAa,GAAGiB,EAAad,CAAO,CAAC;AAAA,IACzD,CAAC,CAACO,GAAIQ,CAAgB,MAAM;AAGxB,MAFAX,EAAA,GAEKG,KAILJ,EAAS;AAAA,QACL,GAAIL,EAAyB;AAAA,UAAQ,OAChCC,EAAwD;AAAA,YAAI,CAAAU,MACzDH;AAAA,cACIC;AAAA,cACAC;AAAA,cACAC;AAAA,cACAM;AAAA,YAAA;AAAA,UACJ;AAAA,QACJ;AAAA,MACJ;AAAA,IAER;AAAA,IACA,EAAE,WAAW,IAAM,OAAO,OAAA;AAAA,EAAO;AAQrC,SALa,MAAM;AACf,IAAAJ,EAAA,GACAP,EAAA;AAAA,EACJ;A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