ivt 0.7.6 → 0.7.7
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 +13 -13
- package/dist/accordion-table/index.mjs +25 -25
- package/dist/alert/index.mjs +3 -3
- package/dist/alert-dialog/index.mjs +15 -15
- package/dist/auto-complete-multi-select/index.mjs +31 -31
- package/dist/avatar/index.mjs +5 -5
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +8 -5
- package/dist/base/index.mjs +55 -55
- package/dist/breadcrumb/index.mjs +5 -5
- package/dist/button/index.mjs +3 -3
- package/dist/button-group/index.mjs +3 -3
- 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 +12 -12
- package/dist/chunks/{AutoComplete-BpwnFm_u.mjs → AutoComplete-CwXFZyHj.mjs} +9 -9
- package/dist/chunks/{AutoComplete-BpwnFm_u.mjs.map → AutoComplete-CwXFZyHj.mjs.map} +1 -1
- package/dist/chunks/{CalendarRange-BGP7p-ma.mjs → CalendarRange-C1JaC0NH.mjs} +46 -16
- package/dist/chunks/CalendarRange-C1JaC0NH.mjs.map +1 -0
- package/dist/chunks/{ComboboxField-CzJlHHXv.mjs → ComboboxField-BhANWqsL.mjs} +9 -9
- package/dist/chunks/{ComboboxField-CzJlHHXv.mjs.map → ComboboxField-BhANWqsL.mjs.map} +1 -1
- package/dist/chunks/{Container-77E_UFi2.mjs → Container-CJ5Ez8WO.mjs} +2 -2
- package/dist/chunks/{Container-77E_UFi2.mjs.map → Container-CJ5Ez8WO.mjs.map} +1 -1
- package/dist/chunks/{DeleteConfirmationModal-DQK05Srx.mjs → DeleteConfirmationModal-eF3-GJwU.mjs} +10 -7
- package/dist/chunks/DeleteConfirmationModal-eF3-GJwU.mjs.map +1 -0
- package/dist/chunks/{ListItem-B0_5JcsU.mjs → ListItem-lXygMzwt.mjs} +4 -4
- package/dist/chunks/{ListItem-B0_5JcsU.mjs.map → ListItem-lXygMzwt.mjs.map} +1 -1
- package/dist/chunks/{TooltipIndicator-Db1poSJI.mjs → TooltipIndicator-lfV17ijc.mjs} +4 -4
- package/dist/chunks/{TooltipIndicator-Db1poSJI.mjs.map → TooltipIndicator-lfV17ijc.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-DkfSKqYE.mjs → _commonjsHelpers-DZfHmcAT.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-DZfHmcAT.mjs.map +1 -0
- package/dist/chunks/{accordion-DSn7k_RQ.mjs → accordion-Dk7Kvu7n.mjs} +9 -9
- package/dist/chunks/{accordion-DSn7k_RQ.mjs.map → accordion-Dk7Kvu7n.mjs.map} +1 -1
- package/dist/chunks/{alert-aP6n7wtq.mjs → alert-B5yYDdqO.mjs} +2 -2
- package/dist/chunks/{alert-aP6n7wtq.mjs.map → alert-B5yYDdqO.mjs.map} +1 -1
- package/dist/chunks/{badge-CsUuqHNu.mjs → badge-0b82aTVL.mjs} +2 -2
- package/dist/chunks/{badge-CsUuqHNu.mjs.map → badge-0b82aTVL.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-BRbxNcQb.mjs → bundle-mjs-sQO1296o.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-BRbxNcQb.mjs.map → bundle-mjs-sQO1296o.mjs.map} +1 -1
- package/dist/chunks/{button-BW9I4XWU.mjs → button-BtEUUk_h.mjs} +2 -2
- package/dist/chunks/{button-BW9I4XWU.mjs.map → button-BtEUUk_h.mjs.map} +1 -1
- package/dist/chunks/{calendar-C549VT55.mjs → calendar-CzCHYS3Z.mjs} +7 -7
- package/dist/chunks/{calendar-C549VT55.mjs.map → calendar-CzCHYS3Z.mjs.map} +1 -1
- package/dist/chunks/{calendar-days-BSzlDBsi.mjs → calendar-days-CRvU4N4b.mjs} +2 -2
- package/dist/chunks/{calendar-days-BSzlDBsi.mjs.map → calendar-days-CRvU4N4b.mjs.map} +1 -1
- package/dist/chunks/{card-Dqm2EuWU.mjs → card-BZltpfI0.mjs} +2 -2
- package/dist/chunks/{card-Dqm2EuWU.mjs.map → card-BZltpfI0.mjs.map} +1 -1
- package/dist/chunks/{check-CKdwsuVA.mjs → check-CppcZQPE.mjs} +2 -2
- package/dist/chunks/{check-CKdwsuVA.mjs.map → check-CppcZQPE.mjs.map} +1 -1
- package/dist/chunks/{checkbox-CvaPsjy3.mjs → checkbox-D0AQLtly.mjs} +9 -9
- package/dist/chunks/{checkbox-CvaPsjy3.mjs.map → checkbox-D0AQLtly.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-o7NUBnJ4.mjs → chevron-down-t-R0PXW2.mjs} +2 -2
- package/dist/chunks/{chevron-down-o7NUBnJ4.mjs.map → chevron-down-t-R0PXW2.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-BZ8X7kLy.mjs → chevron-left-KMSmVyA4.mjs} +2 -2
- package/dist/chunks/{chevron-left-BZ8X7kLy.mjs.map → chevron-left-KMSmVyA4.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-jAScR3zY.mjs → chevron-right-BmRsffrg.mjs} +2 -2
- package/dist/chunks/{chevron-right-jAScR3zY.mjs.map → chevron-right-BmRsffrg.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-BSIPdamI.mjs → chevrons-up-down-Cvh-L0Ad.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-BSIPdamI.mjs.map → chevrons-up-down-Cvh-L0Ad.mjs.map} +1 -1
- package/dist/chunks/{command-B29vdoVO.mjs → command-BAV_ZM-u.mjs} +8 -8
- package/dist/chunks/{command-B29vdoVO.mjs.map → command-BAV_ZM-u.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-CkP7424r.mjs → createLucideIcon-IJTsyy04.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-CkP7424r.mjs.map → createLucideIcon-IJTsyy04.mjs.map} +1 -1
- package/dist/chunks/{date-Y_hKMQVr.mjs → date-ClgZoeOx.mjs} +2 -2
- package/dist/chunks/{date-Y_hKMQVr.mjs.map → date-ClgZoeOx.mjs.map} +1 -1
- package/dist/chunks/{dialog-BhaHMQnG.mjs → dialog-DtOWs7bR.mjs} +4 -4
- package/dist/chunks/{dialog-BhaHMQnG.mjs.map → dialog-DtOWs7bR.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-DHAz8TrI.mjs → ellipsis-BuMC1Iph.mjs} +2 -2
- package/dist/chunks/{ellipsis-DHAz8TrI.mjs.map → ellipsis-BuMC1Iph.mjs.map} +1 -1
- package/dist/chunks/{form-BAxhKbgh.mjs → form-itZyV1Dd.mjs} +4 -4
- package/dist/chunks/{form-BAxhKbgh.mjs.map → form-itZyV1Dd.mjs.map} +1 -1
- package/dist/chunks/{format-numbers-CWj9Vf7x.mjs → format-numbers-Ds4Usx3O.mjs} +7 -2
- package/dist/chunks/format-numbers-Ds4Usx3O.mjs.map +1 -0
- package/dist/chunks/{format-CR4Q6BSq.mjs → format-rKG7bR7-.mjs} +1 -1
- package/dist/chunks/{format-CR4Q6BSq.mjs.map → format-rKG7bR7-.mjs.map} +1 -1
- package/dist/chunks/{hover-card-DVmQc78n.mjs → hover-card-CQgoBTFu.mjs} +9 -9
- package/dist/chunks/{hover-card-DVmQc78n.mjs.map → hover-card-CQgoBTFu.mjs.map} +1 -1
- package/dist/chunks/{index-Cs9A0tpU.mjs → index-B2h5mEFW.mjs} +1 -1
- package/dist/chunks/{index-Cs9A0tpU.mjs.map → index-B2h5mEFW.mjs.map} +1 -1
- package/dist/chunks/{index-Bt1elORc.mjs → index-B4gr9hob.mjs} +9 -9
- package/dist/chunks/{index-Bt1elORc.mjs.map → index-B4gr9hob.mjs.map} +1 -1
- package/dist/chunks/{index-D_Q4NGnO.mjs → index-B8A26Y89.mjs} +1 -1
- package/dist/chunks/{index-D_Q4NGnO.mjs.map → index-B8A26Y89.mjs.map} +1 -1
- package/dist/chunks/{index-Dp_0m03a.mjs → index-BSMFZq7D.mjs} +2 -2
- package/dist/chunks/{index-Dp_0m03a.mjs.map → index-BSMFZq7D.mjs.map} +1 -1
- package/dist/chunks/{index-4pJ77hyF.mjs → index-BYHg2bm1.mjs} +1 -1
- package/dist/chunks/{index-4pJ77hyF.mjs.map → index-BYHg2bm1.mjs.map} +1 -1
- package/dist/chunks/{index-DNMhNzeD.mjs → index-BmZzmund.mjs} +7 -7
- package/dist/chunks/{index-DNMhNzeD.mjs.map → index-BmZzmund.mjs.map} +1 -1
- package/dist/chunks/{index-oX_tk439.mjs → index-Bp-UT0u_.mjs} +1 -1
- package/dist/chunks/{index-oX_tk439.mjs.map → index-Bp-UT0u_.mjs.map} +1 -1
- package/dist/chunks/{index-Ct610FOk.mjs → index-BqGZCpIk.mjs} +2 -2
- package/dist/chunks/{index-Ct610FOk.mjs.map → index-BqGZCpIk.mjs.map} +1 -1
- package/dist/chunks/{index-DhI6OG_H.mjs → index-C9nN2J3_.mjs} +2 -2
- package/dist/chunks/{index-DhI6OG_H.mjs.map → index-C9nN2J3_.mjs.map} +1 -1
- package/dist/chunks/{index-D2DYiX9D.mjs → index-CAQFO5pv.mjs} +2 -2
- package/dist/chunks/{index-D2DYiX9D.mjs.map → index-CAQFO5pv.mjs.map} +1 -1
- package/dist/chunks/{index-CvVBB5ll.mjs → index-CO8BD2gK.mjs} +4 -4
- package/dist/chunks/{index-CvVBB5ll.mjs.map → index-CO8BD2gK.mjs.map} +1 -1
- package/dist/chunks/{index-CByz7d8q.mjs → index-CcOAET5X.mjs} +3 -3
- package/dist/chunks/{index-CByz7d8q.mjs.map → index-CcOAET5X.mjs.map} +1 -1
- package/dist/chunks/{index-D_e6adwb.mjs → index-CeAVvwQy.mjs} +5 -5
- package/dist/chunks/{index-D_e6adwb.mjs.map → index-CeAVvwQy.mjs.map} +1 -1
- package/dist/chunks/{index-D1CSAowX.mjs → index-DOCJsTKK.mjs} +13 -13
- package/dist/chunks/{index-D1CSAowX.mjs.map → index-DOCJsTKK.mjs.map} +1 -1
- package/dist/chunks/{index-DCDDoDjL.mjs → index-D_0BjrgS.mjs} +6 -6
- package/dist/chunks/{index-DCDDoDjL.mjs.map → index-D_0BjrgS.mjs.map} +1 -1
- package/dist/chunks/{index-BN17NQCv.mjs → index-D_eYlNYO.mjs} +1 -1
- package/dist/chunks/{index-BN17NQCv.mjs.map → index-D_eYlNYO.mjs.map} +1 -1
- package/dist/chunks/{index-CS2Lzoed.mjs → index-DjsX-naS.mjs} +7 -7
- package/dist/chunks/{index-CS2Lzoed.mjs.map → index-DjsX-naS.mjs.map} +1 -1
- package/dist/chunks/{index-DQD35Ges.mjs → index-U9iegIVd.mjs} +3 -3
- package/dist/chunks/{index-DQD35Ges.mjs.map → index-U9iegIVd.mjs.map} +1 -1
- package/dist/chunks/{index-D8mA4n7w.mjs → index-VoloYtJc.mjs} +1 -1
- package/dist/chunks/{index-D8mA4n7w.mjs.map → index-VoloYtJc.mjs.map} +1 -1
- package/dist/chunks/{index-CVjOpozG.mjs → index-b6LGpn-D.mjs} +1 -1
- package/dist/chunks/{index-CVjOpozG.mjs.map → index-b6LGpn-D.mjs.map} +1 -1
- package/dist/chunks/{index-DLqxy-dg.mjs → index-bhfoRF9s.mjs} +1 -1
- package/dist/chunks/{index-DLqxy-dg.mjs.map → index-bhfoRF9s.mjs.map} +1 -1
- package/dist/chunks/{index.module-Df4mRjmZ.mjs → index.module-cPd7xzY9.mjs} +1 -1
- package/dist/chunks/{index.module-Df4mRjmZ.mjs.map → index.module-cPd7xzY9.mjs.map} +1 -1
- package/dist/chunks/{input-YpoAHnXb.mjs → input-NkOFiDdw.mjs} +3 -3
- package/dist/chunks/input-NkOFiDdw.mjs.map +1 -0
- package/dist/chunks/{input-otp-BKqdZwNx.mjs → input-otp-WMzsnf2P.mjs} +3 -3
- package/dist/chunks/{input-otp-BKqdZwNx.mjs.map → input-otp-WMzsnf2P.mjs.map} +1 -1
- package/dist/chunks/{label-D5s6d0et.mjs → label-BExccyIB.mjs} +2 -2
- package/dist/chunks/{label-D5s6d0et.mjs.map → label-BExccyIB.mjs.map} +1 -1
- package/dist/chunks/{loader-circle-C7StEOZI.mjs → loader-circle-B5LZyuBm.mjs} +2 -2
- package/dist/chunks/{loader-circle-C7StEOZI.mjs.map → loader-circle-B5LZyuBm.mjs.map} +1 -1
- package/dist/chunks/{menubar-ySifmjAG.mjs → menubar-Cwzkhwpx.mjs} +11 -11
- package/dist/chunks/{menubar-ySifmjAG.mjs.map → menubar-Cwzkhwpx.mjs.map} +1 -1
- package/dist/chunks/{multi-select-BsnRMfg7.mjs → multi-select-CN3aRFMh.mjs} +13 -13
- package/dist/chunks/{multi-select-BsnRMfg7.mjs.map → multi-select-CN3aRFMh.mjs.map} +1 -1
- package/dist/chunks/{pagination-CV6N_Qu_.mjs → pagination-BC-VpN0g.mjs} +6 -6
- package/dist/chunks/{pagination-CV6N_Qu_.mjs.map → pagination-BC-VpN0g.mjs.map} +1 -1
- package/dist/chunks/{popover-D3JC54Y3.mjs → popover-5o_1oulo.mjs} +11 -11
- package/dist/chunks/{popover-D3JC54Y3.mjs.map → popover-5o_1oulo.mjs.map} +1 -1
- package/dist/chunks/{progress-D_Enl4tV.mjs → progress-DUpF225t.mjs} +2 -2
- package/dist/chunks/{progress-D_Enl4tV.mjs.map → progress-DUpF225t.mjs.map} +1 -1
- package/dist/chunks/{radio-group-yF1QEewC.mjs → radio-group-Dmw7n5e7.mjs} +11 -11
- package/dist/chunks/{radio-group-yF1QEewC.mjs.map → radio-group-Dmw7n5e7.mjs.map} +1 -1
- package/dist/chunks/{react-number-format.es-C3uDZhRo.mjs → react-number-format.es-BN_RzQtV.mjs} +1 -1
- package/dist/chunks/{react-number-format.es-C3uDZhRo.mjs.map → react-number-format.es-BN_RzQtV.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-CdGRe--S.mjs → scroll-area-C9hJhMjB.mjs} +9 -9
- package/dist/chunks/{scroll-area-CdGRe--S.mjs.map → scroll-area-C9hJhMjB.mjs.map} +1 -1
- package/dist/chunks/{select-B8JYuJE5.mjs → select-CQwHSTHT.mjs} +5 -5
- package/dist/chunks/{select-B8JYuJE5.mjs.map → select-CQwHSTHT.mjs.map} +1 -1
- package/dist/chunks/{separator-sWF5eZgM.mjs → separator-CFkfEDOC.mjs} +2 -2
- package/dist/chunks/{separator-sWF5eZgM.mjs.map → separator-CFkfEDOC.mjs.map} +1 -1
- package/dist/chunks/{sheet-D-4XWzUo.mjs → sheet-MLBi3fZ4.mjs} +4 -4
- package/dist/chunks/{sheet-D-4XWzUo.mjs.map → sheet-MLBi3fZ4.mjs.map} +1 -1
- package/dist/chunks/{skeleton-CQlSHSfr.mjs → skeleton-BJAh31dx.mjs} +2 -2
- package/dist/chunks/{skeleton-CQlSHSfr.mjs.map → skeleton-BJAh31dx.mjs.map} +1 -1
- package/dist/chunks/{slider-CaliGouI.mjs → slider-BMHrznD3.mjs} +9 -9
- package/dist/chunks/{slider-CaliGouI.mjs.map → slider-BMHrznD3.mjs.map} +1 -1
- package/dist/chunks/{sortable-BoTUMXD0.mjs → sortable-DEgW7nst.mjs} +3 -3
- package/dist/chunks/{sortable-BoTUMXD0.mjs.map → sortable-DEgW7nst.mjs.map} +1 -1
- package/dist/chunks/{switch-szutUcvb.mjs → switch-D_AtRQaE.mjs} +7 -7
- package/dist/chunks/{switch-szutUcvb.mjs.map → switch-D_AtRQaE.mjs.map} +1 -1
- package/dist/chunks/{table-wwce3IsC.mjs → table-Dq4zkZaw.mjs} +2 -2
- package/dist/chunks/{table-wwce3IsC.mjs.map → table-Dq4zkZaw.mjs.map} +1 -1
- package/dist/chunks/{tabs-BDPMoWeJ.mjs → tabs-Chrj0N-f.mjs} +9 -9
- package/dist/chunks/{tabs-BDPMoWeJ.mjs.map → tabs-Chrj0N-f.mjs.map} +1 -1
- package/dist/chunks/{textarea-DYBOxg35.mjs → textarea-BcmwRML8.mjs} +2 -2
- package/dist/chunks/{textarea-DYBOxg35.mjs.map → textarea-BcmwRML8.mjs.map} +1 -1
- package/dist/chunks/{toast-S15TT7Q2.mjs → toast-DE1mmo_h.mjs} +12 -12
- package/dist/chunks/{toast-S15TT7Q2.mjs.map → toast-DE1mmo_h.mjs.map} +1 -1
- package/dist/chunks/{toggle-GXtKRhvr.mjs → toggle-FD-Jw2xC.mjs} +4 -4
- package/dist/chunks/{toggle-GXtKRhvr.mjs.map → toggle-FD-Jw2xC.mjs.map} +1 -1
- package/dist/chunks/{tooltip-z43eMlPO.mjs → tooltip-DpEs9Uln.mjs} +11 -11
- package/dist/chunks/{tooltip-z43eMlPO.mjs.map → tooltip-DpEs9Uln.mjs.map} +1 -1
- package/dist/chunks/{trash-2-CZE_1bXY.mjs → trash-2-UpLAtgrt.mjs} +2 -2
- package/dist/chunks/{trash-2-CZE_1bXY.mjs.map → trash-2-UpLAtgrt.mjs.map} +1 -1
- package/dist/chunks/{triangle-alert-BeczCtiG.mjs → triangle-alert-ChizEoXT.mjs} +2 -2
- package/dist/chunks/{triangle-alert-BeczCtiG.mjs.map → triangle-alert-ChizEoXT.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-B20VGjW7.mjs → tslib.es6-BBSUcSv5.mjs} +1 -1
- package/dist/chunks/{tslib.es6-B20VGjW7.mjs.map → tslib.es6-BBSUcSv5.mjs.map} +1 -1
- package/dist/chunks/{use-toast-C3gJQZ0s.mjs → use-toast-C1hUHeG0.mjs} +1 -1
- package/dist/chunks/{use-toast-C3gJQZ0s.mjs.map → use-toast-C1hUHeG0.mjs.map} +1 -1
- package/dist/chunks/{utils-uOfHPBdi.mjs → utils-DnvLjiIj.mjs} +2 -2
- package/dist/chunks/{utils-uOfHPBdi.mjs.map → utils-DnvLjiIj.mjs.map} +1 -1
- package/dist/chunks/{wand-sparkles-COk3z6HL.mjs → wand-sparkles-BYe6ab0J.mjs} +2 -2
- package/dist/chunks/{wand-sparkles-COk3z6HL.mjs.map → wand-sparkles-BYe6ab0J.mjs.map} +1 -1
- package/dist/chunks/{x-D5HL_X5m.mjs → x-CKkn5Jb1.mjs} +2 -2
- package/dist/chunks/{x-D5HL_X5m.mjs.map → x-CKkn5Jb1.mjs.map} +1 -1
- package/dist/collapsible/index.mjs +7 -7
- package/dist/combobox/index.mjs +24 -24
- package/dist/command/index.mjs +18 -18
- package/dist/context-menu/index.mjs +21 -21
- package/dist/dash/index.mjs +23 -24
- package/dist/dash/index.mjs.map +1 -1
- package/dist/data-table/index.mjs +33 -33
- package/dist/date-picker/index.mjs +25 -25
- package/dist/dialog/index.mjs +17 -17
- package/dist/drawer/index.mjs +14 -14
- package/dist/dropdown-menu/index.mjs +21 -21
- package/dist/dropzone/index.mjs +17 -17
- package/dist/editable-table/index.mjs +18 -18
- package/dist/empty/index.mjs +2 -2
- package/dist/field/index.mjs +4 -4
- package/dist/form/index.mjs +4 -4
- package/dist/form-fields/index.mjs +26 -26
- package/dist/form-layout/index.d.ts +17 -2
- package/dist/form-layout/index.mjs +291 -112
- package/dist/form-layout/index.mjs.map +1 -1
- package/dist/hover-card/index.mjs +13 -13
- 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 +4 -4
- package/dist/item/index.mjs +3 -3
- package/dist/ivt.css +1 -1
- package/dist/kbd/index.mjs +2 -2
- package/dist/label/index.mjs +3 -3
- package/dist/layout/index.mjs +21 -21
- package/dist/menubar/index.mjs +22 -22
- package/dist/multi-input-list/index.mjs +28 -28
- package/dist/multi-select/index.mjs +31 -31
- package/dist/navigation-menu/index.mjs +15 -15
- package/dist/pagination/index.mjs +8 -8
- package/dist/popover/index.mjs +16 -16
- package/dist/progress/index.mjs +3 -3
- package/dist/radio-group/index.mjs +16 -16
- package/dist/resizable/index.mjs +3 -3
- package/dist/scroll-area/index.mjs +10 -10
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +3 -3
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.mjs +5 -5
- package/dist/sheet/index.mjs +17 -17
- package/dist/sidebar/index.mjs +25 -25
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/slider/index.mjs +11 -11
- package/dist/sortable/index.mjs +4 -4
- package/dist/spinner/index.mjs +4 -4
- package/dist/switch/index.mjs +9 -9
- package/dist/table/index.mjs +3 -3
- package/dist/table-filter/index.d.ts +1 -1
- package/dist/table-filter/index.mjs +51 -52
- package/dist/table-filter/index.mjs.map +1 -1
- package/dist/tabs/index.mjs +12 -12
- package/dist/textarea/index.mjs +3 -3
- package/dist/toast/index.mjs +14 -14
- package/dist/toaster/index.mjs +15 -15
- package/dist/toggle/index.mjs +6 -6
- package/dist/toggle-group/index.mjs +11 -11
- package/dist/tooltip/index.mjs +15 -15
- package/package.json +1 -1
- package/dist/chunks/CalendarRange-BGP7p-ma.mjs.map +0 -1
- package/dist/chunks/DeleteConfirmationModal-DQK05Srx.mjs.map +0 -1
- package/dist/chunks/_commonjsHelpers-DkfSKqYE.mjs.map +0 -1
- package/dist/chunks/format-numbers-CWj9Vf7x.mjs.map +0 -1
- package/dist/chunks/input-YpoAHnXb.mjs.map +0 -1
- package/dist/chunks/styles-C5sFcbz4.mjs +0 -6
- package/dist/chunks/styles-C5sFcbz4.mjs.map +0 -1
|
@@ -1,64 +1,69 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useId, useState, useEffect } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { f as
|
|
7
|
-
import { f as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { S as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import '../chunks/
|
|
2
|
+
import { useId, useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { N as NumericFormat, P as PatternFormat } from '../chunks/react-number-format.es-BN_RzQtV.mjs';
|
|
4
|
+
import { M as MultiSelect } from '../chunks/multi-select-CN3aRFMh.mjs';
|
|
5
|
+
import { c as cn } from '../chunks/utils-DnvLjiIj.mjs';
|
|
6
|
+
import { f as formatDateToBrazilian, p as ptBR } from '../chunks/date-ClgZoeOx.mjs';
|
|
7
|
+
import { f as formatMoney, s as styleInputError, a as styleInput } from '../chunks/format-numbers-Ds4Usx3O.mjs';
|
|
8
|
+
import { f as FormField, a as FormItem, b as FormLabel, c as FormControl, d as FormDescription, e as FormMessage, F as Form } from '../chunks/form-itZyV1Dd.mjs';
|
|
9
|
+
import { C as CalendarRange } from '../chunks/CalendarRange-C1JaC0NH.mjs';
|
|
10
|
+
import { T as Toggle } from '../chunks/toggle-FD-Jw2xC.mjs';
|
|
11
|
+
import { I as InputOTP, a as InputOTPGroup, b as InputOTPSlot } from '../chunks/input-otp-WMzsnf2P.mjs';
|
|
12
|
+
import { S as Slider } from '../chunks/slider-BMHrznD3.mjs';
|
|
13
|
+
import { R as RadioGroup, a as RadioGroupItem } from '../chunks/radio-group-Dmw7n5e7.mjs';
|
|
14
|
+
import { S as Switch } from '../chunks/switch-D_AtRQaE.mjs';
|
|
15
|
+
import { c as createLucideIcon } from '../chunks/createLucideIcon-IJTsyy04.mjs';
|
|
16
|
+
import { A as AutoComplete } from '../chunks/AutoComplete-CwXFZyHj.mjs';
|
|
17
|
+
import { L as ListItem } from '../chunks/ListItem-lXygMzwt.mjs';
|
|
18
|
+
import { L as Label } from '../chunks/label-BExccyIB.mjs';
|
|
19
|
+
import { C as Checkbox } from '../chunks/checkbox-D0AQLtly.mjs';
|
|
20
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-5o_1oulo.mjs';
|
|
21
|
+
import { B as Button } from '../chunks/button-BtEUUk_h.mjs';
|
|
22
|
+
import { f as format } from '../chunks/format-rKG7bR7-.mjs';
|
|
23
|
+
import { C as Calendar$1 } from '../chunks/calendar-CzCHYS3Z.mjs';
|
|
24
|
+
import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from '../chunks/select-CQwHSTHT.mjs';
|
|
25
|
+
import { I as Input } from '../chunks/input-NkOFiDdw.mjs';
|
|
26
|
+
import { T as Textarea } from '../chunks/textarea-BcmwRML8.mjs';
|
|
27
|
+
import { S as Separator } from '../chunks/separator-CFkfEDOC.mjs';
|
|
28
|
+
import 'class-variance-authority';
|
|
29
|
+
import '../chunks/x-CKkn5Jb1.mjs';
|
|
30
|
+
import '../chunks/chevrons-up-down-Cvh-L0Ad.mjs';
|
|
31
|
+
import '../chunks/check-CppcZQPE.mjs';
|
|
32
|
+
import '../chunks/wand-sparkles-BYe6ab0J.mjs';
|
|
33
|
+
import '../chunks/badge-0b82aTVL.mjs';
|
|
25
34
|
import '@radix-ui/react-slot';
|
|
26
|
-
import '../chunks/
|
|
35
|
+
import '../chunks/tooltip-DpEs9Uln.mjs';
|
|
36
|
+
import '../chunks/index-bhfoRF9s.mjs';
|
|
27
37
|
import 'react-dom';
|
|
28
38
|
import 'react/jsx-runtime';
|
|
29
|
-
import '../chunks/index-
|
|
30
|
-
import '../chunks/index-
|
|
31
|
-
import '../chunks/index-
|
|
32
|
-
import '
|
|
33
|
-
import '../chunks/index-
|
|
34
|
-
import '../chunks/index-
|
|
35
|
-
import '../chunks/index-
|
|
36
|
-
import '../chunks/index-
|
|
37
|
-
import '../chunks/index-
|
|
39
|
+
import '../chunks/index-b6LGpn-D.mjs';
|
|
40
|
+
import '../chunks/index-CO8BD2gK.mjs';
|
|
41
|
+
import '../chunks/index-B2h5mEFW.mjs';
|
|
42
|
+
import '../chunks/index-BSMFZq7D.mjs';
|
|
43
|
+
import '../chunks/index-BYHg2bm1.mjs';
|
|
44
|
+
import '../chunks/index-D_0BjrgS.mjs';
|
|
45
|
+
import '../chunks/index-C9nN2J3_.mjs';
|
|
46
|
+
import '../chunks/index-U9iegIVd.mjs';
|
|
47
|
+
import '../chunks/index-CcOAET5X.mjs';
|
|
48
|
+
import '../chunks/index-CAQFO5pv.mjs';
|
|
49
|
+
import '../chunks/index-BqGZCpIk.mjs';
|
|
50
|
+
import '../chunks/command-BAV_ZM-u.mjs';
|
|
51
|
+
import '../chunks/index-B4gr9hob.mjs';
|
|
52
|
+
import '../chunks/index-CeAVvwQy.mjs';
|
|
53
|
+
import '../chunks/tslib.es6-BBSUcSv5.mjs';
|
|
54
|
+
import '../chunks/dialog-DtOWs7bR.mjs';
|
|
55
|
+
import '../chunks/bundle-mjs-sQO1296o.mjs';
|
|
56
|
+
import '../chunks/calendar-days-CRvU4N4b.mjs';
|
|
57
|
+
import '../chunks/index-Bp-UT0u_.mjs';
|
|
58
|
+
import '../chunks/index-B8A26Y89.mjs';
|
|
59
|
+
import '../chunks/index-VoloYtJc.mjs';
|
|
38
60
|
import '@radix-ui/react-collection';
|
|
39
|
-
import '../chunks/index-
|
|
40
|
-
import '../chunks/index-
|
|
41
|
-
import '../chunks/
|
|
42
|
-
import '../chunks/
|
|
43
|
-
import '../chunks/
|
|
44
|
-
import '../chunks/
|
|
45
|
-
import '../chunks/x-D5HL_X5m.mjs';
|
|
46
|
-
import '../chunks/chevrons-up-down-BSIPdamI.mjs';
|
|
47
|
-
import '../chunks/command-B29vdoVO.mjs';
|
|
48
|
-
import '../chunks/index-Bt1elORc.mjs';
|
|
49
|
-
import '../chunks/index-CvVBB5ll.mjs';
|
|
50
|
-
import '../chunks/index-D_e6adwb.mjs';
|
|
51
|
-
import '../chunks/tslib.es6-B20VGjW7.mjs';
|
|
52
|
-
import '../chunks/index-DQD35Ges.mjs';
|
|
53
|
-
import '../chunks/dialog-BhaHMQnG.mjs';
|
|
54
|
-
import '../chunks/TooltipIndicator-Db1poSJI.mjs';
|
|
55
|
-
import '../chunks/tooltip-z43eMlPO.mjs';
|
|
56
|
-
import '../chunks/index-DCDDoDjL.mjs';
|
|
57
|
-
import '../chunks/index-Ct610FOk.mjs';
|
|
58
|
-
import '../chunks/badge-CsUuqHNu.mjs';
|
|
59
|
-
import '../chunks/chevron-left-BZ8X7kLy.mjs';
|
|
60
|
-
import '../chunks/chevron-right-jAScR3zY.mjs';
|
|
61
|
-
import '../chunks/chevron-down-o7NUBnJ4.mjs';
|
|
61
|
+
import '../chunks/index-DjsX-naS.mjs';
|
|
62
|
+
import '../chunks/index.module-cPd7xzY9.mjs';
|
|
63
|
+
import '../chunks/TooltipIndicator-lfV17ijc.mjs';
|
|
64
|
+
import '../chunks/chevron-left-KMSmVyA4.mjs';
|
|
65
|
+
import '../chunks/chevron-right-BmRsffrg.mjs';
|
|
66
|
+
import '../chunks/chevron-down-t-R0PXW2.mjs';
|
|
62
67
|
import '@radix-ui/react-select';
|
|
63
68
|
|
|
64
69
|
const __iconNode = [
|
|
@@ -135,39 +140,49 @@ const Calendar = createLucideIcon("Calendar", __iconNode);
|
|
|
135
140
|
});
|
|
136
141
|
}
|
|
137
142
|
|
|
138
|
-
function AutocompleteFieldWrapper({ field, form, autocompleteConfig, placeholder, disabled }) {
|
|
143
|
+
function AutocompleteFieldWrapper({ field, form, autocompleteConfig, placeholder, disabled, isError }) {
|
|
139
144
|
const [open, setOpen] = useState(false);
|
|
140
|
-
// biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
141
145
|
const [selectedOption, setSelectedOption] = useState(null);
|
|
142
|
-
const
|
|
143
|
-
((option)=>option.label || String(option.id));
|
|
144
|
-
const getOptionKey = autocompleteConfig.getOptionKey ||
|
|
145
|
-
((option)=>option.id);
|
|
146
|
-
const getOptionValue = autocompleteConfig.getOptionValue || // biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
147
|
-
((option)=>option.id);
|
|
146
|
+
const selectedOptionRef = useRef(null);
|
|
147
|
+
const getOptionLabel = autocompleteConfig.getOptionLabel || ((option)=>option.label || String(option.id));
|
|
148
|
+
const getOptionKey = autocompleteConfig.getOptionKey || ((option)=>option.id);
|
|
149
|
+
const getOptionValue = autocompleteConfig.getOptionValue || ((option)=>option.id);
|
|
148
150
|
useEffect(()=>{
|
|
151
|
+
if (selectedOptionRef.current && field.value) {
|
|
152
|
+
const currentValue = getOptionValue(selectedOptionRef.current);
|
|
153
|
+
if (currentValue === field.value) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
149
157
|
if (field.value && autocompleteConfig.fetchOptions) {
|
|
150
|
-
const
|
|
158
|
+
const isNumericValue = typeof field.value === "number";
|
|
159
|
+
const searchTerm = isNumericValue ? "" : field.value;
|
|
151
160
|
autocompleteConfig.fetchOptions(searchTerm).then((options)=>{
|
|
152
|
-
let found =
|
|
153
|
-
if (
|
|
154
|
-
found = options.find((opt)=>{
|
|
155
|
-
const label = getOptionLabel(opt);
|
|
156
|
-
return label === field.value || label.toLowerCase().includes(field.value.toLowerCase());
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
if (!found && typeof field.value === "number") {
|
|
161
|
+
let found = null;
|
|
162
|
+
if (isNumericValue) {
|
|
160
163
|
found = options.find((opt)=>getOptionKey(opt) === field.value);
|
|
164
|
+
} else {
|
|
165
|
+
found = options.find((opt)=>getOptionValue(opt) === field.value);
|
|
166
|
+
if (!found) {
|
|
167
|
+
found = options.find((opt)=>{
|
|
168
|
+
const label = getOptionLabel(opt);
|
|
169
|
+
return label === field.value || label.toLowerCase().includes(field.value.toLowerCase());
|
|
170
|
+
});
|
|
171
|
+
}
|
|
161
172
|
}
|
|
162
173
|
if (found) {
|
|
174
|
+
selectedOptionRef.current = found;
|
|
163
175
|
setSelectedOption(found);
|
|
164
176
|
} else {
|
|
177
|
+
selectedOptionRef.current = null;
|
|
165
178
|
setSelectedOption(null);
|
|
166
179
|
}
|
|
167
180
|
}).catch(()=>{
|
|
181
|
+
selectedOptionRef.current = null;
|
|
168
182
|
setSelectedOption(null);
|
|
169
183
|
});
|
|
170
|
-
} else {
|
|
184
|
+
} else if (!field.value) {
|
|
185
|
+
selectedOptionRef.current = null;
|
|
171
186
|
setSelectedOption(null);
|
|
172
187
|
}
|
|
173
188
|
}, [
|
|
@@ -179,10 +194,10 @@ function AutocompleteFieldWrapper({ field, form, autocompleteConfig, placeholder
|
|
|
179
194
|
]);
|
|
180
195
|
return /*#__PURE__*/ React.createElement(AutoComplete, {
|
|
181
196
|
value: selectedOption,
|
|
182
|
-
// biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
183
197
|
onChange: (option)=>{
|
|
184
198
|
const value = option ? getOptionValue(option) : null;
|
|
185
199
|
field.onChange(value);
|
|
200
|
+
selectedOptionRef.current = option;
|
|
186
201
|
setSelectedOption(option);
|
|
187
202
|
if (option && autocompleteConfig.onChangeCallback) {
|
|
188
203
|
autocompleteConfig.onChangeCallback(option, form);
|
|
@@ -197,13 +212,13 @@ function AutocompleteFieldWrapper({ field, form, autocompleteConfig, placeholder
|
|
|
197
212
|
messageEmpty: autocompleteConfig.messageEmpty || "Nenhum resultado encontrado...",
|
|
198
213
|
getOptionLabel: getOptionLabel,
|
|
199
214
|
getOptionKey: getOptionKey,
|
|
200
|
-
clearable: autocompleteConfig.clearable ??
|
|
201
|
-
className: "
|
|
215
|
+
clearable: autocompleteConfig.clearable ?? true,
|
|
216
|
+
className: cn("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", isError && styleInputError)
|
|
202
217
|
});
|
|
203
218
|
}
|
|
204
219
|
function BaseFormField({ config, control, readOnly = false, form }) {
|
|
205
220
|
const baseId = useId();
|
|
206
|
-
const { name, label, type, placeholder, description, required, options, decimalScale, disabled, prefix, radioOptions, otpLength, sliderRange, format: patternFormat, mask, autocompleteConfig, render: customRender } = config;
|
|
221
|
+
const { name, label, type, placeholder, description, required, options, items, allowNegative, decimalScale, disabled, prefix, radioOptions, otpLength, sliderRange, format: patternFormat, mask, autocompleteConfig, render: customRender, maxLength, endAdornment, multiSelectConfig, dateConfig, fileConfig } = config;
|
|
207
222
|
const formatReadOnlyValue = (value, fieldType)=>{
|
|
208
223
|
if (value === null || value === undefined || value === "") {
|
|
209
224
|
return undefined;
|
|
@@ -249,6 +264,46 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
249
264
|
return String(value);
|
|
250
265
|
case "slider":
|
|
251
266
|
return typeof value === "number" ? String(value) : undefined;
|
|
267
|
+
case "numberRange":
|
|
268
|
+
{
|
|
269
|
+
if (typeof value === "object" && value !== null && ("min" in value || "max" in value)) {
|
|
270
|
+
const range = value;
|
|
271
|
+
const minStr = range.min !== null && range.min !== undefined ? range.min.toLocaleString("pt-BR", {
|
|
272
|
+
minimumFractionDigits: decimalScale ?? 0,
|
|
273
|
+
maximumFractionDigits: decimalScale ?? 7
|
|
274
|
+
}) : "";
|
|
275
|
+
const maxStr = range.max !== null && range.max !== undefined ? range.max.toLocaleString("pt-BR", {
|
|
276
|
+
minimumFractionDigits: decimalScale ?? 0,
|
|
277
|
+
maximumFractionDigits: decimalScale ?? 7
|
|
278
|
+
}) : "";
|
|
279
|
+
if (minStr && maxStr) {
|
|
280
|
+
return `${minStr} - ${maxStr}`;
|
|
281
|
+
}
|
|
282
|
+
if (minStr) return `Mín: ${minStr}`;
|
|
283
|
+
if (maxStr) return `Máx: ${maxStr}`;
|
|
284
|
+
}
|
|
285
|
+
return undefined;
|
|
286
|
+
}
|
|
287
|
+
case "dateRange":
|
|
288
|
+
{
|
|
289
|
+
if (typeof value === "object" && value !== null && "from" in value) {
|
|
290
|
+
const range = value;
|
|
291
|
+
if (range.from && range.to) {
|
|
292
|
+
return `${formatDate(range.from)} - ${formatDate(range.to)}`;
|
|
293
|
+
}
|
|
294
|
+
if (range.from) {
|
|
295
|
+
return `De: ${formatDate(range.from)}`;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return undefined;
|
|
299
|
+
}
|
|
300
|
+
case "multiselect":
|
|
301
|
+
{
|
|
302
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
303
|
+
return value.join(", ");
|
|
304
|
+
}
|
|
305
|
+
return undefined;
|
|
306
|
+
}
|
|
252
307
|
default:
|
|
253
308
|
return String(value);
|
|
254
309
|
}
|
|
@@ -257,7 +312,6 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
257
312
|
return /*#__PURE__*/ React.createElement(FormField, {
|
|
258
313
|
control: control,
|
|
259
314
|
name: name,
|
|
260
|
-
// biome-ignore lint/suspicious/noExplicitAny: react-hook-form field type
|
|
261
315
|
render: ({ field })=>/*#__PURE__*/ React.createElement(ListItem, {
|
|
262
316
|
title: label,
|
|
263
317
|
value: formatReadOnlyValue(field.value, type)
|
|
@@ -267,38 +321,59 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
267
321
|
return /*#__PURE__*/ React.createElement(FormField, {
|
|
268
322
|
control: control,
|
|
269
323
|
name: name,
|
|
270
|
-
|
|
271
|
-
|
|
324
|
+
render: ({ field, fieldState })=>{
|
|
325
|
+
const isError = fieldState?.invalid;
|
|
272
326
|
if (customRender && form) {
|
|
273
327
|
return /*#__PURE__*/ React.createElement(FormItem, {
|
|
274
|
-
className: type === "checkbox" ? "flex flex-row items-start space-
|
|
275
|
-
}, type !== "checkbox" && type !== "switch" && /*#__PURE__*/ React.createElement(FormLabel, null, label,
|
|
328
|
+
className: type === "checkbox" ? "flex flex-row items-start space-y-0 space-x-3 rounded-md border p-4" : ""
|
|
329
|
+
}, type !== "checkbox" && type !== "switch" && /*#__PURE__*/ React.createElement(FormLabel, null, label, required && /*#__PURE__*/ React.createElement("span", {
|
|
276
330
|
className: "text-destructive"
|
|
277
|
-
}, "*")), /*#__PURE__*/ React.createElement(FormControl,
|
|
331
|
+
}, "*"), ":"), /*#__PURE__*/ React.createElement(FormControl, {
|
|
332
|
+
className: isError ? styleInputError : ""
|
|
333
|
+
}, customRender({
|
|
278
334
|
field,
|
|
279
335
|
form
|
|
280
336
|
})), type !== "checkbox" && description && /*#__PURE__*/ React.createElement(FormDescription, null, description), /*#__PURE__*/ React.createElement(FormMessage, null));
|
|
281
337
|
}
|
|
282
338
|
return /*#__PURE__*/ React.createElement(FormItem, {
|
|
283
|
-
className: type === "checkbox" ? "flex flex-row items-start space-
|
|
284
|
-
}, type !== "checkbox" && type !== "switch" && /*#__PURE__*/ React.createElement(FormLabel, null, label,
|
|
339
|
+
className: type === "checkbox" ? "flex flex-row items-start space-y-0 space-x-3 rounded-md border p-4" : ""
|
|
340
|
+
}, type !== "checkbox" && type !== "switch" && /*#__PURE__*/ React.createElement(FormLabel, null, label, required && /*#__PURE__*/ React.createElement("span", {
|
|
285
341
|
className: "text-destructive"
|
|
286
|
-
}, "*")), /*#__PURE__*/ React.createElement(FormControl, null, (()=>{
|
|
342
|
+
}, "*"), ":"), /*#__PURE__*/ React.createElement(FormControl, null, (()=>{
|
|
287
343
|
switch(type){
|
|
288
344
|
case "text":
|
|
289
345
|
case "email":
|
|
290
346
|
case "url":
|
|
291
347
|
case "tel":
|
|
292
|
-
return /*#__PURE__*/ React.createElement(
|
|
348
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
349
|
+
className: "relative"
|
|
350
|
+
}, /*#__PURE__*/ React.createElement(Input, {
|
|
293
351
|
...field,
|
|
294
352
|
type: type,
|
|
295
353
|
placeholder: placeholder,
|
|
296
354
|
disabled: disabled,
|
|
297
|
-
|
|
298
|
-
|
|
355
|
+
maxLength: maxLength,
|
|
356
|
+
value: field.value || "",
|
|
357
|
+
className: cn(isError ? styleInputError : "", endAdornment && "pr-20")
|
|
358
|
+
}), endAdornment && /*#__PURE__*/ React.createElement("div", {
|
|
359
|
+
className: "text-muted-foreground pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-xs"
|
|
360
|
+
}, endAdornment(field.value)));
|
|
361
|
+
case "file":
|
|
362
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
363
|
+
className: "flex items-center gap-2"
|
|
364
|
+
}, /*#__PURE__*/ React.createElement(Input, {
|
|
365
|
+
type: "file",
|
|
366
|
+
onChange: (e)=>{
|
|
367
|
+
const file = e.target.files?.[0] || null;
|
|
368
|
+
field.onChange(file);
|
|
369
|
+
},
|
|
370
|
+
className: "cursor-pointer file:cursor-pointer",
|
|
371
|
+
accept: fileConfig?.accept,
|
|
372
|
+
disabled: disabled
|
|
373
|
+
}));
|
|
299
374
|
case "textarea":
|
|
300
|
-
return /*#__PURE__*/ React.createElement(
|
|
301
|
-
className: "
|
|
375
|
+
return /*#__PURE__*/ React.createElement(Textarea, {
|
|
376
|
+
className: cn("min-h-20", isError && styleInputError),
|
|
302
377
|
...field,
|
|
303
378
|
placeholder: placeholder,
|
|
304
379
|
disabled: disabled,
|
|
@@ -319,7 +394,8 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
319
394
|
}
|
|
320
395
|
},
|
|
321
396
|
placeholder: placeholder,
|
|
322
|
-
disabled: disabled
|
|
397
|
+
disabled: disabled,
|
|
398
|
+
className: isError ? styleInputError : ""
|
|
323
399
|
});
|
|
324
400
|
case "currency":
|
|
325
401
|
return /*#__PURE__*/ React.createElement(NumericFormat, {
|
|
@@ -337,7 +413,8 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
337
413
|
},
|
|
338
414
|
placeholder: placeholder,
|
|
339
415
|
disabled: disabled,
|
|
340
|
-
prefix: prefix ?? "R$ "
|
|
416
|
+
prefix: prefix ?? "R$ ",
|
|
417
|
+
className: isError ? styleInputError : ""
|
|
341
418
|
});
|
|
342
419
|
case "pattern":
|
|
343
420
|
return /*#__PURE__*/ React.createElement(PatternFormat, {
|
|
@@ -349,7 +426,8 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
349
426
|
value: field.value || "",
|
|
350
427
|
onValueChange: (values)=>{
|
|
351
428
|
field.onChange(values.value);
|
|
352
|
-
}
|
|
429
|
+
},
|
|
430
|
+
className: isError ? styleInputError : ""
|
|
353
431
|
});
|
|
354
432
|
case "select":
|
|
355
433
|
{
|
|
@@ -359,11 +437,11 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
359
437
|
value: selectValue,
|
|
360
438
|
disabled: disabled
|
|
361
439
|
}, /*#__PURE__*/ React.createElement(FormControl, null, /*#__PURE__*/ React.createElement(SelectTrigger, {
|
|
362
|
-
className: "w-full"
|
|
440
|
+
className: cn("w-full", isError && styleInputError)
|
|
363
441
|
}, /*#__PURE__*/ React.createElement(SelectValue, {
|
|
364
442
|
placeholder: placeholder || "Selecione"
|
|
365
443
|
}))), /*#__PURE__*/ React.createElement(SelectContent, {
|
|
366
|
-
className: "max-h-[300px] overflow-
|
|
444
|
+
className: "max-h-[300px] overflow-x-hidden overflow-y-auto"
|
|
367
445
|
}, options?.map((opt)=>{
|
|
368
446
|
const val = typeof opt === "object" ? String(opt.value) : opt;
|
|
369
447
|
const lab = typeof opt === "object" ? opt.label : opt;
|
|
@@ -379,7 +457,7 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
379
457
|
}, /*#__PURE__*/ React.createElement(Button, {
|
|
380
458
|
variant: "outline",
|
|
381
459
|
disabled: disabled,
|
|
382
|
-
className: cn("w-full justify-start text-left font-normal", !field.value && "text-muted-foreground")
|
|
460
|
+
className: cn("w-full justify-start text-left font-normal", !field.value && "text-muted-foreground", isError && styleInputError)
|
|
383
461
|
}, /*#__PURE__*/ React.createElement(Calendar, {
|
|
384
462
|
className: "mr-2 h-4 w-4"
|
|
385
463
|
}), field.value ? format(new Date(field.value), "dd/MM/yyyy", {
|
|
@@ -415,16 +493,18 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
415
493
|
onValueChange: field.onChange,
|
|
416
494
|
className: "flex flex-col gap-2",
|
|
417
495
|
disabled: disabled ?? false
|
|
418
|
-
}, (radioOptions ?? [])?.map((opt)
|
|
496
|
+
}, (radioOptions ?? [])?.map((opt)=>{
|
|
497
|
+
const radioId = `${String(name)}-${opt.value}`;
|
|
498
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
419
499
|
key: opt.value,
|
|
420
500
|
className: "flex items-center gap-2"
|
|
421
501
|
}, /*#__PURE__*/ React.createElement(RadioGroupItem, {
|
|
422
502
|
value: opt.value,
|
|
423
|
-
id:
|
|
424
|
-
}), /*#__PURE__*/ React.createElement(
|
|
425
|
-
htmlFor:
|
|
426
|
-
|
|
427
|
-
|
|
503
|
+
id: radioId
|
|
504
|
+
}), /*#__PURE__*/ React.createElement(Label, {
|
|
505
|
+
htmlFor: radioId
|
|
506
|
+
}, opt.label));
|
|
507
|
+
}));
|
|
428
508
|
case "slider":
|
|
429
509
|
return /*#__PURE__*/ React.createElement("div", {
|
|
430
510
|
className: "space-y-2"
|
|
@@ -438,7 +518,7 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
438
518
|
step: sliderRange?.step ?? 1,
|
|
439
519
|
disabled: disabled
|
|
440
520
|
}), typeof field.value === "number" && /*#__PURE__*/ React.createElement("p", {
|
|
441
|
-
className: "text-
|
|
521
|
+
className: "text-muted-foreground text-xs"
|
|
442
522
|
}, "Valor: ", field.value));
|
|
443
523
|
case "otp":
|
|
444
524
|
return /*#__PURE__*/ React.createElement(InputOTP, {
|
|
@@ -448,9 +528,12 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
448
528
|
disabled: disabled
|
|
449
529
|
}, /*#__PURE__*/ React.createElement(InputOTPGroup, null, Array.from({
|
|
450
530
|
length: otpLength ?? 6
|
|
451
|
-
}, (_, i)
|
|
452
|
-
|
|
531
|
+
}, (_, i)=>({
|
|
532
|
+
id: `${baseId}-otp-${i}`,
|
|
453
533
|
index: i
|
|
534
|
+
})).map((slot)=>/*#__PURE__*/ React.createElement(InputOTPSlot, {
|
|
535
|
+
key: slot.id,
|
|
536
|
+
index: slot.index
|
|
454
537
|
}))));
|
|
455
538
|
case "toggle":
|
|
456
539
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -458,7 +541,8 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
458
541
|
}, /*#__PURE__*/ React.createElement(Toggle, {
|
|
459
542
|
pressed: !!field.value,
|
|
460
543
|
onPressedChange: (pressed)=>field.onChange(pressed),
|
|
461
|
-
disabled: disabled
|
|
544
|
+
disabled: disabled,
|
|
545
|
+
className: cn(isError && styleInputError)
|
|
462
546
|
}, label));
|
|
463
547
|
case "autocomplete":
|
|
464
548
|
{
|
|
@@ -470,7 +554,102 @@ function BaseFormField({ config, control, readOnly = false, form }) {
|
|
|
470
554
|
form: form,
|
|
471
555
|
autocompleteConfig: autocompleteConfig,
|
|
472
556
|
placeholder: placeholder,
|
|
557
|
+
disabled: disabled,
|
|
558
|
+
isError: isError
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
case "dateRange":
|
|
562
|
+
{
|
|
563
|
+
return /*#__PURE__*/ React.createElement(CalendarRange, {
|
|
564
|
+
numberOfMonths: 2,
|
|
565
|
+
value: field.value,
|
|
566
|
+
onChange: (value)=>{
|
|
567
|
+
field.onChange(value);
|
|
568
|
+
if (form) {
|
|
569
|
+
setTimeout(()=>{
|
|
570
|
+
form.trigger([
|
|
571
|
+
name
|
|
572
|
+
]);
|
|
573
|
+
}, 0);
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
placeholder: placeholder,
|
|
577
|
+
className: cn("h-10 w-full", isError && styleInputError),
|
|
578
|
+
disabled: disabled || dateConfig?.disabledDate,
|
|
579
|
+
disabledDateTooltip: dateConfig?.disabledDateTooltip
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
case "numberRange":
|
|
583
|
+
{
|
|
584
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
585
|
+
className: "flex gap-2"
|
|
586
|
+
}, /*#__PURE__*/ React.createElement(NumericFormat, {
|
|
587
|
+
placeholder: "Mínimo",
|
|
588
|
+
value: field.value?.min ?? "",
|
|
589
|
+
allowNegative: allowNegative ?? true,
|
|
590
|
+
allowLeadingZeros: false,
|
|
591
|
+
maxLength: undefined,
|
|
592
|
+
decimalSeparator: ",",
|
|
593
|
+
thousandSeparator: ".",
|
|
594
|
+
decimalScale: decimalScale ?? 8,
|
|
595
|
+
fixedDecimalScale: false,
|
|
596
|
+
onValueChange: (values)=>{
|
|
597
|
+
const numericValue = values.floatValue ?? null;
|
|
598
|
+
field.onChange({
|
|
599
|
+
...field.value ?? {
|
|
600
|
+
min: null,
|
|
601
|
+
max: null
|
|
602
|
+
},
|
|
603
|
+
min: numericValue
|
|
604
|
+
});
|
|
605
|
+
},
|
|
606
|
+
className: styleInput,
|
|
473
607
|
disabled: disabled
|
|
608
|
+
}), /*#__PURE__*/ React.createElement(NumericFormat, {
|
|
609
|
+
placeholder: "Máximo",
|
|
610
|
+
value: field.value?.max ?? "",
|
|
611
|
+
allowNegative: allowNegative ?? true,
|
|
612
|
+
allowLeadingZeros: false,
|
|
613
|
+
maxLength: undefined,
|
|
614
|
+
decimalSeparator: ",",
|
|
615
|
+
thousandSeparator: ".",
|
|
616
|
+
decimalScale: decimalScale ?? 8,
|
|
617
|
+
fixedDecimalScale: false,
|
|
618
|
+
onValueChange: (values)=>{
|
|
619
|
+
const numericValue = values.floatValue ?? null;
|
|
620
|
+
field.onChange({
|
|
621
|
+
...field.value ?? {
|
|
622
|
+
min: null,
|
|
623
|
+
max: null
|
|
624
|
+
},
|
|
625
|
+
max: numericValue
|
|
626
|
+
});
|
|
627
|
+
},
|
|
628
|
+
className: styleInput,
|
|
629
|
+
disabled: disabled
|
|
630
|
+
}));
|
|
631
|
+
}
|
|
632
|
+
case "multiselect":
|
|
633
|
+
{
|
|
634
|
+
const multiSelectOptions = items?.map((item)=>({
|
|
635
|
+
label: item,
|
|
636
|
+
value: item
|
|
637
|
+
})) || options?.map((opt)=>typeof opt === "string" ? {
|
|
638
|
+
label: opt,
|
|
639
|
+
value: opt
|
|
640
|
+
} : {
|
|
641
|
+
label: opt.label,
|
|
642
|
+
value: String(opt.value)
|
|
643
|
+
}) || [];
|
|
644
|
+
return /*#__PURE__*/ React.createElement(MultiSelect, {
|
|
645
|
+
options: multiSelectOptions,
|
|
646
|
+
onValueChange: field.onChange,
|
|
647
|
+
defaultValue: field.value,
|
|
648
|
+
value: field.value,
|
|
649
|
+
placeholder: placeholder,
|
|
650
|
+
variant: "default",
|
|
651
|
+
maxCount: multiSelectConfig?.maxCount,
|
|
652
|
+
subtle: multiSelectConfig?.subtle
|
|
474
653
|
});
|
|
475
654
|
}
|
|
476
655
|
default:
|
|
@@ -493,11 +672,11 @@ function FormLayout({ form, sections, onSubmit, onError, formId, title, descript
|
|
|
493
672
|
onSubmit: form.handleSubmit(onSubmit, onError),
|
|
494
673
|
id: formId,
|
|
495
674
|
ref: formRef,
|
|
496
|
-
className: "space-y-8
|
|
675
|
+
className: "relative space-y-8 px-1"
|
|
497
676
|
}, (title || description) && /*#__PURE__*/ React.createElement("div", {
|
|
498
|
-
className: "space-y-2
|
|
677
|
+
className: "mb-6 space-y-2"
|
|
499
678
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
500
|
-
className: "flex justify-between
|
|
679
|
+
className: "flex items-start justify-between"
|
|
501
680
|
}, /*#__PURE__*/ React.createElement("div", null, title && /*#__PURE__*/ React.createElement("h2", {
|
|
502
681
|
className: "text-xl font-semibold tracking-tight"
|
|
503
682
|
}, title), description && /*#__PURE__*/ React.createElement("p", {
|
|
@@ -521,7 +700,7 @@ function FormLayout({ form, sections, onSubmit, onError, formId, title, descript
|
|
|
521
700
|
form: form
|
|
522
701
|
}))))))) : /*#__PURE__*/ React.createElement("div", {
|
|
523
702
|
id: formId,
|
|
524
|
-
className: "space-y-8
|
|
703
|
+
className: "relative space-y-8 px-1"
|
|
525
704
|
}, sections.map((section, idx)=>/*#__PURE__*/ React.createElement("div", {
|
|
526
705
|
key: section.title ? `${section.title}-${idx}` : `section-${idx}`,
|
|
527
706
|
className: "space-y-4"
|