ivt 0.7.3 → 0.7.4
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.mjs +57 -142
- package/dist/base/index.mjs.map +1 -1
- package/dist/breadcrumb/index.mjs +5 -5
- package/dist/button/index.mjs +3 -3
- 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-qFuwmV53.mjs +95 -0
- package/dist/chunks/AutoComplete-qFuwmV53.mjs.map +1 -0
- package/dist/chunks/{CalendarRange-C6BJ_i8D.mjs → CalendarRange-Ce7PiNfq.mjs} +8 -8
- package/dist/chunks/{CalendarRange-C6BJ_i8D.mjs.map → CalendarRange-Ce7PiNfq.mjs.map} +1 -1
- package/dist/chunks/{ComboboxField-DFqOZmlN.mjs → ComboboxField-DaRpRraW.mjs} +9 -9
- package/dist/chunks/{ComboboxField-DFqOZmlN.mjs.map → ComboboxField-DaRpRraW.mjs.map} +1 -1
- package/dist/chunks/{Container-BFnURH_3.mjs → Container-DwaAaEiC.mjs} +2 -2
- package/dist/chunks/{Container-BFnURH_3.mjs.map → Container-DwaAaEiC.mjs.map} +1 -1
- package/dist/chunks/{DeleteConfirmationModal-3tgFcxyU.mjs → DeleteConfirmationModal-BwTbbBAw.mjs} +4 -4
- package/dist/chunks/{DeleteConfirmationModal-3tgFcxyU.mjs.map → DeleteConfirmationModal-BwTbbBAw.mjs.map} +1 -1
- package/dist/chunks/{ListItem-Dhdqegoz.mjs → ListItem-zxS4CZdq.mjs} +4 -4
- package/dist/chunks/{ListItem-Dhdqegoz.mjs.map → ListItem-zxS4CZdq.mjs.map} +1 -1
- package/dist/chunks/{TooltipIndicator-tYIvoK3x.mjs → TooltipIndicator-CwGGAeRz.mjs} +4 -4
- package/dist/chunks/{TooltipIndicator-tYIvoK3x.mjs.map → TooltipIndicator-CwGGAeRz.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-CDajFLDm.mjs → _commonjsHelpers-B2Be7UYW.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-B2Be7UYW.mjs.map +1 -0
- package/dist/chunks/{accordion-Dig0Vyew.mjs → accordion-D4JVALAO.mjs} +9 -11
- package/dist/chunks/{accordion-Dig0Vyew.mjs.map → accordion-D4JVALAO.mjs.map} +1 -1
- package/dist/chunks/{alert-CtNiMMMm.mjs → alert-D-E6nsVK.mjs} +2 -2
- package/dist/chunks/{alert-CtNiMMMm.mjs.map → alert-D-E6nsVK.mjs.map} +1 -1
- package/dist/chunks/{badge-CMepcgQ2.mjs → badge-C6mkl9yr.mjs} +2 -2
- package/dist/chunks/{badge-CMepcgQ2.mjs.map → badge-C6mkl9yr.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-ByJyReDu.mjs → bundle-mjs-B1dpl-bk.mjs} +228 -154
- package/dist/chunks/bundle-mjs-B1dpl-bk.mjs.map +1 -0
- package/dist/chunks/{button-DHQrVlqk.mjs → button-DsgJkgEz.mjs} +2 -2
- package/dist/chunks/{button-DHQrVlqk.mjs.map → button-DsgJkgEz.mjs.map} +1 -1
- package/dist/chunks/{calendar-DtKpXGXO.mjs → calendar-Co99lCn4.mjs} +550 -166
- package/dist/chunks/calendar-Co99lCn4.mjs.map +1 -0
- package/dist/chunks/{calendar-days-5V8H0_Qn.mjs → calendar-days-BF4GDmMr.mjs} +2 -2
- package/dist/chunks/{calendar-days-5V8H0_Qn.mjs.map → calendar-days-BF4GDmMr.mjs.map} +1 -1
- package/dist/chunks/{card-DgO3JDtX.mjs → card-Cuo7NL8y.mjs} +2 -2
- package/dist/chunks/{card-DgO3JDtX.mjs.map → card-Cuo7NL8y.mjs.map} +1 -1
- package/dist/chunks/{check-yo43z6YO.mjs → check-CzKqQLNR.mjs} +2 -2
- package/dist/chunks/{check-yo43z6YO.mjs.map → check-CzKqQLNR.mjs.map} +1 -1
- package/dist/chunks/{checkbox-B3xoUcaP.mjs → checkbox-C7RUdsIS.mjs} +9 -11
- package/dist/chunks/{checkbox-B3xoUcaP.mjs.map → checkbox-C7RUdsIS.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-gO34wzc7.mjs → chevron-down-CZjN_vyX.mjs} +2 -2
- package/dist/chunks/{chevron-down-gO34wzc7.mjs.map → chevron-down-CZjN_vyX.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-DGlHB7Nw.mjs → chevron-left-BpfBwM4S.mjs} +2 -2
- package/dist/chunks/{chevron-left-DGlHB7Nw.mjs.map → chevron-left-BpfBwM4S.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-B6bwFEdI.mjs → chevron-right-uq-O8rwC.mjs} +2 -2
- package/dist/chunks/{chevron-right-B6bwFEdI.mjs.map → chevron-right-uq-O8rwC.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-StzXyb6Z.mjs → chevrons-up-down-DKM8h8j_.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-StzXyb6Z.mjs.map → chevrons-up-down-DKM8h8j_.mjs.map} +1 -1
- package/dist/chunks/{command-BUHV178P.mjs → command-CAS791lb.mjs} +8 -8
- package/dist/chunks/{command-BUHV178P.mjs.map → command-CAS791lb.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-BrIj5xiA.mjs → createLucideIcon-xkRZC0aJ.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-BrIj5xiA.mjs.map → createLucideIcon-xkRZC0aJ.mjs.map} +1 -1
- package/dist/chunks/{date-re6oTh_O.mjs → date-DYEUxjwi.mjs} +2 -2
- package/dist/chunks/{date-re6oTh_O.mjs.map → date-DYEUxjwi.mjs.map} +1 -1
- package/dist/chunks/{dialog-CsH0QGEc.mjs → dialog-Dt_M700u.mjs} +4 -4
- package/dist/chunks/{dialog-CsH0QGEc.mjs.map → dialog-Dt_M700u.mjs.map} +1 -1
- package/dist/chunks/{ellipsis-BED2L1d7.mjs → ellipsis-BcRZkfZw.mjs} +2 -2
- package/dist/chunks/{ellipsis-BED2L1d7.mjs.map → ellipsis-BcRZkfZw.mjs.map} +1 -1
- package/dist/chunks/{form-B4-N-eE1.mjs → form-CJnoOgoH.mjs} +299 -150
- package/dist/chunks/form-CJnoOgoH.mjs.map +1 -0
- package/dist/chunks/{format-C24_9AKp.mjs → format-BSPAt__h.mjs} +1 -1
- package/dist/chunks/{format-C24_9AKp.mjs.map → format-BSPAt__h.mjs.map} +1 -1
- package/dist/chunks/{format-numbers-CksgR7yb.mjs → format-numbers-BpGX211b.mjs} +2 -6
- package/dist/chunks/format-numbers-BpGX211b.mjs.map +1 -0
- package/dist/chunks/{hover-card-Dke495v-.mjs → hover-card-DKMcpBnt.mjs} +9 -11
- package/dist/chunks/{hover-card-Dke495v-.mjs.map → hover-card-DKMcpBnt.mjs.map} +1 -1
- package/dist/chunks/{index-Bn9j4jd_.mjs → index-0DBJW078.mjs} +2 -2
- package/dist/chunks/{index-Bn9j4jd_.mjs.map → index-0DBJW078.mjs.map} +1 -1
- package/dist/chunks/{index-DmwGzaYt.mjs → index-7wUPkpwA.mjs} +9 -11
- package/dist/chunks/{index-DmwGzaYt.mjs.map → index-7wUPkpwA.mjs.map} +1 -1
- package/dist/chunks/{index-BrOFvz7z.mjs → index-9921_a2g.mjs} +1 -1
- package/dist/chunks/{index-BrOFvz7z.mjs.map → index-9921_a2g.mjs.map} +1 -1
- package/dist/chunks/{index-DjiiXdCh.mjs → index-B49Rv10M.mjs} +1 -1
- package/dist/chunks/{index-DjiiXdCh.mjs.map → index-B49Rv10M.mjs.map} +1 -1
- package/dist/chunks/{index-7SNyMh-j.mjs → index-B8pOe-bI.mjs} +13 -15
- package/dist/chunks/{index-7SNyMh-j.mjs.map → index-B8pOe-bI.mjs.map} +1 -1
- package/dist/chunks/{index-VN9qcZ4P.mjs → index-B8zlei3I.mjs} +1 -1
- package/dist/chunks/{index-VN9qcZ4P.mjs.map → index-B8zlei3I.mjs.map} +1 -1
- package/dist/chunks/{index-DmLyVVSA.mjs → index-BpZD69GD.mjs} +2 -2
- package/dist/chunks/{index-DmLyVVSA.mjs.map → index-BpZD69GD.mjs.map} +1 -1
- package/dist/chunks/{index-C-ZwjB4k.mjs → index-BtdTgi0_.mjs} +1 -1
- package/dist/chunks/{index-C-ZwjB4k.mjs.map → index-BtdTgi0_.mjs.map} +1 -1
- package/dist/chunks/{index-C8cUOEOO.mjs → index-Cm5-jAR7.mjs} +38 -2
- package/dist/chunks/index-Cm5-jAR7.mjs.map +1 -0
- package/dist/chunks/{index-DHpiwknP.mjs → index-CsC-dafu.mjs} +3 -3
- package/dist/chunks/{index-DHpiwknP.mjs.map → index-CsC-dafu.mjs.map} +1 -1
- package/dist/chunks/{index-rXTYYoI9.mjs → index-CuEeN4AG.mjs} +6 -7
- package/dist/chunks/{index-rXTYYoI9.mjs.map → index-CuEeN4AG.mjs.map} +1 -1
- package/dist/chunks/{index-BElPX9xn.mjs → index-CvWc6WZ4.mjs} +7 -9
- package/dist/chunks/{index-BElPX9xn.mjs.map → index-CvWc6WZ4.mjs.map} +1 -1
- package/dist/chunks/{index-D7mBTwC1.mjs → index-DSBOi0JP.mjs} +4 -5
- package/dist/chunks/{index-D7mBTwC1.mjs.map → index-DSBOi0JP.mjs.map} +1 -1
- package/dist/chunks/{index-B8RPmvRI.mjs → index-DWtzT31F.mjs} +2 -2
- package/dist/chunks/{index-B8RPmvRI.mjs.map → index-DWtzT31F.mjs.map} +1 -1
- package/dist/chunks/{index-DLAC_TU-.mjs → index-DaifcY5X.mjs} +7 -9
- package/dist/chunks/{index-DLAC_TU-.mjs.map → index-DaifcY5X.mjs.map} +1 -1
- package/dist/chunks/{index-DIkcxop-.mjs → index-DjoMuta5.mjs} +1 -1
- package/dist/chunks/{index-DIkcxop-.mjs.map → index-DjoMuta5.mjs.map} +1 -1
- package/dist/chunks/{index-DY9hLs8O.mjs → index-Dn87UbZu.mjs} +2 -2
- package/dist/chunks/{index-DY9hLs8O.mjs.map → index-Dn87UbZu.mjs.map} +1 -1
- package/dist/chunks/{index-BKxnMSY9.mjs → index-G8uUqzC7.mjs} +12 -2
- package/dist/chunks/index-G8uUqzC7.mjs.map +1 -0
- package/dist/chunks/{index-CFaMr67I.mjs → index-SJQIKyxi.mjs} +1 -1
- package/dist/chunks/{index-CFaMr67I.mjs.map → index-SJQIKyxi.mjs.map} +1 -1
- package/dist/chunks/{index-BP00_xoF.mjs → index-fcmnzZn6.mjs} +12 -5
- package/dist/chunks/index-fcmnzZn6.mjs.map +1 -0
- package/dist/chunks/{index-BXScVxAr.mjs → index-zv8c0UAU.mjs} +3 -3
- package/dist/chunks/{index-BXScVxAr.mjs.map → index-zv8c0UAU.mjs.map} +1 -1
- package/dist/chunks/index.module-B_Z75X1e.mjs +73 -0
- package/dist/chunks/index.module-B_Z75X1e.mjs.map +1 -0
- package/dist/chunks/{input-Beaky41D.mjs → input-NILUGijL.mjs} +2 -2
- package/dist/chunks/{input-Beaky41D.mjs.map → input-NILUGijL.mjs.map} +1 -1
- package/dist/chunks/input-otp-b-7MmY2H.mjs +455 -0
- package/dist/chunks/input-otp-b-7MmY2H.mjs.map +1 -0
- package/dist/chunks/{label-n_pPs58q.mjs → label-81mjh4Q4.mjs} +44 -3
- package/dist/chunks/label-81mjh4Q4.mjs.map +1 -0
- package/dist/chunks/{loader-circle-CEDL1CbD.mjs → loader-circle-sGBNpyP3.mjs} +2 -2
- package/dist/chunks/{loader-circle-CEDL1CbD.mjs.map → loader-circle-sGBNpyP3.mjs.map} +1 -1
- package/dist/chunks/{menubar-C8VLP8-v.mjs → menubar-Dz5biTZv.mjs} +11 -13
- package/dist/chunks/{menubar-C8VLP8-v.mjs.map → menubar-Dz5biTZv.mjs.map} +1 -1
- package/dist/chunks/{multi-select-fLsOx7-e.mjs → multi-select-DeW-tL6j.mjs} +13 -13
- package/dist/chunks/{multi-select-fLsOx7-e.mjs.map → multi-select-DeW-tL6j.mjs.map} +1 -1
- package/dist/chunks/{pagination-iwqbmQ5Q.mjs → pagination-0W2Kek6Z.mjs} +6 -6
- package/dist/chunks/{pagination-iwqbmQ5Q.mjs.map → pagination-0W2Kek6Z.mjs.map} +1 -1
- package/dist/chunks/{popover-Cpht2GgQ.mjs → popover-ChoMUAP9.mjs} +11 -13
- package/dist/chunks/{popover-Cpht2GgQ.mjs.map → popover-ChoMUAP9.mjs.map} +1 -1
- package/dist/chunks/progress-zrBdDKEV.mjs +223 -0
- package/dist/chunks/progress-zrBdDKEV.mjs.map +1 -0
- package/dist/chunks/radio-group-r3ejuIom.mjs +258 -0
- package/dist/chunks/radio-group-r3ejuIom.mjs.map +1 -0
- package/dist/chunks/{react-number-format.es-CcgVtYyo.mjs → react-number-format.es-rRpdCutF.mjs} +1 -1
- package/dist/chunks/{react-number-format.es-CcgVtYyo.mjs.map → react-number-format.es-rRpdCutF.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-DuO1U-ha.mjs → scroll-area-DjtXX0pm.mjs} +9 -11
- package/dist/chunks/{scroll-area-DuO1U-ha.mjs.map → scroll-area-DjtXX0pm.mjs.map} +1 -1
- package/dist/chunks/{select-D5DzfQ8s.mjs → select-CICQavYx.mjs} +5 -5
- package/dist/chunks/{select-D5DzfQ8s.mjs.map → select-CICQavYx.mjs.map} +1 -1
- package/dist/chunks/{separator-DHnqygnd.mjs → separator-CL28DVoA.mjs} +44 -3
- package/dist/chunks/separator-CL28DVoA.mjs.map +1 -0
- package/dist/chunks/{sheet-CXvwS4r9.mjs → sheet-BIN5Bwkz.mjs} +4 -4
- package/dist/chunks/{sheet-CXvwS4r9.mjs.map → sheet-BIN5Bwkz.mjs.map} +1 -1
- package/dist/chunks/{skeleton-CuuvHTlE.mjs → skeleton-DEo09dsp.mjs} +2 -2
- package/dist/chunks/{skeleton-CuuvHTlE.mjs.map → skeleton-DEo09dsp.mjs.map} +1 -1
- package/dist/chunks/slider-C_afdOBq.mjs +588 -0
- package/dist/chunks/slider-C_afdOBq.mjs.map +1 -0
- package/dist/chunks/{sortable-Dc-PXgOX.mjs → sortable-Hz2p-hG_.mjs} +3 -3
- package/dist/chunks/{sortable-Dc-PXgOX.mjs.map → sortable-Hz2p-hG_.mjs.map} +1 -1
- package/dist/chunks/styles-DQr_CtBg.mjs +6 -0
- package/dist/chunks/styles-DQr_CtBg.mjs.map +1 -0
- package/dist/chunks/switch-CoxjUYji.mjs +138 -0
- package/dist/chunks/switch-CoxjUYji.mjs.map +1 -0
- package/dist/chunks/{table-CsRWNDTp.mjs → table-CaTzvnGO.mjs} +2 -2
- package/dist/chunks/{table-CsRWNDTp.mjs.map → table-CaTzvnGO.mjs.map} +1 -1
- package/dist/chunks/{tabs-Bw6ByWDS.mjs → tabs-DbcqE74l.mjs} +9 -10
- package/dist/chunks/{tabs-Bw6ByWDS.mjs.map → tabs-DbcqE74l.mjs.map} +1 -1
- package/dist/chunks/{textarea-C7CkvJ9p.mjs → textarea-C99bTFre.mjs} +2 -2
- package/dist/chunks/{textarea-C7CkvJ9p.mjs.map → textarea-C99bTFre.mjs.map} +1 -1
- package/dist/chunks/{toggle-BRsNuICy.mjs → toggle-x7-6JYvP.mjs} +4 -5
- package/dist/chunks/{toggle-BRsNuICy.mjs.map → toggle-x7-6JYvP.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DXG_UtcS.mjs → tooltip-aCFcTWvT.mjs} +11 -13
- package/dist/chunks/{tooltip-DXG_UtcS.mjs.map → tooltip-aCFcTWvT.mjs.map} +1 -1
- package/dist/chunks/{trash-2-DSHxuneu.mjs → trash-2-BRTBRPsE.mjs} +2 -2
- package/dist/chunks/{trash-2-DSHxuneu.mjs.map → trash-2-BRTBRPsE.mjs.map} +1 -1
- package/dist/chunks/{triangle-alert-8sDAvjNW.mjs → triangle-alert-DEr_0gbo.mjs} +2 -2
- package/dist/chunks/{triangle-alert-8sDAvjNW.mjs.map → triangle-alert-DEr_0gbo.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-WVUvgLYj.mjs → tslib.es6-9fTryOSE.mjs} +1 -1
- package/dist/chunks/{tslib.es6-WVUvgLYj.mjs.map → tslib.es6-9fTryOSE.mjs.map} +1 -1
- package/dist/chunks/{utils-BqIRZT53.mjs → utils-M7D-rn0u.mjs} +2 -2
- package/dist/chunks/{utils-BqIRZT53.mjs.map → utils-M7D-rn0u.mjs.map} +1 -1
- package/dist/chunks/{wand-sparkles-BjK8VloB.mjs → wand-sparkles-cr6EaHA_.mjs} +2 -2
- package/dist/chunks/{wand-sparkles-BjK8VloB.mjs.map → wand-sparkles-cr6EaHA_.mjs.map} +1 -1
- package/dist/chunks/{x-D7oIZ9hK.mjs → x-Heb3hHKJ.mjs} +2 -2
- package/dist/chunks/{x-D7oIZ9hK.mjs.map → x-Heb3hHKJ.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.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.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 +16 -18
- 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.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 +85 -0
- package/dist/form-layout/index.mjs +534 -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.mjs +5 -5
- package/dist/input-otp/index.mjs +5 -455
- package/dist/input-otp/index.mjs.map +1 -1
- package/dist/item/index.mjs +3 -4
- package/dist/item/index.mjs.map +1 -1
- package/dist/ivt.css +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.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.mjs +5 -5
- package/dist/sheet/index.mjs +18 -20
- package/dist/sheet/index.mjs.map +1 -1
- 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.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.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 +13 -15
- package/dist/toast/index.mjs.map +1 -1
- 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 +6 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-Cpht2GgQ.mjs","sources":["../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/components/ui/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = \"center\",\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 cursor-pointer rounded-md border p-4 shadow-md outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["Popover","PopperPrimitive.Root","PopoverAnchor","PopperPrimitive.Anchor","PopoverTrigger","PortalPrimitive","PopoverContent","RemoveScroll","PopperPrimitive.Content","PopperPrimitive.Arrow","Root","Anchor","Content","props","React","PopoverPrimitive","data-slot","className","align","sideOffset","cn"],"mappings":";;;;;;;;;;;;;;;;;AAwBA,IAAM,YAAA,GAAe,SAAA;AAGrB,IAAM,CAAC,oBAAwC,CAAA,GAAI,mBAAmB,YAAA,EAAc;AAClF,IAAA;AACD,CAAA,CAAA;AACD,IAAM,iBAAiB,iBAAA,EAAkB;AAczC,IAAM,CAAC,eAAA,EAAiB,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IAChF,qBAAOC,cAAA,CAAA,aAAA,CAACC,KAAqB,EAAA;QAACC,WAAAA,EAAU,SAAA;AAAW,QAAA,GAAGH;;AACvD;AAEA,SAAST,cAAAA,CAAe,EAAE,GAAGS,KAAAA,EAA8D,EAAA;IAC1F,qBAAOC,cAAA,CAAA,aAAA,CAACC,OAAwB,EAAA;QAACC,WAAAA,EAAU,iBAAA;AAAmB,QAAA,GAAGH;;AAClE;AAEA,SAASP,cAAAA,CAAe,EACvBW,SAAS,EACTC,KAAAA,GAAQ,QAAQ,EAChBC,UAAAA,GAAa,CAAC,EACd,GAAGN,KAAAA,EACoD,EAAA;AACvD,IAAA,qBACCC,6BAACC,MAAuB,EAAA,IAAA,gBACvBD,cAAA,CAAA,aAAA,CAACC,QAAwB,EAAA;QACxBC,WAAAA,EAAU,iBAAA;QACVE,KAAAA,EAAOA,KAAAA;QACPC,UAAAA,EAAYA,UAAAA;AACZF,QAAAA,SAAAA,EAAWG,GACV,2bAAA,EACAH,SAAAA,CAAAA;AAEA,QAAA,GAAGJ;;AAIR;AAEA,SAASX,aAAAA,CAAc,EAAE,GAAGW,KAAAA,EAA6D,EAAA;IACxF,qBAAOC,cAAA,CAAA,aAAA,CAACC,OAAuB,EAAA;QAACC,WAAAA,EAAU,gBAAA;AAAkB,QAAA,GAAGH;;AAChE;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"popover-ChoMUAP9.mjs","sources":["../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/components/ui/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = \"center\",\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 cursor-pointer rounded-md border p-4 shadow-md outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["Popover","PopperPrimitive.Root","PopoverAnchor","PopperPrimitive.Anchor","PopoverTrigger","PortalPrimitive","PopoverContent","RemoveScroll","PopperPrimitive.Content","PopperPrimitive.Arrow","Root","Anchor","Content","props","React","PopoverPrimitive","data-slot","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;AAEA,IAAMC,KAAAA,GAAOV,SAAA;AACb,IAAMW,OAAAA,GAAST,eAAA;AACf,IAAM,OAAA,GAAUE,gBAAA;AAChB,IAAM,MAAA,GAAS,aAAA;AACf,IAAMQ,QAAAA,GAAUN,gBAAA;;AC7ehB,SAASN,OAAAA,CAAQ,EAAE,GAAGa,KAAAA,EAA2D,EAAA;IAChF,qBAAOC,cAAA,CAAA,aAAA,CAACC,KAAqB,EAAA;QAACC,WAAAA,EAAU,SAAA;AAAW,QAAA,GAAGH;;AACvD;AAEA,SAAST,cAAAA,CAAe,EAAE,GAAGS,KAAAA,EAA8D,EAAA;IAC1F,qBAAOC,cAAA,CAAA,aAAA,CAACC,OAAwB,EAAA;QAACC,WAAAA,EAAU,iBAAA;AAAmB,QAAA,GAAGH;;AAClE;AAEA,SAASP,cAAAA,CAAe,EACvBW,SAAS,EACTC,KAAAA,GAAQ,QAAQ,EAChBC,UAAAA,GAAa,CAAC,EACd,GAAGN,KAAAA,EACoD,EAAA;AACvD,IAAA,qBACCC,6BAACC,MAAuB,EAAA,IAAA,gBACvBD,cAAA,CAAA,aAAA,CAACC,QAAwB,EAAA;QACxBC,WAAAA,EAAU,iBAAA;QACVE,KAAAA,EAAOA,KAAAA;QACPC,UAAAA,EAAYA,UAAAA;AACZF,QAAAA,SAAAA,EAAWG,GACV,2bAAA,EACAH,SAAAA,CAAAA;AAEA,QAAA,GAAGJ;;AAIR;AAEA,SAASX,aAAAA,CAAc,EAAE,GAAGW,KAAAA,EAA6D,EAAA;IACxF,qBAAOC,cAAA,CAAA,aAAA,CAACC,OAAuB,EAAA;QAACC,WAAAA,EAAU,gBAAA;AAAkB,QAAA,GAAGH;;AAChE;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
import { createSlot } from '@radix-ui/react-slot';
|
|
6
|
+
import { c as cn } from './utils-M7D-rn0u.mjs';
|
|
7
|
+
|
|
8
|
+
// src/create-context.tsx
|
|
9
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
10
|
+
let defaultContexts = [];
|
|
11
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
12
|
+
const BaseContext = React.createContext(defaultContext);
|
|
13
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
14
|
+
const index = defaultContexts.length;
|
|
15
|
+
defaultContexts = [
|
|
16
|
+
...defaultContexts,
|
|
17
|
+
defaultContext
|
|
18
|
+
];
|
|
19
|
+
const Provider = (props)=>{
|
|
20
|
+
const { scope, children, ...context } = props;
|
|
21
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
22
|
+
const value = React.useMemo(()=>context, Object.values(context));
|
|
23
|
+
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
24
|
+
value,
|
|
25
|
+
children
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
29
|
+
function useContext2(consumerName, scope) {
|
|
30
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
31
|
+
const context = React.useContext(Context);
|
|
32
|
+
if (context) return context;
|
|
33
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
34
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
35
|
+
}
|
|
36
|
+
return [
|
|
37
|
+
Provider,
|
|
38
|
+
useContext2
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
const createScope = ()=>{
|
|
42
|
+
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
43
|
+
return React.createContext(defaultContext);
|
|
44
|
+
});
|
|
45
|
+
return function useScope(scope) {
|
|
46
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
47
|
+
return React.useMemo(()=>({
|
|
48
|
+
[`__scope${scopeName}`]: {
|
|
49
|
+
...scope,
|
|
50
|
+
[scopeName]: contexts
|
|
51
|
+
}
|
|
52
|
+
}), [
|
|
53
|
+
scope,
|
|
54
|
+
contexts
|
|
55
|
+
]);
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
createScope.scopeName = scopeName;
|
|
59
|
+
return [
|
|
60
|
+
createContext3,
|
|
61
|
+
composeContextScopes(createScope, ...createContextScopeDeps)
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
function composeContextScopes(...scopes) {
|
|
65
|
+
const baseScope = scopes[0];
|
|
66
|
+
if (scopes.length === 1) return baseScope;
|
|
67
|
+
const createScope = ()=>{
|
|
68
|
+
const scopeHooks = scopes.map((createScope2)=>({
|
|
69
|
+
useScope: createScope2(),
|
|
70
|
+
scopeName: createScope2.scopeName
|
|
71
|
+
}));
|
|
72
|
+
return function useComposedScopes(overrideScopes) {
|
|
73
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName })=>{
|
|
74
|
+
const scopeProps = useScope(overrideScopes);
|
|
75
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
76
|
+
return {
|
|
77
|
+
...nextScopes2,
|
|
78
|
+
...currentScope
|
|
79
|
+
};
|
|
80
|
+
}, {});
|
|
81
|
+
return React.useMemo(()=>({
|
|
82
|
+
[`__scope${baseScope.scopeName}`]: nextScopes
|
|
83
|
+
}), [
|
|
84
|
+
nextScopes
|
|
85
|
+
]);
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
createScope.scopeName = baseScope.scopeName;
|
|
89
|
+
return createScope;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// src/primitive.tsx
|
|
93
|
+
var NODES = [
|
|
94
|
+
"a",
|
|
95
|
+
"button",
|
|
96
|
+
"div",
|
|
97
|
+
"form",
|
|
98
|
+
"h2",
|
|
99
|
+
"h3",
|
|
100
|
+
"img",
|
|
101
|
+
"input",
|
|
102
|
+
"label",
|
|
103
|
+
"li",
|
|
104
|
+
"nav",
|
|
105
|
+
"ol",
|
|
106
|
+
"p",
|
|
107
|
+
"select",
|
|
108
|
+
"span",
|
|
109
|
+
"svg",
|
|
110
|
+
"ul"
|
|
111
|
+
];
|
|
112
|
+
var Primitive = NODES.reduce((primitive, node)=>{
|
|
113
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
114
|
+
const Node = React.forwardRef((props, forwardedRef)=>{
|
|
115
|
+
const { asChild, ...primitiveProps } = props;
|
|
116
|
+
const Comp = asChild ? Slot : node;
|
|
117
|
+
if (typeof window !== "undefined") {
|
|
118
|
+
window[Symbol.for("radix-ui")] = true;
|
|
119
|
+
}
|
|
120
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
121
|
+
...primitiveProps,
|
|
122
|
+
ref: forwardedRef
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
Node.displayName = `Primitive.${node}`;
|
|
126
|
+
return {
|
|
127
|
+
...primitive,
|
|
128
|
+
[node]: Node
|
|
129
|
+
};
|
|
130
|
+
}, {});
|
|
131
|
+
|
|
132
|
+
var PROGRESS_NAME = "Progress";
|
|
133
|
+
var DEFAULT_MAX = 100;
|
|
134
|
+
var [createProgressContext] = createContextScope(PROGRESS_NAME);
|
|
135
|
+
var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
136
|
+
var Progress$1 = React.forwardRef((props, forwardedRef)=>{
|
|
137
|
+
const { __scopeProgress, value: valueProp = null, max: maxProp, getValueLabel = defaultGetValueLabel, ...progressProps } = props;
|
|
138
|
+
if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {
|
|
139
|
+
console.error(getInvalidMaxError(`${maxProp}`, "Progress"));
|
|
140
|
+
}
|
|
141
|
+
const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
|
|
142
|
+
if (valueProp !== null && !isValidValueNumber(valueProp, max)) {
|
|
143
|
+
console.error(getInvalidValueError(`${valueProp}`, "Progress"));
|
|
144
|
+
}
|
|
145
|
+
const value = isValidValueNumber(valueProp, max) ? valueProp : null;
|
|
146
|
+
const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
147
|
+
return /* @__PURE__ */ jsx(ProgressProvider, {
|
|
148
|
+
scope: __scopeProgress,
|
|
149
|
+
value,
|
|
150
|
+
max,
|
|
151
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
152
|
+
"aria-valuemax": max,
|
|
153
|
+
"aria-valuemin": 0,
|
|
154
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
155
|
+
"aria-valuetext": valueLabel,
|
|
156
|
+
role: "progressbar",
|
|
157
|
+
"data-state": getProgressState(value, max),
|
|
158
|
+
"data-value": value ?? void 0,
|
|
159
|
+
"data-max": max,
|
|
160
|
+
...progressProps,
|
|
161
|
+
ref: forwardedRef
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
Progress$1.displayName = PROGRESS_NAME;
|
|
166
|
+
var INDICATOR_NAME = "ProgressIndicator";
|
|
167
|
+
var ProgressIndicator = React.forwardRef((props, forwardedRef)=>{
|
|
168
|
+
const { __scopeProgress, ...indicatorProps } = props;
|
|
169
|
+
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
170
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
171
|
+
"data-state": getProgressState(context.value, context.max),
|
|
172
|
+
"data-value": context.value ?? void 0,
|
|
173
|
+
"data-max": context.max,
|
|
174
|
+
...indicatorProps,
|
|
175
|
+
ref: forwardedRef
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
ProgressIndicator.displayName = INDICATOR_NAME;
|
|
179
|
+
function defaultGetValueLabel(value, max) {
|
|
180
|
+
return `${Math.round(value / max * 100)}%`;
|
|
181
|
+
}
|
|
182
|
+
function getProgressState(value, maxValue) {
|
|
183
|
+
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
184
|
+
}
|
|
185
|
+
function isNumber(value) {
|
|
186
|
+
return typeof value === "number";
|
|
187
|
+
}
|
|
188
|
+
function isValidMaxNumber(max) {
|
|
189
|
+
return isNumber(max) && !isNaN(max) && max > 0;
|
|
190
|
+
}
|
|
191
|
+
function isValidValueNumber(value, max) {
|
|
192
|
+
return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
|
|
193
|
+
}
|
|
194
|
+
function getInvalidMaxError(propValue, componentName) {
|
|
195
|
+
return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
|
|
196
|
+
}
|
|
197
|
+
function getInvalidValueError(propValue, componentName) {
|
|
198
|
+
return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
|
|
199
|
+
- a positive number
|
|
200
|
+
- less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set)
|
|
201
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
202
|
+
|
|
203
|
+
Defaulting to \`null\`.`;
|
|
204
|
+
}
|
|
205
|
+
var Root = Progress$1;
|
|
206
|
+
var Indicator = ProgressIndicator;
|
|
207
|
+
|
|
208
|
+
function Progress({ className, value, ...props }) {
|
|
209
|
+
return /*#__PURE__*/ React__default.createElement(Root, {
|
|
210
|
+
"data-slot": "progress",
|
|
211
|
+
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
212
|
+
...props
|
|
213
|
+
}, /*#__PURE__*/ React__default.createElement(Indicator, {
|
|
214
|
+
"data-slot": "progress-indicator",
|
|
215
|
+
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
216
|
+
style: {
|
|
217
|
+
transform: `translateX(-${100 - (value || 0)}%)`
|
|
218
|
+
}
|
|
219
|
+
}));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { Progress as P };
|
|
223
|
+
//# sourceMappingURL=progress-zrBdDKEV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-zrBdDKEV.mjs","sources":["../../node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs","../../node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../node_modules/@radix-ui/react-progress/dist/index.mjs","../../src/components/ui/progress/progress.tsx"],"sourcesContent":["// src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n Context.displayName = rootComponentName + \"Context\";\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n BaseContext.displayName = rootComponentName + \"Context\";\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/progress.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PROGRESS_NAME = \"Progress\";\nvar DEFAULT_MAX = 100;\nvar [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\nvar [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);\nvar Progress = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, \"Progress\"));\n }\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, \"Progress\"));\n }\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;\n return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-valuemax\": max,\n \"aria-valuemin\": 0,\n \"aria-valuenow\": isNumber(value) ? value : void 0,\n \"aria-valuetext\": valueLabel,\n role: \"progressbar\",\n \"data-state\": getProgressState(value, max),\n \"data-value\": value ?? void 0,\n \"data-max\": max,\n ...progressProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nProgress.displayName = PROGRESS_NAME;\nvar INDICATOR_NAME = \"ProgressIndicator\";\nvar ProgressIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getProgressState(context.value, context.max),\n \"data-value\": context.value ?? void 0,\n \"data-max\": context.max,\n ...indicatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nProgressIndicator.displayName = INDICATOR_NAME;\nfunction defaultGetValueLabel(value, max) {\n return `${Math.round(value / max * 100)}%`;\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nfunction getInvalidMaxError(propValue, componentName) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\nfunction getInvalidValueError(propValue, componentName) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\nvar Root = Progress;\nvar Indicator = ProgressIndicator;\nexport {\n Indicator,\n Progress,\n ProgressIndicator,\n Root,\n createProgressScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nfunction Progress({\n\tclassName,\n\tvalue,\n\t...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n\treturn (\n\t\t<ProgressPrimitive.Root\n\t\t\tdata-slot=\"progress\"\n\t\t\tclassName={cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ProgressPrimitive.Indicator\n\t\t\t\tdata-slot=\"progress-indicator\"\n\t\t\t\tclassName=\"bg-primary h-full w-full flex-1 transition-all\"\n\t\t\t\tstyle={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n\t\t\t/>\n\t\t</ProgressPrimitive.Root>\n\t);\n}\n\nexport { Progress };\n"],"names":["createContext","useContext","createScope","nextScopes","Progress","className","value","props","React","ProgressPrimitive","data-slot","cn","style","transform"],"mappings":";;;;;;;;AAyCA,SAAS,mBAAmB,SAAA,EAAmB,sBAAA,GAAwC,EAAC,EAAG;IACzF,IAAI,eAAA,GAAyB,EAAC;AAM9B,IAAA,SAASA,cAAAA,CACP,iBAAA,EACA,cAAA,EACA;AACA,QAAA,MAAM,WAAA,GAAoB,KAAA,CAAA,aAAA,CAA4C,cAAc,CAAA;QACpF,WAAA,CAAY,WAAA,GAAc,iBAAA,GAAoB,SAAA;QAC9C,MAAM,KAAA,GAAQ,gBAAgB,MAAA;AAC9B,QAAA,eAAA,GAAkB;AAAI,YAAA,GAAA,eAAA;YAAiB;AAAc,SAAA;QAErD,MAAM,QAAA,GAEF,CAAC,KAAA,GAAA;YACH,MAAM,EAAE,KAAA,EAAO,QAAA,EAAU,GAAG,OAAA,EAAQ,GAAI,KAAA;YACxC,MAAM,OAAA,GAAU,QAAQ,SAAS,CAAA,GAAI,KAAK,CAAA,IAAK,WAAA;YAG/C,MAAM,KAAA,GAAc,KAAA,CAAA,OAAA,CAAQ,IAAM,SAAS,MAAA,CAAO,MAAA,CAAO,OAAO,CAAC,CAAA;AACjE,YAAA,uBAAO,GAAA,CAAC,OAAA,CAAQ,QAAA,EAAR;AAAiB,gBAAA,KAAA;AAAe,gBAAA;aAAS,CAAA;AACnD,QAAA,CAAA;QAEA,QAAA,CAAS,WAAA,GAAc,iBAAA,GAAoB,UAAA;AAE3C,QAAA,SAASC,WAAAA,CAAW,YAAA,EAAsB,KAAA,EAA4C;YACpF,MAAM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OAAO,CAAA,gCAAA,EAAmC,SAAS,CAAA,iBAAA,EAAoB,aAAa,CAAA,sEAAA,EAAyE,WAAW,CAAA,GAAA,CAAA;AAC1K;AAEA,SAAS,oBAAA,CAAqB,SAAA,EAAmB,aAAA,EAAuB;IACtE,OAAO,CAAA,kCAAA,EAAqC,SAAS,CAAA,iBAAA,EAAoB,aAAa,CAAA;;AAAA,8CAAA,EAExC,WAAW,CAAA;;;uBAAA,CAAA;AAI3D;AAEA,IAAM,IAAA,GAAOA,UAAA;AACb,IAAM,SAAA,GAAY,iBAAA;;AC9IlB,SAASA,SAAS,EACjBC,SAAS,EACTC,KAAK,EACL,GAAGC,KAAAA,EACkD,EAAA;IACrD,qBACCC,cAAA,CAAA,aAAA,CAACC,IAAsB,EAAA;QACtBC,WAAAA,EAAU,UAAA;AACVL,QAAAA,SAAAA,EAAWM,GAAG,gEAAA,EAAkEN,SAAAA,CAAAA;AAC/E,QAAA,GAAGE;AAEJ,KAAA,gBAAAC,cAAA,CAAA,aAAA,CAACC,SAA2B,EAAA;QAC3BC,WAAAA,EAAU,oBAAA;QACVL,SAAAA,EAAU,gDAAA;QACVO,KAAAA,EAAO;YAAEC,SAAAA,EAAW,CAAC,YAAY,EAAE,GAAA,IAAOP,KAAAA,IAAS,CAAA,CAAA,CAAG,EAAE;AAAE;;AAI9D;;;;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { P as Primitive, c as composeEventHandlers } from './index-G8uUqzC7.mjs';
|
|
3
|
+
import { c as createContextScope, u as useComposedRefs } from './index-Cm5-jAR7.mjs';
|
|
4
|
+
import { c as createRovingFocusGroupScope, R as Root, I as Item } from './index-CvWc6WZ4.mjs';
|
|
5
|
+
import { u as useControllableState } from './index-BpZD69GD.mjs';
|
|
6
|
+
import { u as useDirection } from './index-B49Rv10M.mjs';
|
|
7
|
+
import { u as useSize } from './index-DWtzT31F.mjs';
|
|
8
|
+
import { u as usePrevious } from './index-SJQIKyxi.mjs';
|
|
9
|
+
import { P as Presence } from './index-CsC-dafu.mjs';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
import { c as cn } from './utils-M7D-rn0u.mjs';
|
|
12
|
+
import { C as Check } from './check-CzKqQLNR.mjs';
|
|
13
|
+
|
|
14
|
+
var RADIO_NAME = "Radio";
|
|
15
|
+
var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
|
|
16
|
+
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
17
|
+
var Radio = React.forwardRef((props, forwardedRef)=>{
|
|
18
|
+
const { __scopeRadio, name, checked = false, required, disabled, value = "on", onCheck, form, ...radioProps } = props;
|
|
19
|
+
const [button, setButton] = React.useState(null);
|
|
20
|
+
const composedRefs = useComposedRefs(forwardedRef, (node)=>setButton(node));
|
|
21
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
22
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
23
|
+
return /* @__PURE__ */ jsxs(RadioProvider, {
|
|
24
|
+
scope: __scopeRadio,
|
|
25
|
+
checked,
|
|
26
|
+
disabled,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsx(Primitive.button, {
|
|
29
|
+
type: "button",
|
|
30
|
+
role: "radio",
|
|
31
|
+
"aria-checked": checked,
|
|
32
|
+
"data-state": getState(checked),
|
|
33
|
+
"data-disabled": disabled ? "" : void 0,
|
|
34
|
+
disabled,
|
|
35
|
+
value,
|
|
36
|
+
...radioProps,
|
|
37
|
+
ref: composedRefs,
|
|
38
|
+
onClick: composeEventHandlers(props.onClick, (event)=>{
|
|
39
|
+
if (!checked) onCheck?.();
|
|
40
|
+
if (isFormControl) {
|
|
41
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
42
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
isFormControl && /* @__PURE__ */ jsx(RadioBubbleInput, {
|
|
47
|
+
control: button,
|
|
48
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
49
|
+
name,
|
|
50
|
+
value,
|
|
51
|
+
checked,
|
|
52
|
+
required,
|
|
53
|
+
disabled,
|
|
54
|
+
form,
|
|
55
|
+
style: {
|
|
56
|
+
transform: "translateX(-100%)"
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
Radio.displayName = RADIO_NAME;
|
|
63
|
+
var INDICATOR_NAME = "RadioIndicator";
|
|
64
|
+
var RadioIndicator = React.forwardRef((props, forwardedRef)=>{
|
|
65
|
+
const { __scopeRadio, forceMount, ...indicatorProps } = props;
|
|
66
|
+
const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
|
|
67
|
+
return /* @__PURE__ */ jsx(Presence, {
|
|
68
|
+
present: forceMount || context.checked,
|
|
69
|
+
children: /* @__PURE__ */ jsx(Primitive.span, {
|
|
70
|
+
"data-state": getState(context.checked),
|
|
71
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
72
|
+
...indicatorProps,
|
|
73
|
+
ref: forwardedRef
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
RadioIndicator.displayName = INDICATOR_NAME;
|
|
78
|
+
var BUBBLE_INPUT_NAME = "RadioBubbleInput";
|
|
79
|
+
var RadioBubbleInput = React.forwardRef(({ __scopeRadio, control, checked, bubbles = true, ...props }, forwardedRef)=>{
|
|
80
|
+
const ref = React.useRef(null);
|
|
81
|
+
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
82
|
+
const prevChecked = usePrevious(checked);
|
|
83
|
+
const controlSize = useSize(control);
|
|
84
|
+
React.useEffect(()=>{
|
|
85
|
+
const input = ref.current;
|
|
86
|
+
if (!input) return;
|
|
87
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
88
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
89
|
+
const setChecked = descriptor.set;
|
|
90
|
+
if (prevChecked !== checked && setChecked) {
|
|
91
|
+
const event = new Event("click", {
|
|
92
|
+
bubbles
|
|
93
|
+
});
|
|
94
|
+
setChecked.call(input, checked);
|
|
95
|
+
input.dispatchEvent(event);
|
|
96
|
+
}
|
|
97
|
+
}, [
|
|
98
|
+
prevChecked,
|
|
99
|
+
checked,
|
|
100
|
+
bubbles
|
|
101
|
+
]);
|
|
102
|
+
return /* @__PURE__ */ jsx(Primitive.input, {
|
|
103
|
+
type: "radio",
|
|
104
|
+
"aria-hidden": true,
|
|
105
|
+
defaultChecked: checked,
|
|
106
|
+
...props,
|
|
107
|
+
tabIndex: -1,
|
|
108
|
+
ref: composedRefs,
|
|
109
|
+
style: {
|
|
110
|
+
...props.style,
|
|
111
|
+
...controlSize,
|
|
112
|
+
position: "absolute",
|
|
113
|
+
pointerEvents: "none",
|
|
114
|
+
opacity: 0,
|
|
115
|
+
margin: 0
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
RadioBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
|
120
|
+
function getState(checked) {
|
|
121
|
+
return checked ? "checked" : "unchecked";
|
|
122
|
+
}
|
|
123
|
+
var ARROW_KEYS = [
|
|
124
|
+
"ArrowUp",
|
|
125
|
+
"ArrowDown",
|
|
126
|
+
"ArrowLeft",
|
|
127
|
+
"ArrowRight"
|
|
128
|
+
];
|
|
129
|
+
var RADIO_GROUP_NAME = "RadioGroup";
|
|
130
|
+
var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME, [
|
|
131
|
+
createRovingFocusGroupScope,
|
|
132
|
+
createRadioScope
|
|
133
|
+
]);
|
|
134
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
135
|
+
var useRadioScope = createRadioScope();
|
|
136
|
+
var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);
|
|
137
|
+
var RadioGroup$1 = React.forwardRef((props, forwardedRef)=>{
|
|
138
|
+
const { __scopeRadioGroup, name, defaultValue, value: valueProp, required = false, disabled = false, orientation, dir, loop = true, onValueChange, ...groupProps } = props;
|
|
139
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
140
|
+
const direction = useDirection(dir);
|
|
141
|
+
const [value, setValue] = useControllableState({
|
|
142
|
+
prop: valueProp,
|
|
143
|
+
defaultProp: defaultValue ?? null,
|
|
144
|
+
onChange: onValueChange,
|
|
145
|
+
caller: RADIO_GROUP_NAME
|
|
146
|
+
});
|
|
147
|
+
return /* @__PURE__ */ jsx(RadioGroupProvider, {
|
|
148
|
+
scope: __scopeRadioGroup,
|
|
149
|
+
name,
|
|
150
|
+
required,
|
|
151
|
+
disabled,
|
|
152
|
+
value,
|
|
153
|
+
onValueChange: setValue,
|
|
154
|
+
children: /* @__PURE__ */ jsx(Root, {
|
|
155
|
+
asChild: true,
|
|
156
|
+
...rovingFocusGroupScope,
|
|
157
|
+
orientation,
|
|
158
|
+
dir: direction,
|
|
159
|
+
loop,
|
|
160
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
161
|
+
role: "radiogroup",
|
|
162
|
+
"aria-required": required,
|
|
163
|
+
"aria-orientation": orientation,
|
|
164
|
+
"data-disabled": disabled ? "" : void 0,
|
|
165
|
+
dir: direction,
|
|
166
|
+
...groupProps,
|
|
167
|
+
ref: forwardedRef
|
|
168
|
+
})
|
|
169
|
+
})
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
RadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
173
|
+
var ITEM_NAME = "RadioGroupItem";
|
|
174
|
+
var RadioGroupItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
175
|
+
const { __scopeRadioGroup, disabled, ...itemProps } = props;
|
|
176
|
+
const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);
|
|
177
|
+
const isDisabled = context.disabled || disabled;
|
|
178
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
179
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
180
|
+
const ref = React.useRef(null);
|
|
181
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
182
|
+
const checked = context.value === itemProps.value;
|
|
183
|
+
const isArrowKeyPressedRef = React.useRef(false);
|
|
184
|
+
React.useEffect(()=>{
|
|
185
|
+
const handleKeyDown = (event)=>{
|
|
186
|
+
if (ARROW_KEYS.includes(event.key)) {
|
|
187
|
+
isArrowKeyPressedRef.current = true;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
const handleKeyUp = ()=>isArrowKeyPressedRef.current = false;
|
|
191
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
192
|
+
document.addEventListener("keyup", handleKeyUp);
|
|
193
|
+
return ()=>{
|
|
194
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
195
|
+
document.removeEventListener("keyup", handleKeyUp);
|
|
196
|
+
};
|
|
197
|
+
}, []);
|
|
198
|
+
return /* @__PURE__ */ jsx(Item, {
|
|
199
|
+
asChild: true,
|
|
200
|
+
...rovingFocusGroupScope,
|
|
201
|
+
focusable: !isDisabled,
|
|
202
|
+
active: checked,
|
|
203
|
+
children: /* @__PURE__ */ jsx(Radio, {
|
|
204
|
+
disabled: isDisabled,
|
|
205
|
+
required: context.required,
|
|
206
|
+
checked,
|
|
207
|
+
...radioScope,
|
|
208
|
+
...itemProps,
|
|
209
|
+
name: context.name,
|
|
210
|
+
ref: composedRefs,
|
|
211
|
+
onCheck: ()=>context.onValueChange(itemProps.value),
|
|
212
|
+
onKeyDown: composeEventHandlers((event)=>{
|
|
213
|
+
if (event.key === "Enter") event.preventDefault();
|
|
214
|
+
}),
|
|
215
|
+
onFocus: composeEventHandlers(itemProps.onFocus, ()=>{
|
|
216
|
+
if (isArrowKeyPressedRef.current) ref.current?.click();
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
RadioGroupItem$1.displayName = ITEM_NAME;
|
|
222
|
+
var INDICATOR_NAME2 = "RadioGroupIndicator";
|
|
223
|
+
var RadioGroupIndicator = React.forwardRef((props, forwardedRef)=>{
|
|
224
|
+
const { __scopeRadioGroup, ...indicatorProps } = props;
|
|
225
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
226
|
+
return /* @__PURE__ */ jsx(RadioIndicator, {
|
|
227
|
+
...radioScope,
|
|
228
|
+
...indicatorProps,
|
|
229
|
+
ref: forwardedRef
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
RadioGroupIndicator.displayName = INDICATOR_NAME2;
|
|
233
|
+
var Root2 = RadioGroup$1;
|
|
234
|
+
var Item2 = RadioGroupItem$1;
|
|
235
|
+
var Indicator = RadioGroupIndicator;
|
|
236
|
+
|
|
237
|
+
function RadioGroup({ className, ...props }) {
|
|
238
|
+
return /*#__PURE__*/ React.createElement(Root2, {
|
|
239
|
+
"data-slot": "radio-group",
|
|
240
|
+
className: cn("grid gap-3", className),
|
|
241
|
+
...props
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function RadioGroupItem({ className, ...props }) {
|
|
245
|
+
return /*#__PURE__*/ React.createElement(Item2, {
|
|
246
|
+
"data-slot": "radio-group-item",
|
|
247
|
+
className: cn("border-primary text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
248
|
+
...props
|
|
249
|
+
}, /*#__PURE__*/ React.createElement(Indicator, {
|
|
250
|
+
"data-slot": "radio-group-indicator",
|
|
251
|
+
className: "relative flex items-center justify-center"
|
|
252
|
+
}, /*#__PURE__*/ React.createElement(Check, {
|
|
253
|
+
className: "size-3 text-current"
|
|
254
|
+
})));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export { RadioGroup as R, RadioGroupItem as a };
|
|
258
|
+
//# sourceMappingURL=radio-group-r3ejuIom.mjs.map
|