ivt 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.mjs +15 -15
- package/dist/accordion-table/index.mjs +27 -27
- package/dist/alert/index.mjs +5 -44
- package/dist/alert/index.mjs.map +1 -1
- package/dist/alert-dialog/index.mjs +17 -17
- package/dist/aspect-ratio/index.mjs +1 -1
- package/dist/auto-complete-multi-select/index.mjs +33 -33
- package/dist/avatar/index.mjs +7 -7
- package/dist/badge/index.d.ts +1 -1
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +121 -2
- package/dist/base/index.mjs +240 -51
- package/dist/base/index.mjs.map +1 -1
- package/dist/breadcrumb/index.mjs +5 -5
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.mjs +3 -3
- package/dist/button-group/index.mjs +4 -4
- package/dist/calendar/index.mjs +9 -9
- package/dist/card/index.mjs +3 -3
- package/dist/carousel/index.mjs +4 -4
- package/dist/chart/index.mjs +4 -4
- package/dist/checkbox/index.mjs +14 -14
- package/dist/chunks/{CalendarRange-BA-db50F.mjs → CalendarRange-k63hDccF.mjs} +8 -8
- package/dist/chunks/{CalendarRange-BA-db50F.mjs.map → CalendarRange-k63hDccF.mjs.map} +1 -1
- package/dist/chunks/{ComboboxField-BtmBUUUa.mjs → ComboboxField-5Glf1Ozh.mjs} +9 -9
- package/dist/chunks/{ComboboxField-BtmBUUUa.mjs.map → ComboboxField-5Glf1Ozh.mjs.map} +1 -1
- package/dist/chunks/{Container-435PicTP.mjs → Container-Cv6NG9kb.mjs} +2 -2
- package/dist/chunks/{Container-435PicTP.mjs.map → Container-Cv6NG9kb.mjs.map} +1 -1
- package/dist/chunks/{DeleteConfirmationModal-B9Ahb3Mu.mjs → DeleteConfirmationModal-DRseBzq7.mjs} +4 -4
- package/dist/chunks/{DeleteConfirmationModal-B9Ahb3Mu.mjs.map → DeleteConfirmationModal-DRseBzq7.mjs.map} +1 -1
- package/dist/chunks/{ListItem-CwSloNFZ.mjs → ListItem-eGWDX0GP.mjs} +4 -4
- package/dist/chunks/{ListItem-CwSloNFZ.mjs.map → ListItem-eGWDX0GP.mjs.map} +1 -1
- package/dist/chunks/{TooltipIndicator-UUTwNh5Y.mjs → TooltipIndicator-BjtHYQzo.mjs} +5 -5
- package/dist/chunks/{TooltipIndicator-UUTwNh5Y.mjs.map → TooltipIndicator-BjtHYQzo.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-BMx1TIzK.mjs → _commonjsHelpers-D3vrMN3C.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-D3vrMN3C.mjs.map +1 -0
- package/dist/chunks/{accordion-s3aERwYW.mjs → accordion-BsbSmZP2.mjs} +11 -11
- package/dist/chunks/{accordion-s3aERwYW.mjs.map → accordion-BsbSmZP2.mjs.map} +1 -1
- package/dist/chunks/alert-Cw-E3eta.mjs +44 -0
- package/dist/chunks/alert-Cw-E3eta.mjs.map +1 -0
- package/dist/chunks/{badge-CSKBGHyC.mjs → badge-DTn1AQbT.mjs} +2 -2
- package/dist/chunks/{badge-CSKBGHyC.mjs.map → badge-DTn1AQbT.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-DsNiaMJS.mjs → bundle-mjs-Lvc-Dri9.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-DsNiaMJS.mjs.map → bundle-mjs-Lvc-Dri9.mjs.map} +1 -1
- package/dist/chunks/{button-DW1YQJSf.mjs → button-Cve1c7GQ.mjs} +2 -2
- package/dist/chunks/{button-DW1YQJSf.mjs.map → button-Cve1c7GQ.mjs.map} +1 -1
- package/dist/chunks/{calendar-DrMz_17c.mjs → calendar-BTfcQ69r.mjs} +7 -7
- package/dist/chunks/{calendar-DrMz_17c.mjs.map → calendar-BTfcQ69r.mjs.map} +1 -1
- package/dist/chunks/{calendar-days-kzxw9us-.mjs → calendar-days-D95Vh8Id.mjs} +2 -2
- package/dist/chunks/{calendar-days-kzxw9us-.mjs.map → calendar-days-D95Vh8Id.mjs.map} +1 -1
- package/dist/chunks/{card-B_pDGP_4.mjs → card-BCce9vjU.mjs} +2 -2
- package/dist/chunks/{card-B_pDGP_4.mjs.map → card-BCce9vjU.mjs.map} +1 -1
- package/dist/chunks/{check-Dc1DpMhB.mjs → check-F6R3Zyjv.mjs} +2 -2
- package/dist/chunks/{check-Dc1DpMhB.mjs.map → check-F6R3Zyjv.mjs.map} +1 -1
- package/dist/chunks/{checkbox-BaYmfSmN.mjs → checkbox-BONbXOR8.mjs} +11 -11
- package/dist/chunks/{checkbox-BaYmfSmN.mjs.map → checkbox-BONbXOR8.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-BfdFfN5b.mjs → chevron-down-CAAkkaxH.mjs} +2 -2
- package/dist/chunks/{chevron-down-BfdFfN5b.mjs.map → chevron-down-CAAkkaxH.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-BBpi9Tuc.mjs → chevron-left-D9H1SFsq.mjs} +2 -2
- package/dist/chunks/{chevron-left-BBpi9Tuc.mjs.map → chevron-left-D9H1SFsq.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-gwqv7hdT.mjs → chevron-right-BBzqWfgU.mjs} +2 -2
- package/dist/chunks/{chevron-right-gwqv7hdT.mjs.map → chevron-right-BBzqWfgU.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-Dg5q5QQ6.mjs → chevrons-up-down-qNyleCLF.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-Dg5q5QQ6.mjs.map → chevrons-up-down-qNyleCLF.mjs.map} +1 -1
- package/dist/chunks/{command-CyjrKgCk.mjs → command-IbA1nxIb.mjs} +8 -8
- package/dist/chunks/{command-CyjrKgCk.mjs.map → command-IbA1nxIb.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-DfHHy_fF.mjs → createLucideIcon-0uwxvfEG.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-DfHHy_fF.mjs.map → createLucideIcon-0uwxvfEG.mjs.map} +1 -1
- package/dist/chunks/{date-DBD540pc.mjs → date-BBTPAd8S.mjs} +2 -2
- package/dist/chunks/{date-DBD540pc.mjs.map → date-BBTPAd8S.mjs.map} +1 -1
- package/dist/chunks/{dialog-DdfabDy3.mjs → dialog-B2DUrpTa.mjs} +4 -4
- package/dist/chunks/{dialog-DdfabDy3.mjs.map → dialog-B2DUrpTa.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-Bc1Luije.mjs → ellipsis-DvX337aw.mjs} +2 -2
- package/dist/chunks/{ellipsis-Bc1Luije.mjs.map → ellipsis-DvX337aw.mjs.map} +1 -1
- package/dist/chunks/{form-DGcmwo-6.mjs → form-CChLO9RR.mjs} +3 -3
- package/dist/chunks/{form-DGcmwo-6.mjs.map → form-CChLO9RR.mjs.map} +1 -1
- package/dist/chunks/{format-DfGa0nsw.mjs → format-4Jz4C5tC.mjs} +1 -1
- package/dist/chunks/{format-DfGa0nsw.mjs.map → format-4Jz4C5tC.mjs.map} +1 -1
- package/dist/chunks/{format-numbers-Cdm34ghV.mjs → format-numbers-BhgU0ZHz.mjs} +1 -1
- package/dist/chunks/{format-numbers-Cdm34ghV.mjs.map → format-numbers-BhgU0ZHz.mjs.map} +1 -1
- package/dist/chunks/{hover-card-DA5OKIru.mjs → hover-card-DX4d068Z.mjs} +11 -11
- package/dist/chunks/{hover-card-DA5OKIru.mjs.map → hover-card-DX4d068Z.mjs.map} +1 -1
- package/dist/chunks/{index-0SCeyzsK.mjs → index-6TVIC1_R.mjs} +2 -2
- package/dist/chunks/{index-0SCeyzsK.mjs.map → index-6TVIC1_R.mjs.map} +1 -1
- package/dist/chunks/{index-CwcOLnJm.mjs → index-BSGOnYAL.mjs} +1 -1
- package/dist/chunks/{index-CwcOLnJm.mjs.map → index-BSGOnYAL.mjs.map} +1 -1
- package/dist/chunks/{index-DhxU0LEQ.mjs → index-BeWMIyGj.mjs} +1 -1
- package/dist/chunks/{index-DhxU0LEQ.mjs.map → index-BeWMIyGj.mjs.map} +1 -1
- package/dist/chunks/{index-B50gul4j.mjs → index-Bewwph0a.mjs} +1 -1
- package/dist/chunks/{index-B50gul4j.mjs.map → index-Bewwph0a.mjs.map} +1 -1
- package/dist/chunks/{index-BnADUzzc.mjs → index-BrfogwJw.mjs} +1 -1
- package/dist/chunks/{index-BnADUzzc.mjs.map → index-BrfogwJw.mjs.map} +1 -1
- package/dist/chunks/{index-DsZMIujt.mjs → index-Bx0xXTid.mjs} +11 -11
- package/dist/chunks/{index-DsZMIujt.mjs.map → index-Bx0xXTid.mjs.map} +1 -1
- package/dist/chunks/{index-D43aEpzt.mjs → index-CO3WOWY2.mjs} +9 -9
- package/dist/chunks/{index-D43aEpzt.mjs.map → index-CO3WOWY2.mjs.map} +1 -1
- package/dist/chunks/{index-mk_bVkL9.mjs → index-CWI00LgK.mjs} +2 -2
- package/dist/chunks/{index-mk_bVkL9.mjs.map → index-CWI00LgK.mjs.map} +1 -1
- package/dist/chunks/{index-D7dCxTP2.mjs → index-CYpZ8qGv.mjs} +5 -5
- package/dist/chunks/{index-D7dCxTP2.mjs.map → index-CYpZ8qGv.mjs.map} +1 -1
- package/dist/chunks/{index-BZhmkMVZ.mjs → index-Ch8cepWA.mjs} +3 -3
- package/dist/chunks/{index-BZhmkMVZ.mjs.map → index-Ch8cepWA.mjs.map} +1 -1
- package/dist/chunks/{index-CPtkkz-Y.mjs → index-CkRZ2gKz.mjs} +1 -1
- package/dist/chunks/{index-CPtkkz-Y.mjs.map → index-CkRZ2gKz.mjs.map} +1 -1
- package/dist/chunks/{index-DKrv9iMY.mjs → index-CrXpydfv.mjs} +1 -1
- package/dist/chunks/{index-DKrv9iMY.mjs.map → index-CrXpydfv.mjs.map} +1 -1
- package/dist/chunks/{index-CllA0jgd.mjs → index-D2G_PixC.mjs} +1 -1
- package/dist/chunks/{index-CllA0jgd.mjs.map → index-D2G_PixC.mjs.map} +1 -1
- package/dist/chunks/{index-CbAYX6tE.mjs → index-D5BJ_0bf.mjs} +1 -1
- package/dist/chunks/{index-CbAYX6tE.mjs.map → index-D5BJ_0bf.mjs.map} +1 -1
- package/dist/chunks/{index-CtGzvqE-.mjs → index-DCv7HM9c.mjs} +9 -9
- package/dist/chunks/{index-CtGzvqE-.mjs.map → index-DCv7HM9c.mjs.map} +1 -1
- package/dist/chunks/{index-X3UvAhoa.mjs → index-DR3ok_zE.mjs} +7 -7
- package/dist/chunks/{index-X3UvAhoa.mjs.map → index-DR3ok_zE.mjs.map} +1 -1
- package/dist/chunks/{index-aPZimpBX.mjs → index-DpW61g8q.mjs} +1 -1
- package/dist/chunks/{index-aPZimpBX.mjs.map → index-DpW61g8q.mjs.map} +1 -1
- package/dist/chunks/{index-BOVs_g4Q.mjs → index-Dw0VFoXM.mjs} +5 -5
- package/dist/chunks/{index-BOVs_g4Q.mjs.map → index-Dw0VFoXM.mjs.map} +1 -1
- package/dist/chunks/{index-QBr28_3u.mjs → index-F1Vay3hL.mjs} +2 -2
- package/dist/chunks/{index-QBr28_3u.mjs.map → index-F1Vay3hL.mjs.map} +1 -1
- package/dist/chunks/{index-DDclWz5f.mjs → index-YaCKvBnb.mjs} +1 -1
- package/dist/chunks/{index-DDclWz5f.mjs.map → index-YaCKvBnb.mjs.map} +1 -1
- package/dist/chunks/{index-So-nn3e7.mjs → index-cxmuS08t.mjs} +3 -3
- package/dist/chunks/{index-So-nn3e7.mjs.map → index-cxmuS08t.mjs.map} +1 -1
- package/dist/chunks/{index-DQBXf0Nn.mjs → index-na6H-GCB.mjs} +15 -15
- package/dist/chunks/{index-DQBXf0Nn.mjs.map → index-na6H-GCB.mjs.map} +1 -1
- package/dist/chunks/{index-6uBK1TEk.mjs → index-utzX5BKz.mjs} +2 -2
- package/dist/chunks/{index-6uBK1TEk.mjs.map → index-utzX5BKz.mjs.map} +1 -1
- package/dist/chunks/{index.module-B3k6LHMC.mjs → index.module-DOV7zOvH.mjs} +1 -1
- package/dist/chunks/{index.module-B3k6LHMC.mjs.map → index.module-DOV7zOvH.mjs.map} +1 -1
- package/dist/chunks/{input-DyG0N-65.mjs → input-DA9gkhwB.mjs} +2 -2
- package/dist/chunks/{input-DyG0N-65.mjs.map → input-DA9gkhwB.mjs.map} +1 -1
- package/dist/chunks/{label-C5b7EsNj.mjs → label-BgC413_9.mjs} +3 -3
- package/dist/chunks/{label-C5b7EsNj.mjs.map → label-BgC413_9.mjs.map} +1 -1
- package/dist/chunks/{loader-circle-BrgkMgEj.mjs → loader-circle-CmQoMw39.mjs} +2 -2
- package/dist/chunks/{loader-circle-BrgkMgEj.mjs.map → loader-circle-CmQoMw39.mjs.map} +1 -1
- package/dist/chunks/{menubar-DiHLFmad.mjs → menubar-DU7jMSAY.mjs} +13 -13
- package/dist/chunks/{menubar-DiHLFmad.mjs.map → menubar-DU7jMSAY.mjs.map} +1 -1
- package/dist/chunks/{multi-select-CfMr2pov.mjs → multi-select-QKfLMC0m.mjs} +13 -13
- package/dist/chunks/{multi-select-CfMr2pov.mjs.map → multi-select-QKfLMC0m.mjs.map} +1 -1
- package/dist/chunks/{pagination-Cu57jNb0.mjs → pagination-zyJ5vFmL.mjs} +6 -6
- package/dist/chunks/{pagination-Cu57jNb0.mjs.map → pagination-zyJ5vFmL.mjs.map} +1 -1
- package/dist/chunks/{popover-CpjZYtpI.mjs → popover-RcJ808cy.mjs} +13 -13
- package/dist/chunks/{popover-CpjZYtpI.mjs.map → popover-RcJ808cy.mjs.map} +1 -1
- package/dist/chunks/{progress-Dgf1ABrX.mjs → progress-BcHalZVV.mjs} +4 -4
- package/dist/chunks/{progress-Dgf1ABrX.mjs.map → progress-BcHalZVV.mjs.map} +1 -1
- package/dist/chunks/{react-number-format.es-pRV7N_mS.mjs → react-number-format.es-CyaQTuwn.mjs} +1 -1
- package/dist/chunks/{react-number-format.es-pRV7N_mS.mjs.map → react-number-format.es-CyaQTuwn.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-spod4_Wh.mjs → scroll-area-DUSbQJic.mjs} +11 -11
- package/dist/chunks/{scroll-area-spod4_Wh.mjs.map → scroll-area-DUSbQJic.mjs.map} +1 -1
- package/dist/chunks/{select-CBh20D2n.mjs → select-DqpIJliN.mjs} +5 -5
- package/dist/chunks/{select-CBh20D2n.mjs.map → select-DqpIJliN.mjs.map} +1 -1
- package/dist/chunks/{separator-B1xNjDsr.mjs → separator-h4204yqZ.mjs} +3 -3
- package/dist/chunks/{separator-B1xNjDsr.mjs.map → separator-h4204yqZ.mjs.map} +1 -1
- package/dist/chunks/{sheet-RT3yw-5P.mjs → sheet-ChrvUpAV.mjs} +4 -4
- package/dist/chunks/{sheet-RT3yw-5P.mjs.map → sheet-ChrvUpAV.mjs.map} +1 -1
- package/dist/chunks/{skeleton-gQmBTQmq.mjs → skeleton-DYRcDQga.mjs} +2 -2
- package/dist/chunks/{skeleton-gQmBTQmq.mjs.map → skeleton-DYRcDQga.mjs.map} +1 -1
- package/dist/chunks/{sortable-DHhSfpHS.mjs → sortable-B9EKkKQQ.mjs} +3 -3
- package/dist/chunks/{sortable-DHhSfpHS.mjs.map → sortable-B9EKkKQQ.mjs.map} +1 -1
- package/dist/chunks/{table-DnJSdOoO.mjs → table-Bf_4RiC6.mjs} +2 -2
- package/dist/chunks/{table-DnJSdOoO.mjs.map → table-Bf_4RiC6.mjs.map} +1 -1
- package/dist/chunks/tabs-BH56W9Uk.mjs +187 -0
- package/dist/chunks/tabs-BH56W9Uk.mjs.map +1 -0
- package/dist/chunks/{textarea-BODhTsCw.mjs → textarea-D1VTvn_8.mjs} +2 -2
- package/dist/chunks/{textarea-BODhTsCw.mjs.map → textarea-D1VTvn_8.mjs.map} +1 -1
- package/dist/chunks/{toggle-DwAXXdM8.mjs → toggle-DPn3fWo1.mjs} +5 -5
- package/dist/chunks/{toggle-DwAXXdM8.mjs.map → toggle-DPn3fWo1.mjs.map} +1 -1
- package/dist/chunks/{tooltip-C8PymYjC.mjs → tooltip-DL6xVJHi.mjs} +13 -13
- package/dist/chunks/{tooltip-C8PymYjC.mjs.map → tooltip-DL6xVJHi.mjs.map} +1 -1
- package/dist/chunks/{trash-2-DHnJ2JOw.mjs → trash-2-B6-kuqxf.mjs} +2 -2
- package/dist/chunks/{trash-2-DHnJ2JOw.mjs.map → trash-2-B6-kuqxf.mjs.map} +1 -1
- package/dist/chunks/{triangle-alert-K46ws0FW.mjs → triangle-alert-Gr8soT6b.mjs} +2 -2
- package/dist/chunks/{triangle-alert-K46ws0FW.mjs.map → triangle-alert-Gr8soT6b.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-CjQCvxqN.mjs → tslib.es6-Bf7t9JE-.mjs} +1 -1
- package/dist/chunks/{tslib.es6-CjQCvxqN.mjs.map → tslib.es6-Bf7t9JE-.mjs.map} +1 -1
- package/dist/chunks/{utils-CZzyeare.mjs → utils-BOlqGJrg.mjs} +2 -2
- package/dist/chunks/{utils-CZzyeare.mjs.map → utils-BOlqGJrg.mjs.map} +1 -1
- package/dist/chunks/{wand-sparkles-BJ4B_5uo.mjs → wand-sparkles-BOLdCXYe.mjs} +2 -2
- package/dist/chunks/{wand-sparkles-BJ4B_5uo.mjs.map → wand-sparkles-BOLdCXYe.mjs.map} +1 -1
- package/dist/chunks/{x-4VGfZ2jd.mjs → x-DWHixXf6.mjs} +2 -2
- package/dist/chunks/{x-4VGfZ2jd.mjs.map → x-DWHixXf6.mjs.map} +1 -1
- package/dist/collapsible/index.mjs +9 -9
- package/dist/combobox/index.d.ts +5 -1
- package/dist/combobox/index.mjs +29 -27
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.mjs +20 -20
- package/dist/context-menu/index.mjs +23 -23
- package/dist/dash/index.mjs +25 -25
- package/dist/data-table/index.mjs +35 -35
- package/dist/date-picker/index.mjs +27 -27
- package/dist/dialog/index.mjs +19 -19
- package/dist/drawer/index.mjs +16 -16
- package/dist/dropdown-menu/index.mjs +23 -23
- package/dist/dropzone/index.mjs +19 -19
- package/dist/editable-table/index.mjs +20 -20
- package/dist/empty/index.mjs +2 -2
- package/dist/field/index.mjs +5 -5
- package/dist/form/index.mjs +5 -5
- package/dist/form-fields/index.mjs +28 -28
- package/dist/hover-card/index.mjs +15 -15
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/input-group/index.mjs +5 -5
- package/dist/input-otp/index.mjs +3 -3
- package/dist/item/index.mjs +4 -4
- package/dist/ivt.css +1 -1
- package/dist/kbd/index.mjs +2 -2
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.mjs +23 -23
- package/dist/menubar/index.mjs +24 -24
- package/dist/multi-input-list/index.d.ts +8 -0
- package/dist/multi-input-list/index.mjs +185 -75
- package/dist/multi-input-list/index.mjs.map +1 -1
- package/dist/multi-select/index.mjs +33 -33
- package/dist/navigation-menu/index.mjs +17 -17
- package/dist/pagination/index.mjs +8 -8
- package/dist/popover/index.mjs +18 -18
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +17 -17
- package/dist/resizable/index.mjs +3 -3
- package/dist/scroll-area/index.mjs +12 -12
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +4 -4
- package/dist/shared/index.mjs +5 -5
- package/dist/sheet/index.mjs +19 -19
- package/dist/sidebar/index.mjs +27 -27
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/slider/index.mjs +12 -12
- package/dist/sortable/index.mjs +4 -4
- package/dist/spinner/index.mjs +4 -4
- package/dist/switch/index.mjs +10 -10
- package/dist/table/index.mjs +3 -3
- package/dist/table-filter/index.mjs +53 -53
- package/dist/tabs/index.mjs +16 -190
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.mjs +3 -3
- package/dist/toast/index.mjs +15 -15
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +13 -13
- package/dist/tooltip/index.mjs +17 -17
- package/package.json +470 -470
- package/dist/chunks/_commonjsHelpers-BMx1TIzK.mjs.map +0 -1
package/dist/kbd/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { c as cn } from '../chunks/utils-
|
|
3
|
-
import '../chunks/bundle-mjs-
|
|
2
|
+
import { c as cn } from '../chunks/utils-BOlqGJrg.mjs';
|
|
3
|
+
import '../chunks/bundle-mjs-Lvc-Dri9.mjs';
|
|
4
4
|
|
|
5
5
|
function Kbd({ className, ...props }) {
|
|
6
6
|
return /*#__PURE__*/ React__default.createElement("kbd", {
|
package/dist/label/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { L as Label } from '../chunks/label-
|
|
1
|
+
export { L as Label } from '../chunks/label-BgC413_9.mjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '../chunks/index-
|
|
3
|
+
import '../chunks/index-CrXpydfv.mjs';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
import '@radix-ui/react-slot';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../chunks/utils-
|
|
8
|
-
import '../chunks/bundle-mjs-
|
|
7
|
+
import '../chunks/utils-BOlqGJrg.mjs';
|
|
8
|
+
import '../chunks/bundle-mjs-Lvc-Dri9.mjs';
|
|
9
9
|
//# sourceMappingURL=index.mjs.map
|
package/dist/layout/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { C as Container, a as ChildContainer } from '../chunks/Container-
|
|
2
|
-
export { L as ListItem } from '../chunks/ListItem-
|
|
1
|
+
import { C as Container, a as ChildContainer } from '../chunks/Container-Cv6NG9kb.mjs';
|
|
2
|
+
export { L as ListItem } from '../chunks/ListItem-eGWDX0GP.mjs';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { c as cn } from '../chunks/utils-
|
|
5
|
-
import { T as TriangleAlert } from '../chunks/triangle-alert-
|
|
6
|
-
import '../chunks/TooltipIndicator-
|
|
7
|
-
import '../chunks/createLucideIcon-
|
|
8
|
-
import '../chunks/tooltip-
|
|
9
|
-
import '../chunks/index-
|
|
10
|
-
import '../chunks/index-
|
|
11
|
-
import '../chunks/index-
|
|
4
|
+
import { c as cn } from '../chunks/utils-BOlqGJrg.mjs';
|
|
5
|
+
import { T as TriangleAlert } from '../chunks/triangle-alert-Gr8soT6b.mjs';
|
|
6
|
+
import '../chunks/TooltipIndicator-BjtHYQzo.mjs';
|
|
7
|
+
import '../chunks/createLucideIcon-0uwxvfEG.mjs';
|
|
8
|
+
import '../chunks/tooltip-DL6xVJHi.mjs';
|
|
9
|
+
import '../chunks/index-BeWMIyGj.mjs';
|
|
10
|
+
import '../chunks/index-D5BJ_0bf.mjs';
|
|
11
|
+
import '../chunks/index-YaCKvBnb.mjs';
|
|
12
12
|
import 'react/jsx-runtime';
|
|
13
|
-
import '../chunks/index-
|
|
14
|
-
import '../chunks/index-
|
|
13
|
+
import '../chunks/index-CYpZ8qGv.mjs';
|
|
14
|
+
import '../chunks/index-CrXpydfv.mjs';
|
|
15
15
|
import 'react-dom';
|
|
16
16
|
import '@radix-ui/react-slot';
|
|
17
|
-
import '../chunks/index-
|
|
18
|
-
import '../chunks/index-
|
|
19
|
-
import '../chunks/index-
|
|
20
|
-
import '../chunks/index-
|
|
21
|
-
import '../chunks/index-
|
|
22
|
-
import '../chunks/index-
|
|
23
|
-
import '../chunks/index-
|
|
24
|
-
import '../chunks/index-
|
|
25
|
-
import '../chunks/index-
|
|
26
|
-
import '../chunks/badge-
|
|
17
|
+
import '../chunks/index-BSGOnYAL.mjs';
|
|
18
|
+
import '../chunks/index-utzX5BKz.mjs';
|
|
19
|
+
import '../chunks/index-BrfogwJw.mjs';
|
|
20
|
+
import '../chunks/index-DR3ok_zE.mjs';
|
|
21
|
+
import '../chunks/index-F1Vay3hL.mjs';
|
|
22
|
+
import '../chunks/index-cxmuS08t.mjs';
|
|
23
|
+
import '../chunks/index-Ch8cepWA.mjs';
|
|
24
|
+
import '../chunks/index-CWI00LgK.mjs';
|
|
25
|
+
import '../chunks/index-6TVIC1_R.mjs';
|
|
26
|
+
import '../chunks/badge-DTn1AQbT.mjs';
|
|
27
27
|
import 'class-variance-authority';
|
|
28
|
-
import '../chunks/bundle-mjs-
|
|
28
|
+
import '../chunks/bundle-mjs-Lvc-Dri9.mjs';
|
|
29
29
|
|
|
30
30
|
const SectionInfo = ({ title = "Informações Básicas", description = "Veja informações sobre o Administrador de Fundo", className, extraDescription })=>{
|
|
31
31
|
return /*#__PURE__*/ React__default.createElement("section", {
|
package/dist/menubar/index.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export { M as Menubar, j as MenubarCheckboxItem, d as MenubarContent, e as MenubarGroup, h as MenubarItem, g as MenubarLabel, b as MenubarMenu, a as MenubarPortal, k as MenubarRadioGroup, l as MenubarRadioItem, f as MenubarSeparator, i as MenubarShortcut, m as MenubarSub, o as MenubarSubContent, n as MenubarSubTrigger, c as MenubarTrigger } from '../chunks/menubar-
|
|
1
|
+
export { M as Menubar, j as MenubarCheckboxItem, d as MenubarContent, e as MenubarGroup, h as MenubarItem, g as MenubarLabel, b as MenubarMenu, a as MenubarPortal, k as MenubarRadioGroup, l as MenubarRadioItem, f as MenubarSeparator, i as MenubarShortcut, m as MenubarSub, o as MenubarSubContent, n as MenubarSubTrigger, c as MenubarTrigger } from '../chunks/menubar-DU7jMSAY.mjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@radix-ui/react-collection';
|
|
4
|
-
import '../chunks/index-
|
|
4
|
+
import '../chunks/index-CkRZ2gKz.mjs';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
|
-
import '../chunks/index-
|
|
7
|
-
import '../chunks/index-
|
|
8
|
-
import '../chunks/index-
|
|
9
|
-
import '../chunks/index-
|
|
10
|
-
import '../chunks/index-
|
|
11
|
-
import '../chunks/index-
|
|
12
|
-
import '../chunks/createLucideIcon-
|
|
13
|
-
import '../chunks/index-
|
|
14
|
-
import '../chunks/index-
|
|
6
|
+
import '../chunks/index-BeWMIyGj.mjs';
|
|
7
|
+
import '../chunks/index-D5BJ_0bf.mjs';
|
|
8
|
+
import '../chunks/index-YaCKvBnb.mjs';
|
|
9
|
+
import '../chunks/index-utzX5BKz.mjs';
|
|
10
|
+
import '../chunks/index-BrfogwJw.mjs';
|
|
11
|
+
import '../chunks/index-na6H-GCB.mjs';
|
|
12
|
+
import '../chunks/createLucideIcon-0uwxvfEG.mjs';
|
|
13
|
+
import '../chunks/index-CYpZ8qGv.mjs';
|
|
14
|
+
import '../chunks/index-CrXpydfv.mjs';
|
|
15
15
|
import 'react-dom';
|
|
16
16
|
import '@radix-ui/react-slot';
|
|
17
|
-
import '../chunks/index-
|
|
18
|
-
import '../chunks/index-
|
|
19
|
-
import '../chunks/tslib.es6-
|
|
20
|
-
import '../chunks/index-
|
|
21
|
-
import '../chunks/index-
|
|
22
|
-
import '../chunks/index-
|
|
23
|
-
import '../chunks/index-
|
|
24
|
-
import '../chunks/index-
|
|
25
|
-
import '../chunks/index-
|
|
26
|
-
import '../chunks/utils-
|
|
27
|
-
import '../chunks/bundle-mjs-
|
|
28
|
-
import '../chunks/check-
|
|
29
|
-
import '../chunks/chevron-right-
|
|
17
|
+
import '../chunks/index-BSGOnYAL.mjs';
|
|
18
|
+
import '../chunks/index-Dw0VFoXM.mjs';
|
|
19
|
+
import '../chunks/tslib.es6-Bf7t9JE-.mjs';
|
|
20
|
+
import '../chunks/index-DR3ok_zE.mjs';
|
|
21
|
+
import '../chunks/index-F1Vay3hL.mjs';
|
|
22
|
+
import '../chunks/index-cxmuS08t.mjs';
|
|
23
|
+
import '../chunks/index-Ch8cepWA.mjs';
|
|
24
|
+
import '../chunks/index-CO3WOWY2.mjs';
|
|
25
|
+
import '../chunks/index-CWI00LgK.mjs';
|
|
26
|
+
import '../chunks/utils-BOlqGJrg.mjs';
|
|
27
|
+
import '../chunks/bundle-mjs-Lvc-Dri9.mjs';
|
|
28
|
+
import '../chunks/check-F6R3Zyjv.mjs';
|
|
29
|
+
import '../chunks/chevron-right-BBzqWfgU.mjs';
|
|
30
30
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -9,6 +9,7 @@ interface MultiInputListProps {
|
|
|
9
9
|
defaultValue?: string[];
|
|
10
10
|
onValueChange: (value: string[]) => void;
|
|
11
11
|
placeholder?: string;
|
|
12
|
+
searchPlaceholder?: string;
|
|
12
13
|
label?: string | React__default.ReactNode;
|
|
13
14
|
description?: string;
|
|
14
15
|
listTitle?: string;
|
|
@@ -21,6 +22,13 @@ interface MultiInputListProps {
|
|
|
21
22
|
id?: string;
|
|
22
23
|
showAddButton?: boolean;
|
|
23
24
|
addButtonLabel?: string;
|
|
25
|
+
fetchOptions?: (term: string) => Promise<{
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
maxHeight?: string | number;
|
|
30
|
+
fetchDependencies?: unknown[];
|
|
31
|
+
triggerFetchOnFocus?: boolean;
|
|
24
32
|
}
|
|
25
33
|
declare const MultiInputList: React__default.ForwardRefExoticComponent<MultiInputListProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
26
34
|
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { c
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import '../chunks/
|
|
12
|
-
import '../chunks/
|
|
13
|
-
import '../chunks/
|
|
2
|
+
import { c } from '../chunks/index.module-DOV7zOvH.mjs';
|
|
3
|
+
import { c as cn } from '../chunks/utils-BOlqGJrg.mjs';
|
|
4
|
+
import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-qNyleCLF.mjs';
|
|
5
|
+
import { C as Check } from '../chunks/check-F6R3Zyjv.mjs';
|
|
6
|
+
import { T as Trash2 } from '../chunks/trash-2-B6-kuqxf.mjs';
|
|
7
|
+
import { L as Label } from '../chunks/label-BgC413_9.mjs';
|
|
8
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-RcJ808cy.mjs';
|
|
9
|
+
import { I as Input } from '../chunks/input-DA9gkhwB.mjs';
|
|
10
|
+
import { C as Command, b as CommandInput, c as CommandList, f as CommandItem, d as CommandEmpty, e as CommandGroup } from '../chunks/command-IbA1nxIb.mjs';
|
|
11
|
+
import { B as Button } from '../chunks/button-Cve1c7GQ.mjs';
|
|
12
|
+
import '../chunks/bundle-mjs-Lvc-Dri9.mjs';
|
|
13
|
+
import '../chunks/createLucideIcon-0uwxvfEG.mjs';
|
|
14
|
+
import '../chunks/index-CrXpydfv.mjs';
|
|
14
15
|
import 'react-dom';
|
|
15
16
|
import '@radix-ui/react-slot';
|
|
16
17
|
import 'react/jsx-runtime';
|
|
17
|
-
import '../chunks/index-
|
|
18
|
-
import '../chunks/index-
|
|
19
|
-
import '../chunks/index-
|
|
20
|
-
import '../chunks/index-
|
|
21
|
-
import '../chunks/index-
|
|
22
|
-
import '../chunks/index-
|
|
23
|
-
import '../chunks/tslib.es6-
|
|
24
|
-
import '../chunks/index-
|
|
25
|
-
import '../chunks/index-
|
|
26
|
-
import '../chunks/index-
|
|
27
|
-
import '../chunks/index-
|
|
28
|
-
import '../chunks/index-
|
|
29
|
-
import '../chunks/index-
|
|
30
|
-
import '../chunks/index-
|
|
31
|
-
import '../chunks/index-
|
|
32
|
-
import '../chunks/dialog-
|
|
33
|
-
import '../chunks/x-
|
|
18
|
+
import '../chunks/index-BeWMIyGj.mjs';
|
|
19
|
+
import '../chunks/index-D5BJ_0bf.mjs';
|
|
20
|
+
import '../chunks/index-YaCKvBnb.mjs';
|
|
21
|
+
import '../chunks/index-CYpZ8qGv.mjs';
|
|
22
|
+
import '../chunks/index-BSGOnYAL.mjs';
|
|
23
|
+
import '../chunks/index-Dw0VFoXM.mjs';
|
|
24
|
+
import '../chunks/tslib.es6-Bf7t9JE-.mjs';
|
|
25
|
+
import '../chunks/index-utzX5BKz.mjs';
|
|
26
|
+
import '../chunks/index-BrfogwJw.mjs';
|
|
27
|
+
import '../chunks/index-DR3ok_zE.mjs';
|
|
28
|
+
import '../chunks/index-F1Vay3hL.mjs';
|
|
29
|
+
import '../chunks/index-cxmuS08t.mjs';
|
|
30
|
+
import '../chunks/index-Ch8cepWA.mjs';
|
|
31
|
+
import '../chunks/index-CWI00LgK.mjs';
|
|
32
|
+
import '../chunks/index-Bx0xXTid.mjs';
|
|
33
|
+
import '../chunks/dialog-B2DUrpTa.mjs';
|
|
34
|
+
import '../chunks/x-DWHixXf6.mjs';
|
|
34
35
|
import 'class-variance-authority';
|
|
35
36
|
|
|
36
|
-
const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value: controlledValue, defaultValue = [], onValueChange, placeholder = "Digite...", label, description, listTitle = "Itens adicionados", listUnit = "itens", className, disabled, selectAllLabel = "(Selecionar todos)", validationRegex, onInvalidInput, id, showAddButton, addButtonLabel = "Adicionar", ...props }, ref)=>{
|
|
37
|
+
const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options: initialOptions, value: controlledValue, defaultValue = [], onValueChange, placeholder = "Digite...", searchPlaceholder = "Buscar...", label, description, listTitle = "Itens adicionados", listUnit = "itens", className, disabled, selectAllLabel = "(Selecionar todos)", validationRegex, onInvalidInput, id, showAddButton, addButtonLabel = "Adicionar", fetchOptions, maxHeight = "200px", fetchDependencies = [], triggerFetchOnFocus = true, ...props }, ref)=>{
|
|
37
38
|
const generatedId = React__default.useId();
|
|
38
39
|
const inputId = id || generatedId;
|
|
39
40
|
const [selectedValues, setSelectedValues] = React__default.useState(controlledValue || defaultValue);
|
|
@@ -41,6 +42,9 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
41
42
|
const [searchTerm, setSearchTerm] = React__default.useState("");
|
|
42
43
|
const [isPopoverOpen, setIsPopoverOpen] = React__default.useState(false);
|
|
43
44
|
const [isShiftOn, setIsShiftOn] = React__default.useState(false);
|
|
45
|
+
const [knownOptions, setKnownOptions] = React__default.useState(initialOptions);
|
|
46
|
+
const [fetchedOptions, setFetchedOptions] = React__default.useState([]);
|
|
47
|
+
const [loading, setLoading] = React__default.useState(false);
|
|
44
48
|
React__default.useEffect(()=>{
|
|
45
49
|
if (controlledValue) {
|
|
46
50
|
setSelectedValues(controlledValue);
|
|
@@ -48,7 +52,68 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
48
52
|
}, [
|
|
49
53
|
controlledValue
|
|
50
54
|
]);
|
|
51
|
-
|
|
55
|
+
React__default.useEffect(()=>{
|
|
56
|
+
if (initialOptions.length > 0) {
|
|
57
|
+
setKnownOptions((prev)=>{
|
|
58
|
+
const prevMap = new Map(prev.map((o)=>[
|
|
59
|
+
o.value,
|
|
60
|
+
o
|
|
61
|
+
]));
|
|
62
|
+
initialOptions.forEach((o)=>{
|
|
63
|
+
prevMap.set(o.value, o);
|
|
64
|
+
});
|
|
65
|
+
return Array.from(prevMap.values());
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}, [
|
|
69
|
+
initialOptions
|
|
70
|
+
]);
|
|
71
|
+
const displayOptions = React__default.useMemo(()=>{
|
|
72
|
+
if (fetchOptions) {
|
|
73
|
+
return fetchedOptions;
|
|
74
|
+
}
|
|
75
|
+
if (!searchTerm) return initialOptions;
|
|
76
|
+
return initialOptions.filter((opt)=>opt.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
77
|
+
}, [
|
|
78
|
+
fetchOptions,
|
|
79
|
+
fetchedOptions,
|
|
80
|
+
initialOptions,
|
|
81
|
+
searchTerm
|
|
82
|
+
]);
|
|
83
|
+
const debouncedFetch = c(async (term)=>{
|
|
84
|
+
if (!fetchOptions) return;
|
|
85
|
+
try {
|
|
86
|
+
const result = await fetchOptions(term);
|
|
87
|
+
setFetchedOptions(result);
|
|
88
|
+
setKnownOptions((prev)=>{
|
|
89
|
+
const prevMap = new Map(prev.map((o)=>[
|
|
90
|
+
o.value,
|
|
91
|
+
o
|
|
92
|
+
]));
|
|
93
|
+
result.forEach((o)=>{
|
|
94
|
+
prevMap.set(o.value, o);
|
|
95
|
+
});
|
|
96
|
+
return Array.from(prevMap.values());
|
|
97
|
+
});
|
|
98
|
+
} catch (err) {
|
|
99
|
+
console.error("Erro ao buscar opções:", err);
|
|
100
|
+
setFetchedOptions([]);
|
|
101
|
+
} finally{
|
|
102
|
+
setLoading(false);
|
|
103
|
+
}
|
|
104
|
+
}, 500);
|
|
105
|
+
const dependenciesSerialized = React__default.useMemo(()=>JSON.stringify(fetchDependencies), [
|
|
106
|
+
fetchDependencies
|
|
107
|
+
]);
|
|
108
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: <useEffect>
|
|
109
|
+
React__default.useEffect(()=>{
|
|
110
|
+
if (fetchOptions && (searchTerm || inputValue)) {
|
|
111
|
+
setLoading(true);
|
|
112
|
+
debouncedFetch(searchTerm || inputValue);
|
|
113
|
+
}
|
|
114
|
+
}, [
|
|
115
|
+
dependenciesSerialized
|
|
116
|
+
]);
|
|
52
117
|
const addFromInput = (text)=>{
|
|
53
118
|
if (!text) return;
|
|
54
119
|
const parts = text.split(",").map((p)=>p.trim()).filter((p)=>p.length > 0);
|
|
@@ -57,7 +122,6 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
57
122
|
const invalidParts = validationRegex ? parts.filter((p)=>!validationRegex.test(p)) : [];
|
|
58
123
|
if (invalidParts.length > 0) {
|
|
59
124
|
if (onInvalidInput) onInvalidInput(invalidParts);
|
|
60
|
-
// Keep invalid parts in the input
|
|
61
125
|
setInputValue(invalidParts.join(", "));
|
|
62
126
|
} else {
|
|
63
127
|
setInputValue("");
|
|
@@ -66,6 +130,16 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
66
130
|
const newSet = new Set(selectedValues);
|
|
67
131
|
validParts.forEach((part)=>{
|
|
68
132
|
newSet.add(part);
|
|
133
|
+
setKnownOptions((prev)=>{
|
|
134
|
+
if (prev.some((o)=>o.value === part)) return prev;
|
|
135
|
+
return [
|
|
136
|
+
...prev,
|
|
137
|
+
{
|
|
138
|
+
label: part,
|
|
139
|
+
value: part
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
});
|
|
69
143
|
});
|
|
70
144
|
const newValues = Array.from(newSet);
|
|
71
145
|
setSelectedValues(newValues);
|
|
@@ -73,16 +147,24 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
73
147
|
}
|
|
74
148
|
};
|
|
75
149
|
const handleKeyDown = (e)=>{
|
|
76
|
-
if (e.key === "
|
|
150
|
+
if (e.key === "ArrowDown") {
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
if (!isPopoverOpen) {
|
|
153
|
+
setIsPopoverOpen(true);
|
|
154
|
+
}
|
|
155
|
+
requestAnimationFrame(()=>{
|
|
156
|
+
const firstItem = document.querySelector('[role="option"]');
|
|
157
|
+
firstItem?.focus();
|
|
158
|
+
});
|
|
159
|
+
} else if (e.key === "Enter") {
|
|
77
160
|
e.preventDefault();
|
|
78
161
|
addFromInput(inputValue);
|
|
79
|
-
setIsPopoverOpen(false);
|
|
162
|
+
setIsPopoverOpen(false);
|
|
80
163
|
} else if (e.key === ",") {
|
|
81
164
|
e.preventDefault();
|
|
82
|
-
addFromInput(inputValue);
|
|
165
|
+
addFromInput(inputValue);
|
|
83
166
|
} else if (e.key === "Tab") {
|
|
84
167
|
if (inputValue) {
|
|
85
|
-
// If tabbing out, add what's there
|
|
86
168
|
addFromInput(inputValue);
|
|
87
169
|
}
|
|
88
170
|
}
|
|
@@ -98,10 +180,13 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
98
180
|
};
|
|
99
181
|
const toggleInterval = (index)=>{
|
|
100
182
|
if (selectedValues.length < 1) return;
|
|
101
|
-
const
|
|
183
|
+
const currentOptions = displayOptions;
|
|
184
|
+
const lastValue = selectedValues.at(-1);
|
|
185
|
+
const lastIndex = currentOptions.findIndex((o)=>o.value === lastValue);
|
|
186
|
+
if (lastIndex === -1) return;
|
|
102
187
|
const start = Math.min(lastIndex, index);
|
|
103
188
|
const end = Math.max(lastIndex, index) + 1;
|
|
104
|
-
const rangeValues =
|
|
189
|
+
const rangeValues = currentOptions.slice(start, end).map((o)=>o.value);
|
|
105
190
|
const areAllSelected = rangeValues.every((v)=>selectedValues.includes(v));
|
|
106
191
|
const newSelectedValues = areAllSelected ? selectedValues.filter((v)=>!rangeValues.includes(v)) : [
|
|
107
192
|
...new Set([
|
|
@@ -117,20 +202,16 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
117
202
|
setSelectedValues(newValues);
|
|
118
203
|
onValueChange(newValues);
|
|
119
204
|
};
|
|
120
|
-
// Filter options based on search term (inside popover)
|
|
121
|
-
const filteredOptions = options.filter((opt)=>opt.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
122
|
-
const hasSuggestions = options.length > 0; // Always show popover if options exist, filtering happens inside
|
|
123
205
|
const handleSelectAll = ()=>{
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const newValues = selectedValues.filter((val)=>!
|
|
206
|
+
const optionsToSelect = displayOptions;
|
|
207
|
+
const allSelected = optionsToSelect.every((o)=>selectedValues.includes(o.value));
|
|
208
|
+
if (allSelected) {
|
|
209
|
+
const newValues = selectedValues.filter((val)=>!optionsToSelect.some((opt)=>opt.value === val));
|
|
128
210
|
setSelectedValues(newValues);
|
|
129
211
|
onValueChange(newValues);
|
|
130
212
|
} else {
|
|
131
|
-
// Select all filtered options
|
|
132
213
|
const newSet = new Set(selectedValues);
|
|
133
|
-
|
|
214
|
+
optionsToSelect.forEach((opt)=>{
|
|
134
215
|
newSet.add(opt.value);
|
|
135
216
|
});
|
|
136
217
|
const newValues = Array.from(newSet);
|
|
@@ -138,21 +219,21 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
138
219
|
onValueChange(newValues);
|
|
139
220
|
}
|
|
140
221
|
};
|
|
141
|
-
const isAllFilteredSelected =
|
|
222
|
+
const isAllFilteredSelected = displayOptions.length > 0 && displayOptions.every((opt)=>selectedValues.includes(opt.value));
|
|
142
223
|
return /*#__PURE__*/ React__default.createElement("div", {
|
|
143
224
|
className: cn("space-y-2", className)
|
|
144
225
|
}, label && /*#__PURE__*/ React__default.createElement(Label, {
|
|
145
226
|
htmlFor: inputId,
|
|
146
|
-
className: "text-foreground text-sm font-medium
|
|
227
|
+
className: "text-foreground gap-0 text-sm font-medium"
|
|
147
228
|
}, label), /*#__PURE__*/ React__default.createElement("div", {
|
|
148
229
|
className: "flex w-full items-center gap-2"
|
|
149
230
|
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
150
231
|
className: "relative flex-1"
|
|
151
232
|
}, /*#__PURE__*/ React__default.createElement(Popover, {
|
|
152
|
-
open: isPopoverOpen &&
|
|
233
|
+
open: isPopoverOpen && (displayOptions.length > 0 || loading || !!fetchOptions),
|
|
153
234
|
onOpenChange: (open)=>{
|
|
154
235
|
setIsPopoverOpen(open);
|
|
155
|
-
if (!open) setSearchTerm("");
|
|
236
|
+
if (!open) setSearchTerm("");
|
|
156
237
|
}
|
|
157
238
|
}, /*#__PURE__*/ React__default.createElement(PopoverTrigger, {
|
|
158
239
|
asChild: true
|
|
@@ -168,21 +249,33 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
168
249
|
setIsPopoverOpen(true);
|
|
169
250
|
},
|
|
170
251
|
onChange: (e)=>{
|
|
171
|
-
|
|
252
|
+
const val = e.target.value;
|
|
253
|
+
setInputValue(val);
|
|
254
|
+
if (fetchOptions) {
|
|
255
|
+
setSearchTerm(val);
|
|
256
|
+
setLoading(true);
|
|
257
|
+
debouncedFetch(val);
|
|
258
|
+
}
|
|
172
259
|
if (!isPopoverOpen) setIsPopoverOpen(true);
|
|
173
260
|
},
|
|
174
261
|
onKeyDown: handleKeyDown,
|
|
175
|
-
onFocus: ()=>
|
|
262
|
+
onFocus: ()=>{
|
|
263
|
+
setIsPopoverOpen(true);
|
|
264
|
+
if (triggerFetchOnFocus && fetchOptions) {
|
|
265
|
+
setLoading(true);
|
|
266
|
+
debouncedFetch(inputValue || "");
|
|
267
|
+
}
|
|
268
|
+
},
|
|
176
269
|
disabled: disabled,
|
|
177
270
|
className: "w-full pr-8",
|
|
178
271
|
autoComplete: "off",
|
|
179
272
|
...props
|
|
180
|
-
}),
|
|
181
|
-
className: "absolute
|
|
273
|
+
}), (initialOptions.length > 0 || fetchOptions) && /*#__PURE__*/ React__default.createElement("div", {
|
|
274
|
+
className: "pointer-events-none absolute top-2.5 right-4 opacity-50"
|
|
182
275
|
}, /*#__PURE__*/ React__default.createElement(ChevronsUpDown, {
|
|
183
276
|
className: "size-4"
|
|
184
277
|
})))), /*#__PURE__*/ React__default.createElement(PopoverContent, {
|
|
185
|
-
className: "
|
|
278
|
+
className: "w-[--radix-popover-trigger-width] p-0",
|
|
186
279
|
align: "start",
|
|
187
280
|
onOpenAutoFocus: (e)=>e.preventDefault(),
|
|
188
281
|
onKeyDown: (event)=>{
|
|
@@ -192,30 +285,41 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
192
285
|
event.key === "Shift" ? setIsShiftOn(false) : null;
|
|
193
286
|
}
|
|
194
287
|
}, /*#__PURE__*/ React__default.createElement(Command, {
|
|
195
|
-
shouldFilter: false
|
|
196
|
-
|
|
197
|
-
|
|
288
|
+
shouldFilter: false,
|
|
289
|
+
className: ""
|
|
290
|
+
}, !fetchOptions && /*#__PURE__*/ React__default.createElement(CommandInput, {
|
|
291
|
+
placeholder: searchPlaceholder,
|
|
198
292
|
value: searchTerm,
|
|
199
|
-
onValueChange:
|
|
200
|
-
|
|
293
|
+
onValueChange: (val)=>{
|
|
294
|
+
setSearchTerm(val);
|
|
295
|
+
if (fetchOptions) {
|
|
296
|
+
setLoading(true);
|
|
297
|
+
debouncedFetch(val);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}), /*#__PURE__*/ React__default.createElement(CommandList, null, displayOptions.length > 0 && !fetchOptions && /*#__PURE__*/ React__default.createElement(CommandItem, {
|
|
201
301
|
onSelect: handleSelectAll,
|
|
202
|
-
className: "flex
|
|
302
|
+
className: "mx-1 flex cursor-pointer items-center justify-between"
|
|
203
303
|
}, /*#__PURE__*/ React__default.createElement("span", null, selectAllLabel), isAllFilteredSelected && /*#__PURE__*/ React__default.createElement(Check, {
|
|
204
304
|
className: "h-4 w-4"
|
|
205
|
-
})),
|
|
305
|
+
})), loading && /*#__PURE__*/ React__default.createElement("div", {
|
|
306
|
+
className: cn("text-muted-foreground py-6 text-center text-sm", fetchOptions && "p-6")
|
|
307
|
+
}, "Carregando..."), !loading && displayOptions.length === 0 && /*#__PURE__*/ React__default.createElement(CommandEmpty, {
|
|
308
|
+
className: cn("text-sm", fetchOptions && "p-6")
|
|
309
|
+
}, "Nenhuma sugestão."), !loading && displayOptions.length > 0 && /*#__PURE__*/ React__default.createElement(CommandGroup, null, displayOptions.map((option)=>{
|
|
206
310
|
const isSelected = selectedValues.includes(option.value);
|
|
207
311
|
return /*#__PURE__*/ React__default.createElement(CommandItem, {
|
|
208
312
|
key: option.value,
|
|
313
|
+
value: option.label,
|
|
209
314
|
onSelect: ()=>{
|
|
210
315
|
if (isShiftOn) {
|
|
211
|
-
const originalIndex =
|
|
316
|
+
const originalIndex = displayOptions.findIndex((o)=>o.value === option.value);
|
|
212
317
|
toggleInterval(originalIndex);
|
|
213
318
|
} else {
|
|
214
319
|
toggleOption(option.value);
|
|
215
320
|
}
|
|
216
|
-
// Keep open for multiple selection
|
|
217
321
|
},
|
|
218
|
-
className: "flex justify-between
|
|
322
|
+
className: "flex cursor-pointer justify-between"
|
|
219
323
|
}, /*#__PURE__*/ React__default.createElement("span", null, option.label), isSelected && /*#__PURE__*/ React__default.createElement(Check, {
|
|
220
324
|
className: "h-4 w-4"
|
|
221
325
|
}));
|
|
@@ -229,33 +333,39 @@ const MultiInputList = /*#__PURE__*/ React__default.forwardRef(({ options, value
|
|
|
229
333
|
}, description), selectedValues.length > 0 && /*#__PURE__*/ React__default.createElement("div", {
|
|
230
334
|
className: "mt-4 pt-4"
|
|
231
335
|
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
232
|
-
className: "flex items-center justify-between
|
|
336
|
+
className: "mb-2 flex items-center justify-between"
|
|
233
337
|
}, /*#__PURE__*/ React__default.createElement("h4", {
|
|
234
|
-
className: "text-
|
|
338
|
+
className: "text-muted-foreground px-1 text-sm font-medium"
|
|
235
339
|
}, listTitle)), /*#__PURE__*/ React__default.createElement("div", {
|
|
236
|
-
className: "
|
|
340
|
+
className: "rounded-md rounded-b-none border-b"
|
|
341
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
342
|
+
style: {
|
|
343
|
+
maxHeight
|
|
344
|
+
},
|
|
345
|
+
className: "w-full overflow-y-auto rounded-md"
|
|
346
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
347
|
+
className: "divide-y"
|
|
237
348
|
}, selectedValues.map((val)=>{
|
|
238
|
-
|
|
239
|
-
const option = options.find((o)=>o.value === val);
|
|
349
|
+
const option = knownOptions.find((o)=>o.value === val);
|
|
240
350
|
const displayLabel = option ? option.label : val;
|
|
241
351
|
return /*#__PURE__*/ React__default.createElement("div", {
|
|
242
352
|
key: val,
|
|
243
|
-
className: "flex items-center justify-between py-2
|
|
353
|
+
className: "bg-background hover:bg-muted/50 flex items-center justify-between px-1 py-2 text-sm transition-colors"
|
|
244
354
|
}, /*#__PURE__*/ React__default.createElement("span", {
|
|
245
355
|
className: "truncate"
|
|
246
356
|
}, displayLabel), /*#__PURE__*/ React__default.createElement(Button, {
|
|
247
357
|
variant: "ghost",
|
|
248
358
|
size: "icon",
|
|
249
359
|
onClick: ()=>removeItem(val),
|
|
250
|
-
className: "
|
|
360
|
+
className: "text-destructive hover:text-destructive hover:bg-destructive/10 h-8 w-8",
|
|
251
361
|
type: "button"
|
|
252
362
|
}, /*#__PURE__*/ React__default.createElement(Trash2, {
|
|
253
363
|
className: "h-4 w-4"
|
|
254
364
|
}), /*#__PURE__*/ React__default.createElement("span", {
|
|
255
365
|
className: "sr-only"
|
|
256
366
|
}, "Remover ", displayLabel)));
|
|
257
|
-
})), /*#__PURE__*/ React__default.createElement("div", {
|
|
258
|
-
className: "
|
|
367
|
+
})))), /*#__PURE__*/ React__default.createElement("div", {
|
|
368
|
+
className: "text-muted-foreground bg-muted relative -mt-px flex items-center justify-between border-t px-1 py-2 text-sm"
|
|
259
369
|
}, /*#__PURE__*/ React__default.createElement("span", null, "Total"), /*#__PURE__*/ React__default.createElement("span", null, selectedValues.length, " ", listUnit))));
|
|
260
370
|
});
|
|
261
371
|
MultiInputList.displayName = "MultiInputList";
|