bootstrap-vue-next 0.45.0 → 0.45.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/{BAccordion-CJZMsvwP.js → BAccordion-DgXJMqdG.js} +2 -2
- package/dist/{BAccordion-CJZMsvwP.js.map → BAccordion-DgXJMqdG.js.map} +1 -1
- package/dist/{BAccordion-CNzV6f8e.mjs → BAccordion-Gz2SpRmq.mjs} +2 -2
- package/dist/{BAccordion-CNzV6f8e.mjs.map → BAccordion-Gz2SpRmq.mjs.map} +1 -1
- package/dist/{BAlert-CRRUJXYi.mjs → BAlert-BFPBalmr.mjs} +9 -10
- package/dist/BAlert-BFPBalmr.mjs.map +1 -0
- package/dist/{BAlert-CHbgLTZH.js → BAlert-Dk3rgEOI.js} +9 -10
- package/dist/BAlert-Dk3rgEOI.js.map +1 -0
- package/dist/{BApp-DJWC2mB8.mjs → BApp-CIu-zI8K.mjs} +2 -2
- package/dist/BApp-CIu-zI8K.mjs.map +1 -0
- package/dist/{BApp-DaM0UKIg.js → BApp-cBKQc5Dd.js} +2 -2
- package/dist/BApp-cBKQc5Dd.js.map +1 -0
- package/dist/BAspect-BULTO240.js.map +1 -1
- package/dist/BAspect-CwokVvvn.mjs.map +1 -1
- package/dist/{BAutocomplete-4CFl6XQR.js → BAutocomplete-BCOfyy8g.js} +126 -66
- package/dist/{BAutocomplete-4CFl6XQR.js.map → BAutocomplete-BCOfyy8g.js.map} +1 -1
- package/dist/{BAutocomplete-B7yzKPIp.mjs → BAutocomplete-j3KJbBFs.mjs} +127 -67
- package/dist/{BAutocomplete-B7yzKPIp.mjs.map → BAutocomplete-j3KJbBFs.mjs.map} +1 -1
- package/dist/{BAvatar-BHqTW5Ll.js → BAvatar-CZn0MQHY.js} +7 -7
- package/dist/BAvatar-CZn0MQHY.js.map +1 -0
- package/dist/{BAvatar-BSLk69M0.mjs → BAvatar-DODGnQMY.mjs} +7 -7
- package/dist/BAvatar-DODGnQMY.mjs.map +1 -0
- package/dist/{BBadge-D5ra3W5R.mjs → BBadge-CZ219I7a.mjs} +5 -5
- package/dist/BBadge-CZ219I7a.mjs.map +1 -0
- package/dist/{BBadge-BBUcrujj.js → BBadge-DTJcCo9u.js} +5 -5
- package/dist/BBadge-DTJcCo9u.js.map +1 -0
- package/dist/{BBreadcrumb-BSsiwCNB.js → BBreadcrumb-DFG2Qxl9.js} +2 -2
- package/dist/BBreadcrumb-DFG2Qxl9.js.map +1 -0
- package/dist/{BBreadcrumb-amkzWyz6.mjs → BBreadcrumb-Dk4ia-9c.mjs} +2 -2
- package/dist/BBreadcrumb-Dk4ia-9c.mjs.map +1 -0
- package/dist/{BButton-BUYwco3v.js → BButton-BZ9eI3ZX.js} +4 -4
- package/dist/BButton-BZ9eI3ZX.js.map +1 -0
- package/dist/{BButton-DgequxLk.mjs → BButton-C0Ylhonf.mjs} +4 -4
- package/dist/BButton-C0Ylhonf.mjs.map +1 -0
- package/dist/{BButton-CDo9SRvU.mjs → BButton-D_sCrjpg.mjs} +4 -5
- package/dist/BButton-D_sCrjpg.mjs.map +1 -0
- package/dist/{BButton-Bw4HgpsF.js → BButton-Dr-RadYQ.js} +4 -5
- package/dist/BButton-Dr-RadYQ.js.map +1 -0
- package/dist/{BCard-CSyEHz8Z.js → BCard-BjQkY783.js} +2 -2
- package/dist/BCard-BjQkY783.js.map +1 -0
- package/dist/{BCard-CgbTFn3S.js → BCard-BkvG5Zzw.js} +5 -11
- package/dist/BCard-BkvG5Zzw.js.map +1 -0
- package/dist/{BCard-C1G8PO5k.mjs → BCard-TS8DtOwm.mjs} +6 -12
- package/dist/BCard-TS8DtOwm.mjs.map +1 -0
- package/dist/{BCard-CJ822HyH.mjs → BCard-cj8_dIcz.mjs} +2 -2
- package/dist/BCard-cj8_dIcz.mjs.map +1 -0
- package/dist/{BCarousel-BgT74ryc.js → BCarousel-D23rApAX.js} +3 -3
- package/dist/{BCarousel-BgT74ryc.js.map → BCarousel-D23rApAX.js.map} +1 -1
- package/dist/{BCarousel-D9Yei1Q4.mjs → BCarousel-VL1gVXpt.mjs} +3 -3
- package/dist/{BCarousel-D9Yei1Q4.mjs.map → BCarousel-VL1gVXpt.mjs.map} +1 -1
- package/dist/{BCloseButton-CjgbR1Ec.mjs → BCloseButton-CCdRwLDo.mjs} +1 -1
- package/dist/BCloseButton-CCdRwLDo.mjs.map +1 -0
- package/dist/{BCloseButton-CN__Jjcj.js → BCloseButton-fw5ONnhr.js} +1 -1
- package/dist/BCloseButton-fw5ONnhr.js.map +1 -0
- package/dist/{BCol-0tZmpOme.js → BCol-CArTYHqb.js} +2 -2
- package/dist/BCol-CArTYHqb.js.map +1 -0
- package/dist/{BCol-C4v-TOX6.mjs → BCol-VPaTVLsM.mjs} +2 -2
- package/dist/BCol-VPaTVLsM.mjs.map +1 -0
- package/dist/{BCollapse-D-xTGkX_.mjs → BCollapse-CTvK48kB.mjs} +2 -2
- package/dist/BCollapse-CTvK48kB.mjs.map +1 -0
- package/dist/{BCollapse-DZ1z2c8U.js → BCollapse-CZlDVTpI.js} +2 -2
- package/dist/BCollapse-CZlDVTpI.js.map +1 -0
- package/dist/{BContainer-BZUI2qQv.js → BContainer-CNmEk2mi.js} +3 -3
- package/dist/BContainer-CNmEk2mi.js.map +1 -0
- package/dist/{BContainer-DjIGH6-y.mjs → BContainer-CeHyMYb_.mjs} +3 -3
- package/dist/BContainer-CeHyMYb_.mjs.map +1 -0
- package/dist/{BDateField-RWwEMIwd.js → BDateField-B4yL8Pju.js} +6 -6
- package/dist/BDateField-B4yL8Pju.js.map +1 -0
- package/dist/{BDateField-BJIq6gs9.mjs → BDateField-gRWIwMnA.mjs} +6 -6
- package/dist/BDateField-gRWIwMnA.mjs.map +1 -0
- package/dist/{BDatePicker-DfzZBWjU.mjs → BDatePicker-ZuMpgD91.mjs} +8 -8
- package/dist/{BDatePicker-DfzZBWjU.mjs.map → BDatePicker-ZuMpgD91.mjs.map} +1 -1
- package/dist/{BDatePicker-BQN6qZXa.js → BDatePicker-m2drV1fl.js} +8 -8
- package/dist/{BDatePicker-BQN6qZXa.js.map → BDatePicker-m2drV1fl.js.map} +1 -1
- package/dist/{BDropdown-D2pBrZsG.mjs → BDropdown-B2vWJ-u0.mjs} +12 -12
- package/dist/BDropdown-B2vWJ-u0.mjs.map +1 -0
- package/dist/{BDropdown-BxciLgyt.js → BDropdown-BSCasYDc.js} +12 -12
- package/dist/BDropdown-BSCasYDc.js.map +1 -0
- package/dist/{BDropdown-DgbFCKfP.js → BDropdown-CL-erjq8.js} +4 -4
- package/dist/BDropdown-CL-erjq8.js.map +1 -0
- package/dist/{BDropdown-CRIh9xqy.mjs → BDropdown-D2ep4wKG.mjs} +4 -4
- package/dist/BDropdown-D2ep4wKG.mjs.map +1 -0
- package/dist/{BForm-Oh6PpdcD.mjs → BForm-CpNuvbIt.mjs} +1 -1
- package/dist/BForm-CpNuvbIt.mjs.map +1 -0
- package/dist/{BForm-_h0kYDl7.js → BForm-CriVh5cC.js} +5 -5
- package/dist/BForm-CriVh5cC.js.map +1 -0
- package/dist/{BForm-Bp7SFxiK.js → BForm-K67Ciyza.js} +1 -1
- package/dist/BForm-K67Ciyza.js.map +1 -0
- package/dist/{BForm-C8I6v7bU.mjs → BForm-__5Chigr.mjs} +5 -5
- package/dist/BForm-__5Chigr.mjs.map +1 -0
- package/dist/{BFormCheckbox-BPQxUDQG.js → BFormCheckbox-g7gtIrhy.js} +5 -5
- package/dist/BFormCheckbox-g7gtIrhy.js.map +1 -0
- package/dist/{BFormCheckbox-DPNPjRKN.mjs → BFormCheckbox-xN7AQw4O.mjs} +5 -5
- package/dist/BFormCheckbox-xN7AQw4O.mjs.map +1 -0
- package/dist/{BFormFile-BWknj7fW.js → BFormFile-DC-x9wQo.js} +3 -3
- package/dist/{BFormFile-BWknj7fW.js.map → BFormFile-DC-x9wQo.js.map} +1 -1
- package/dist/{BFormFile-Bf3GMYeX.mjs → BFormFile-DXdAyYmv.mjs} +3 -3
- package/dist/{BFormFile-Bf3GMYeX.mjs.map → BFormFile-DXdAyYmv.mjs.map} +1 -1
- package/dist/BFormGroup-DZTiChgT.js +505 -0
- package/dist/BFormGroup-DZTiChgT.js.map +1 -0
- package/dist/BFormGroup-ayltvQts.mjs +499 -0
- package/dist/BFormGroup-ayltvQts.mjs.map +1 -0
- package/dist/{BFormInput-BuRSGYdY.js → BFormInput-DNuvqbFQ.js} +2 -2
- package/dist/BFormInput-DNuvqbFQ.js.map +1 -0
- package/dist/{BFormInput-Dg9dbwHp.mjs → BFormInput-NKko58M2.mjs} +2 -2
- package/dist/BFormInput-NKko58M2.mjs.map +1 -0
- package/dist/{BFormOtp-DYjsPhQN.mjs → BFormOtp-B4al7MJf.mjs} +6 -6
- package/dist/{BFormOtp-DYjsPhQN.mjs.map → BFormOtp-B4al7MJf.mjs.map} +1 -1
- package/dist/{BFormOtp-C1YJvwN8.js → BFormOtp-UcLR9oFd.js} +6 -6
- package/dist/{BFormOtp-C1YJvwN8.js.map → BFormOtp-UcLR9oFd.js.map} +1 -1
- package/dist/{BFormRadio-CqYd0bLV.mjs → BFormRadio-DHx68AdL.mjs} +5 -5
- package/dist/BFormRadio-DHx68AdL.mjs.map +1 -0
- package/dist/{BFormRadio-BZ0etDxl.js → BFormRadio-DX-gM5Rc.js} +5 -5
- package/dist/BFormRadio-DX-gM5Rc.js.map +1 -0
- package/dist/{BFormRating-Bb_ACp-9.mjs → BFormRating-BR7RMvZG.mjs} +2 -2
- package/dist/BFormRating-BR7RMvZG.mjs.map +1 -0
- package/dist/{BFormRating-CNqf91vN.js → BFormRating-CF-x5qkB.js} +2 -2
- package/dist/BFormRating-CF-x5qkB.js.map +1 -0
- package/dist/{BFormSelect-B_mbfTMC.js → BFormSelect-CUkyKBNN.js} +5 -5
- package/dist/BFormSelect-CUkyKBNN.js.map +1 -0
- package/dist/{BFormSelect-CpkJ1haI.mjs → BFormSelect-Co-ZU8yY.mjs} +5 -5
- package/dist/BFormSelect-Co-ZU8yY.mjs.map +1 -0
- package/dist/{BFormSelectOption-O8cyyv3i.mjs → BFormSelectOption-B3BO50XB.mjs} +1 -1
- package/dist/BFormSelectOption-B3BO50XB.mjs.map +1 -0
- package/dist/{BFormSelectOption-BY4P8HOf.js → BFormSelectOption-CQ3j1Q5j.js} +1 -1
- package/dist/BFormSelectOption-CQ3j1Q5j.js.map +1 -0
- package/dist/{BFormSpinbutton-BLO0Yf36.mjs → BFormSpinbutton-CPsVUIh9.mjs} +4 -4
- package/dist/{BFormSpinbutton-BLO0Yf36.mjs.map → BFormSpinbutton-CPsVUIh9.mjs.map} +1 -1
- package/dist/{BFormSpinbutton-BaOTL1k1.js → BFormSpinbutton-DPCXum9q.js} +4 -4
- package/dist/{BFormSpinbutton-BaOTL1k1.js.map → BFormSpinbutton-DPCXum9q.js.map} +1 -1
- package/dist/{BFormTag-C7B-bX72.js → BFormTag-Bsy6Znok.js} +3 -3
- package/dist/BFormTag-Bsy6Znok.js.map +1 -0
- package/dist/{BFormTag-BUWEugEC.mjs → BFormTag-Cjg1R-Lj.mjs} +3 -3
- package/dist/BFormTag-Cjg1R-Lj.mjs.map +1 -0
- package/dist/{BFormTags-DJzXJp7d.js → BFormTags-BIZyBseI.js} +9 -7
- package/dist/BFormTags-BIZyBseI.js.map +1 -0
- package/dist/{BFormTags-DWAWX2av.mjs → BFormTags-D2Dk598Q.mjs} +9 -7
- package/dist/BFormTags-D2Dk598Q.mjs.map +1 -0
- package/dist/{BFormTextarea-8c3B3kAI.js → BFormTextarea-CYh47SxL.js} +3 -3
- package/dist/BFormTextarea-CYh47SxL.js.map +1 -0
- package/dist/{BFormTextarea-BMk05ojJ.mjs → BFormTextarea-M21mholw.mjs} +3 -3
- package/dist/BFormTextarea-M21mholw.mjs.map +1 -0
- package/dist/{BFormValidFeedback-DvTgwqSe.js → BFormValidFeedback-BhkEhSa0.js} +3 -3
- package/dist/BFormValidFeedback-BhkEhSa0.js.map +1 -0
- package/dist/{BFormValidFeedback-_Dgzm0Ag.mjs → BFormValidFeedback-DWkakzVO.mjs} +3 -3
- package/dist/BFormValidFeedback-DWkakzVO.mjs.map +1 -0
- package/dist/{BImg-Dyy0N-WQ.js → BImg-DFiJSy66.js} +7 -7
- package/dist/BImg-DFiJSy66.js.map +1 -0
- package/dist/{BImg-BQqZfIM9.mjs → BImg-UUMOpbK0.mjs} +7 -7
- package/dist/BImg-UUMOpbK0.mjs.map +1 -0
- package/dist/{BInputGroup-C5sxenhE.mjs → BInputGroup-3AVRA3U7.mjs} +1 -1
- package/dist/BInputGroup-3AVRA3U7.mjs.map +1 -0
- package/dist/{BInputGroup-DTP5Vf1f.js → BInputGroup-BAC-B_UM.js} +1 -1
- package/dist/BInputGroup-BAC-B_UM.js.map +1 -0
- package/dist/{BInputGroup-Dl9AgpAx.mjs → BInputGroup-CfELrPhK.mjs} +2 -2
- package/dist/BInputGroup-CfELrPhK.mjs.map +1 -0
- package/dist/{BInputGroup-Bfcs5h_Q.js → BInputGroup-CiKwWBSu.js} +2 -2
- package/dist/BInputGroup-CiKwWBSu.js.map +1 -0
- package/dist/{BLink-Cz5YCsnv.mjs → BLink-CNFWSz0D.mjs} +2 -2
- package/dist/{BLink-Cz5YCsnv.mjs.map → BLink-CNFWSz0D.mjs.map} +1 -1
- package/dist/{BLink-uemyYKst.js → BLink-uLjtY3bY.js} +2 -2
- package/dist/{BLink-uemyYKst.js.map → BLink-uLjtY3bY.js.map} +1 -1
- package/dist/{BListGroup-BmtN0xQ3.mjs → BListGroup-CGxa7ZEu.mjs} +2 -2
- package/dist/BListGroup-CGxa7ZEu.mjs.map +1 -0
- package/dist/{BListGroup-DuyMdAxJ.js → BListGroup-CeXKZio1.js} +2 -2
- package/dist/BListGroup-CeXKZio1.js.map +1 -0
- package/dist/{BModal-BnHYbFuj.js → BModal-6hh-azT8.js} +9 -9
- package/dist/{BModal-BnHYbFuj.js.map → BModal-6hh-azT8.js.map} +1 -1
- package/dist/{BModal-CAjLrkBp.mjs → BModal-BEmloby5.mjs} +9 -9
- package/dist/{BModal-CAjLrkBp.mjs.map → BModal-BEmloby5.mjs.map} +1 -1
- package/dist/{BNav-BdO2N7G0.mjs → BNav-EHHlEg1E.mjs} +5 -5
- package/dist/BNav-EHHlEg1E.mjs.map +1 -0
- package/dist/{BNav-MjroX-Jl.js → BNav-u9QwSGj3.js} +5 -5
- package/dist/BNav-u9QwSGj3.js.map +1 -0
- package/dist/{BNavbar-vN3_CMLn.mjs → BNavbar-kgHIo_Gr.mjs} +5 -5
- package/dist/BNavbar-kgHIo_Gr.mjs.map +1 -0
- package/dist/{BNavbar-s9Ak5PnO.js → BNavbar-s8yvmhyz.js} +5 -5
- package/dist/BNavbar-s8yvmhyz.js.map +1 -0
- package/dist/{BOffcanvas-DmkJSSFy.mjs → BOffcanvas-DaKJOICF.mjs} +9 -9
- package/dist/BOffcanvas-DaKJOICF.mjs.map +1 -0
- package/dist/{BOffcanvas-ColOuYdV.js → BOffcanvas-mlOkh8T1.js} +9 -9
- package/dist/BOffcanvas-mlOkh8T1.js.map +1 -0
- package/dist/{BOverlay-B7vJAdHO.js → BOverlay--gZBEMlX.js} +5 -5
- package/dist/BOverlay--gZBEMlX.js.map +1 -0
- package/dist/{BOverlay-BGxH9JVy.mjs → BOverlay-DSUoseNJ.mjs} +5 -5
- package/dist/BOverlay-DSUoseNJ.mjs.map +1 -0
- package/dist/{BPagination-CvoSN1He.mjs → BPagination-C7MKOk8h.mjs} +8 -8
- package/dist/BPagination-C7MKOk8h.mjs.map +1 -0
- package/dist/{BPagination-C0-4NVzW.js → BPagination-D6W1LdgK.js} +8 -8
- package/dist/BPagination-D6W1LdgK.js.map +1 -0
- package/dist/{BPlaceholder-n447tOzJ.js → BPlaceholder-Ckvq3tMu.js} +6 -6
- package/dist/BPlaceholder-Ckvq3tMu.js.map +1 -0
- package/dist/{BPlaceholder-DKDtjMjy.mjs → BPlaceholder-D__hNPyQ.mjs} +6 -6
- package/dist/BPlaceholder-D__hNPyQ.mjs.map +1 -0
- package/dist/{BProgress-BIqo6vLh.mjs → BProgress-I1ucNlpA.mjs} +3 -3
- package/dist/BProgress-I1ucNlpA.mjs.map +1 -0
- package/dist/{BProgress-Bc3ZSkac.js → BProgress-ySlPjpRn.js} +3 -3
- package/dist/BProgress-ySlPjpRn.js.map +1 -0
- package/dist/{BRow-tqMEhkZS.js → BRow-CmKiMcMZ.js} +3 -3
- package/dist/BRow-CmKiMcMZ.js.map +1 -0
- package/dist/{BRow-BCEK3fe6.mjs → BRow-U3L8AcKV.mjs} +3 -3
- package/dist/BRow-U3L8AcKV.mjs.map +1 -0
- package/dist/{BSpinner-8UMAINYb.js → BSpinner-C1bm8U4-.js} +2 -2
- package/dist/BSpinner-C1bm8U4-.js.map +1 -0
- package/dist/{BSpinner-BpnwONvx.mjs → BSpinner-CAo-XD04.mjs} +2 -2
- package/dist/BSpinner-CAo-XD04.mjs.map +1 -0
- package/dist/{BTable-CjHMx8Yv.mjs → BTable-DYS8Lftg.mjs} +7 -7
- package/dist/BTable-DYS8Lftg.mjs.map +1 -0
- package/dist/{BTable-Btzu1IJ_.js → BTable-G-Pjvx68.js} +7 -7
- package/dist/BTable-G-Pjvx68.js.map +1 -0
- package/dist/{BTableSimple-C901Z5V9.mjs → BTableSimple-CThwYBVl.mjs} +3 -3
- package/dist/BTableSimple-CThwYBVl.mjs.map +1 -0
- package/dist/{BTableSimple-BcdizuDm.js → BTableSimple-pyz_6D4s.js} +3 -3
- package/dist/BTableSimple-pyz_6D4s.js.map +1 -0
- package/dist/{BTabs-DiYaJi22.js → BTabs-C8rUY0Lx.js} +41 -13
- package/dist/BTabs-C8rUY0Lx.js.map +1 -0
- package/dist/{BTabs-DZEF9kgT.mjs → BTabs-Krs_Lv-R.mjs} +42 -14
- package/dist/BTabs-Krs_Lv-R.mjs.map +1 -0
- package/dist/{BTimeField-DSWZeGYP.mjs → BTimeField-DSf4cMpN.mjs} +5 -5
- package/dist/{BTimeField-DSWZeGYP.mjs.map → BTimeField-DSf4cMpN.mjs.map} +1 -1
- package/dist/{BTimeField-VTrtxGkI.js → BTimeField-W2LqGCjB.js} +5 -5
- package/dist/{BTimeField-VTrtxGkI.js.map → BTimeField-W2LqGCjB.js.map} +1 -1
- package/dist/{BToast-BFcT76M1.js → BToast-DZuxMDbe.js} +10 -11
- package/dist/BToast-DZuxMDbe.js.map +1 -0
- package/dist/{BToast-D5XkJqF4.mjs → BToast-Dcfnqbxt.mjs} +10 -11
- package/dist/BToast-Dcfnqbxt.mjs.map +1 -0
- package/dist/{BTooltip-BwiqjqX-.js → BTooltip-BGTjsV1z.js} +2 -2
- package/dist/BTooltip-BGTjsV1z.js.map +1 -0
- package/dist/{BTooltip-DohT1Q3C.mjs → BTooltip-BWij0hjE.mjs} +2 -2
- package/dist/BTooltip-BWij0hjE.mjs.map +1 -0
- package/dist/{BootstrapVueOptions-DbXZtoXX.js → BootstrapVueOptions-DeViqxoD.js} +1 -1
- package/dist/{BootstrapVueOptions-DbXZtoXX.js.map → BootstrapVueOptions-DeViqxoD.js.map} +1 -1
- package/dist/{BootstrapVueOptions-D3flIVqU.mjs → BootstrapVueOptions-Dt1TQdih.mjs} +1 -1
- package/dist/{BootstrapVueOptions-D3flIVqU.mjs.map → BootstrapVueOptions-Dt1TQdih.mjs.map} +1 -1
- package/dist/{ConditionalTeleport-BNsziElf.mjs → ConditionalTeleport-B4KYZIM6.mjs} +1 -1
- package/dist/ConditionalTeleport-B4KYZIM6.mjs.map +1 -0
- package/dist/{ConditionalTeleport-BJZk6HAx.js → ConditionalTeleport-BDWcebyD.js} +1 -1
- package/dist/ConditionalTeleport-BDWcebyD.js.map +1 -0
- package/dist/{ConditionalWrapper-Cc7EIszd.js → ConditionalWrapper-DZH_VSwb.js} +1 -1
- package/dist/{ConditionalWrapper-Cc7EIszd.js.map → ConditionalWrapper-DZH_VSwb.js.map} +1 -1
- package/dist/{ConditionalWrapper-D9ovtbHB.mjs → ConditionalWrapper-Dbc_O6qe.mjs} +1 -1
- package/dist/{ConditionalWrapper-D9ovtbHB.mjs.map → ConditionalWrapper-Dbc_O6qe.mjs.map} +1 -1
- package/dist/{DateRangeFieldInput-DiVuhf4Y.mjs → DateRangeFieldInput-B86VEz0H.mjs} +5 -5
- package/dist/{DateRangeFieldInput-DiVuhf4Y.mjs.map → DateRangeFieldInput-B86VEz0H.mjs.map} +1 -1
- package/dist/{DateRangeFieldInput-Ce7PM3PJ.js → DateRangeFieldInput-HvvI2You.js} +5 -5
- package/dist/{DateRangeFieldInput-Ce7PM3PJ.js.map → DateRangeFieldInput-HvvI2You.js.map} +1 -1
- package/dist/{PopperContent-CSwv2Fih.js → PopperContent-BS_eKjzD.js} +6 -6
- package/dist/{PopperContent-CSwv2Fih.js.map → PopperContent-BS_eKjzD.js.map} +1 -1
- package/dist/{PopperContent-BTUvv6Tu.mjs → PopperContent-DmSgsjSC.mjs} +6 -6
- package/dist/{PopperContent-BTUvv6Tu.mjs.map → PopperContent-DmSgsjSC.mjs.map} +1 -1
- package/dist/{VisuallyHidden-Bbwok8oL.mjs → VisuallyHidden-C4sXnc-k.mjs} +2 -2
- package/dist/{VisuallyHidden-Bbwok8oL.mjs.map → VisuallyHidden-C4sXnc-k.mjs.map} +1 -1
- package/dist/{VisuallyHidden-DaN947I0.js → VisuallyHidden-Cx0phlXT.js} +2 -2
- package/dist/{VisuallyHidden-DaN947I0.js.map → VisuallyHidden-Cx0phlXT.js.map} +1 -1
- package/dist/{VisuallyHiddenInput-Biq4Qv5j.js → VisuallyHiddenInput-BNrInt6d.js} +2 -2
- package/dist/{VisuallyHiddenInput-Biq4Qv5j.js.map → VisuallyHiddenInput-BNrInt6d.js.map} +1 -1
- package/dist/{VisuallyHiddenInput-D1SjTCVH.mjs → VisuallyHiddenInput-DKIzxsQR.mjs} +2 -2
- package/dist/{VisuallyHiddenInput-D1SjTCVH.mjs.map → VisuallyHiddenInput-DKIzxsQR.mjs.map} +1 -1
- package/dist/bootstrap-vue-next.css +56 -1
- package/dist/bootstrap-vue-next.mjs +60 -60
- package/dist/bootstrap-vue-next.umd.js +60 -60
- package/dist/components/BAccordion/BAccordionItem.vue.d.mts +1 -2
- package/dist/components/BAccordion/BAccordionItem.vue.d.ts +1 -2
- package/dist/components/BAlert/BAlert.vue.d.mts +1 -1
- package/dist/components/BAlert/BAlert.vue.d.ts +1 -1
- package/dist/components/BApp/BApp.vue.d.mts +1 -1
- package/dist/components/BApp/BApp.vue.d.ts +1 -1
- package/dist/components/BApp/BOrchestrator.vue.d.mts +1 -1
- package/dist/components/BApp/BOrchestrator.vue.d.ts +1 -1
- package/dist/components/BAspect/BAspect.vue.d.mts +2 -4
- package/dist/components/BAspect/BAspect.vue.d.ts +2 -4
- package/dist/components/BAutocomplete/BAutocomplete.vue.d.mts +270 -6
- package/dist/components/BAutocomplete/BAutocomplete.vue.d.ts +270 -6
- package/dist/components/BAvatar/BAvatar.vue.d.mts +1 -2
- package/dist/components/BAvatar/BAvatar.vue.d.ts +1 -2
- package/dist/components/BAvatar/BAvatarGroup.vue.d.mts +1 -2
- package/dist/components/BAvatar/BAvatarGroup.vue.d.ts +1 -2
- package/dist/components/BBadge/BBadge.vue.d.mts +1 -2
- package/dist/components/BBadge/BBadge.vue.d.ts +1 -2
- package/dist/components/BBreadcrumb/BBreadcrumb.vue.d.mts +1 -2
- package/dist/components/BBreadcrumb/BBreadcrumb.vue.d.ts +1 -2
- package/dist/components/BBreadcrumb/BBreadcrumbItem.vue.d.mts +1 -2
- package/dist/components/BBreadcrumb/BBreadcrumbItem.vue.d.ts +1 -2
- package/dist/components/BButton/BButton.vue.d.mts +1 -3
- package/dist/components/BButton/BButton.vue.d.ts +1 -3
- package/dist/components/BButton/BButtonGroup.vue.d.mts +1 -2
- package/dist/components/BButton/BButtonGroup.vue.d.ts +1 -2
- package/dist/components/BButton/BCloseButton.vue.d.mts +1 -1
- package/dist/components/BButton/BCloseButton.vue.d.ts +1 -1
- package/dist/components/BCard/BCard.vue.d.mts +1 -2
- package/dist/components/BCard/BCard.vue.d.ts +1 -2
- package/dist/components/BCard/BCardBody.vue.d.mts +1 -2
- package/dist/components/BCard/BCardBody.vue.d.ts +1 -2
- package/dist/components/BCard/BCardGroup.vue.d.mts +1 -2
- package/dist/components/BCard/BCardGroup.vue.d.ts +1 -2
- package/dist/components/BCard/BCardHeader.vue.d.mts +1 -1
- package/dist/components/BCard/BCardHeader.vue.d.ts +1 -1
- package/dist/components/BCard/BCardImg.vue.d.mts +1 -1
- package/dist/components/BCard/BCardImg.vue.d.ts +1 -1
- package/dist/components/BCard/BCardSubtitle.vue.d.mts +1 -2
- package/dist/components/BCard/BCardSubtitle.vue.d.ts +1 -2
- package/dist/components/BCard/BCardText.vue.d.mts +1 -2
- package/dist/components/BCard/BCardText.vue.d.ts +1 -2
- package/dist/components/BCard/BCardTitle.vue.d.mts +1 -2
- package/dist/components/BCard/BCardTitle.vue.d.ts +1 -2
- package/dist/components/BCardHeadFoot.vue.d.mts +1 -2
- package/dist/components/BCardHeadFoot.vue.d.ts +1 -2
- package/dist/components/BCarousel/BCarousel.vue.d.mts +1 -1
- package/dist/components/BCarousel/BCarousel.vue.d.ts +1 -1
- package/dist/components/BCarousel/BCarouselSlide.vue.d.mts +1 -2
- package/dist/components/BCarousel/BCarouselSlide.vue.d.ts +1 -2
- package/dist/components/BCollapse/BCollapse.vue.d.mts +1 -2
- package/dist/components/BCollapse/BCollapse.vue.d.ts +1 -2
- package/dist/components/BContainer/BCol.vue.d.mts +1 -2
- package/dist/components/BContainer/BCol.vue.d.ts +1 -2
- package/dist/components/BContainer/BContainer.vue.d.mts +1 -2
- package/dist/components/BContainer/BContainer.vue.d.ts +1 -2
- package/dist/components/BContainer/BRow.vue.d.mts +1 -2
- package/dist/components/BContainer/BRow.vue.d.ts +1 -2
- package/dist/components/BDateField/BDateField.vue.d.mts +2 -3
- package/dist/components/BDateField/BDateField.vue.d.ts +2 -3
- package/dist/components/BDateField/BDateRangeField.vue.d.mts +2 -3
- package/dist/components/BDateField/BDateRangeField.vue.d.ts +2 -3
- package/dist/components/BDateField/BTimeRangeField.vue.d.mts +5 -6
- package/dist/components/BDateField/BTimeRangeField.vue.d.ts +5 -6
- package/dist/components/BDatePicker/BDatePicker.vue.d.mts +3 -4
- package/dist/components/BDatePicker/BDatePicker.vue.d.ts +3 -4
- package/dist/components/BDatePicker/BDateRangePicker.vue.d.mts +3 -4
- package/dist/components/BDatePicker/BDateRangePicker.vue.d.ts +3 -4
- package/dist/components/BDropdown/BDropdownDivider.vue.d.mts +1 -1
- package/dist/components/BDropdown/BDropdownDivider.vue.d.ts +1 -1
- package/dist/components/BDropdown/BDropdownForm.vue.d.mts +1 -2
- package/dist/components/BDropdown/BDropdownForm.vue.d.ts +1 -2
- package/dist/components/BDropdown/BDropdownGroup.vue.d.mts +1 -2
- package/dist/components/BDropdown/BDropdownGroup.vue.d.ts +1 -2
- package/dist/components/BDropdown/BDropdownHeader.vue.d.mts +1 -2
- package/dist/components/BDropdown/BDropdownHeader.vue.d.ts +1 -2
- package/dist/components/BDropdown/BDropdownItem.vue.d.mts +1 -2
- package/dist/components/BDropdown/BDropdownItem.vue.d.ts +1 -2
- package/dist/components/BDropdown/BDropdownItemButton.vue.d.mts +1 -2
- package/dist/components/BDropdown/BDropdownItemButton.vue.d.ts +1 -2
- package/dist/components/BDropdown/BDropdownText.vue.d.mts +1 -2
- package/dist/components/BDropdown/BDropdownText.vue.d.ts +1 -2
- package/dist/components/BForm/BForm.vue.d.mts +1 -2
- package/dist/components/BForm/BForm.vue.d.ts +1 -2
- package/dist/components/BForm/BFormDatalist.vue.d.mts +1 -2
- package/dist/components/BForm/BFormDatalist.vue.d.ts +1 -2
- package/dist/components/BForm/BFormDatalistBase.vue.d.mts +1 -1
- package/dist/components/BForm/BFormDatalistBase.vue.d.ts +1 -1
- package/dist/components/BForm/BFormFloatingLabel.vue.d.mts +1 -2
- package/dist/components/BForm/BFormFloatingLabel.vue.d.ts +1 -2
- package/dist/components/BForm/BFormRow.vue.d.mts +1 -2
- package/dist/components/BForm/BFormRow.vue.d.ts +1 -2
- package/dist/components/BForm/BFormText.vue.d.mts +1 -2
- package/dist/components/BForm/BFormText.vue.d.ts +1 -2
- package/dist/components/BFormCheckbox/BFormCheckbox.vue.d.mts +1 -3
- package/dist/components/BFormCheckbox/BFormCheckbox.vue.d.ts +1 -3
- package/dist/components/BFormCheckbox/BFormCheckboxGroup.vue.d.mts +1 -2
- package/dist/components/BFormCheckbox/BFormCheckboxGroup.vue.d.ts +1 -2
- package/dist/components/BFormCheckbox/BFormCheckboxGroupBase.vue.d.mts +1 -2
- package/dist/components/BFormCheckbox/BFormCheckboxGroupBase.vue.d.ts +1 -2
- package/dist/components/BFormGroup/BFormGroup.vue.d.mts +3 -3
- package/dist/components/BFormGroup/BFormGroup.vue.d.ts +3 -3
- package/dist/components/BFormGroupContent.vue.d.mts +35 -0
- package/dist/components/BFormGroupContent.vue.d.ts +35 -0
- package/dist/components/BFormGroupLabel.vue.d.mts +35 -0
- package/dist/components/BFormGroupLabel.vue.d.ts +35 -0
- package/dist/components/BFormInput/BFormInput.vue.d.mts +2 -2
- package/dist/components/BFormInput/BFormInput.vue.d.ts +2 -2
- package/dist/components/BFormRadio/BFormRadio.vue.d.mts +1 -3
- package/dist/components/BFormRadio/BFormRadio.vue.d.ts +1 -3
- package/dist/components/BFormRadio/BFormRadioGroup.vue.d.mts +1 -2
- package/dist/components/BFormRadio/BFormRadioGroup.vue.d.ts +1 -2
- package/dist/components/BFormRadio/BFormRadioGroupBase.vue.d.mts +1 -2
- package/dist/components/BFormRadio/BFormRadioGroupBase.vue.d.ts +1 -2
- package/dist/components/BFormSelect/BFormSelect.vue.d.mts +1 -3
- package/dist/components/BFormSelect/BFormSelect.vue.d.ts +1 -3
- package/dist/components/BFormSelect/BFormSelectBase.vue.d.mts +1 -1
- package/dist/components/BFormSelect/BFormSelectBase.vue.d.ts +1 -1
- package/dist/components/BFormSelect/BFormSelectOption.vue.d.mts +1 -2
- package/dist/components/BFormSelect/BFormSelectOption.vue.d.ts +1 -2
- package/dist/components/BFormSelect/BFormSelectOptionGroup.vue.d.mts +1 -2
- package/dist/components/BFormSelect/BFormSelectOptionGroup.vue.d.ts +1 -2
- package/dist/components/BFormSpinbutton/BFormSpinbutton.vue.d.mts +3 -3
- package/dist/components/BFormSpinbutton/BFormSpinbutton.vue.d.ts +3 -3
- package/dist/components/BFormTags/BFormTag.vue.d.mts +1 -2
- package/dist/components/BFormTags/BFormTag.vue.d.ts +1 -2
- package/dist/components/BFormTags/BFormTags.vue.d.mts +4 -3
- package/dist/components/BFormTags/BFormTags.vue.d.ts +4 -3
- package/dist/components/BFormTextarea/BFormTextarea.vue.d.mts +2 -2
- package/dist/components/BFormTextarea/BFormTextarea.vue.d.ts +2 -2
- package/dist/components/BImg/BImg.vue.d.mts +1 -1
- package/dist/components/BImg/BImg.vue.d.ts +1 -1
- package/dist/components/BInputGroup/BInputGroup.vue.d.mts +1 -2
- package/dist/components/BInputGroup/BInputGroup.vue.d.ts +1 -2
- package/dist/components/BInputGroup/BInputGroupText.vue.d.mts +1 -2
- package/dist/components/BInputGroup/BInputGroupText.vue.d.ts +1 -2
- package/dist/components/BListGroup/BListGroup.vue.d.mts +1 -2
- package/dist/components/BListGroup/BListGroup.vue.d.ts +1 -2
- package/dist/components/BListGroup/BListGroupItem.vue.d.mts +1 -2
- package/dist/components/BListGroup/BListGroupItem.vue.d.ts +1 -2
- package/dist/components/BModal/BModal.vue.d.mts +2 -2
- package/dist/components/BModal/BModal.vue.d.ts +2 -2
- package/dist/components/BNav/BNav.vue.d.mts +1 -2
- package/dist/components/BNav/BNav.vue.d.ts +1 -2
- package/dist/components/BNav/BNavForm.vue.d.mts +1 -2
- package/dist/components/BNav/BNavForm.vue.d.ts +1 -2
- package/dist/components/BNav/BNavItem.vue.d.mts +1 -2
- package/dist/components/BNav/BNavItem.vue.d.ts +1 -2
- package/dist/components/BNav/BNavItemDropdown.vue.d.mts +1 -2
- package/dist/components/BNav/BNavItemDropdown.vue.d.ts +1 -2
- package/dist/components/BNav/BNavText.vue.d.mts +1 -2
- package/dist/components/BNav/BNavText.vue.d.ts +1 -2
- package/dist/components/BNavbar/BNavbar.vue.d.mts +1 -2
- package/dist/components/BNavbar/BNavbar.vue.d.ts +1 -2
- package/dist/components/BNavbar/BNavbarBrand.vue.d.mts +1 -2
- package/dist/components/BNavbar/BNavbarBrand.vue.d.ts +1 -2
- package/dist/components/BNavbar/BNavbarNav.vue.d.mts +1 -2
- package/dist/components/BNavbar/BNavbarNav.vue.d.ts +1 -2
- package/dist/components/BNavbar/BNavbarToggle.vue.d.mts +1 -2
- package/dist/components/BNavbar/BNavbarToggle.vue.d.ts +1 -2
- package/dist/components/BOffcanvas/BOffcanvas.vue.d.mts +1 -2
- package/dist/components/BOffcanvas/BOffcanvas.vue.d.ts +1 -2
- package/dist/components/BOverlay/BOverlay.vue.d.mts +1 -2
- package/dist/components/BOverlay/BOverlay.vue.d.ts +1 -2
- package/dist/components/BPagination/BPagination.vue.d.mts +1 -1
- package/dist/components/BPagination/BPagination.vue.d.ts +1 -1
- package/dist/components/BPlaceholder/BPlaceholder.vue.d.mts +1 -1
- package/dist/components/BPlaceholder/BPlaceholder.vue.d.ts +1 -1
- package/dist/components/BPlaceholder/BPlaceholderButton.vue.d.mts +1 -1
- package/dist/components/BPlaceholder/BPlaceholderButton.vue.d.ts +1 -1
- package/dist/components/BPlaceholder/BPlaceholderCard.vue.d.mts +1 -2
- package/dist/components/BPlaceholder/BPlaceholderCard.vue.d.ts +1 -2
- package/dist/components/BPlaceholder/BPlaceholderTable.vue.d.mts +1 -2
- package/dist/components/BPlaceholder/BPlaceholderTable.vue.d.ts +1 -2
- package/dist/components/BPlaceholder/BPlaceholderWrapper.vue.d.mts +1 -2
- package/dist/components/BPlaceholder/BPlaceholderWrapper.vue.d.ts +1 -2
- package/dist/components/BPopover/BPopover.vue.d.mts +1 -1
- package/dist/components/BPopover/BPopover.vue.d.ts +1 -1
- package/dist/components/BProgress/BProgress.vue.d.mts +1 -2
- package/dist/components/BProgress/BProgress.vue.d.ts +1 -2
- package/dist/components/BProgress/BProgressBar.vue.d.mts +1 -2
- package/dist/components/BProgress/BProgressBar.vue.d.ts +1 -2
- package/dist/components/BSpinner/BSpinner.vue.d.mts +1 -2
- package/dist/components/BSpinner/BSpinner.vue.d.ts +1 -2
- package/dist/components/BTable/BTableLite.vue.d.mts +1 -2
- package/dist/components/BTable/BTableLite.vue.d.ts +1 -2
- package/dist/components/BTable/BTableSimple.vue.d.mts +1 -2
- package/dist/components/BTable/BTableSimple.vue.d.ts +1 -2
- package/dist/components/BTable/BTbody.vue.d.mts +1 -2
- package/dist/components/BTable/BTbody.vue.d.ts +1 -2
- package/dist/components/BTable/BTd.vue.d.mts +1 -2
- package/dist/components/BTable/BTd.vue.d.ts +1 -2
- package/dist/components/BTable/BTfoot.vue.d.mts +1 -2
- package/dist/components/BTable/BTfoot.vue.d.ts +1 -2
- package/dist/components/BTable/BTh.vue.d.mts +1 -2
- package/dist/components/BTable/BTh.vue.d.ts +1 -2
- package/dist/components/BTable/BThead.vue.d.mts +1 -2
- package/dist/components/BTable/BThead.vue.d.ts +1 -2
- package/dist/components/BTable/BTr.vue.d.mts +1 -2
- package/dist/components/BTable/BTr.vue.d.ts +1 -2
- package/dist/components/BTabs/BTabs.vue.d.mts +2 -0
- package/dist/components/BTabs/BTabs.vue.d.ts +2 -0
- package/dist/components/BTabsTabContent.vue.d.mts +27 -0
- package/dist/components/BTabsTabContent.vue.d.ts +27 -0
- package/dist/components/BTimeField/BTimeField.vue.d.mts +2 -3
- package/dist/components/BTimeField/BTimeField.vue.d.ts +2 -3
- package/dist/components/BToast/BToast.vue.d.mts +1 -2
- package/dist/components/BToast/BToast.vue.d.ts +1 -2
- package/dist/components/BTooltip/BTooltip.vue.d.mts +1 -1
- package/dist/components/BTooltip/BTooltip.vue.d.ts +1 -1
- package/dist/composables/useAriaInvalid.d.mts +3 -2
- package/dist/composables/useAriaInvalid.d.ts +3 -2
- package/dist/composables/useFormInput.d.mts +1 -1
- package/dist/composables/useFormInput.d.ts +1 -1
- package/dist/{constants-hccBP09R.js → constants-BLIvvaat.js} +1 -1
- package/dist/{constants-hccBP09R.js.map → constants-BLIvvaat.js.map} +1 -1
- package/dist/{constants-BSIK14yA.mjs → constants-Ba9iJn2H.mjs} +1 -1
- package/dist/{constants-BSIK14yA.mjs.map → constants-Ba9iJn2H.mjs.map} +1 -1
- package/dist/{debounce-C-5Oukxb.js → debounce-D6kifS6w.js} +1 -1
- package/dist/{debounce-C-5Oukxb.js.map → debounce-D6kifS6w.js.map} +1 -1
- package/dist/{debounce-C_wjWVGH.mjs → debounce-DHxNfjan.mjs} +1 -1
- package/dist/{debounce-C_wjWVGH.mjs.map → debounce-DHxNfjan.mjs.map} +1 -1
- package/dist/{dist-BJ15ThEs.js → dist-DiXKLh_W.js} +2 -66
- package/dist/{dist-BJ15ThEs.js.map → dist-DiXKLh_W.js.map} +1 -1
- package/dist/{dist-B10a-gZ8.mjs → dist-Dk9C_HFS.mjs} +4 -62
- package/dist/dist-Dk9C_HFS.mjs.map +1 -0
- package/dist/{floating-ui.vue-CAMaNcqI.mjs → floating-ui.vue-CH2o_mZU.mjs} +1 -1
- package/dist/{floating-ui.vue-CAMaNcqI.mjs.map → floating-ui.vue-CH2o_mZU.mjs.map} +1 -1
- package/dist/{floating-ui.vue-GXIS2sFG.js → floating-ui.vue-DDOIU2nS.js} +1 -1
- package/dist/{floating-ui.vue-GXIS2sFG.js.map → floating-ui.vue-DDOIU2nS.js.map} +1 -1
- package/dist/{floatingUi-BAUk171g.mjs → floatingUi-8xXp54zf.mjs} +12 -12
- package/dist/floatingUi-8xXp54zf.mjs.map +1 -0
- package/dist/{floatingUi-DBLN9xLH.js → floatingUi-9SWu8BgZ.js} +12 -12
- package/dist/floatingUi-9SWu8BgZ.js.map +1 -0
- package/dist/{getClasses-qqI6x4f4.js → getClasses-8P0iBind.js} +1 -1
- package/dist/{getClasses-qqI6x4f4.js.map → getClasses-8P0iBind.js.map} +1 -1
- package/dist/{getClasses-DaWzwT2S.mjs → getClasses-COokMI60.mjs} +1 -1
- package/dist/{getClasses-DaWzwT2S.mjs.map → getClasses-COokMI60.mjs.map} +1 -1
- package/dist/{getElement-0_htvrFw.mjs → getElement-D2Jr1cbp.mjs} +1 -1
- package/dist/{getElement-0_htvrFw.mjs.map → getElement-D2Jr1cbp.mjs.map} +1 -1
- package/dist/{getElement-CxWWOx3K.js → getElement-DWGFJn0w.js} +1 -1
- package/dist/{getElement-CxWWOx3K.js.map → getElement-DWGFJn0w.js.map} +1 -1
- package/dist/{registryAccess-D-YxwQJq.js → registryAccess-B9QDQwV8.js} +1 -1
- package/dist/{registryAccess-D-YxwQJq.js.map → registryAccess-B9QDQwV8.js.map} +1 -1
- package/dist/{registryAccess-C1Ti_nxW.mjs → registryAccess-BkJDdh-3.mjs} +1 -1
- package/dist/{registryAccess-C1Ti_nxW.mjs.map → registryAccess-BkJDdh-3.mjs.map} +1 -1
- package/dist/src/components/BAccordion/index.mjs +1 -1
- package/dist/src/components/BAccordion/index.umd.js +1 -1
- package/dist/src/components/BAlert/index.mjs +1 -1
- package/dist/src/components/BAlert/index.umd.js +1 -1
- package/dist/src/components/BApp/index.mjs +1 -1
- package/dist/src/components/BApp/index.umd.js +1 -1
- package/dist/src/components/BAutocomplete/index.mjs +1 -1
- package/dist/src/components/BAutocomplete/index.umd.js +1 -1
- package/dist/src/components/BAvatar/index.mjs +1 -1
- package/dist/src/components/BAvatar/index.umd.js +1 -1
- package/dist/src/components/BBadge/index.mjs +1 -1
- package/dist/src/components/BBadge/index.umd.js +1 -1
- package/dist/src/components/BBreadcrumb/index.mjs +1 -1
- package/dist/src/components/BBreadcrumb/index.umd.js +1 -1
- package/dist/src/components/BButton/index.mjs +3 -3
- package/dist/src/components/BButton/index.umd.js +3 -3
- package/dist/src/components/BCard/index.mjs +2 -2
- package/dist/src/components/BCard/index.umd.js +2 -2
- package/dist/src/components/BCarousel/index.mjs +1 -1
- package/dist/src/components/BCarousel/index.umd.js +1 -1
- package/dist/src/components/BCol/index.mjs +1 -1
- package/dist/src/components/BCol/index.umd.js +1 -1
- package/dist/src/components/BCollapse/index.mjs +1 -1
- package/dist/src/components/BCollapse/index.umd.js +1 -1
- package/dist/src/components/BContainer/index.mjs +3 -3
- package/dist/src/components/BContainer/index.umd.js +3 -3
- package/dist/src/components/BDateField/index.mjs +1 -1
- package/dist/src/components/BDateField/index.umd.js +1 -1
- package/dist/src/components/BDatePicker/index.mjs +1 -1
- package/dist/src/components/BDatePicker/index.umd.js +1 -1
- package/dist/src/components/BDropdown/index.mjs +2 -2
- package/dist/src/components/BDropdown/index.umd.js +2 -2
- package/dist/src/components/BForm/index.mjs +3 -3
- package/dist/src/components/BForm/index.umd.js +3 -3
- package/dist/src/components/BFormCheckbox/index.mjs +1 -1
- package/dist/src/components/BFormCheckbox/index.umd.js +1 -1
- package/dist/src/components/BFormFile/index.mjs +1 -1
- package/dist/src/components/BFormFile/index.umd.js +1 -1
- package/dist/src/components/BFormGroup/index.mjs +1 -1
- package/dist/src/components/BFormGroup/index.umd.js +1 -1
- package/dist/src/components/BFormInput/index.mjs +1 -1
- package/dist/src/components/BFormInput/index.umd.js +1 -1
- package/dist/src/components/BFormOtp/index.mjs +1 -1
- package/dist/src/components/BFormOtp/index.umd.js +1 -1
- package/dist/src/components/BFormRadio/index.mjs +1 -1
- package/dist/src/components/BFormRadio/index.umd.js +1 -1
- package/dist/src/components/BFormRating/index.mjs +1 -1
- package/dist/src/components/BFormRating/index.umd.js +1 -1
- package/dist/src/components/BFormSelect/index.mjs +2 -2
- package/dist/src/components/BFormSelect/index.umd.js +2 -2
- package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
- package/dist/src/components/BFormSpinbutton/index.umd.js +1 -1
- package/dist/src/components/BFormTags/index.mjs +2 -2
- package/dist/src/components/BFormTags/index.umd.js +2 -2
- package/dist/src/components/BFormTextarea/index.mjs +1 -1
- package/dist/src/components/BFormTextarea/index.umd.js +1 -1
- package/dist/src/components/BImg/index.mjs +1 -1
- package/dist/src/components/BImg/index.umd.js +1 -1
- package/dist/src/components/BInputGroup/index.mjs +2 -2
- package/dist/src/components/BInputGroup/index.umd.js +2 -2
- package/dist/src/components/BLink/index.mjs +1 -1
- package/dist/src/components/BLink/index.umd.js +1 -1
- package/dist/src/components/BListGroup/index.mjs +1 -1
- package/dist/src/components/BListGroup/index.umd.js +1 -1
- package/dist/src/components/BModal/index.mjs +1 -1
- package/dist/src/components/BModal/index.umd.js +1 -1
- package/dist/src/components/BNav/index.mjs +1 -1
- package/dist/src/components/BNav/index.umd.js +1 -1
- package/dist/src/components/BNavbar/index.mjs +1 -1
- package/dist/src/components/BNavbar/index.umd.js +1 -1
- package/dist/src/components/BOffcanvas/index.mjs +1 -1
- package/dist/src/components/BOffcanvas/index.umd.js +1 -1
- package/dist/src/components/BOverlay/index.mjs +1 -1
- package/dist/src/components/BOverlay/index.umd.js +1 -1
- package/dist/src/components/BPagination/index.mjs +1 -1
- package/dist/src/components/BPagination/index.umd.js +1 -1
- package/dist/src/components/BPlaceholder/index.mjs +1 -1
- package/dist/src/components/BPlaceholder/index.umd.js +1 -1
- package/dist/src/components/BPopover/index.mjs +1 -1
- package/dist/src/components/BPopover/index.umd.js +1 -1
- package/dist/src/components/BProgress/index.mjs +1 -1
- package/dist/src/components/BProgress/index.umd.js +1 -1
- package/dist/src/components/BRow/index.mjs +1 -1
- package/dist/src/components/BRow/index.umd.js +1 -1
- package/dist/src/components/BSpinner/index.mjs +1 -1
- package/dist/src/components/BSpinner/index.umd.js +1 -1
- package/dist/src/components/BTable/index.mjs +2 -2
- package/dist/src/components/BTable/index.umd.js +2 -2
- package/dist/src/components/BTabs/index.mjs +1 -1
- package/dist/src/components/BTabs/index.umd.js +1 -1
- package/dist/src/components/BTimeField/index.mjs +1 -1
- package/dist/src/components/BTimeField/index.umd.js +1 -1
- package/dist/src/components/BToast/index.mjs +1 -1
- package/dist/src/components/BToast/index.umd.js +1 -1
- package/dist/src/components/BTooltip/index.mjs +1 -1
- package/dist/src/components/BTooltip/index.umd.js +1 -1
- package/dist/src/components/index.mjs +58 -58
- package/dist/src/components/index.umd.js +58 -58
- package/dist/src/composables/useColorMode/index.mjs +1 -1
- package/dist/src/composables/useColorMode/index.umd.js +1 -1
- package/dist/src/composables/useModal/index.mjs +1 -1
- package/dist/src/composables/useModal/index.umd.js +1 -1
- package/dist/src/composables/usePopover/index.mjs +2 -2
- package/dist/src/composables/usePopover/index.umd.js +2 -2
- package/dist/src/composables/useScrollLock/index.mjs +1 -1
- package/dist/src/composables/useScrollLock/index.umd.js +1 -1
- package/dist/src/composables/useScrollspy/index.mjs +2 -2
- package/dist/src/composables/useScrollspy/index.umd.js +2 -2
- package/dist/src/composables/useToast/index.mjs +1 -1
- package/dist/src/composables/useToast/index.umd.js +1 -1
- package/dist/src/composables/useToggle/index.mjs +1 -1
- package/dist/src/composables/useToggle/index.umd.js +1 -1
- package/dist/src/directives/BPopover/index.mjs +2 -2
- package/dist/src/directives/BPopover/index.umd.js +2 -2
- package/dist/src/directives/BScrollspy/index.mjs +1 -1
- package/dist/src/directives/BScrollspy/index.umd.js +1 -1
- package/dist/src/directives/BToggle/index.mjs +3 -3
- package/dist/src/directives/BToggle/index.umd.js +3 -3
- package/dist/src/directives/BTooltip/index.mjs +2 -2
- package/dist/src/directives/BTooltip/index.umd.js +2 -2
- package/dist/src/resolvers/index.mjs +1 -1
- package/dist/src/resolvers/index.umd.js +1 -1
- package/dist/src/types/index.mjs +1 -1
- package/dist/src/types/index.umd.js +1 -1
- package/dist/{stringUtils-BwKOASdU.js → stringUtils-68ZN_GRt.js} +2 -2
- package/dist/{stringUtils-BwKOASdU.js.map → stringUtils-68ZN_GRt.js.map} +1 -1
- package/dist/{stringUtils-CslYpDTt.mjs → stringUtils-D4eEDlt1.mjs} +2 -2
- package/dist/{stringUtils-CslYpDTt.mjs.map → stringUtils-D4eEDlt1.mjs.map} +1 -1
- package/dist/types/AriaInvalid.d.mts +1 -0
- package/dist/types/AriaInvalid.d.ts +1 -0
- package/dist/types/ComponentEmits.d.mts +8 -1
- package/dist/types/ComponentEmits.d.ts +8 -1
- package/dist/types/ComponentProps.d.mts +3 -0
- package/dist/types/ComponentProps.d.ts +3 -0
- package/dist/types/ComponentSlots.d.mts +23 -0
- package/dist/types/ComponentSlots.d.ts +23 -0
- package/dist/{useAlignment-BiCREohQ.mjs → useAlignment-DuR8ymKI.mjs} +1 -1
- package/dist/{useAlignment-BiCREohQ.mjs.map → useAlignment-DuR8ymKI.mjs.map} +1 -1
- package/dist/{useAlignment-D5xKBRez.js → useAlignment-oKolnDpb.js} +1 -1
- package/dist/{useAlignment-D5xKBRez.js.map → useAlignment-oKolnDpb.js.map} +1 -1
- package/dist/useAriaInvalid-CHHPHNLU.js.map +1 -1
- package/dist/useAriaInvalid-apOwgexm.mjs.map +1 -1
- package/dist/{useColorVariantClasses-B6Me_Kx6.mjs → useColorVariantClasses-CqeXHjRh.mjs} +1 -1
- package/dist/{useColorVariantClasses-B6Me_Kx6.mjs.map → useColorVariantClasses-CqeXHjRh.mjs.map} +1 -1
- package/dist/{useColorVariantClasses-CEfOwjPv.js → useColorVariantClasses-Dq0sOYDL.js} +1 -1
- package/dist/{useColorVariantClasses-CEfOwjPv.js.map → useColorVariantClasses-Dq0sOYDL.js.map} +1 -1
- package/dist/{useCountdownHover-t9O7DHoK.mjs → useCountdownHover-C3NXiAaF.mjs} +2 -2
- package/dist/{useCountdownHover-t9O7DHoK.mjs.map → useCountdownHover-C3NXiAaF.mjs.map} +1 -1
- package/dist/{useCountdownHover-8bwLWYoN.js → useCountdownHover-DbVhE-N0.js} +2 -2
- package/dist/{useCountdownHover-8bwLWYoN.js.map → useCountdownHover-DbVhE-N0.js.map} +1 -1
- package/dist/{useDateField-DmmXa0_5.mjs → useDateField-CJKgollJ.mjs} +3 -3
- package/dist/{useDateField-DmmXa0_5.mjs.map → useDateField-CJKgollJ.mjs.map} +1 -1
- package/dist/{useDateField-COTiu3aN.js → useDateField-DWv3600o.js} +3 -3
- package/dist/{useDateField-COTiu3aN.js.map → useDateField-DWv3600o.js.map} +1 -1
- package/dist/{useFormCheck-CbRHduFK.mjs → useFormCheck-BKXrwS3g.mjs} +2 -2
- package/dist/{useFormCheck-CbRHduFK.mjs.map → useFormCheck-BKXrwS3g.mjs.map} +1 -1
- package/dist/{useFormCheck-Cj5K6pk-.js → useFormCheck-DYjLG4WA.js} +2 -2
- package/dist/{useFormCheck-Cj5K6pk-.js.map → useFormCheck-DYjLG4WA.js.map} +1 -1
- package/dist/{useFormInput-BgJCT9k_.mjs → useFormInput-CA4FYoV7.mjs} +4 -4
- package/dist/{useFormInput-BgJCT9k_.mjs.map → useFormInput-CA4FYoV7.mjs.map} +1 -1
- package/dist/{useFormInput-CsR38QR6.js → useFormInput-D31FCDxr.js} +4 -4
- package/dist/{useFormInput-CsR38QR6.js.map → useFormInput-D31FCDxr.js.map} +1 -1
- package/dist/{useFormSelect-D3gVO4jJ.mjs → useFormSelect-C0nvno12.mjs} +1 -1
- package/dist/{useFormSelect-D3gVO4jJ.mjs.map → useFormSelect-C0nvno12.mjs.map} +1 -1
- package/dist/{useFormSelect-CiIMUolC.js → useFormSelect-CjAziZpu.js} +1 -1
- package/dist/{useFormSelect-CiIMUolC.js.map → useFormSelect-CjAziZpu.js.map} +1 -1
- package/dist/{useForwardExpose-DrJOy0jY.js → useForwardExpose-BpZJluPs.js} +2 -2
- package/dist/{useForwardExpose-DrJOy0jY.js.map → useForwardExpose-BpZJluPs.js.map} +1 -1
- package/dist/{useForwardExpose-4OUimdPL.mjs → useForwardExpose-Cob6LlGd.mjs} +2 -2
- package/dist/{useForwardExpose-4OUimdPL.mjs.map → useForwardExpose-Cob6LlGd.mjs.map} +1 -1
- package/dist/{useKbd-IZRktImL.mjs → useKbd-DfmgFov6.mjs} +1 -1
- package/dist/{useKbd-IZRktImL.mjs.map → useKbd-DfmgFov6.mjs.map} +1 -1
- package/dist/{useKbd-ZZushx7D.js → useKbd-sqDCJtXL.js} +1 -1
- package/dist/{useKbd-ZZushx7D.js.map → useKbd-sqDCJtXL.js.map} +1 -1
- package/dist/{useNumberishToStyle-DFf9fokb.js → useNumberishToStyle-BtMa0R27.js} +2 -2
- package/dist/{useNumberishToStyle-DFf9fokb.js.map → useNumberishToStyle-BtMa0R27.js.map} +1 -1
- package/dist/{useNumberishToStyle-DEqGK1UH.mjs → useNumberishToStyle-DgS1slD3.mjs} +2 -2
- package/dist/{useNumberishToStyle-DEqGK1UH.mjs.map → useNumberishToStyle-DgS1slD3.mjs.map} +1 -1
- package/dist/{useRadiusElementClasses-BlrN-T6U.mjs → useRadiusElementClasses-BW832F7F.mjs} +1 -1
- package/dist/{useRadiusElementClasses-BlrN-T6U.mjs.map → useRadiusElementClasses-BW832F7F.mjs.map} +1 -1
- package/dist/{useRadiusElementClasses-C13_PhPM.js → useRadiusElementClasses-DWiUVgex.js} +1 -1
- package/dist/{useRadiusElementClasses-C13_PhPM.js.map → useRadiusElementClasses-DWiUVgex.js.map} +1 -1
- package/dist/{useRtl-DXAooTrl.js → useRtl-DDPRnA7g.js} +1 -1
- package/dist/{useRtl-DXAooTrl.js.map → useRtl-DDPRnA7g.js.map} +1 -1
- package/dist/{useRtl-DpwU_RM8.mjs → useRtl-VR3M2Txg.mjs} +1 -1
- package/dist/{useRtl-DpwU_RM8.mjs.map → useRtl-VR3M2Txg.mjs.map} +1 -1
- package/dist/{useSafeScrollLock-Bm9RxDoY.js → useSafeScrollLock-7wmPH_Hy.js} +2 -2
- package/dist/{useSafeScrollLock-Bm9RxDoY.js.map → useSafeScrollLock-7wmPH_Hy.js.map} +1 -1
- package/dist/{useSafeScrollLock-D62o8jto.mjs → useSafeScrollLock-Me5LyqjD.mjs} +2 -2
- package/dist/{useSafeScrollLock-D62o8jto.mjs.map → useSafeScrollLock-Me5LyqjD.mjs.map} +1 -1
- package/dist/{useShowHide-BTCaeU5j.js → useShowHide-BhdrR1wG.js} +2 -2
- package/dist/{useShowHide-BTCaeU5j.js.map → useShowHide-BhdrR1wG.js.map} +1 -1
- package/dist/{useShowHide-yAK5dhPT.mjs → useShowHide-DKdljnpv.mjs} +2 -2
- package/dist/{useShowHide-yAK5dhPT.mjs.map → useShowHide-DKdljnpv.mjs.map} +1 -1
- package/dist/{useStateClass-CJ24hpkn.js → useStateClass-CXK3nCg9.js} +1 -1
- package/dist/{useStateClass-CJ24hpkn.js.map → useStateClass-CXK3nCg9.js.map} +1 -1
- package/dist/{useStateClass-CdmlbrGn.mjs → useStateClass-DxlL_m2E.mjs} +1 -1
- package/dist/{useStateClass-CdmlbrGn.mjs.map → useStateClass-DxlL_m2E.mjs.map} +1 -1
- package/dist/{utils-DtPi91ue.js → utils-BTPjS0XS.js} +2 -2
- package/dist/{utils-DtPi91ue.js.map → utils-BTPjS0XS.js.map} +1 -1
- package/dist/{utils-D30CwVm-.mjs → utils-Dgz9Trtl.mjs} +2 -2
- package/dist/{utils-D30CwVm-.mjs.map → utils-Dgz9Trtl.mjs.map} +1 -1
- package/package.json +1 -1
- package/src/components/BAutocomplete/_autocomplete.scss +69 -1
- package/dist/BAlert-CHbgLTZH.js.map +0 -1
- package/dist/BAlert-CRRUJXYi.mjs.map +0 -1
- package/dist/BApp-DJWC2mB8.mjs.map +0 -1
- package/dist/BApp-DaM0UKIg.js.map +0 -1
- package/dist/BAvatar-BHqTW5Ll.js.map +0 -1
- package/dist/BAvatar-BSLk69M0.mjs.map +0 -1
- package/dist/BBadge-BBUcrujj.js.map +0 -1
- package/dist/BBadge-D5ra3W5R.mjs.map +0 -1
- package/dist/BBreadcrumb-BSsiwCNB.js.map +0 -1
- package/dist/BBreadcrumb-amkzWyz6.mjs.map +0 -1
- package/dist/BButton-BUYwco3v.js.map +0 -1
- package/dist/BButton-Bw4HgpsF.js.map +0 -1
- package/dist/BButton-CDo9SRvU.mjs.map +0 -1
- package/dist/BButton-DgequxLk.mjs.map +0 -1
- package/dist/BCard-C1G8PO5k.mjs.map +0 -1
- package/dist/BCard-CJ822HyH.mjs.map +0 -1
- package/dist/BCard-CSyEHz8Z.js.map +0 -1
- package/dist/BCard-CgbTFn3S.js.map +0 -1
- package/dist/BCloseButton-CN__Jjcj.js.map +0 -1
- package/dist/BCloseButton-CjgbR1Ec.mjs.map +0 -1
- package/dist/BCol-0tZmpOme.js.map +0 -1
- package/dist/BCol-C4v-TOX6.mjs.map +0 -1
- package/dist/BCollapse-D-xTGkX_.mjs.map +0 -1
- package/dist/BCollapse-DZ1z2c8U.js.map +0 -1
- package/dist/BContainer-BZUI2qQv.js.map +0 -1
- package/dist/BContainer-DjIGH6-y.mjs.map +0 -1
- package/dist/BDateField-BJIq6gs9.mjs.map +0 -1
- package/dist/BDateField-RWwEMIwd.js.map +0 -1
- package/dist/BDropdown-BxciLgyt.js.map +0 -1
- package/dist/BDropdown-CRIh9xqy.mjs.map +0 -1
- package/dist/BDropdown-D2pBrZsG.mjs.map +0 -1
- package/dist/BDropdown-DgbFCKfP.js.map +0 -1
- package/dist/BForm-Bp7SFxiK.js.map +0 -1
- package/dist/BForm-C8I6v7bU.mjs.map +0 -1
- package/dist/BForm-Oh6PpdcD.mjs.map +0 -1
- package/dist/BForm-_h0kYDl7.js.map +0 -1
- package/dist/BFormCheckbox-BPQxUDQG.js.map +0 -1
- package/dist/BFormCheckbox-DPNPjRKN.mjs.map +0 -1
- package/dist/BFormGroup--38dFj0X.mjs +0 -381
- package/dist/BFormGroup--38dFj0X.mjs.map +0 -1
- package/dist/BFormGroup-BwO1BZD1.js +0 -387
- package/dist/BFormGroup-BwO1BZD1.js.map +0 -1
- package/dist/BFormInput-BuRSGYdY.js.map +0 -1
- package/dist/BFormInput-Dg9dbwHp.mjs.map +0 -1
- package/dist/BFormRadio-BZ0etDxl.js.map +0 -1
- package/dist/BFormRadio-CqYd0bLV.mjs.map +0 -1
- package/dist/BFormRating-Bb_ACp-9.mjs.map +0 -1
- package/dist/BFormRating-CNqf91vN.js.map +0 -1
- package/dist/BFormSelect-B_mbfTMC.js.map +0 -1
- package/dist/BFormSelect-CpkJ1haI.mjs.map +0 -1
- package/dist/BFormSelectOption-BY4P8HOf.js.map +0 -1
- package/dist/BFormSelectOption-O8cyyv3i.mjs.map +0 -1
- package/dist/BFormTag-BUWEugEC.mjs.map +0 -1
- package/dist/BFormTag-C7B-bX72.js.map +0 -1
- package/dist/BFormTags-DJzXJp7d.js.map +0 -1
- package/dist/BFormTags-DWAWX2av.mjs.map +0 -1
- package/dist/BFormTextarea-8c3B3kAI.js.map +0 -1
- package/dist/BFormTextarea-BMk05ojJ.mjs.map +0 -1
- package/dist/BFormValidFeedback-DvTgwqSe.js.map +0 -1
- package/dist/BFormValidFeedback-_Dgzm0Ag.mjs.map +0 -1
- package/dist/BImg-BQqZfIM9.mjs.map +0 -1
- package/dist/BImg-Dyy0N-WQ.js.map +0 -1
- package/dist/BInputGroup-Bfcs5h_Q.js.map +0 -1
- package/dist/BInputGroup-C5sxenhE.mjs.map +0 -1
- package/dist/BInputGroup-DTP5Vf1f.js.map +0 -1
- package/dist/BInputGroup-Dl9AgpAx.mjs.map +0 -1
- package/dist/BListGroup-BmtN0xQ3.mjs.map +0 -1
- package/dist/BListGroup-DuyMdAxJ.js.map +0 -1
- package/dist/BNav-BdO2N7G0.mjs.map +0 -1
- package/dist/BNav-MjroX-Jl.js.map +0 -1
- package/dist/BNavbar-s9Ak5PnO.js.map +0 -1
- package/dist/BNavbar-vN3_CMLn.mjs.map +0 -1
- package/dist/BOffcanvas-ColOuYdV.js.map +0 -1
- package/dist/BOffcanvas-DmkJSSFy.mjs.map +0 -1
- package/dist/BOverlay-B7vJAdHO.js.map +0 -1
- package/dist/BOverlay-BGxH9JVy.mjs.map +0 -1
- package/dist/BPagination-C0-4NVzW.js.map +0 -1
- package/dist/BPagination-CvoSN1He.mjs.map +0 -1
- package/dist/BPlaceholder-DKDtjMjy.mjs.map +0 -1
- package/dist/BPlaceholder-n447tOzJ.js.map +0 -1
- package/dist/BProgress-BIqo6vLh.mjs.map +0 -1
- package/dist/BProgress-Bc3ZSkac.js.map +0 -1
- package/dist/BRow-BCEK3fe6.mjs.map +0 -1
- package/dist/BRow-tqMEhkZS.js.map +0 -1
- package/dist/BSpinner-8UMAINYb.js.map +0 -1
- package/dist/BSpinner-BpnwONvx.mjs.map +0 -1
- package/dist/BTable-Btzu1IJ_.js.map +0 -1
- package/dist/BTable-CjHMx8Yv.mjs.map +0 -1
- package/dist/BTableSimple-BcdizuDm.js.map +0 -1
- package/dist/BTableSimple-C901Z5V9.mjs.map +0 -1
- package/dist/BTabs-DZEF9kgT.mjs.map +0 -1
- package/dist/BTabs-DiYaJi22.js.map +0 -1
- package/dist/BToast-BFcT76M1.js.map +0 -1
- package/dist/BToast-D5XkJqF4.mjs.map +0 -1
- package/dist/BTooltip-BwiqjqX-.js.map +0 -1
- package/dist/BTooltip-DohT1Q3C.mjs.map +0 -1
- package/dist/ConditionalTeleport-BJZk6HAx.js.map +0 -1
- package/dist/ConditionalTeleport-BNsziElf.mjs.map +0 -1
- package/dist/dist-B10a-gZ8.mjs.map +0 -1
- package/dist/floatingUi-BAUk171g.mjs.map +0 -1
- package/dist/floatingUi-DBLN9xLH.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormSpinbutton-BLO0Yf36.mjs","names":[],"sources":["../src/components/BFormSpinbutton/BFormSpinbutton.vue","../src/components/BFormSpinbutton/BFormSpinbutton.vue"],"sourcesContent":["<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonSlots,\n BFormSpinbuttonProps,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n","<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonSlots,\n BFormSpinbuttonProps,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 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A,WAAA,UAAU,OAAY,kBAAA,MAAkB,WAAA,MAAU,GAAI,MAAA,MAAK,CAAC,gBAAW,GAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA;IAK/E,WAUO,KAAA,QAVO,QAAA,MAAQ,OAAO,KAAK,MAAI,EAAiC,UAAW,MAAA,QAAO,EAAA,QAUlF,CATL,mBAQS,UART,WACU,QAOD,MAPS,OAAO,QAAM;KAC5B,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,KAAA;KACjC,cAAU,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,KAAA;uBAEnC,mBAEM,OAAA,eAAA,mBAFO,QAAA,MAAQ,OAAO,IAAG,CAAA,EAAA,CAC7B,mBAAqC,QAAA,eAAA,mBAAvB,QAAA,MAAQ,OAAO,KAAI,CAAA,EAAA,MAAA,GAAA,CAAA,EAAA,GAAA,EAAA,EAAA,GAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BFormSpinbutton-CPsVUIh9.mjs","names":[],"sources":["../src/components/BFormSpinbutton/BFormSpinbutton.vue","../src/components/BFormSpinbutton/BFormSpinbutton.vue"],"sourcesContent":["<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n","<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n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AU,GAAI,MAAA,MAAK,CAAC,gBAAW,GAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA;IAK/E,WAUO,KAAA,QAVO,QAAA,MAAQ,OAAO,KAAK,MAAI,EAAiC,UAAW,MAAA,QAAO,EAAA,QAUlF,CATL,mBAQS,UART,WACU,QAOD,MAPS,OAAO,QAAM;KAC5B,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,KAAA;KACjC,cAAU,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,KAAA;uBAEnC,mBAEM,OAAA,eAAA,mBAFO,QAAA,MAAQ,OAAO,IAAG,CAAA,EAAA,CAC7B,mBAAqC,QAAA,eAAA,mBAAvB,QAAA,MAAQ,OAAO,KAAI,CAAA,EAAA,MAAA,GAAA,CAAA,EAAA,GAAA,EAAA,EAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require("./chunk-CoQrYLCe.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DiXKLh_W.js");
|
|
3
3
|
const require_dom = require("./dom-Bs6DzM72.js");
|
|
4
4
|
const require_useDefaults = require("./useDefaults-DsLf4iRY.js");
|
|
5
5
|
const require_useId = require("./useId-DHrBgM7P.js");
|
|
6
|
-
const require_constants = require("./constants-
|
|
7
|
-
const require_useRtl = require("./useRtl-
|
|
6
|
+
const require_constants = require("./constants-BLIvvaat.js");
|
|
7
|
+
const require_useRtl = require("./useRtl-DDPRnA7g.js");
|
|
8
8
|
let vue = require("vue");
|
|
9
9
|
//#region src/components/BFormSpinbutton/BFormSpinbutton.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1 = [
|
|
@@ -444,4 +444,4 @@ Object.defineProperty(exports, "BFormSpinbutton_default", {
|
|
|
444
444
|
}
|
|
445
445
|
});
|
|
446
446
|
|
|
447
|
-
//# sourceMappingURL=BFormSpinbutton-
|
|
447
|
+
//# sourceMappingURL=BFormSpinbutton-DPCXum9q.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormSpinbutton-BaOTL1k1.js","names":[],"sources":["../src/components/BFormSpinbutton/BFormSpinbutton.vue","../src/components/BFormSpinbutton/BFormSpinbutton.vue"],"sourcesContent":["<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonSlots,\n BFormSpinbuttonProps,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n","<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonSlots,\n BFormSpinbuttonProps,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4hBA,IAAM,gBAAgB;CACpB,KAAK;CACL,KAAK;CACL,MAAM;CACN,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAvcD,MAAM,YAAY;GAAC,kBAAA;GAAS,kBAAA;GAAW,kBAAA;;GAAqB,kBAAA;GAAa,kBAAA;GAAa;EA6BtF,MAAM,QAAQ,oBAAA,YA3BC,SA2BmB,kBAAiB;EACnD,MAAM,OAAO;EAGb,MAAM,cAAA,GAAA,IAAA,UAAgF,SAAA,aAErF;EAED,MAAM,WAAA,GAAA,IAAA,gBAAyB,WAAU;EAEzC,MAAM,EAAC,YAAW,aAAA,SAAS,QAAO;EA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AAA;oCAIjE,OAAA,OAAA,GAAA,IAAA,kBADA,WAAA,UAAU,OAAY,kBAAA,MAAkB,WAAA,MAAU,IAAA,GAAA,IAAA,OAAI,MAAK,CAAC,gBAAW,GAAA,EAAA,EAAA,CAAA,EAAA,IAAA,WAAA;wBAexE,KAAA,QAVO,QAAA,MAAQ,OAAO,KAAK,MAAI,EAAiC,WAAA,GAAA,IAAA,OAAW,QAAO,EAAA,QAUlF,EAAA,GAAA,IAAA,oBADI,WAAA,GAAA,IAAA,YAPC,QAOD,MAPS,OAAO,QAAM;KAC5B,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,KAAA;KACjC,cAAU,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,KAAA;4DAI7B,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAFO,QAAA,MAAQ,OAAO,IAAG,CAAA,EAAA,EAAA,GAAA,IAAA,oBACQ,SAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAAvB,QAAA,MAAQ,OAAO,KAAI,CAAA,EAAA,MAAA,GAAA,CAAA,EAAA,GAAA,EAAA,EAAA,GAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BFormSpinbutton-DPCXum9q.js","names":[],"sources":["../src/components/BFormSpinbutton/BFormSpinbutton.vue","../src/components/BFormSpinbutton/BFormSpinbutton.vue"],"sourcesContent":["<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n","<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4hBA,IAAM,gBAAgB;CACpB,KAAK;CACL,KAAK;CACL,MAAM;CACN,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAvcD,MAAM,YAAY;GAAC,kBAAA;GAAS,kBAAA;GAAW,kBAAA;;GAAqB,kBAAA;GAAa,kBAAA;GAAa;EA6BtF,MAAM,QAAQ,oBAAA,YA3BC,SA2BmB,kBAAiB;EACnD,MAAM,OAAO;EAGb,MAAM,cAAA,GAAA,IAAA,UAAgF,SAAA,aAErF;EAED,MAAM,WAAA,GAAA,IAAA,gBAAyB,WAAU;EAEzC,MAAM,EAAC,YAAW,aAAA,SAAS,QAAO;EAElC,MAAM,aAAa,cAAA,YAAY,MAAM,IAAI,aAAY;EAErD,MAAM,mBAAA,GAAA,IAAA,iBAAkC;GACtC,YAAY,MAAM;GAClB,YAAY,MAAM;GAClB,SAAS,QAAQ;GACjB,iBAAiB,MAAM,UAAU,MAAM;GACvC,UAAU,CAAC,MAAM,UAAU,CAAC,MAAM;GAClC,uBAAuB,CAAC,MAAM;GAC9B,eAAe,MAAM;IACpB,gBAAgB,MAAM,SAAS,MAAM,SAAS,KAAA;GAChD,EAAC;EAEF,MAAM,uBAAA,GAAA,IAAA,iBAAsC;GAC1C,UAAU,MAAM;GAChB,qBAAqB,CAAC,MAAM;GAC5B,sBAAsB,MAAM;GAC5B,cAAc,MAAM;GACpB,iBAAiB,MAAM;GACvB,gBAAgB,CAAC,MAAM;GACvB,cAAc,CAAC,MAAM;GACtB,EAAC;EAGF,IAAI;EACJ,IAAI;EAC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AO,GAAA,KAAA;4DAI7B,QAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAFO,QAAA,MAAQ,OAAO,IAAG,CAAA,EAAA,EAAA,GAAA,IAAA,oBACQ,SAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAAvB,QAAA,MAAQ,OAAO,KAAI,CAAA,EAAA,MAAA,GAAA,CAAA,EAAA,GAAA,EAAA,EAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require("./chunk-CoQrYLCe.js");
|
|
2
2
|
const require_useDefaults = require("./useDefaults-DsLf4iRY.js");
|
|
3
3
|
const require_useId = require("./useId-DHrBgM7P.js");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const require_BCloseButton = require("./BCloseButton-fw5ONnhr.js");
|
|
5
|
+
const require_useColorVariantClasses = require("./useColorVariantClasses-Dq0sOYDL.js");
|
|
6
6
|
let vue = require("vue");
|
|
7
7
|
//#region src/components/BFormTags/BFormTag.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var _hoisted_1 = ["id"];
|
|
@@ -83,4 +83,4 @@ Object.defineProperty(exports, "BFormTag_default", {
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
//# sourceMappingURL=BFormTag-
|
|
86
|
+
//# sourceMappingURL=BFormTag-Bsy6Znok.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BFormTag-Bsy6Znok.js","names":[],"sources":["../src/components/BFormTags/BFormTag.vue","../src/components/BFormTags/BFormTag.vue"],"sourcesContent":["<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n :title=\"tagText\"\n class=\"badge b-form-tag d-inline-flex align-items-center mw-100\"\n :class=\"computedClasses\"\n :aria-labelledby=\"taglabelId\"\n >\n <span :id=\"taglabelId\" class=\"b-form-tag-content flex-grow-1 text-truncate\">\n <slot>{{ tagText }}</slot>\n </span>\n <BCloseButton\n v-if=\"!props.disabled && !props.noRemove\"\n aria-keyshortcuts=\"Delete\"\n :aria-label=\"props.removeLabel\"\n class=\"b-form-tag-remove\"\n :aria-describedby=\"taglabelId\"\n :aria-controls=\"props.id\"\n @click=\"emit('remove', tagText)\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTagEmits, BFormTagProps, BFormTagSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTagProps>(), {\n disabled: false,\n id: undefined,\n noRemove: false,\n pill: false,\n removeLabel: 'Remove tag',\n tag: 'span',\n title: undefined,\n variant: 'secondary',\n})\nconst props = useDefaults(_props, 'BFormTag')\nconst emit = defineEmits<BFormTagEmits>()\nconst slots = defineSlots<BFormTagSlots>()\n\nconst computedId = useId(() => props.id)\n\nconst tagText = computed(\n () => ((slots.default?.({})[0].children ?? '').toString() || props.title) ?? ''\n)\nconst taglabelId = computed(() => `${computedId.value}taglabel__`)\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'rounded-pill': props.pill,\n 'disabled': props.disabled,\n },\n])\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n :title=\"tagText\"\n class=\"badge b-form-tag d-inline-flex align-items-center mw-100\"\n :class=\"computedClasses\"\n :aria-labelledby=\"taglabelId\"\n >\n <span :id=\"taglabelId\" class=\"b-form-tag-content flex-grow-1 text-truncate\">\n <slot>{{ tagText }}</slot>\n </span>\n <BCloseButton\n v-if=\"!props.disabled && !props.noRemove\"\n aria-keyshortcuts=\"Delete\"\n :aria-label=\"props.removeLabel\"\n class=\"b-form-tag-remove\"\n :aria-describedby=\"taglabelId\"\n :aria-controls=\"props.id\"\n @click=\"emit('remove', tagText)\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTagEmits, BFormTagProps, BFormTagSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTagProps>(), {\n disabled: false,\n id: undefined,\n noRemove: false,\n pill: false,\n removeLabel: 'Remove tag',\n tag: 'span',\n title: undefined,\n variant: 'secondary',\n})\nconst props = useDefaults(_props, 'BFormTag')\nconst emit = defineEmits<BFormTagEmits>()\nconst slots = defineSlots<BFormTagSlots>()\n\nconst computedId = useId(() => props.id)\n\nconst tagText = computed(\n () => ((slots.default?.({})[0].children ?? '').toString() || props.title) ?? ''\n)\nconst taglabelId = computed(() => `${computedId.value}taglabel__`)\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'rounded-pill': props.pill,\n 'disabled': props.disabled,\n },\n])\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ,oBAAA,YAVC,SAUmB,WAAU;EAC5C,MAAM,OAAO;EACb,MAAM,SAAA,GAAA,IAAA,WAAQ;EAEd,MAAM,aAAa,cAAA,YAAY,MAAM,GAAE;EAEvC,MAAM,WAAA,GAAA,IAAA,kBACI,MAAM,UAAU,EAAE,CAAC,CAAC,GAAG,YAAY,IAAI,UAAU,IAAI,MAAM,UAAU,GAC/E;EACA,MAAM,cAAA,GAAA,IAAA,gBAA4B,GAAG,WAAW,MAAM,YAAW;EAEjE,MAAM,eAAe,+BAAA,uBAAuB,MAAK;EACjD,MAAM,mBAAA,GAAA,IAAA,gBAAiC,CACrC,aAAa,OACb;GACE,gBAAgB,MAAM;GACtB,YAAY,MAAM;GACnB,CACF,CAAA;;qGA1DQ,MAAK,CAAC,IAAG,EAAA;IACb,KAAA,GAAA,IAAA,OAAI,WAAU;IACd,OAAO,QAAA;IACR,QAAA,GAAA,IAAA,gBAAK,CAAC,4DACE,gBAAA,MAAe,CAAA;IACtB,mBAAiB,WAAA;;oCAIX,EAAA,GAAA,IAAA,oBAAA,QAAA;KAFA,IAAI,WAAA;KAAY,OAAM;4BACD,KAAA,QAAA,WAAA,EAAA,QAAA,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAAjB,QAAA,MAAO,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA,EAAA,EAAA,GAAA,IAAA,OAGT,MAAK,CAAC,YAAQ,EAAA,GAAA,IAAA,OAAK,MAAK,CAAC,aAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,aAOhC,qBAAA,sBAAA;;KANA,qBAAkB;KACjB,eAAA,GAAA,IAAA,OAAY,MAAK,CAAC;KACnB,OAAM;KACL,oBAAkB,WAAA;KAClB,kBAAA,GAAA,IAAA,OAAe,MAAK,CAAC;KACrB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAW,QAAA,MAAO"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as useDefaults } from "./useDefaults-BKgBaqOV.mjs";
|
|
2
2
|
import { t as useId$1 } from "./useId-BKZFSYm8.mjs";
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
3
|
+
import { t as BCloseButton_default } from "./BCloseButton-CCdRwLDo.mjs";
|
|
4
|
+
import { t as useColorVariantClasses } from "./useColorVariantClasses-CqeXHjRh.mjs";
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, withCtx } from "vue";
|
|
6
6
|
//#region src/components/BFormTags/BFormTag.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = ["id"];
|
|
@@ -77,4 +77,4 @@ var BFormTag_default = /* @__PURE__ */ defineComponent({
|
|
|
77
77
|
//#endregion
|
|
78
78
|
export { BFormTag_default as t };
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=BFormTag-
|
|
80
|
+
//# sourceMappingURL=BFormTag-Cjg1R-Lj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BFormTag-Cjg1R-Lj.mjs","names":[],"sources":["../src/components/BFormTags/BFormTag.vue","../src/components/BFormTags/BFormTag.vue"],"sourcesContent":["<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n :title=\"tagText\"\n class=\"badge b-form-tag d-inline-flex align-items-center mw-100\"\n :class=\"computedClasses\"\n :aria-labelledby=\"taglabelId\"\n >\n <span :id=\"taglabelId\" class=\"b-form-tag-content flex-grow-1 text-truncate\">\n <slot>{{ tagText }}</slot>\n </span>\n <BCloseButton\n v-if=\"!props.disabled && !props.noRemove\"\n aria-keyshortcuts=\"Delete\"\n :aria-label=\"props.removeLabel\"\n class=\"b-form-tag-remove\"\n :aria-describedby=\"taglabelId\"\n :aria-controls=\"props.id\"\n @click=\"emit('remove', tagText)\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTagEmits, BFormTagProps, BFormTagSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTagProps>(), {\n disabled: false,\n id: undefined,\n noRemove: false,\n pill: false,\n removeLabel: 'Remove tag',\n tag: 'span',\n title: undefined,\n variant: 'secondary',\n})\nconst props = useDefaults(_props, 'BFormTag')\nconst emit = defineEmits<BFormTagEmits>()\nconst slots = defineSlots<BFormTagSlots>()\n\nconst computedId = useId(() => props.id)\n\nconst tagText = computed(\n () => ((slots.default?.({})[0].children ?? '').toString() || props.title) ?? ''\n)\nconst taglabelId = computed(() => `${computedId.value}taglabel__`)\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'rounded-pill': props.pill,\n 'disabled': props.disabled,\n },\n])\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n :title=\"tagText\"\n class=\"badge b-form-tag d-inline-flex align-items-center mw-100\"\n :class=\"computedClasses\"\n :aria-labelledby=\"taglabelId\"\n >\n <span :id=\"taglabelId\" class=\"b-form-tag-content flex-grow-1 text-truncate\">\n <slot>{{ tagText }}</slot>\n </span>\n <BCloseButton\n v-if=\"!props.disabled && !props.noRemove\"\n aria-keyshortcuts=\"Delete\"\n :aria-label=\"props.removeLabel\"\n class=\"b-form-tag-remove\"\n :aria-describedby=\"taglabelId\"\n :aria-controls=\"props.id\"\n @click=\"emit('remove', tagText)\"\n />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTagEmits, BFormTagProps, BFormTagSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTagProps>(), {\n disabled: false,\n id: undefined,\n noRemove: false,\n pill: false,\n removeLabel: 'Remove tag',\n tag: 'span',\n title: undefined,\n variant: 'secondary',\n})\nconst props = useDefaults(_props, 'BFormTag')\nconst emit = defineEmits<BFormTagEmits>()\nconst slots = defineSlots<BFormTagSlots>()\n\nconst computedId = useId(() => props.id)\n\nconst tagText = computed(\n () => ((slots.default?.({})[0].children ?? '').toString() || props.title) ?? ''\n)\nconst taglabelId = computed(() => `${computedId.value}taglabel__`)\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'rounded-pill': props.pill,\n 'disabled': props.disabled,\n },\n])\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ,YAVC,SAUmB,WAAU;EAC5C,MAAM,OAAO;EACb,MAAM,QAAQ,UAAA;EAEd,MAAM,aAAa,cAAY,MAAM,GAAE;EAEvC,MAAM,UAAU,iBACN,MAAM,UAAU,EAAE,CAAC,CAAC,GAAG,YAAY,IAAI,UAAU,IAAI,MAAM,UAAU,GAC/E;EACA,MAAM,aAAa,eAAe,GAAG,WAAW,MAAM,YAAW;EAEjE,MAAM,eAAe,uBAAuB,MAAK;EACjD,MAAM,kBAAkB,eAAe,CACrC,aAAa,OACb;GACE,gBAAgB,MAAM;GACtB,YAAY,MAAM;GACnB,CACF,CAAA;;uBA3DC,YAoBY,wBAnBL,MAAA,MAAK,CAAC,IAAG,EAAA;IACb,IAAI,MAAA,WAAU;IACd,OAAO,QAAA;IACR,OAAK,eAAA,CAAC,4DACE,gBAAA,MAAe,CAAA;IACtB,mBAAiB,WAAA;;2BAIX,CAFP,mBAEO,QAAA;KAFA,IAAI,WAAA;KAAY,OAAM;QAC3B,WAA0B,KAAA,QAAA,WAAA,EAAA,QAAA,CAAA,gBAAA,gBAAjB,QAAA,MAAO,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA,EAAA,CAGT,MAAA,MAAK,CAAC,YAAQ,CAAK,MAAA,MAAK,CAAC,YAAA,WAAA,EADlC,YAQE,sBAAA;;KANA,qBAAkB;KACjB,cAAY,MAAA,MAAK,CAAC;KACnB,OAAM;KACL,oBAAkB,WAAA;KAClB,iBAAe,MAAA,MAAK,CAAC;KACrB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAW,QAAA,MAAO"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require("./chunk-CoQrYLCe.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DiXKLh_W.js");
|
|
3
3
|
const require_useDefaults = require("./useDefaults-DsLf4iRY.js");
|
|
4
4
|
const require_useId = require("./useId-DHrBgM7P.js");
|
|
5
|
-
const require_stringUtils = require("./stringUtils-
|
|
6
|
-
const require_useStateClass = require("./useStateClass-
|
|
7
|
-
const require_BFormTag = require("./BFormTag-
|
|
5
|
+
const require_stringUtils = require("./stringUtils-68ZN_GRt.js");
|
|
6
|
+
const require_useStateClass = require("./useStateClass-CXK3nCg9.js");
|
|
7
|
+
const require_BFormTag = require("./BFormTag-Bsy6Znok.js");
|
|
8
8
|
let vue = require("vue");
|
|
9
9
|
//#region src/components/BFormTags/BFormTags.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1 = ["id"];
|
|
@@ -129,6 +129,7 @@ var BFormTags_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
129
129
|
"focus",
|
|
130
130
|
"focusin",
|
|
131
131
|
"focusout",
|
|
132
|
+
"tag-added",
|
|
132
133
|
"tag-state"
|
|
133
134
|
], ["update:modelValue"]),
|
|
134
135
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -243,6 +244,7 @@ var BFormTags_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
243
244
|
inputValue.value = "";
|
|
244
245
|
shouldRemoveOnDelete.value = true;
|
|
245
246
|
modelValue.value = newValue;
|
|
247
|
+
if (validTags.length > 0) emit("tag-added", validTags);
|
|
246
248
|
focused.value = true;
|
|
247
249
|
};
|
|
248
250
|
const removeTag = (tag) => {
|
|
@@ -277,7 +279,7 @@ var BFormTags_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
277
279
|
for: _inputId.value,
|
|
278
280
|
"aria-live": (0, vue.unref)(focused) ? "polite" : "off",
|
|
279
281
|
"aria-atomic": "true",
|
|
280
|
-
"aria-relevant": "additions
|
|
282
|
+
"aria-relevant": "additions"
|
|
281
283
|
}, (0, vue.toDisplayString)(tags.value.join(", ")), 9, _hoisted_2),
|
|
282
284
|
(0, vue.createElementVNode)("div", {
|
|
283
285
|
id: `${(0, vue.unref)(computedId)}removed_tags__`,
|
|
@@ -373,7 +375,7 @@ var BFormTags_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
373
375
|
placeholder: (0, vue.unref)(props).placeholder,
|
|
374
376
|
class: "b-form-tags-input w-100 flex-grow-1 p-0 m-0 bg-transparent border-0",
|
|
375
377
|
style: {
|
|
376
|
-
"outline": "currentcolor none
|
|
378
|
+
"outline": "currentcolor none 0",
|
|
377
379
|
"min-width": "5rem"
|
|
378
380
|
}
|
|
379
381
|
}, (0, vue.unref)(props).inputAttrs, {
|
|
@@ -422,4 +424,4 @@ Object.defineProperty(exports, "BFormTags_default", {
|
|
|
422
424
|
}
|
|
423
425
|
});
|
|
424
426
|
|
|
425
|
-
//# sourceMappingURL=BFormTags-
|
|
427
|
+
//# sourceMappingURL=BFormTags-BIZyBseI.js.map
|