ivt 0.7.3 → 0.7.5
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 -15
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/accordion-table/index.mjs +26 -28
- package/dist/accordion-table/index.mjs.map +1 -1
- package/dist/alert/index.mjs +3 -3
- package/dist/alert-dialog/index.mjs +15 -17
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/aspect-ratio/index.mjs +42 -3
- package/dist/aspect-ratio/index.mjs.map +1 -1
- package/dist/auto-complete-multi-select/index.mjs +31 -33
- package/dist/auto-complete-multi-select/index.mjs.map +1 -1
- package/dist/avatar/index.mjs +130 -8
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +31 -9
- package/dist/base/index.mjs +79 -164
- 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.d.ts +3 -2
- package/dist/button-group/index.mjs +3 -4
- package/dist/button-group/index.mjs.map +1 -1
- 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 +2869 -1282
- package/dist/chart/index.mjs.map +1 -1
- package/dist/checkbox/index.mjs +12 -14
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/AutoComplete-BpwnFm_u.mjs +106 -0
- package/dist/chunks/AutoComplete-BpwnFm_u.mjs.map +1 -0
- package/dist/chunks/{CalendarRange-C6BJ_i8D.mjs → CalendarRange-BGP7p-ma.mjs} +8 -8
- package/dist/chunks/{CalendarRange-C6BJ_i8D.mjs.map → CalendarRange-BGP7p-ma.mjs.map} +1 -1
- package/dist/chunks/{ComboboxField-DFqOZmlN.mjs → ComboboxField-CzJlHHXv.mjs} +9 -9
- package/dist/chunks/{ComboboxField-DFqOZmlN.mjs.map → ComboboxField-CzJlHHXv.mjs.map} +1 -1
- package/dist/chunks/{Container-BFnURH_3.mjs → Container-77E_UFi2.mjs} +2 -2
- package/dist/chunks/{Container-BFnURH_3.mjs.map → Container-77E_UFi2.mjs.map} +1 -1
- package/dist/chunks/{DeleteConfirmationModal-3tgFcxyU.mjs → DeleteConfirmationModal-DQK05Srx.mjs} +4 -4
- package/dist/chunks/{DeleteConfirmationModal-3tgFcxyU.mjs.map → DeleteConfirmationModal-DQK05Srx.mjs.map} +1 -1
- package/dist/chunks/{ListItem-Dhdqegoz.mjs → ListItem-B0_5JcsU.mjs} +4 -4
- package/dist/chunks/{ListItem-Dhdqegoz.mjs.map → ListItem-B0_5JcsU.mjs.map} +1 -1
- package/dist/chunks/{TooltipIndicator-tYIvoK3x.mjs → TooltipIndicator-Db1poSJI.mjs} +4 -4
- package/dist/chunks/{TooltipIndicator-tYIvoK3x.mjs.map → TooltipIndicator-Db1poSJI.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-CDajFLDm.mjs → _commonjsHelpers-DkfSKqYE.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-DkfSKqYE.mjs.map +1 -0
- package/dist/chunks/{accordion-Dig0Vyew.mjs → accordion-DSn7k_RQ.mjs} +9 -11
- package/dist/chunks/{accordion-Dig0Vyew.mjs.map → accordion-DSn7k_RQ.mjs.map} +1 -1
- package/dist/chunks/{alert-CtNiMMMm.mjs → alert-aP6n7wtq.mjs} +2 -2
- package/dist/chunks/{alert-CtNiMMMm.mjs.map → alert-aP6n7wtq.mjs.map} +1 -1
- package/dist/chunks/{badge-CMepcgQ2.mjs → badge-CsUuqHNu.mjs} +2 -2
- package/dist/chunks/{badge-CMepcgQ2.mjs.map → badge-CsUuqHNu.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-ByJyReDu.mjs → bundle-mjs-BRbxNcQb.mjs} +228 -154
- package/dist/chunks/bundle-mjs-BRbxNcQb.mjs.map +1 -0
- package/dist/chunks/{button-DHQrVlqk.mjs → button-BW9I4XWU.mjs} +2 -2
- package/dist/chunks/{button-DHQrVlqk.mjs.map → button-BW9I4XWU.mjs.map} +1 -1
- package/dist/chunks/button-C8IZYeQz.d.ts +16 -0
- package/dist/chunks/{calendar-DtKpXGXO.mjs → calendar-C549VT55.mjs} +1181 -797
- package/dist/chunks/calendar-C549VT55.mjs.map +1 -0
- package/dist/chunks/{calendar-days-5V8H0_Qn.mjs → calendar-days-BSzlDBsi.mjs} +2 -2
- package/dist/chunks/{calendar-days-5V8H0_Qn.mjs.map → calendar-days-BSzlDBsi.mjs.map} +1 -1
- package/dist/chunks/{card-DgO3JDtX.mjs → card-Dqm2EuWU.mjs} +2 -2
- package/dist/chunks/{card-DgO3JDtX.mjs.map → card-Dqm2EuWU.mjs.map} +1 -1
- package/dist/chunks/{check-yo43z6YO.mjs → check-CKdwsuVA.mjs} +2 -2
- package/dist/chunks/{check-yo43z6YO.mjs.map → check-CKdwsuVA.mjs.map} +1 -1
- package/dist/chunks/{checkbox-B3xoUcaP.mjs → checkbox-CvaPsjy3.mjs} +9 -11
- package/dist/chunks/{checkbox-B3xoUcaP.mjs.map → checkbox-CvaPsjy3.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-gO34wzc7.mjs → chevron-down-o7NUBnJ4.mjs} +2 -2
- package/dist/chunks/{chevron-down-gO34wzc7.mjs.map → chevron-down-o7NUBnJ4.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-DGlHB7Nw.mjs → chevron-left-BZ8X7kLy.mjs} +2 -2
- package/dist/chunks/{chevron-left-DGlHB7Nw.mjs.map → chevron-left-BZ8X7kLy.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-B6bwFEdI.mjs → chevron-right-jAScR3zY.mjs} +2 -2
- package/dist/chunks/{chevron-right-B6bwFEdI.mjs.map → chevron-right-jAScR3zY.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-StzXyb6Z.mjs → chevrons-up-down-BSIPdamI.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-StzXyb6Z.mjs.map → chevrons-up-down-BSIPdamI.mjs.map} +1 -1
- package/dist/chunks/{command-BUHV178P.mjs → command-B29vdoVO.mjs} +8 -8
- package/dist/chunks/{command-BUHV178P.mjs.map → command-B29vdoVO.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-BrIj5xiA.mjs → createLucideIcon-CkP7424r.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-BrIj5xiA.mjs.map → createLucideIcon-CkP7424r.mjs.map} +1 -1
- package/dist/chunks/{date-re6oTh_O.mjs → date-Y_hKMQVr.mjs} +2 -2
- package/dist/chunks/{date-re6oTh_O.mjs.map → date-Y_hKMQVr.mjs.map} +1 -1
- package/dist/chunks/{dialog-CsH0QGEc.mjs → dialog-BhaHMQnG.mjs} +4 -4
- package/dist/chunks/{dialog-CsH0QGEc.mjs.map → dialog-BhaHMQnG.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-BED2L1d7.mjs → ellipsis-DHAz8TrI.mjs} +2 -2
- package/dist/chunks/{ellipsis-BED2L1d7.mjs.map → ellipsis-DHAz8TrI.mjs.map} +1 -1
- package/dist/chunks/{form-B4-N-eE1.mjs → form-BAxhKbgh.mjs} +299 -150
- package/dist/chunks/form-BAxhKbgh.mjs.map +1 -0
- package/dist/chunks/{format-C24_9AKp.mjs → format-CR4Q6BSq.mjs} +1 -1
- package/dist/chunks/{format-C24_9AKp.mjs.map → format-CR4Q6BSq.mjs.map} +1 -1
- package/dist/chunks/{format-numbers-CksgR7yb.mjs → format-numbers-CWj9Vf7x.mjs} +2 -6
- package/dist/chunks/format-numbers-CWj9Vf7x.mjs.map +1 -0
- package/dist/chunks/{hover-card-Dke495v-.mjs → hover-card-DVmQc78n.mjs} +9 -11
- package/dist/chunks/{hover-card-Dke495v-.mjs.map → hover-card-DVmQc78n.mjs.map} +1 -1
- package/dist/chunks/{index-DIkcxop-.mjs → index-4pJ77hyF.mjs} +1 -1
- package/dist/chunks/{index-DIkcxop-.mjs.map → index-4pJ77hyF.mjs.map} +1 -1
- package/dist/chunks/{index-BrOFvz7z.mjs → index-BN17NQCv.mjs} +1 -1
- package/dist/chunks/{index-BrOFvz7z.mjs.map → index-BN17NQCv.mjs.map} +1 -1
- package/dist/chunks/{index-DmwGzaYt.mjs → index-Bt1elORc.mjs} +9 -11
- package/dist/chunks/{index-DmwGzaYt.mjs.map → index-Bt1elORc.mjs.map} +1 -1
- package/dist/chunks/{index-DHpiwknP.mjs → index-CByz7d8q.mjs} +3 -3
- package/dist/chunks/{index-DHpiwknP.mjs.map → index-CByz7d8q.mjs.map} +1 -1
- package/dist/chunks/{index-BElPX9xn.mjs → index-CS2Lzoed.mjs} +7 -9
- package/dist/chunks/{index-BElPX9xn.mjs.map → index-CS2Lzoed.mjs.map} +1 -1
- package/dist/chunks/{index-C8cUOEOO.mjs → index-CVjOpozG.mjs} +38 -2
- package/dist/chunks/index-CVjOpozG.mjs.map +1 -0
- package/dist/chunks/{index-C-ZwjB4k.mjs → index-Cs9A0tpU.mjs} +1 -1
- package/dist/chunks/{index-C-ZwjB4k.mjs.map → index-Cs9A0tpU.mjs.map} +1 -1
- package/dist/chunks/{index-Bn9j4jd_.mjs → index-Ct610FOk.mjs} +2 -2
- package/dist/chunks/{index-Bn9j4jd_.mjs.map → index-Ct610FOk.mjs.map} +1 -1
- package/dist/chunks/{index-D7mBTwC1.mjs → index-CvVBB5ll.mjs} +4 -5
- package/dist/chunks/{index-D7mBTwC1.mjs.map → index-CvVBB5ll.mjs.map} +1 -1
- package/dist/chunks/{index-7SNyMh-j.mjs → index-D1CSAowX.mjs} +13 -15
- package/dist/chunks/{index-7SNyMh-j.mjs.map → index-D1CSAowX.mjs.map} +1 -1
- package/dist/chunks/{index-DmLyVVSA.mjs → index-D2DYiX9D.mjs} +2 -2
- package/dist/chunks/{index-DmLyVVSA.mjs.map → index-D2DYiX9D.mjs.map} +1 -1
- package/dist/chunks/{index-CFaMr67I.mjs → index-D8mA4n7w.mjs} +1 -1
- package/dist/chunks/{index-CFaMr67I.mjs.map → index-D8mA4n7w.mjs.map} +1 -1
- package/dist/chunks/{index-rXTYYoI9.mjs → index-DCDDoDjL.mjs} +6 -7
- package/dist/chunks/{index-rXTYYoI9.mjs.map → index-DCDDoDjL.mjs.map} +1 -1
- package/dist/chunks/{index-BKxnMSY9.mjs → index-DLqxy-dg.mjs} +12 -2
- package/dist/chunks/index-DLqxy-dg.mjs.map +1 -0
- package/dist/chunks/{index-DLAC_TU-.mjs → index-DNMhNzeD.mjs} +7 -9
- package/dist/chunks/{index-DLAC_TU-.mjs.map → index-DNMhNzeD.mjs.map} +1 -1
- package/dist/chunks/{index-BXScVxAr.mjs → index-DQD35Ges.mjs} +3 -3
- package/dist/chunks/{index-BXScVxAr.mjs.map → index-DQD35Ges.mjs.map} +1 -1
- package/dist/chunks/{index-DjiiXdCh.mjs → index-D_Q4NGnO.mjs} +1 -1
- package/dist/chunks/{index-DjiiXdCh.mjs.map → index-D_Q4NGnO.mjs.map} +1 -1
- package/dist/chunks/{index-BP00_xoF.mjs → index-D_e6adwb.mjs} +12 -5
- package/dist/chunks/index-D_e6adwb.mjs.map +1 -0
- package/dist/chunks/{index-B8RPmvRI.mjs → index-DhI6OG_H.mjs} +2 -2
- package/dist/chunks/{index-B8RPmvRI.mjs.map → index-DhI6OG_H.mjs.map} +1 -1
- package/dist/chunks/{index-DY9hLs8O.mjs → index-Dp_0m03a.mjs} +2 -2
- package/dist/chunks/{index-DY9hLs8O.mjs.map → index-Dp_0m03a.mjs.map} +1 -1
- package/dist/chunks/{index-VN9qcZ4P.mjs → index-oX_tk439.mjs} +1 -1
- package/dist/chunks/{index-VN9qcZ4P.mjs.map → index-oX_tk439.mjs.map} +1 -1
- package/dist/chunks/index.module-Df4mRjmZ.mjs +73 -0
- package/dist/chunks/index.module-Df4mRjmZ.mjs.map +1 -0
- package/dist/chunks/{input-Beaky41D.mjs → input-YpoAHnXb.mjs} +2 -2
- package/dist/chunks/{input-Beaky41D.mjs.map → input-YpoAHnXb.mjs.map} +1 -1
- package/dist/chunks/input-otp-BKqdZwNx.mjs +455 -0
- package/dist/chunks/input-otp-BKqdZwNx.mjs.map +1 -0
- package/dist/chunks/{label-n_pPs58q.mjs → label-D5s6d0et.mjs} +44 -3
- package/dist/chunks/label-D5s6d0et.mjs.map +1 -0
- package/dist/chunks/{loader-circle-CEDL1CbD.mjs → loader-circle-C7StEOZI.mjs} +2 -2
- package/dist/chunks/{loader-circle-CEDL1CbD.mjs.map → loader-circle-C7StEOZI.mjs.map} +1 -1
- package/dist/chunks/{menubar-C8VLP8-v.mjs → menubar-ySifmjAG.mjs} +11 -13
- package/dist/chunks/{menubar-C8VLP8-v.mjs.map → menubar-ySifmjAG.mjs.map} +1 -1
- package/dist/chunks/{multi-select-fLsOx7-e.mjs → multi-select-BsnRMfg7.mjs} +13 -13
- package/dist/chunks/{multi-select-fLsOx7-e.mjs.map → multi-select-BsnRMfg7.mjs.map} +1 -1
- package/dist/chunks/{pagination-iwqbmQ5Q.mjs → pagination-CV6N_Qu_.mjs} +6 -6
- package/dist/chunks/{pagination-iwqbmQ5Q.mjs.map → pagination-CV6N_Qu_.mjs.map} +1 -1
- package/dist/chunks/{popover-Cpht2GgQ.mjs → popover-D3JC54Y3.mjs} +11 -13
- package/dist/chunks/{popover-Cpht2GgQ.mjs.map → popover-D3JC54Y3.mjs.map} +1 -1
- package/dist/chunks/progress-D_Enl4tV.mjs +223 -0
- package/dist/chunks/progress-D_Enl4tV.mjs.map +1 -0
- package/dist/chunks/radio-group-yF1QEewC.mjs +258 -0
- package/dist/chunks/radio-group-yF1QEewC.mjs.map +1 -0
- package/dist/chunks/{react-number-format.es-CcgVtYyo.mjs → react-number-format.es-C3uDZhRo.mjs} +1 -1
- package/dist/chunks/{react-number-format.es-CcgVtYyo.mjs.map → react-number-format.es-C3uDZhRo.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-DuO1U-ha.mjs → scroll-area-CdGRe--S.mjs} +9 -11
- package/dist/chunks/{scroll-area-DuO1U-ha.mjs.map → scroll-area-CdGRe--S.mjs.map} +1 -1
- package/dist/chunks/{select-D5DzfQ8s.mjs → select-B8JYuJE5.mjs} +5 -5
- package/dist/chunks/{select-D5DzfQ8s.mjs.map → select-B8JYuJE5.mjs.map} +1 -1
- package/dist/chunks/{separator-DHnqygnd.mjs → separator-sWF5eZgM.mjs} +44 -3
- package/dist/chunks/separator-sWF5eZgM.mjs.map +1 -0
- package/dist/chunks/{sheet-CXvwS4r9.mjs → sheet-D-4XWzUo.mjs} +4 -4
- package/dist/chunks/{sheet-CXvwS4r9.mjs.map → sheet-D-4XWzUo.mjs.map} +1 -1
- package/dist/chunks/{skeleton-CuuvHTlE.mjs → skeleton-CQlSHSfr.mjs} +2 -2
- package/dist/chunks/{skeleton-CuuvHTlE.mjs.map → skeleton-CQlSHSfr.mjs.map} +1 -1
- package/dist/chunks/slider-CaliGouI.mjs +588 -0
- package/dist/chunks/slider-CaliGouI.mjs.map +1 -0
- package/dist/chunks/{sortable-Dc-PXgOX.mjs → sortable-BoTUMXD0.mjs} +3 -3
- package/dist/chunks/{sortable-Dc-PXgOX.mjs.map → sortable-BoTUMXD0.mjs.map} +1 -1
- package/dist/chunks/styles-C5sFcbz4.mjs +6 -0
- package/dist/chunks/styles-C5sFcbz4.mjs.map +1 -0
- package/dist/chunks/switch-szutUcvb.mjs +138 -0
- package/dist/chunks/switch-szutUcvb.mjs.map +1 -0
- package/dist/chunks/{table-CsRWNDTp.mjs → table-wwce3IsC.mjs} +2 -2
- package/dist/chunks/{table-CsRWNDTp.mjs.map → table-wwce3IsC.mjs.map} +1 -1
- package/dist/chunks/{tabs-Bw6ByWDS.mjs → tabs-BDPMoWeJ.mjs} +9 -10
- package/dist/chunks/{tabs-Bw6ByWDS.mjs.map → tabs-BDPMoWeJ.mjs.map} +1 -1
- package/dist/chunks/{textarea-C7CkvJ9p.mjs → textarea-DYBOxg35.mjs} +2 -2
- package/dist/chunks/{textarea-C7CkvJ9p.mjs.map → textarea-DYBOxg35.mjs.map} +1 -1
- package/dist/chunks/toast-S15TT7Q2.mjs +702 -0
- package/dist/chunks/toast-S15TT7Q2.mjs.map +1 -0
- package/dist/chunks/{toggle-BRsNuICy.mjs → toggle-GXtKRhvr.mjs} +4 -5
- package/dist/chunks/{toggle-BRsNuICy.mjs.map → toggle-GXtKRhvr.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DXG_UtcS.mjs → tooltip-z43eMlPO.mjs} +11 -13
- package/dist/chunks/{tooltip-DXG_UtcS.mjs.map → tooltip-z43eMlPO.mjs.map} +1 -1
- package/dist/chunks/{trash-2-DSHxuneu.mjs → trash-2-CZE_1bXY.mjs} +2 -2
- package/dist/chunks/{trash-2-DSHxuneu.mjs.map → trash-2-CZE_1bXY.mjs.map} +1 -1
- package/dist/chunks/{triangle-alert-8sDAvjNW.mjs → triangle-alert-BeczCtiG.mjs} +2 -2
- package/dist/chunks/{triangle-alert-8sDAvjNW.mjs.map → triangle-alert-BeczCtiG.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-WVUvgLYj.mjs → tslib.es6-B20VGjW7.mjs} +1 -1
- package/dist/chunks/{tslib.es6-WVUvgLYj.mjs.map → tslib.es6-B20VGjW7.mjs.map} +1 -1
- package/dist/chunks/use-toast-C3gJQZ0s.mjs +137 -0
- package/dist/chunks/use-toast-C3gJQZ0s.mjs.map +1 -0
- package/dist/chunks/{utils-BqIRZT53.mjs → utils-uOfHPBdi.mjs} +2 -2
- package/dist/chunks/{utils-BqIRZT53.mjs.map → utils-uOfHPBdi.mjs.map} +1 -1
- package/dist/chunks/{wand-sparkles-BjK8VloB.mjs → wand-sparkles-COk3z6HL.mjs} +2 -2
- package/dist/chunks/{wand-sparkles-BjK8VloB.mjs.map → wand-sparkles-COk3z6HL.mjs.map} +1 -1
- package/dist/chunks/{x-D7oIZ9hK.mjs → x-D5HL_X5m.mjs} +2 -2
- package/dist/chunks/{x-D7oIZ9hK.mjs.map → x-D5HL_X5m.mjs.map} +1 -1
- package/dist/collapsible/index.mjs +8 -10
- package/dist/collapsible/index.mjs.map +1 -1
- package/dist/combobox/index.mjs +25 -27
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.d.ts +7 -7
- package/dist/command/index.mjs +19 -21
- package/dist/command/index.mjs.map +1 -1
- package/dist/context-menu/index.mjs +21 -23
- package/dist/context-menu/index.mjs.map +1 -1
- package/dist/dash/index.mjs +25 -26
- package/dist/dash/index.mjs.map +1 -1
- package/dist/data-table/index.mjs +33 -35
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/date-picker/index.d.ts +22 -7
- package/dist/date-picker/index.mjs +26 -28
- package/dist/date-picker/index.mjs.map +1 -1
- package/dist/dialog/index.mjs +18 -20
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/drawer/index.mjs +15 -17
- package/dist/drawer/index.mjs.map +1 -1
- package/dist/dropdown-menu/index.mjs +21 -23
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +19 -133
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/editable-table/index.mjs +18 -20
- package/dist/editable-table/index.mjs.map +1 -1
- package/dist/empty/index.mjs +2 -2
- package/dist/field/index.d.ts +3 -2
- package/dist/field/index.mjs +4 -5
- package/dist/field/index.mjs.map +1 -1
- package/dist/form/index.mjs +4 -5
- package/dist/form/index.mjs.map +1 -1
- package/dist/form-fields/index.mjs +27 -29
- package/dist/form-fields/index.mjs.map +1 -1
- package/dist/form-layout/index.d.ts +86 -0
- package/dist/form-layout/index.mjs +535 -0
- package/dist/form-layout/index.mjs.map +1 -0
- package/dist/hover-card/index.mjs +14 -16
- package/dist/hover-card/index.mjs.map +1 -1
- 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.d.ts +1 -1
- package/dist/input-group/index.mjs +5 -5
- package/dist/input-otp/index.mjs +5 -455
- package/dist/input-otp/index.mjs.map +1 -1
- package/dist/item/index.d.ts +4 -2
- package/dist/item/index.mjs +3 -4
- package/dist/item/index.mjs.map +1 -1
- package/dist/kbd/index.mjs +2 -2
- package/dist/label/index.mjs +3 -4
- package/dist/label/index.mjs.map +1 -1
- package/dist/layout/index.mjs +22 -24
- package/dist/layout/index.mjs.map +1 -1
- package/dist/menubar/index.mjs +22 -24
- package/dist/menubar/index.mjs.map +1 -1
- package/dist/multi-input-list/index.mjs +28 -30
- package/dist/multi-input-list/index.mjs.map +1 -1
- package/dist/multi-select/index.mjs +32 -34
- package/dist/multi-select/index.mjs.map +1 -1
- package/dist/navigation-menu/index.mjs +15 -17
- package/dist/navigation-menu/index.mjs.map +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/pagination/index.mjs +8 -8
- package/dist/popover/index.mjs +17 -19
- package/dist/popover/index.mjs.map +1 -1
- package/dist/progress/index.mjs +3 -5
- package/dist/progress/index.mjs.map +1 -1
- package/dist/radio-group/index.mjs +18 -264
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/resizable/index.mjs +3 -3
- package/dist/scroll-area/index.mjs +10 -12
- package/dist/scroll-area/index.mjs.map +1 -1
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +3 -4
- package/dist/separator/index.mjs.map +1 -1
- package/dist/shared/index.d.ts +13 -3
- package/dist/shared/index.mjs +6 -6
- package/dist/shared/index.mjs.map +1 -1
- package/dist/sheet/index.d.ts +7 -7
- package/dist/sheet/index.mjs +18 -20
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/sidebar/index.d.ts +17 -4
- package/dist/sidebar/index.mjs +26 -28
- package/dist/sidebar/index.mjs.map +1 -1
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/slider/index.mjs +14 -591
- package/dist/slider/index.mjs.map +1 -1
- package/dist/sortable/index.d.ts +12 -3
- package/dist/sortable/index.mjs +4 -4
- package/dist/spinner/index.mjs +4 -4
- package/dist/switch/index.mjs +11 -141
- package/dist/switch/index.mjs.map +1 -1
- package/dist/table/index.mjs +3 -3
- package/dist/table-filter/index.d.ts +8 -3
- package/dist/table-filter/index.mjs +53 -54
- package/dist/table-filter/index.mjs.map +1 -1
- package/dist/tabs/index.mjs +14 -16
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.mjs +3 -3
- package/dist/toast/index.mjs +19 -705
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toaster/index.d.ts +5 -0
- package/dist/toaster/index.mjs +34 -0
- package/dist/toaster/index.mjs.map +1 -0
- package/dist/toggle/index.mjs +6 -7
- package/dist/toggle/index.mjs.map +1 -1
- package/dist/toggle-group/index.mjs +11 -13
- package/dist/toggle-group/index.mjs.map +1 -1
- package/dist/tooltip/index.mjs +16 -18
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +10 -2
- package/dist/chunks/_commonjsHelpers-CDajFLDm.mjs.map +0 -1
- package/dist/chunks/bundle-mjs-ByJyReDu.mjs.map +0 -1
- package/dist/chunks/calendar-DtKpXGXO.mjs.map +0 -1
- package/dist/chunks/form-B4-N-eE1.mjs.map +0 -1
- package/dist/chunks/format-numbers-CksgR7yb.mjs.map +0 -1
- package/dist/chunks/index-5s6ltgHF.mjs +0 -40
- package/dist/chunks/index-5s6ltgHF.mjs.map +0 -1
- package/dist/chunks/index-BKxnMSY9.mjs.map +0 -1
- package/dist/chunks/index-BP00_xoF.mjs.map +0 -1
- package/dist/chunks/index-C8cUOEOO.mjs.map +0 -1
- package/dist/chunks/index-DUoETH03.mjs +0 -12
- package/dist/chunks/index-DUoETH03.mjs.map +0 -1
- package/dist/chunks/index.module-acmtZqFz.mjs +0 -68
- package/dist/chunks/index.module-acmtZqFz.mjs.map +0 -1
- package/dist/chunks/label-n_pPs58q.mjs.map +0 -1
- package/dist/chunks/progress-CZnyHYXZ.mjs +0 -99
- package/dist/chunks/progress-CZnyHYXZ.mjs.map +0 -1
- package/dist/chunks/separator-DHnqygnd.mjs.map +0 -1
- package/dist/icon.svg +0 -7
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -1
- package/dist/ivt.css +0 -1
- package/dist/ivt.png +0 -0
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useId, useState, useEffect } from 'react';
|
|
3
|
+
import { P as PatternFormat, N as NumericFormat } from '../chunks/react-number-format.es-C3uDZhRo.mjs';
|
|
4
|
+
import { c as cn } from '../chunks/utils-uOfHPBdi.mjs';
|
|
5
|
+
import { f as formatDateToBrazilian, p as ptBR } from '../chunks/date-Y_hKMQVr.mjs';
|
|
6
|
+
import { f as formatMoney } from '../chunks/format-numbers-CWj9Vf7x.mjs';
|
|
7
|
+
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-BAxhKbgh.mjs';
|
|
8
|
+
import { T as Toggle } from '../chunks/toggle-GXtKRhvr.mjs';
|
|
9
|
+
import { I as InputOTP, a as InputOTPGroup, b as InputOTPSlot } from '../chunks/input-otp-BKqdZwNx.mjs';
|
|
10
|
+
import { S as Slider } from '../chunks/slider-CaliGouI.mjs';
|
|
11
|
+
import { R as RadioGroup, a as RadioGroupItem } from '../chunks/radio-group-yF1QEewC.mjs';
|
|
12
|
+
import { S as Switch } from '../chunks/switch-szutUcvb.mjs';
|
|
13
|
+
import { c as createLucideIcon } from '../chunks/createLucideIcon-CkP7424r.mjs';
|
|
14
|
+
import { A as AutoComplete } from '../chunks/AutoComplete-BpwnFm_u.mjs';
|
|
15
|
+
import { L as ListItem } from '../chunks/ListItem-B0_5JcsU.mjs';
|
|
16
|
+
import { C as Checkbox } from '../chunks/checkbox-CvaPsjy3.mjs';
|
|
17
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-D3JC54Y3.mjs';
|
|
18
|
+
import { B as Button } from '../chunks/button-BW9I4XWU.mjs';
|
|
19
|
+
import { f as format } from '../chunks/format-CR4Q6BSq.mjs';
|
|
20
|
+
import { C as Calendar$1 } from '../chunks/calendar-C549VT55.mjs';
|
|
21
|
+
import { S as Select, h as SelectTrigger, i as SelectValue, a as SelectContent, c as SelectItem } from '../chunks/select-B8JYuJE5.mjs';
|
|
22
|
+
import { I as Input } from '../chunks/input-YpoAHnXb.mjs';
|
|
23
|
+
import { S as Separator } from '../chunks/separator-sWF5eZgM.mjs';
|
|
24
|
+
import '../chunks/bundle-mjs-BRbxNcQb.mjs';
|
|
25
|
+
import '@radix-ui/react-slot';
|
|
26
|
+
import '../chunks/label-D5s6d0et.mjs';
|
|
27
|
+
import 'react-dom';
|
|
28
|
+
import 'react/jsx-runtime';
|
|
29
|
+
import '../chunks/index-DLqxy-dg.mjs';
|
|
30
|
+
import '../chunks/index-D2DYiX9D.mjs';
|
|
31
|
+
import '../chunks/index-4pJ77hyF.mjs';
|
|
32
|
+
import 'class-variance-authority';
|
|
33
|
+
import '../chunks/index-oX_tk439.mjs';
|
|
34
|
+
import '../chunks/index-CVjOpozG.mjs';
|
|
35
|
+
import '../chunks/index-D_Q4NGnO.mjs';
|
|
36
|
+
import '../chunks/index-D8mA4n7w.mjs';
|
|
37
|
+
import '../chunks/index-DhI6OG_H.mjs';
|
|
38
|
+
import '@radix-ui/react-collection';
|
|
39
|
+
import '../chunks/index-CS2Lzoed.mjs';
|
|
40
|
+
import '../chunks/index-Dp_0m03a.mjs';
|
|
41
|
+
import '../chunks/index-Cs9A0tpU.mjs';
|
|
42
|
+
import '../chunks/index-CByz7d8q.mjs';
|
|
43
|
+
import '../chunks/check-CKdwsuVA.mjs';
|
|
44
|
+
import '../chunks/index.module-Df4mRjmZ.mjs';
|
|
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';
|
|
62
|
+
import '@radix-ui/react-select';
|
|
63
|
+
|
|
64
|
+
const __iconNode = [
|
|
65
|
+
[
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
d: "M8 2v4",
|
|
69
|
+
key: "1cmpym"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
[
|
|
73
|
+
"path",
|
|
74
|
+
{
|
|
75
|
+
d: "M16 2v4",
|
|
76
|
+
key: "4m81vk"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
"rect",
|
|
81
|
+
{
|
|
82
|
+
width: "18",
|
|
83
|
+
height: "18",
|
|
84
|
+
x: "3",
|
|
85
|
+
y: "4",
|
|
86
|
+
rx: "2",
|
|
87
|
+
key: "1hopcy"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
"path",
|
|
92
|
+
{
|
|
93
|
+
d: "M3 10h18",
|
|
94
|
+
key: "8toen8"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
];
|
|
98
|
+
const Calendar = createLucideIcon("Calendar", __iconNode);
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Formata uma data para o padrão brasileiro (dd/MM/yyyy)
|
|
102
|
+
* @param date Data a ser formatada (Date, string ou undefined)
|
|
103
|
+
* @returns String formatada ou undefined se não houver valor
|
|
104
|
+
*/ function formatDate(date) {
|
|
105
|
+
if (!date) return undefined;
|
|
106
|
+
return formatDateToBrazilian(date);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Formata um CNPJ no padrão brasileiro (##.###.###/####-##)
|
|
110
|
+
* @param cnpj CNPJ a ser formatado (string com ou sem formatação)
|
|
111
|
+
* @returns String formatada ou undefined se não houver valor
|
|
112
|
+
*/ function formatCNPJ(cnpj) {
|
|
113
|
+
if (!cnpj) return undefined;
|
|
114
|
+
// Remove caracteres não numéricos
|
|
115
|
+
const cleaned = cnpj.replace(/\D/g, "");
|
|
116
|
+
// Verifica se tem 14 dígitos
|
|
117
|
+
if (cleaned.length !== 14) {
|
|
118
|
+
// Se não tiver 14 dígitos, retorna o valor original
|
|
119
|
+
return cnpj;
|
|
120
|
+
}
|
|
121
|
+
// Formata: ##.###.###/####-##
|
|
122
|
+
return `${cleaned.slice(0, 2)}.${cleaned.slice(2, 5)}.${cleaned.slice(5, 8)}/${cleaned.slice(8, 12)}-${cleaned.slice(12, 14)}`;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Formata um valor numérico como moeda brasileira (R$)
|
|
126
|
+
* @param value Valor numérico a ser formatado
|
|
127
|
+
* @returns String formatada ou undefined se não houver valor
|
|
128
|
+
*/ function formatCurrency(value) {
|
|
129
|
+
if (value === null || value === undefined) return undefined;
|
|
130
|
+
return formatMoney({
|
|
131
|
+
value,
|
|
132
|
+
currency: "BRL",
|
|
133
|
+
minimumFractionDigits: 2,
|
|
134
|
+
maximumFractionDigits: 2
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function AutocompleteFieldWrapper({ field, form, autocompleteConfig, placeholder, disabled }) {
|
|
139
|
+
const [open, setOpen] = useState(false);
|
|
140
|
+
// biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
141
|
+
const [selectedOption, setSelectedOption] = useState(null);
|
|
142
|
+
const getOptionLabel = autocompleteConfig.getOptionLabel || // biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
143
|
+
((option)=>option.label || String(option.id));
|
|
144
|
+
const getOptionKey = autocompleteConfig.getOptionKey || // biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
145
|
+
((option)=>option.id);
|
|
146
|
+
const getOptionValue = autocompleteConfig.getOptionValue || // biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
147
|
+
((option)=>option.id);
|
|
148
|
+
useEffect(()=>{
|
|
149
|
+
if (field.value && autocompleteConfig.fetchOptions) {
|
|
150
|
+
const searchTerm = typeof field.value === "string" ? field.value : "";
|
|
151
|
+
autocompleteConfig.fetchOptions(searchTerm).then((options)=>{
|
|
152
|
+
let found = options.find((opt)=>getOptionValue(opt) === field.value);
|
|
153
|
+
if (!found && typeof field.value === "string") {
|
|
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") {
|
|
160
|
+
found = options.find((opt)=>getOptionKey(opt) === field.value);
|
|
161
|
+
}
|
|
162
|
+
if (found) {
|
|
163
|
+
setSelectedOption(found);
|
|
164
|
+
} else {
|
|
165
|
+
setSelectedOption(null);
|
|
166
|
+
}
|
|
167
|
+
}).catch(()=>{
|
|
168
|
+
setSelectedOption(null);
|
|
169
|
+
});
|
|
170
|
+
} else {
|
|
171
|
+
setSelectedOption(null);
|
|
172
|
+
}
|
|
173
|
+
}, [
|
|
174
|
+
field.value,
|
|
175
|
+
autocompleteConfig.fetchOptions,
|
|
176
|
+
getOptionValue,
|
|
177
|
+
getOptionLabel,
|
|
178
|
+
getOptionKey
|
|
179
|
+
]);
|
|
180
|
+
return /*#__PURE__*/ React.createElement(AutoComplete, {
|
|
181
|
+
value: selectedOption,
|
|
182
|
+
// biome-ignore lint/suspicious/noExplicitAny: autocomplete option type
|
|
183
|
+
onChange: (option)=>{
|
|
184
|
+
const value = option ? getOptionValue(option) : null;
|
|
185
|
+
field.onChange(value);
|
|
186
|
+
setSelectedOption(option);
|
|
187
|
+
if (option && autocompleteConfig.onChangeCallback) {
|
|
188
|
+
autocompleteConfig.onChangeCallback(option, form);
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
placeholder: placeholder || "Digite para buscar...",
|
|
192
|
+
searchPlaceholder: autocompleteConfig.searchPlaceholder || "Buscar...",
|
|
193
|
+
open: open,
|
|
194
|
+
onOpenChange: setOpen,
|
|
195
|
+
fetchOptions: autocompleteConfig.fetchOptions,
|
|
196
|
+
disabled: disabled,
|
|
197
|
+
messageEmpty: autocompleteConfig.messageEmpty || "Nenhum resultado encontrado...",
|
|
198
|
+
getOptionLabel: getOptionLabel,
|
|
199
|
+
getOptionKey: getOptionKey,
|
|
200
|
+
clearable: autocompleteConfig.clearable ?? false,
|
|
201
|
+
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function BaseFormField({ config, control, readOnly = false, form }) {
|
|
205
|
+
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;
|
|
207
|
+
const formatReadOnlyValue = (value, fieldType)=>{
|
|
208
|
+
if (value === null || value === undefined || value === "") {
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
+
switch(fieldType){
|
|
212
|
+
case "date":
|
|
213
|
+
return formatDate(value);
|
|
214
|
+
case "currency":
|
|
215
|
+
return formatCurrency(value);
|
|
216
|
+
case "number":
|
|
217
|
+
return typeof value === "number" ? value.toLocaleString("pt-BR", {
|
|
218
|
+
minimumFractionDigits: decimalScale ?? 0,
|
|
219
|
+
maximumFractionDigits: decimalScale ?? 7
|
|
220
|
+
}) : String(value);
|
|
221
|
+
case "pattern":
|
|
222
|
+
if (patternFormat && typeof value === "string") {
|
|
223
|
+
if (patternFormat.includes("##.###.###/####-##")) {
|
|
224
|
+
return formatCNPJ(value);
|
|
225
|
+
}
|
|
226
|
+
return value;
|
|
227
|
+
}
|
|
228
|
+
return String(value);
|
|
229
|
+
case "select":
|
|
230
|
+
if (options && options.length > 0) {
|
|
231
|
+
const option = options.find((opt)=>{
|
|
232
|
+
const optValue = typeof opt === "object" ? opt.value : opt;
|
|
233
|
+
return String(optValue) === String(value);
|
|
234
|
+
});
|
|
235
|
+
if (option) {
|
|
236
|
+
return typeof option === "object" ? option.label : option;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return String(value);
|
|
240
|
+
case "checkbox":
|
|
241
|
+
case "switch":
|
|
242
|
+
case "toggle":
|
|
243
|
+
return value ? "Sim" : "Não";
|
|
244
|
+
case "radio":
|
|
245
|
+
if (radioOptions) {
|
|
246
|
+
const option = radioOptions.find((opt)=>String(opt.value) === String(value));
|
|
247
|
+
return option ? option.label : String(value);
|
|
248
|
+
}
|
|
249
|
+
return String(value);
|
|
250
|
+
case "slider":
|
|
251
|
+
return typeof value === "number" ? String(value) : undefined;
|
|
252
|
+
default:
|
|
253
|
+
return String(value);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
if (readOnly) {
|
|
257
|
+
return /*#__PURE__*/ React.createElement(FormField, {
|
|
258
|
+
control: control,
|
|
259
|
+
name: name,
|
|
260
|
+
// biome-ignore lint/suspicious/noExplicitAny: react-hook-form field type
|
|
261
|
+
render: ({ field })=>/*#__PURE__*/ React.createElement(ListItem, {
|
|
262
|
+
title: label,
|
|
263
|
+
value: formatReadOnlyValue(field.value, type)
|
|
264
|
+
})
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return /*#__PURE__*/ React.createElement(FormField, {
|
|
268
|
+
control: control,
|
|
269
|
+
name: name,
|
|
270
|
+
// biome-ignore lint/suspicious/noExplicitAny: react-hook-form field type
|
|
271
|
+
render: ({ field })=>{
|
|
272
|
+
if (customRender && form) {
|
|
273
|
+
return /*#__PURE__*/ React.createElement(FormItem, {
|
|
274
|
+
className: type === "checkbox" ? "flex flex-row items-start space-x-3 space-y-0 rounded-md border p-4" : ""
|
|
275
|
+
}, type !== "checkbox" && type !== "switch" && /*#__PURE__*/ React.createElement(FormLabel, null, label, " ", required && /*#__PURE__*/ React.createElement("span", {
|
|
276
|
+
className: "text-destructive"
|
|
277
|
+
}, "*")), /*#__PURE__*/ React.createElement(FormControl, null, customRender({
|
|
278
|
+
field,
|
|
279
|
+
form
|
|
280
|
+
})), type !== "checkbox" && description && /*#__PURE__*/ React.createElement(FormDescription, null, description), /*#__PURE__*/ React.createElement(FormMessage, null));
|
|
281
|
+
}
|
|
282
|
+
return /*#__PURE__*/ React.createElement(FormItem, {
|
|
283
|
+
className: type === "checkbox" ? "flex flex-row items-start space-x-3 space-y-0 rounded-md border p-4" : ""
|
|
284
|
+
}, type !== "checkbox" && type !== "switch" && /*#__PURE__*/ React.createElement(FormLabel, null, label, " ", required && /*#__PURE__*/ React.createElement("span", {
|
|
285
|
+
className: "text-destructive"
|
|
286
|
+
}, "*")), /*#__PURE__*/ React.createElement(FormControl, null, (()=>{
|
|
287
|
+
switch(type){
|
|
288
|
+
case "text":
|
|
289
|
+
case "email":
|
|
290
|
+
case "url":
|
|
291
|
+
case "tel":
|
|
292
|
+
return /*#__PURE__*/ React.createElement(Input, {
|
|
293
|
+
...field,
|
|
294
|
+
type: type,
|
|
295
|
+
placeholder: placeholder,
|
|
296
|
+
disabled: disabled,
|
|
297
|
+
value: field.value || ""
|
|
298
|
+
});
|
|
299
|
+
case "textarea":
|
|
300
|
+
return /*#__PURE__*/ React.createElement("textarea", {
|
|
301
|
+
className: "flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
302
|
+
...field,
|
|
303
|
+
placeholder: placeholder,
|
|
304
|
+
disabled: disabled,
|
|
305
|
+
value: field.value || ""
|
|
306
|
+
});
|
|
307
|
+
case "number":
|
|
308
|
+
return /*#__PURE__*/ React.createElement(NumericFormat, {
|
|
309
|
+
customInput: Input,
|
|
310
|
+
decimalSeparator: ",",
|
|
311
|
+
thousandSeparator: ".",
|
|
312
|
+
decimalScale: decimalScale ?? 7,
|
|
313
|
+
value: field.value ?? "",
|
|
314
|
+
onValueChange: (values)=>field.onChange(values.floatValue),
|
|
315
|
+
placeholder: placeholder,
|
|
316
|
+
disabled: disabled
|
|
317
|
+
});
|
|
318
|
+
case "currency":
|
|
319
|
+
return /*#__PURE__*/ React.createElement(NumericFormat, {
|
|
320
|
+
customInput: Input,
|
|
321
|
+
decimalSeparator: ",",
|
|
322
|
+
thousandSeparator: ".",
|
|
323
|
+
decimalScale: decimalScale ?? 2,
|
|
324
|
+
value: field.value ?? "",
|
|
325
|
+
onValueChange: (values)=>field.onChange(values.floatValue),
|
|
326
|
+
placeholder: placeholder,
|
|
327
|
+
disabled: disabled,
|
|
328
|
+
prefix: prefix ?? "R$ "
|
|
329
|
+
});
|
|
330
|
+
case "pattern":
|
|
331
|
+
return /*#__PURE__*/ React.createElement(PatternFormat, {
|
|
332
|
+
customInput: Input,
|
|
333
|
+
format: patternFormat || "",
|
|
334
|
+
mask: mask || "_",
|
|
335
|
+
placeholder: placeholder,
|
|
336
|
+
disabled: disabled,
|
|
337
|
+
value: field.value || "",
|
|
338
|
+
onValueChange: (values)=>{
|
|
339
|
+
field.onChange(values.value);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
case "select":
|
|
343
|
+
{
|
|
344
|
+
const selectValue = String(field.value || "");
|
|
345
|
+
return /*#__PURE__*/ React.createElement(Select, {
|
|
346
|
+
onValueChange: field.onChange,
|
|
347
|
+
value: selectValue,
|
|
348
|
+
disabled: disabled
|
|
349
|
+
}, /*#__PURE__*/ React.createElement(FormControl, null, /*#__PURE__*/ React.createElement(SelectTrigger, {
|
|
350
|
+
className: "w-full"
|
|
351
|
+
}, /*#__PURE__*/ React.createElement(SelectValue, {
|
|
352
|
+
placeholder: placeholder || "Selecione"
|
|
353
|
+
}))), /*#__PURE__*/ React.createElement(SelectContent, {
|
|
354
|
+
className: "max-h-[300px] overflow-y-auto overflow-x-hidden"
|
|
355
|
+
}, options?.map((opt)=>{
|
|
356
|
+
const val = typeof opt === "object" ? String(opt.value) : opt;
|
|
357
|
+
const lab = typeof opt === "object" ? opt.label : opt;
|
|
358
|
+
return /*#__PURE__*/ React.createElement(SelectItem, {
|
|
359
|
+
key: val,
|
|
360
|
+
value: val
|
|
361
|
+
}, lab);
|
|
362
|
+
})));
|
|
363
|
+
}
|
|
364
|
+
case "date":
|
|
365
|
+
return /*#__PURE__*/ React.createElement(Popover, null, /*#__PURE__*/ React.createElement(PopoverTrigger, {
|
|
366
|
+
asChild: true
|
|
367
|
+
}, /*#__PURE__*/ React.createElement(Button, {
|
|
368
|
+
variant: "outline",
|
|
369
|
+
disabled: disabled,
|
|
370
|
+
className: cn("w-full justify-start text-left font-normal", !field.value && "text-muted-foreground")
|
|
371
|
+
}, /*#__PURE__*/ React.createElement(Calendar, {
|
|
372
|
+
className: "mr-2 h-4 w-4"
|
|
373
|
+
}), field.value ? format(new Date(field.value), "dd/MM/yyyy", {
|
|
374
|
+
locale: ptBR
|
|
375
|
+
}) : /*#__PURE__*/ React.createElement("span", null, placeholder || "Selecione"))), /*#__PURE__*/ React.createElement(PopoverContent, {
|
|
376
|
+
className: "w-auto p-0",
|
|
377
|
+
align: "start"
|
|
378
|
+
}, /*#__PURE__*/ React.createElement(Calendar$1, {
|
|
379
|
+
mode: "single",
|
|
380
|
+
selected: field.value ? new Date(field.value) : undefined,
|
|
381
|
+
onSelect: field.onChange,
|
|
382
|
+
locale: ptBR
|
|
383
|
+
})));
|
|
384
|
+
case "checkbox":
|
|
385
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Checkbox, {
|
|
386
|
+
checked: !!field.value,
|
|
387
|
+
onCheckedChange: field.onChange,
|
|
388
|
+
disabled: disabled
|
|
389
|
+
}), /*#__PURE__*/ React.createElement("div", {
|
|
390
|
+
className: "space-y-1 leading-none"
|
|
391
|
+
}, /*#__PURE__*/ React.createElement(FormLabel, null, label), description && /*#__PURE__*/ React.createElement(FormDescription, null, description)));
|
|
392
|
+
case "switch":
|
|
393
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
394
|
+
className: "flex items-center justify-between"
|
|
395
|
+
}, /*#__PURE__*/ React.createElement(FormLabel, null, label), /*#__PURE__*/ React.createElement(Switch, {
|
|
396
|
+
checked: !!field.value,
|
|
397
|
+
onCheckedChange: field.onChange,
|
|
398
|
+
disabled: disabled
|
|
399
|
+
}));
|
|
400
|
+
case "radio":
|
|
401
|
+
return /*#__PURE__*/ React.createElement(RadioGroup, {
|
|
402
|
+
value: String(field.value ?? ""),
|
|
403
|
+
onValueChange: field.onChange,
|
|
404
|
+
className: "flex flex-col gap-2",
|
|
405
|
+
disabled: disabled ?? false
|
|
406
|
+
}, (radioOptions ?? [])?.map((opt)=>/*#__PURE__*/ React.createElement("div", {
|
|
407
|
+
key: opt.value,
|
|
408
|
+
className: "flex items-center gap-2"
|
|
409
|
+
}, /*#__PURE__*/ React.createElement(RadioGroupItem, {
|
|
410
|
+
value: opt.value,
|
|
411
|
+
id: `${String(name)}-${opt.value}`
|
|
412
|
+
}), /*#__PURE__*/ React.createElement("label", {
|
|
413
|
+
htmlFor: `${String(name)}-${opt.value}`,
|
|
414
|
+
className: "text-sm"
|
|
415
|
+
}, opt.label))));
|
|
416
|
+
case "slider":
|
|
417
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
418
|
+
className: "space-y-2"
|
|
419
|
+
}, /*#__PURE__*/ React.createElement(Slider, {
|
|
420
|
+
value: [
|
|
421
|
+
Number(field.value ?? sliderRange?.min ?? 0)
|
|
422
|
+
],
|
|
423
|
+
onValueChange: (vals)=>field.onChange(vals[0]),
|
|
424
|
+
min: sliderRange?.min ?? 0,
|
|
425
|
+
max: sliderRange?.max ?? 100,
|
|
426
|
+
step: sliderRange?.step ?? 1,
|
|
427
|
+
disabled: disabled
|
|
428
|
+
}), typeof field.value === "number" && /*#__PURE__*/ React.createElement("p", {
|
|
429
|
+
className: "text-xs text-muted-foreground"
|
|
430
|
+
}, "Valor: ", field.value));
|
|
431
|
+
case "otp":
|
|
432
|
+
return /*#__PURE__*/ React.createElement(InputOTP, {
|
|
433
|
+
maxLength: otpLength ?? 6,
|
|
434
|
+
value: String(field.value ?? ""),
|
|
435
|
+
onChange: field.onChange,
|
|
436
|
+
disabled: disabled
|
|
437
|
+
}, /*#__PURE__*/ React.createElement(InputOTPGroup, null, Array.from({
|
|
438
|
+
length: otpLength ?? 6
|
|
439
|
+
}, (_, i)=>/*#__PURE__*/ React.createElement(InputOTPSlot, {
|
|
440
|
+
key: `${baseId}-otp-${i}`,
|
|
441
|
+
index: i
|
|
442
|
+
}))));
|
|
443
|
+
case "toggle":
|
|
444
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
445
|
+
className: "flex items-center gap-2"
|
|
446
|
+
}, /*#__PURE__*/ React.createElement(Toggle, {
|
|
447
|
+
pressed: !!field.value,
|
|
448
|
+
onPressedChange: (pressed)=>field.onChange(pressed),
|
|
449
|
+
disabled: disabled
|
|
450
|
+
}, label));
|
|
451
|
+
case "autocomplete":
|
|
452
|
+
{
|
|
453
|
+
if (!autocompleteConfig || !form) {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
return /*#__PURE__*/ React.createElement(AutocompleteFieldWrapper, {
|
|
457
|
+
field: field,
|
|
458
|
+
form: form,
|
|
459
|
+
autocompleteConfig: autocompleteConfig,
|
|
460
|
+
placeholder: placeholder,
|
|
461
|
+
disabled: disabled
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
default:
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
})()), type !== "checkbox" && description && /*#__PURE__*/ React.createElement(FormDescription, null, description), /*#__PURE__*/ React.createElement(FormMessage, null));
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
BaseFormField.displayName = "BaseFormField";
|
|
472
|
+
function FormLayout({ form, sections, onSubmit, onError, formId, title, description, headerContent, readOnly = false, formRef }) {
|
|
473
|
+
const getColSpanClass = (cols)=>{
|
|
474
|
+
if (!cols || cols === 1) return "col-span-12 md:col-span-6 xl:col-span-4";
|
|
475
|
+
if (cols === 2) return "col-span-12 md:col-span-12 xl:col-span-8";
|
|
476
|
+
if (cols === 3) return "col-span-12";
|
|
477
|
+
if (cols === 6) return "col-span-12 2xl:col-span-6";
|
|
478
|
+
return "col-span-12";
|
|
479
|
+
};
|
|
480
|
+
return /*#__PURE__*/ React.createElement(Form, form, onSubmit ? /*#__PURE__*/ React.createElement("form", {
|
|
481
|
+
onSubmit: form.handleSubmit(onSubmit, onError),
|
|
482
|
+
id: formId,
|
|
483
|
+
ref: formRef,
|
|
484
|
+
className: "space-y-8 relative px-1"
|
|
485
|
+
}, (title || description) && /*#__PURE__*/ React.createElement("div", {
|
|
486
|
+
className: "space-y-2 mb-6"
|
|
487
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
488
|
+
className: "flex justify-between items-start"
|
|
489
|
+
}, /*#__PURE__*/ React.createElement("div", null, title && /*#__PURE__*/ React.createElement("h2", {
|
|
490
|
+
className: "text-xl font-semibold tracking-tight"
|
|
491
|
+
}, title), description && /*#__PURE__*/ React.createElement("p", {
|
|
492
|
+
className: "text-muted-foreground text-sm"
|
|
493
|
+
}, description)), headerContent)), sections.map((section, idx)=>/*#__PURE__*/ React.createElement("div", {
|
|
494
|
+
key: section.title ? `${section.title}-${idx}` : `section-${idx}`,
|
|
495
|
+
className: "space-y-4"
|
|
496
|
+
}, (section.title || section.description) && /*#__PURE__*/ React.createElement("div", {
|
|
497
|
+
className: "flex items-center gap-2"
|
|
498
|
+
}, section.title && /*#__PURE__*/ React.createElement("h3", null, section.title), /*#__PURE__*/ React.createElement(Separator, {
|
|
499
|
+
className: "flex-1"
|
|
500
|
+
})), /*#__PURE__*/ React.createElement("div", {
|
|
501
|
+
className: cn("grid grid-cols-12", readOnly ? "gap-2" : "gap-4")
|
|
502
|
+
}, section.fields.map((config)=>/*#__PURE__*/ React.createElement("div", {
|
|
503
|
+
key: String(config.name),
|
|
504
|
+
className: getColSpanClass(config.cols)
|
|
505
|
+
}, /*#__PURE__*/ React.createElement(BaseFormField, {
|
|
506
|
+
config: config,
|
|
507
|
+
control: form.control,
|
|
508
|
+
readOnly: readOnly,
|
|
509
|
+
form: form
|
|
510
|
+
}))))))) : /*#__PURE__*/ React.createElement("div", {
|
|
511
|
+
id: formId,
|
|
512
|
+
className: "space-y-8 relative px-1"
|
|
513
|
+
}, sections.map((section, idx)=>/*#__PURE__*/ React.createElement("div", {
|
|
514
|
+
key: section.title ? `${section.title}-${idx}` : `section-${idx}`,
|
|
515
|
+
className: "space-y-4"
|
|
516
|
+
}, (section.title || section.description) && /*#__PURE__*/ React.createElement("div", {
|
|
517
|
+
className: "flex items-center gap-2"
|
|
518
|
+
}, section.title && /*#__PURE__*/ React.createElement("h3", null, section.title), /*#__PURE__*/ React.createElement(Separator, {
|
|
519
|
+
className: "flex-1"
|
|
520
|
+
})), /*#__PURE__*/ React.createElement("div", {
|
|
521
|
+
className: cn("grid grid-cols-12", readOnly ? "gap-2" : "gap-4")
|
|
522
|
+
}, section.fields.map((config)=>/*#__PURE__*/ React.createElement("div", {
|
|
523
|
+
key: String(config.name),
|
|
524
|
+
className: getColSpanClass(config.cols)
|
|
525
|
+
}, /*#__PURE__*/ React.createElement(BaseFormField, {
|
|
526
|
+
config: config,
|
|
527
|
+
control: form.control,
|
|
528
|
+
readOnly: readOnly,
|
|
529
|
+
form: form
|
|
530
|
+
}))))))));
|
|
531
|
+
}
|
|
532
|
+
FormLayout.displayName = "FormLayout";
|
|
533
|
+
|
|
534
|
+
export { BaseFormField, FormLayout };
|
|
535
|
+
//# sourceMappingURL=index.mjs.map
|