bootstrap-vue-next 0.45.0 → 0.45.1
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-B1qC2xDb.js} +114 -65
- package/dist/{BAutocomplete-4CFl6XQR.js.map → BAutocomplete-B1qC2xDb.js.map} +1 -1
- package/dist/{BAutocomplete-B7yzKPIp.mjs → BAutocomplete-DQjfkhoO.mjs} +115 -66
- package/dist/{BAutocomplete-B7yzKPIp.mjs.map → BAutocomplete-DQjfkhoO.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 +266 -6
- package/dist/components/BAutocomplete/BAutocomplete.vue.d.ts +266 -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 +5 -0
- package/dist/types/ComponentEmits.d.ts +5 -0
- 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
|
@@ -4,7 +4,7 @@ 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
6
|
const require_flattenFragments = require("./flattenFragments-C1WWqm25.js");
|
|
7
|
-
const require_BCollapse = require("./BCollapse-
|
|
7
|
+
const require_BCollapse = require("./BCollapse-CZlDVTpI.js");
|
|
8
8
|
const require_object = require("./object-BN7QwMcz.js");
|
|
9
9
|
let vue = require("vue");
|
|
10
10
|
//#region src/components/BAccordion/BAccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -357,4 +357,4 @@ Object.defineProperty(exports, "BAccordion_default", {
|
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
359
|
|
|
360
|
-
//# sourceMappingURL=BAccordion-
|
|
360
|
+
//# sourceMappingURL=BAccordion-DgXJMqdG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BAccordion-CJZMsvwP.js","names":[],"sources":["../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordion.vue","../src/components/BAccordion/BAccordion.vue"],"sourcesContent":["<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemProps} from '../../types/ComponentProps'\nimport type {BAccordionItemEmits} from '../../types/ComponentEmits'\nimport type {BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemProps} from '../../types/ComponentProps'\nimport type {BAccordionItemEmits} from '../../types/ComponentEmits'\nimport type {BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA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Q,SAAS,KAAK,OAAO,GAAE;;GAE9E,CAAA;;4DA3QO,OAAA;IAFA,KAAA,GAAA,IAAA,OAAI,WAAU;IAAE,QAAA,GAAA,IAAA,gBAAK,CAAC,aAAoB,gBAAA,MAAe,CAAA;2BACrD,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"BAccordion-DgXJMqdG.js","names":[],"sources":["../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordion.vue","../src/components/BAccordion/BAccordion.vue"],"sourcesContent":["<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemEmits, BAccordionItemProps, BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemEmits, BAccordionItemProps, BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,mBAAe,QAAQ,eAAe,MAAM,QAAQ,SAAS,KAAK,OAAO,GAAE;;GAE9E,CAAA;;4DA3QO,OAAA;IAFA,KAAA,GAAA,IAAA,OAAI,WAAU;IAAE,QAAA,GAAA,IAAA,gBAAK,CAAC,aAAoB,gBAAA,MAAe,CAAA;2BACrD,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
@@ -3,7 +3,7 @@ import { c as sortSlotElementsByPosition } from "./dom-AhkaSoh8.mjs";
|
|
|
3
3
|
import { t as useDefaults } from "./useDefaults-BKgBaqOV.mjs";
|
|
4
4
|
import { t as useId$1 } from "./useId-BKZFSYm8.mjs";
|
|
5
5
|
import { t as flattenFragments } from "./flattenFragments-ClbLQGqR.mjs";
|
|
6
|
-
import { t as BCollapse_default } from "./BCollapse-
|
|
6
|
+
import { t as BCollapse_default } from "./BCollapse-CTvK48kB.mjs";
|
|
7
7
|
import { r as isReadOnlyArray } from "./object-CHQkkner.mjs";
|
|
8
8
|
import { computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, onMounted, onUnmounted, openBlock, provide, readonly, ref, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, unref, useAttrs, useModel, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
9
9
|
//#region src/components/BAccordion/BAccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -345,4 +345,4 @@ var BAccordion_default = /* @__PURE__ */ defineComponent({
|
|
|
345
345
|
//#endregion
|
|
346
346
|
export { BAccordionItem_default as n, BAccordion_default as t };
|
|
347
347
|
|
|
348
|
-
//# sourceMappingURL=BAccordion-
|
|
348
|
+
//# sourceMappingURL=BAccordion-Gz2SpRmq.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BAccordion-CNzV6f8e.mjs","names":[],"sources":["../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordion.vue","../src/components/BAccordion/BAccordion.vue"],"sourcesContent":["<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemProps} from '../../types/ComponentProps'\nimport type {BAccordionItemEmits} from '../../types/ComponentEmits'\nimport type {BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemProps} from '../../types/ComponentProps'\nimport type {BAccordionItemEmits} from '../../types/ComponentEmits'\nimport type {BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsGA,MAAM,QAAQ,YApBC,SAoBmB,iBAAgB;EAClD,MAAM,OAAO;EAEb,MAAM,QAAQ,UAAS;EAEvB,MAAM,iBAAiB,eAAe;GACpC,MAAM,EAAC,OAAO,cAAc,GAAG,kBAAiB;AAChD,UAAO;IAAC;IAAc;IAAa;I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,OAAO,GAAE;;GAE9E,CAAA;;uBA7QC,mBAEM,OAAA;IAFA,IAAI,MAAA,WAAU;IAAE,OAAK,eAAA,CAAC,aAAoB,gBAAA,MAAe,CAAA;OAC7D,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
1
|
+
{"version":3,"file":"BAccordion-Gz2SpRmq.mjs","names":[],"sources":["../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordionItem.vue","../src/components/BAccordion/BAccordion.vue","../src/components/BAccordion/BAccordion.vue"],"sourcesContent":["<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemEmits, BAccordionItemProps, BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div\n ref=\"_el\"\n class=\"accordion-item\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"processedAttrs.wrapperClass\"\n >\n <BCollapse\n :id=\"computedId\"\n v-model=\"modelValue\"\n class=\"accordion-collapse\"\n :class=\"props.collapseClass\"\n :aria-labelledby=\"`${computedId}-heading`\"\n v-bind=\"processedAttrs.collapseAttrs\"\n :tag=\"props.tag\"\n :show=\"props.show\"\n :horizontal=\"props.horizontal\"\n :visible=\"props.visible\"\n :is-nav=\"props.isNav\"\n :lazy=\"props.lazy || parentData?.lazy.value\"\n :unmount-lazy=\"props.unmountLazy || parentData?.unmountLazy.value\"\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n >\n <template #header=\"{visible: toggleVisible, toggle: slotToggle}\">\n <component\n :is=\"props.headerTag\"\n :id=\"`${computedId}-heading`\"\n class=\"accordion-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <button\n class=\"accordion-button\"\n v-bind=\"props.buttonAttrs\"\n :class=\"[{collapsed: !toggleVisible}, props.buttonClass]\"\n type=\"button\"\n :aria-expanded=\"toggleVisible ? 'true' : 'false'\"\n :aria-controls=\"computedId\"\n @click=\"slotToggle\"\n >\n <slot name=\"title\"> {{ props.title }} </slot>\n </button>\n </component>\n </template>\n <div class=\"accordion-body\" v-bind=\"props.bodyAttrs\" :class=\"props.bodyClass\">\n <slot />\n </div>\n </BCollapse>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n inject,\n nextTick,\n onMounted,\n onUnmounted,\n useAttrs,\n useTemplateRef,\n watch,\n} from 'vue'\nimport BCollapse from '../BCollapse/BCollapse.vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BAccordionItemEmits, BAccordionItemProps, BAccordionItemSlots} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BAccordionItemProps, 'modelValue'>>(), {\n bodyAttrs: undefined,\n bodyClass: undefined,\n buttonAttrs: undefined,\n buttonClass: undefined,\n collapseClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerTag: 'h2',\n horizontal: undefined,\n id: undefined,\n isNav: undefined,\n lazy: false,\n unmountLazy: false,\n tag: undefined,\n title: undefined,\n show: undefined,\n visible: false,\n wrapperAttrs: undefined,\n})\nconst props = useDefaults(_props, 'BAccordionItem')\nconst emit = defineEmits<BAccordionItemEmits>()\ndefineSlots<BAccordionItemSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...collapseAttrs} = attrs\n return {wrapperClass, collapseAttrs}\n})\n\nconst parentData = inject(accordionInjectionKey, null)\n\nconst computedId = useId(() => props.id, 'accordion_item')\n\nconst modelValue = defineModel<Exclude<BAccordionItemProps['modelValue'], undefined>>({\n default: false,\n})\n\nif (modelValue.value) {\n parentData?.setOpenItem(computedId.value)\n} else {\n modelValue.value =\n (isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value) && !parentData?.initialAnimation.value\n}\n\nconst el = useTemplateRef('_el')\nparentData?.registerAccordionItem(computedId.value, el)\n\nonUnmounted(() => {\n parentData?.unregisterAccordionItem(computedId.value)\n})\n\nonMounted(() => {\n if (!modelValue.value && parentData?.openItem.value === computedId.value) {\n nextTick(() => {\n modelValue.value = true\n })\n }\n})\n\nconst openInParent = computed(() =>\n isReadOnlyArray(parentData?.openItem.value)\n ? parentData?.openItem.value.includes(computedId.value)\n : parentData?.openItem.value === computedId.value\n)\n\nwatch(\n () => parentData?.openItem.value,\n () => (modelValue.value = openInParent.value)\n)\nwatch(modelValue, () => {\n if (modelValue.value && !openInParent.value) {\n parentData?.setOpenItem(computedId.value)\n } else if (!modelValue.value && openInParent.value) {\n parentData?.setCloseItem(computedId.value)\n }\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"accordion\" :class=\"computedClasses\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n provide,\n readonly,\n ref,\n type ShallowRef,\n shallowRef,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {accordionInjectionKey} from '../../utils/keys'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BAccordionItem from './BAccordionItem.vue'\nimport {sortSlotElementsByPosition} from '../../utils/dom'\nimport type {BAccordionSlots, BAccordionProps} from '../../types'\nimport {isReadOnlyArray} from '../../utils/object'\n\nconst _props = withDefaults(defineProps<Omit<BAccordionProps, 'modelValue' | 'index'>>(), {\n flush: false,\n free: false,\n initialAnimation: false,\n id: undefined,\n lazy: false,\n unmountLazy: false,\n})\nconst props = useDefaults(_props, 'BAccordion')\nconst slots = defineSlots<BAccordionSlots>()\n\nconst modelValue = defineModel<BAccordionProps['modelValue']>({\n default: undefined,\n})\n\nconst index = defineModel<BAccordionProps['index']>('index', {\n default: undefined,\n})\n\nconst itemElementsArray = ref<VNode[]>([])\n\nconst updateItemElementsArray = () => {\n const itemElements = flattenFragments(slots.default?.({}) ?? [])\n itemElementsArray.value = (Array.isArray(itemElements) ? itemElements : [itemElements]).filter(\n (item) => item.type === BAccordionItem\n )\n}\nupdateItemElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateItemElementsArray()\n nextTick(() => {\n sortAccordionItems()\n })\n }\n)\n\ninterface AccordionItem {\n id: string\n el: Readonly<ShallowRef<HTMLElement | null>>\n}\n\nconst accordionItems = shallowRef<AccordionItem[]>([])\n\nconst sortAccordionItems = () => {\n accordionItems.value = [...accordionItems.value].sort((a, b) =>\n sortSlotElementsByPosition(unref(a.el), unref(b.el))\n )\n if (modelValue.value) {\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value\n .map((id) => accordionItems.value.findIndex((item) => item.id === id))\n .filter((i) => i !== -1)\n\n if (next.length !== modelValue.value.length) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('[BAccordion] Unknown item id in v-model:', modelValue.value)\n }\n }\n index.value = next\n } else {\n const idx = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (idx !== -1) index.value = idx\n }\n } else if (index.value !== undefined) {\n modelValue.value = isReadOnlyArray(index.value)\n ? index.value.map((idx) => accordionItems.value[idx]?.id).filter((el) => el !== undefined)\n : accordionItems.value[index.value]?.id\n }\n}\n\nconst computedId = useId(() => props.id, 'accordion')\n\nconst computedClasses = computed(() => ({\n 'accordion-flush': props.flush,\n}))\n\nconst areEqual = (a: unknown, b: unknown) => {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => item === b[index])\n }\n return a === b\n}\n\nwatch(index, (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (index.value === undefined) {\n modelValue.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = !isReadOnlyArray(index.value) ? index.value : index.value?.[0]\n if (idx !== undefined && accordionItems.value[idx]?.id) {\n if (modelValue.value !== accordionItems.value[idx]?.id) {\n modelValue.value = accordionItems.value[idx]?.id\n }\n } else {\n nextTick(() => {\n index.value = undefined\n })\n }\n } else {\n // free mode\n if (isReadOnlyArray(index.value)) {\n const newValue = index.value\n .map((item) => accordionItems.value[item]?.id)\n .filter((el) => el !== undefined)\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n } else {\n const newValue = accordionItems.value[index.value]?.id\n if (newValue === undefined) {\n nextTick(() => {\n index.value = undefined\n })\n return\n }\n if (!areEqual(newValue, modelValue.value)) {\n modelValue.value = newValue\n }\n }\n }\n})\n\nwatch(\n modelValue,\n (newValue, oldValue) => {\n if (areEqual(newValue, oldValue)) return\n if (modelValue.value === undefined) {\n index.value = undefined\n return\n }\n\n if (!props.free) {\n const idx = accordionItems.value.findIndex(\n (item) =>\n item.id ===\n (!isReadOnlyArray(modelValue.value) ? modelValue.value : modelValue.value?.[0])\n )\n\n if (idx !== -1) {\n if (index.value !== idx) {\n index.value = idx\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else if (props.free) {\n if (isReadOnlyArray(modelValue.value)) {\n const idxes = modelValue.value\n .map((value) => accordionItems.value.findIndex((item) => item.id === value))\n .filter((index) => index !== -1)\n if (idxes.length > 0) {\n if (!areEqual(idxes, index.value)) {\n index.value = idxes\n }\n } else {\n nextTick(() => {\n modelValue.value = undefined\n })\n }\n } else {\n const newValue = accordionItems.value.findIndex((item) => item.id === modelValue.value)\n if (!areEqual(newValue, index.value)) {\n index.value = newValue\n }\n }\n }\n },\n {deep: true}\n)\n\nwatch(\n () => props.free,\n (free) => {\n if (modelValue.value) {\n if (!free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = modelValue.value[0]\n } else if (free && !isReadOnlyArray(modelValue.value)) {\n modelValue.value = [modelValue.value]\n }\n }\n }\n)\n\nprovide(accordionInjectionKey, {\n openItem: readonly(modelValue),\n free: toRef(() => props.free),\n initialAnimation: toRef(() => props.initialAnimation),\n lazy: toRef(() => props.lazy),\n unmountLazy: toRef(() => props.unmountLazy),\n setOpenItem: (id: string) => {\n if (props.free && !isReadOnlyArray(modelValue.value)) {\n if (modelValue.value !== undefined) {\n modelValue.value = [modelValue.value, id]\n } else {\n modelValue.value = [id]\n }\n return\n }\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = id\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n if (!modelValue.value.includes(id)) {\n modelValue.value = [...modelValue.value, id]\n }\n } else {\n modelValue.value = id\n }\n },\n setCloseItem: (id: string) => {\n if (!props.free && isReadOnlyArray(modelValue.value)) {\n modelValue.value = undefined\n return\n }\n if (isReadOnlyArray(modelValue.value)) {\n const next = modelValue.value.filter((item) => item !== id)\n modelValue.value = next.length ? next : undefined\n } else {\n if (modelValue.value === id) {\n modelValue.value = undefined\n }\n }\n },\n registerAccordionItem: (id: string, el: Readonly<ShallowRef<HTMLElement | null>>) => {\n accordionItems.value = [...accordionItems.value, {id, el}]\n if (accordionItems.value.length === itemElementsArray.value.length) {\n sortAccordionItems()\n }\n },\n unregisterAccordionItem: (id: string) => {\n accordionItems.value = accordionItems.value.filter((item) => item.id !== id)\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,mBAAe,QAAQ,CAAC,GAAG,eAAe,OAAO;KAAC;KAAI;KAAG,CAAA;AACzD,QAAI,eAAe,MAAM,WAAW,kBAAkB,MAAM,OAC1D,qBAAmB;;GAGvB,0BAA0B,OAAe;AACvC,mBAAe,QAAQ,eAAe,MAAM,QAAQ,SAAS,KAAK,OAAO,GAAE;;GAE9E,CAAA;;uBA7QC,mBAEM,OAAA;IAFA,IAAI,MAAA,WAAU;IAAE,OAAK,eAAA,CAAC,aAAoB,gBAAA,MAAe,CAAA;OAC7D,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
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 useShowHide } from "./useShowHide-
|
|
4
|
-
import { r as useBLinkHelper, t as BLink_default } from "./BLink-
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
3
|
+
import { t as useShowHide } from "./useShowHide-DKdljnpv.mjs";
|
|
4
|
+
import { r as useBLinkHelper, t as BLink_default } from "./BLink-CNFWSz0D.mjs";
|
|
5
|
+
import { t as BCloseButton_default } from "./BCloseButton-CCdRwLDo.mjs";
|
|
6
|
+
import { t as BProgress_default } from "./BProgress-I1ucNlpA.mjs";
|
|
7
|
+
import { n as useCountdown, t as useCountdownHover } from "./useCountdownHover-C3NXiAaF.mjs";
|
|
8
|
+
import { t as BButton_default } from "./BButton-D_sCrjpg.mjs";
|
|
9
9
|
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useModel, useSlots, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
10
10
|
//#region src/components/BAlert/BAlert.vue?vue&type=script&setup=true&lang.ts
|
|
11
11
|
var _hoisted_1 = [
|
|
@@ -211,7 +211,6 @@ var BAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
211
211
|
stop
|
|
212
212
|
});
|
|
213
213
|
return (_ctx, _cache) => {
|
|
214
|
-
const _component_BButton = BButton_default;
|
|
215
214
|
return unref(renderRef) || unref(contentShowing) ? (openBlock(), createBlock(Transition, mergeProps({ key: 0 }, unref(transitionProps), { appear: !!modelValue.value || unref(props).visible }), {
|
|
216
215
|
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
217
216
|
id: unref(props).id,
|
|
@@ -226,7 +225,7 @@ var BAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
226
225
|
key: 0,
|
|
227
226
|
class: normalizeClass(["alert-heading d-flex gap-2", unref(props).headerClass])
|
|
228
227
|
}, {
|
|
229
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps(sharedSlots.value)), () => [createElementVNode("span", null, toDisplayString(unref(props).title), 1)]), unref(props).dismissible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [slots.close || unref(props).closeContent ? (openBlock(), createBlock(
|
|
228
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps(sharedSlots.value)), () => [createElementVNode("span", null, toDisplayString(unref(props).title), 1)]), unref(props).dismissible ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [slots.close || unref(props).closeContent ? (openBlock(), createBlock(BButton_default, {
|
|
230
229
|
key: 0,
|
|
231
230
|
class: normalizeClass([[unref(props).closeClass], "ms-auto ps-1 btn-close-custom"]),
|
|
232
231
|
variant: unref(props).closeVariant,
|
|
@@ -245,7 +244,7 @@ var BAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
245
244
|
unref(contentShowing) && (slots.default || unref(props).body) ? (openBlock(), createElementBlock("div", _hoisted_2, [(openBlock(), createBlock(resolveDynamicComponent(computedTag.value), mergeProps({ class: ["alert-body", unref(props).bodyClass] }, unref(computedLinkProps), { onClick: _cache[2] || (_cache[2] = ($event) => unref(computedLink) && unref(props).dismissible ? unref(hide)() : () => {}) }), {
|
|
246
245
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(sharedSlots.value)), () => [createTextVNode(toDisplayString(unref(props).body), 1)])]),
|
|
247
246
|
_: 3
|
|
248
|
-
}, 16, ["class"])), unref(props).dismissible && !(slots.title || unref(props).title) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [slots.close || unref(props).closeContent ? (openBlock(), createBlock(
|
|
247
|
+
}, 16, ["class"])), unref(props).dismissible && !(slots.title || unref(props).title) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [slots.close || unref(props).closeContent ? (openBlock(), createBlock(BButton_default, {
|
|
249
248
|
key: 0,
|
|
250
249
|
class: normalizeClass([[unref(props).closeClass], "ms-auto btn-close-custom"]),
|
|
251
250
|
variant: unref(props).closeVariant,
|
|
@@ -289,4 +288,4 @@ var BAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
289
288
|
//#endregion
|
|
290
289
|
export { BAlert_default as t };
|
|
291
290
|
|
|
292
|
-
//# sourceMappingURL=BAlert-
|
|
291
|
+
//# sourceMappingURL=BAlert-BFPBalmr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BAlert-BFPBalmr.mjs","names":[],"sources":["../src/components/BAlert/BAlert.vue","../src/components/BAlert/BAlert.vue"],"sourcesContent":["<template>\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"!!modelValue || props.visible\"\n >\n <div\n v-show=\"isAlertVisible\"\n :id=\"props.id\"\n ref=\"_element\"\n class=\"alert\"\n :class=\"[props.alertClass, computedClasses]\"\n tabindex=\"0\"\n :role=\"!isAlertVisible ? undefined : props.isStatus ? 'status' : 'alert'\"\n :aria-live=\"!isAlertVisible ? undefined : props.isStatus ? 'polite' : 'assertive'\"\n :aria-atomic=\"!isAlertVisible ? undefined : true\"\n >\n <component\n :is=\"props.headerTag\"\n v-if=\"contentShowing && (slots.title || props.title)\"\n class=\"alert-heading d-flex gap-2\"\n :class=\"props.headerClass\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n <span>\n {{ props.title }}\n </span>\n </slot>\n <template v-if=\"props.dismissible\">\n <BButton\n v-if=\"slots.close || props.closeContent\"\n :class=\"[props.closeClass]\"\n class=\"ms-auto ps-1 btn-close-custom\"\n :variant=\"props.closeVariant\"\n @click.stop.prevent=\"hide('close')\"\n >\n <slot name=\"close\" v-bind=\"sharedSlots\">\n {{ props.closeContent }}\n </slot>\n </BButton>\n <BCloseButton\n v-else\n :aria-label=\"props.closeLabel\"\n :class=\"[props.closeClass]\"\n @click.stop.prevent=\"hide('close')\"\n />\n </template>\n </component>\n <template v-if=\"contentShowing && (slots.default || props.body)\">\n <div class=\"d-flex gap-2\">\n <component\n :is=\"computedTag\"\n class=\"alert-body\"\n :class=\"props.bodyClass\"\n v-bind=\"computedLinkProps\"\n @click=\"computedLink && props.dismissible ? hide() : () => {}\"\n >\n <slot v-bind=\"sharedSlots\">\n {{ props.body }}\n </slot>\n </component>\n\n <template v-if=\"props.dismissible && !(slots.title || props.title)\">\n <BButton\n v-if=\"slots.close || props.closeContent\"\n :class=\"[props.closeClass]\"\n class=\"ms-auto btn-close-custom\"\n :variant=\"props.closeVariant\"\n @click.stop.prevent=\"hide('close')\"\n >\n <slot name=\"close\" v-bind=\"sharedSlots\">\n {{ props.closeContent }}\n </slot>\n </BButton>\n <BCloseButton\n v-else\n :aria-label=\"props.closeLabel\"\n :class=\"[props.closeClass]\"\n @click.stop.prevent=\"hide('close')\"\n />\n </template>\n </div>\n </template>\n <BProgress\n v-if=\"typeof modelValue === 'number' && props.progressProps !== undefined\"\n :animated=\"props.progressProps.animated\"\n :precision=\"props.progressProps.precision\"\n :show-progress=\"props.progressProps.showProgress\"\n :show-value=\"props.progressProps.showValue\"\n :striped=\"props.progressProps.striped\"\n :variant=\"props.progressProps.variant\"\n :max=\"modelValue\"\n :value=\"remainingMs\"\n height=\"4px\"\n />\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type EmitFn, useTemplateRef, watch, watchEffect} from 'vue'\nimport {useBLinkHelper} from '../../composables/useBLinkHelper'\nimport type {BAlertEmits, BAlertProps, BAlertSlots, ShowHideSlotsData} from '../../types'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport BLink from '../BLink/BLink.vue'\nimport BProgress from '../BProgress/BProgress.vue'\nimport {useCountdown} from '../../composables/useCountdown'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useCountdownHover} from '../../composables/useCountdownHover'\nimport {useId} from '../../composables/useId'\nimport {useShowHide} from '../../composables/useShowHide'\nimport BButton from '../BButton/BButton.vue'\n\nconst _props = withDefaults(defineProps<Omit<BAlertProps, 'modelValue'>>(), {\n bgVariant: null,\n body: undefined,\n bodyClass: undefined,\n closeClass: undefined,\n closeContent: undefined,\n closeLabel: 'Close',\n closeVariant: 'secondary',\n dismissible: false,\n headerClass: undefined,\n headerTag: 'div',\n id: undefined,\n initialAnimation: false,\n interval: 'requestAnimationFrame',\n isStatus: false,\n lazy: false,\n noFade: false,\n noHoverPause: false,\n noResumeOnHoverLeave: false,\n progressProps: undefined,\n unmountLazy: false,\n showOnPause: true,\n show: false,\n solid: false,\n textVariant: null,\n title: undefined,\n alertClass: undefined,\n transProps: undefined,\n visible: false,\n // Link props\n // All others use defaults\n noRel: undefined,\n active: undefined,\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: undefined,\n href: undefined,\n icon: undefined,\n opacity: undefined,\n opacityHover: undefined,\n stretched: false,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n // End link props\n variant: 'info',\n})\nconst props = useDefaults(_props, 'BAlert')\nconst emit = defineEmits<BAlertEmits>()\nconst slots = defineSlots<BAlertSlots>()\n\nconst element = useTemplateRef('_element')\n\nconst modelValue = defineModel<Exclude<BAlertProps['modelValue'], undefined>>({default: false})\nconst {computedLink, computedLinkProps} = useBLinkHelper(props)\n\nconst computedId = useId(() => props.id, 'alert')\n\nconst {\n showRef,\n renderRef,\n hide,\n toggle,\n show,\n buildTriggerableEvent,\n computedNoAnimation,\n isVisible,\n transitionProps,\n contentShowing,\n} = useShowHide(modelValue, props, emit as EmitFn, element, computedId)\n\n// TODO solid is never used\nconst countdownLength = computed(() =>\n typeof modelValue.value === 'boolean' ? 0 : modelValue.value\n)\n\nconst {\n isActive,\n pause,\n restart,\n resume,\n stop,\n isPaused,\n value: remainingMs,\n} = useCountdown(countdownLength, props.interval, {\n immediate: typeof modelValue.value === 'number' && !!modelValue.value,\n})\nuseCountdownHover(\n element,\n {\n noHoverPause: () => props.noHoverPause || typeof modelValue.value !== 'number',\n noResumeOnHoverLeave: () => props.noResumeOnHoverLeave || typeof modelValue.value !== 'number',\n modelValueIgnoresHover: () => typeof modelValue.value === 'boolean',\n },\n {pause, resume}\n)\n\nwatchEffect(() => {\n emit('close-countdown', remainingMs.value)\n})\n\nconst computedTag = computed(() => (computedLink.value ? BLink : 'div'))\n\nconst isAlertVisible = computed(\n () => showRef.value || isActive.value || (props.showOnPause && isPaused.value)\n)\n\n// const colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n // colorClasses.value,\n {\n [`alert-${props.variant}`]: props.variant !== null,\n 'alert-dismissible': props.dismissible && !(slots.close || props.closeContent),\n 'show': isVisible.value,\n 'fade': !computedNoAnimation.value,\n },\n])\n\nwatch(modelValue, (newValue) => {\n if (typeof newValue === 'number') {\n const event = buildTriggerableEvent('show', {cancelable: true, trigger: 'model'})\n emit('show', event)\n if (event.defaultPrevented) {\n emit('show-prevented', buildTriggerableEvent('show-prevented'))\n } else {\n restart()\n }\n }\n})\n\n// isActive in the composable will cause the alert to hide when the countdown is done\nwatch(isActive, (newValue) => {\n if (newValue === false && isPaused.value === false) {\n hide()\n modelValue.value = 0\n stop()\n }\n})\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: showRef.value,\n active: isActive.value,\n}))\n\ndefineExpose({\n show,\n hide,\n toggle,\n pause,\n restart,\n resume,\n stop,\n})\n</script>\n","<template>\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"!!modelValue || props.visible\"\n >\n <div\n v-show=\"isAlertVisible\"\n :id=\"props.id\"\n ref=\"_element\"\n class=\"alert\"\n :class=\"[props.alertClass, computedClasses]\"\n tabindex=\"0\"\n :role=\"!isAlertVisible ? undefined : props.isStatus ? 'status' : 'alert'\"\n :aria-live=\"!isAlertVisible ? undefined : props.isStatus ? 'polite' : 'assertive'\"\n :aria-atomic=\"!isAlertVisible ? undefined : true\"\n >\n <component\n :is=\"props.headerTag\"\n v-if=\"contentShowing && (slots.title || props.title)\"\n class=\"alert-heading d-flex gap-2\"\n :class=\"props.headerClass\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n <span>\n {{ props.title }}\n </span>\n </slot>\n <template v-if=\"props.dismissible\">\n <BButton\n v-if=\"slots.close || props.closeContent\"\n :class=\"[props.closeClass]\"\n class=\"ms-auto ps-1 btn-close-custom\"\n :variant=\"props.closeVariant\"\n @click.stop.prevent=\"hide('close')\"\n >\n <slot name=\"close\" v-bind=\"sharedSlots\">\n {{ props.closeContent }}\n </slot>\n </BButton>\n <BCloseButton\n v-else\n :aria-label=\"props.closeLabel\"\n :class=\"[props.closeClass]\"\n @click.stop.prevent=\"hide('close')\"\n />\n </template>\n </component>\n <template v-if=\"contentShowing && (slots.default || props.body)\">\n <div class=\"d-flex gap-2\">\n <component\n :is=\"computedTag\"\n class=\"alert-body\"\n :class=\"props.bodyClass\"\n v-bind=\"computedLinkProps\"\n @click=\"computedLink && props.dismissible ? hide() : () => {}\"\n >\n <slot v-bind=\"sharedSlots\">\n {{ props.body }}\n </slot>\n </component>\n\n <template v-if=\"props.dismissible && !(slots.title || props.title)\">\n <BButton\n v-if=\"slots.close || props.closeContent\"\n :class=\"[props.closeClass]\"\n class=\"ms-auto btn-close-custom\"\n :variant=\"props.closeVariant\"\n @click.stop.prevent=\"hide('close')\"\n >\n <slot name=\"close\" v-bind=\"sharedSlots\">\n {{ props.closeContent }}\n </slot>\n </BButton>\n <BCloseButton\n v-else\n :aria-label=\"props.closeLabel\"\n :class=\"[props.closeClass]\"\n @click.stop.prevent=\"hide('close')\"\n />\n </template>\n </div>\n </template>\n <BProgress\n v-if=\"typeof modelValue === 'number' && props.progressProps !== undefined\"\n :animated=\"props.progressProps.animated\"\n :precision=\"props.progressProps.precision\"\n :show-progress=\"props.progressProps.showProgress\"\n :show-value=\"props.progressProps.showValue\"\n :striped=\"props.progressProps.striped\"\n :variant=\"props.progressProps.variant\"\n :max=\"modelValue\"\n :value=\"remainingMs\"\n height=\"4px\"\n />\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type EmitFn, useTemplateRef, watch, watchEffect} from 'vue'\nimport {useBLinkHelper} from '../../composables/useBLinkHelper'\nimport type {BAlertEmits, BAlertProps, BAlertSlots, ShowHideSlotsData} from '../../types'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport BLink from '../BLink/BLink.vue'\nimport BProgress from '../BProgress/BProgress.vue'\nimport {useCountdown} from '../../composables/useCountdown'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useCountdownHover} from '../../composables/useCountdownHover'\nimport {useId} from '../../composables/useId'\nimport {useShowHide} from '../../composables/useShowHide'\nimport BButton from '../BButton/BButton.vue'\n\nconst _props = withDefaults(defineProps<Omit<BAlertProps, 'modelValue'>>(), {\n bgVariant: null,\n body: undefined,\n bodyClass: undefined,\n closeClass: undefined,\n closeContent: undefined,\n closeLabel: 'Close',\n closeVariant: 'secondary',\n dismissible: false,\n headerClass: undefined,\n headerTag: 'div',\n id: undefined,\n initialAnimation: false,\n interval: 'requestAnimationFrame',\n isStatus: false,\n lazy: false,\n noFade: false,\n noHoverPause: false,\n noResumeOnHoverLeave: false,\n progressProps: undefined,\n unmountLazy: false,\n showOnPause: true,\n show: false,\n solid: false,\n textVariant: null,\n title: undefined,\n alertClass: undefined,\n transProps: undefined,\n visible: false,\n // Link props\n // All others use defaults\n noRel: undefined,\n active: undefined,\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: undefined,\n href: undefined,\n icon: undefined,\n opacity: undefined,\n opacityHover: undefined,\n stretched: false,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n // End link props\n variant: 'info',\n})\nconst props = useDefaults(_props, 'BAlert')\nconst emit = defineEmits<BAlertEmits>()\nconst slots = defineSlots<BAlertSlots>()\n\nconst element = useTemplateRef('_element')\n\nconst modelValue = defineModel<Exclude<BAlertProps['modelValue'], undefined>>({default: false})\nconst {computedLink, computedLinkProps} = useBLinkHelper(props)\n\nconst computedId = useId(() => props.id, 'alert')\n\nconst {\n showRef,\n renderRef,\n hide,\n toggle,\n show,\n buildTriggerableEvent,\n computedNoAnimation,\n isVisible,\n transitionProps,\n contentShowing,\n} = useShowHide(modelValue, props, emit as EmitFn, element, computedId)\n\n// TODO solid is never used\nconst countdownLength = computed(() =>\n typeof modelValue.value === 'boolean' ? 0 : modelValue.value\n)\n\nconst {\n isActive,\n pause,\n restart,\n resume,\n stop,\n isPaused,\n value: remainingMs,\n} = useCountdown(countdownLength, props.interval, {\n immediate: typeof modelValue.value === 'number' && !!modelValue.value,\n})\nuseCountdownHover(\n element,\n {\n noHoverPause: () => props.noHoverPause || typeof modelValue.value !== 'number',\n noResumeOnHoverLeave: () => props.noResumeOnHoverLeave || typeof modelValue.value !== 'number',\n modelValueIgnoresHover: () => typeof modelValue.value === 'boolean',\n },\n {pause, resume}\n)\n\nwatchEffect(() => {\n emit('close-countdown', remainingMs.value)\n})\n\nconst computedTag = computed(() => (computedLink.value ? BLink : 'div'))\n\nconst isAlertVisible = computed(\n () => showRef.value || isActive.value || (props.showOnPause && isPaused.value)\n)\n\n// const colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n // colorClasses.value,\n {\n [`alert-${props.variant}`]: props.variant !== null,\n 'alert-dismissible': props.dismissible && !(slots.close || props.closeContent),\n 'show': isVisible.value,\n 'fade': !computedNoAnimation.value,\n },\n])\n\nwatch(modelValue, (newValue) => {\n if (typeof newValue === 'number') {\n const event = buildTriggerableEvent('show', {cancelable: true, trigger: 'model'})\n emit('show', event)\n if (event.defaultPrevented) {\n emit('show-prevented', buildTriggerableEvent('show-prevented'))\n } else {\n restart()\n }\n }\n})\n\n// isActive in the composable will cause the alert to hide when the countdown is done\nwatch(isActive, (newValue) => {\n if (newValue === false && isPaused.value === false) {\n hide()\n modelValue.value = 0\n stop()\n }\n})\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: showRef.value,\n active: isActive.value,\n}))\n\ndefineExpose({\n show,\n hide,\n toggle,\n pause,\n restart,\n resume,\n stop,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuKA,MAAM,QAAQ,YAtDC,SAsDmB,SAAQ;EAC1C,MAAM,OAAO;EACb,MAAM,QAAQ,UAAA;EAEd,MAAM,UAAU,eAAe,WAAU;EAEzC,MAAM,aAAa,SAA0D,SAAA,aAAiB;EAC9F,MAAM,EAAC,cAAc,sBAAqB,eAAe,MAAK;EA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AM,SAAS,MAAA,MAAK,CAAC,gBAAA,WAAA,EAD7B,YAUU,iBAAA;;MARP,OAAK,eAAA,CAAA,CAAG,MAAA,MAAK,CAAC,WAAU,EACnB,2BAA0B,CAAA;MAC/B,SAAS,MAAA,MAAK,CAAC;MACf,SAAK,OAAA,OAAA,OAAA,KAAA,eAAA,WAAe,MAAA,KAAI,CAAA,QAAA,EAAA,CAAA,QAAA,UAAA,CAAA;;6BAIlB,CAFP,WAEO,KAAA,QAAA,SAAA,eAAA,mBAFoB,YAAA,MAAW,CAAA,QAE/B,CAAA,gBAAA,gBADF,MAAA,MAAK,CAAC,aAAY,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;kDAGzB,YAKE,sBAAA;;MAHC,cAAY,MAAA,MAAK,CAAC;MAClB,OAAK,eAAA,CAAG,MAAA,MAAK,CAAC,WAAU,CAAA;MACxB,SAAK,OAAA,OAAA,OAAA,KAAA,eAAA,WAAe,MAAA,KAAI,CAAA,QAAA,EAAA,CAAA,QAAA,UAAA,CAAA;;YAMlB,WAAA,UAAU,YAAiB,MAAA,MAAK,CAAC,kBAAkB,KAAA,KAAA,WAAA,EADlE,YAWE,mBAAA;;MATC,UAAU,MAAA,MAAK,CAAC,cAAc;MAC9B,WAAW,MAAA,MAAK,CAAC,cAAc;MAC/B,iBAAe,MAAA,MAAK,CAAC,cAAc;MACnC,cAAY,MAAA,MAAK,CAAC,cAAc;MAChC,SAAS,MAAA,MAAK,CAAC,cAAc;MAC7B,SAAS,MAAA,MAAK,CAAC,cAAc;MAC7B,KAAK,WAAA;MACL,OAAO,MAAA,YAAW;MACnB,QAAO;;;;;;;;;;;iCAtFD,eAAA,MAAc,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
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 require_useShowHide = require("./useShowHide-
|
|
5
|
-
const require_BLink = require("./BLink-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
4
|
+
const require_useShowHide = require("./useShowHide-BhdrR1wG.js");
|
|
5
|
+
const require_BLink = require("./BLink-uLjtY3bY.js");
|
|
6
|
+
const require_BCloseButton = require("./BCloseButton-fw5ONnhr.js");
|
|
7
|
+
const require_BProgress = require("./BProgress-ySlPjpRn.js");
|
|
8
|
+
const require_useCountdownHover = require("./useCountdownHover-DbVhE-N0.js");
|
|
9
|
+
const require_BButton = require("./BButton-Dr-RadYQ.js");
|
|
10
10
|
let vue = require("vue");
|
|
11
11
|
//#region src/components/BAlert/BAlert.vue?vue&type=script&setup=true&lang.ts
|
|
12
12
|
var _hoisted_1 = [
|
|
@@ -212,7 +212,6 @@ var BAlert_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
212
212
|
stop
|
|
213
213
|
});
|
|
214
214
|
return (_ctx, _cache) => {
|
|
215
|
-
const _component_BButton = require_BButton.BButton_default;
|
|
216
215
|
return (0, vue.unref)(renderRef) || (0, vue.unref)(contentShowing) ? ((0, vue.openBlock)(), (0, vue.createBlock)(vue.Transition, (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(transitionProps), { appear: !!modelValue.value || (0, vue.unref)(props).visible }), {
|
|
217
216
|
default: (0, vue.withCtx)(() => [(0, vue.withDirectives)((0, vue.createElementVNode)("div", {
|
|
218
217
|
id: (0, vue.unref)(props).id,
|
|
@@ -227,7 +226,7 @@ var BAlert_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
227
226
|
key: 0,
|
|
228
227
|
class: (0, vue.normalizeClass)(["alert-heading d-flex gap-2", (0, vue.unref)(props).headerClass])
|
|
229
228
|
}, {
|
|
230
|
-
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "title", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(sharedSlots.value)), () => [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(props).title), 1)]), (0, vue.unref)(props).dismissible ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [slots.close || (0, vue.unref)(props).closeContent ? ((0, vue.openBlock)(), (0, vue.createBlock)(
|
|
229
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "title", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(sharedSlots.value)), () => [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(props).title), 1)]), (0, vue.unref)(props).dismissible ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [slots.close || (0, vue.unref)(props).closeContent ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_BButton.BButton_default, {
|
|
231
230
|
key: 0,
|
|
232
231
|
class: (0, vue.normalizeClass)([[(0, vue.unref)(props).closeClass], "ms-auto ps-1 btn-close-custom"]),
|
|
233
232
|
variant: (0, vue.unref)(props).closeVariant,
|
|
@@ -246,7 +245,7 @@ var BAlert_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
246
245
|
(0, vue.unref)(contentShowing) && (slots.default || (0, vue.unref)(props).body) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2, [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(computedTag.value), (0, vue.mergeProps)({ class: ["alert-body", (0, vue.unref)(props).bodyClass] }, (0, vue.unref)(computedLinkProps), { onClick: _cache[2] || (_cache[2] = ($event) => (0, vue.unref)(computedLink) && (0, vue.unref)(props).dismissible ? (0, vue.unref)(hide)() : () => {}) }), {
|
|
247
246
|
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(sharedSlots.value)), () => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(props).body), 1)])]),
|
|
248
247
|
_: 3
|
|
249
|
-
}, 16, ["class"])), (0, vue.unref)(props).dismissible && !(slots.title || (0, vue.unref)(props).title) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [slots.close || (0, vue.unref)(props).closeContent ? ((0, vue.openBlock)(), (0, vue.createBlock)(
|
|
248
|
+
}, 16, ["class"])), (0, vue.unref)(props).dismissible && !(slots.title || (0, vue.unref)(props).title) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [slots.close || (0, vue.unref)(props).closeContent ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_BButton.BButton_default, {
|
|
250
249
|
key: 0,
|
|
251
250
|
class: (0, vue.normalizeClass)([[(0, vue.unref)(props).closeClass], "ms-auto btn-close-custom"]),
|
|
252
251
|
variant: (0, vue.unref)(props).closeVariant,
|
|
@@ -295,4 +294,4 @@ Object.defineProperty(exports, "BAlert_default", {
|
|
|
295
294
|
}
|
|
296
295
|
});
|
|
297
296
|
|
|
298
|
-
//# sourceMappingURL=BAlert-
|
|
297
|
+
//# sourceMappingURL=BAlert-Dk3rgEOI.js.map
|