@commercetools/nimbus 0.0.0-canary-20250919154858 → 0.0.0-canary-20250922152719
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.d.ts +2 -2
- package/dist/chunks/{accordion-CyaEB05t.es.js → accordion-CSSdv9jZ.es.js} +2 -2
- package/dist/chunks/{accordion-CyaEB05t.es.js.map → accordion-CSSdv9jZ.es.js.map} +1 -1
- package/dist/chunks/{accordion-CVM_3Y8u.cjs.js → accordion-xYvGyXy-.cjs.js} +2 -2
- package/dist/chunks/{accordion-CVM_3Y8u.cjs.js.map → accordion-xYvGyXy-.cjs.js.map} +1 -1
- package/dist/chunks/{alert-CQzbVGQM.es.js → alert-BRDuEo75.es.js} +2 -2
- package/dist/chunks/{alert-CQzbVGQM.es.js.map → alert-BRDuEo75.es.js.map} +1 -1
- package/dist/chunks/{alert-B1X_ycTY.cjs.js → alert-CWTCM8-i.cjs.js} +2 -2
- package/dist/chunks/{alert-B1X_ycTY.cjs.js.map → alert-CWTCM8-i.cjs.js.map} +1 -1
- package/dist/chunks/{button-DnZz51Rh.es.js → button-DRMpnb-1.es.js} +2 -2
- package/dist/chunks/{button-DnZz51Rh.es.js.map → button-DRMpnb-1.es.js.map} +1 -1
- package/dist/chunks/{button-RUSyHGQV.cjs.js → button-Dbf1b0F4.cjs.js} +2 -2
- package/dist/chunks/{button-RUSyHGQV.cjs.js.map → button-Dbf1b0F4.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-DhN7hRLB.cjs.js → calendar-CrTvsDQH.cjs.js} +2 -2
- package/dist/chunks/{calendar-DhN7hRLB.cjs.js.map → calendar-CrTvsDQH.cjs.js.map} +1 -1
- package/dist/chunks/{calendar-CrxxYJd-.es.js → calendar-DnQnMOcs.es.js} +4 -4
- package/dist/chunks/{calendar-CrxxYJd-.es.js.map → calendar-DnQnMOcs.es.js.map} +1 -1
- package/dist/chunks/{checkbox-CAvlAkX5.cjs.js → checkbox-Bv0NXUyX.cjs.js} +2 -2
- package/dist/chunks/{checkbox-CAvlAkX5.cjs.js.map → checkbox-Bv0NXUyX.cjs.js.map} +1 -1
- package/dist/chunks/{checkbox-BxRZ9dqc.es.js → checkbox-CdSHDZgM.es.js} +2 -2
- package/dist/chunks/{checkbox-BxRZ9dqc.es.js.map → checkbox-CdSHDZgM.es.js.map} +1 -1
- package/dist/chunks/combobox-C9pPDZQn.cjs.js +2 -0
- package/dist/chunks/combobox-C9pPDZQn.cjs.js.map +1 -0
- package/dist/chunks/{combobox-Bjv3GWGo.es.js → combobox-Dmn2vxIz.es.js} +991 -970
- package/dist/chunks/combobox-Dmn2vxIz.es.js.map +1 -0
- package/dist/chunks/{data-table-9C4ViaHW.es.js → data-table-CBr4TLyH.es.js} +6 -6
- package/dist/chunks/{data-table-9C4ViaHW.es.js.map → data-table-CBr4TLyH.es.js.map} +1 -1
- package/dist/chunks/{data-table-BoRy4kuE.cjs.js → data-table-DIsDZ5JZ.cjs.js} +2 -2
- package/dist/chunks/{data-table-BoRy4kuE.cjs.js.map → data-table-DIsDZ5JZ.cjs.js.map} +1 -1
- package/dist/chunks/date-input-CoAPdZTG.es.js +21 -0
- package/dist/chunks/date-input-CoAPdZTG.es.js.map +1 -0
- package/dist/chunks/date-input-DYC1t1e-.cjs.js +2 -0
- package/dist/chunks/date-input-DYC1t1e-.cjs.js.map +1 -0
- package/dist/chunks/date-picker-BVrTKhZ_.es.js +219 -0
- package/dist/chunks/date-picker-BVrTKhZ_.es.js.map +1 -0
- package/dist/chunks/date-picker-_7Gh_ROw.cjs.js +2 -0
- package/dist/chunks/date-picker-_7Gh_ROw.cjs.js.map +1 -0
- package/dist/chunks/{date-range-picker-CsUWSzSC.es.js → date-range-picker-D55giMLZ.es.js} +88 -91
- package/dist/chunks/date-range-picker-D55giMLZ.es.js.map +1 -0
- package/dist/chunks/date-range-picker-D7pPpSEj.cjs.js +2 -0
- package/dist/chunks/date-range-picker-D7pPpSEj.cjs.js.map +1 -0
- package/dist/chunks/{extractStyleProps-dSQoSYg8.cjs.js → extractStyleProps-CgqRiEwd.cjs.js} +2 -2
- package/dist/chunks/{extractStyleProps-dSQoSYg8.cjs.js.map → extractStyleProps-CgqRiEwd.cjs.js.map} +1 -1
- package/dist/chunks/{extractStyleProps-lz7NzsNX.es.js → extractStyleProps-DkXeCUuq.es.js} +2 -2
- package/dist/chunks/{extractStyleProps-lz7NzsNX.es.js.map → extractStyleProps-DkXeCUuq.es.js.map} +1 -1
- package/dist/chunks/{form-field-CPPobl2Z.es.js → form-field-DMs36b56.es.js} +2 -2
- package/dist/chunks/{form-field-CPPobl2Z.es.js.map → form-field-DMs36b56.es.js.map} +1 -1
- package/dist/chunks/{form-field-BoGSJF6d.cjs.js → form-field-cwK6KNEG.cjs.js} +2 -2
- package/dist/chunks/{form-field-BoGSJF6d.cjs.js.map → form-field-cwK6KNEG.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-CiBtEF0y.cjs.js → icon-button-0GLW7WtL.cjs.js} +2 -2
- package/dist/chunks/{icon-button-CiBtEF0y.cjs.js.map → icon-button-0GLW7WtL.cjs.js.map} +1 -1
- package/dist/chunks/{icon-button-N3Uzjv8o.es.js → icon-button-C_i4ydsN.es.js} +2 -2
- package/dist/chunks/{icon-button-N3Uzjv8o.es.js.map → icon-button-C_i4ydsN.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-BcrMgO27.es.js → icon-toggle-button-f03QyjEE.es.js} +2 -2
- package/dist/chunks/{icon-toggle-button-BcrMgO27.es.js.map → icon-toggle-button-f03QyjEE.es.js.map} +1 -1
- package/dist/chunks/{icon-toggle-button-DeiQ7jmM.cjs.js → icon-toggle-button-tJAqRjak.cjs.js} +2 -2
- package/dist/chunks/{icon-toggle-button-DeiQ7jmM.cjs.js.map → icon-toggle-button-tJAqRjak.cjs.js.map} +1 -1
- package/dist/chunks/{index-DwjTNyza.es.js → index-CRta5Y1_.es.js} +426 -300
- package/dist/chunks/index-CRta5Y1_.es.js.map +1 -0
- package/dist/chunks/index-DX8-EG6B.cjs.js +4 -0
- package/dist/chunks/index-DX8-EG6B.cjs.js.map +1 -0
- package/dist/chunks/{menu-vAP73jq6.es.js → menu-D5UbPSbm.es.js} +3 -3
- package/dist/chunks/{menu-vAP73jq6.es.js.map → menu-D5UbPSbm.es.js.map} +1 -1
- package/dist/chunks/{menu-n9jU7SCA.cjs.js → menu-cYj3HcOe.cjs.js} +2 -2
- package/dist/chunks/{menu-n9jU7SCA.cjs.js.map → menu-cYj3HcOe.cjs.js.map} +1 -1
- package/dist/chunks/{money-input-Dkl0TJ-w.es.js → money-input-CtG9FJDJ.es.js} +4 -4
- package/dist/chunks/{money-input-Dkl0TJ-w.es.js.map → money-input-CtG9FJDJ.es.js.map} +1 -1
- package/dist/chunks/{money-input-CZkI0cQZ.cjs.js → money-input-DXpiO23i.cjs.js} +2 -2
- package/dist/chunks/{money-input-CZkI0cQZ.cjs.js.map → money-input-DXpiO23i.cjs.js.map} +1 -1
- package/dist/chunks/multiline-text-input-DZaLPY2Z.es.js +193 -0
- package/dist/chunks/multiline-text-input-DZaLPY2Z.es.js.map +1 -0
- package/dist/chunks/multiline-text-input-XW9WrmJi.cjs.js +12 -0
- package/dist/chunks/multiline-text-input-XW9WrmJi.cjs.js.map +1 -0
- package/dist/chunks/{nimbus-provider-DQ1CPSp4.cjs.js → nimbus-provider--E4ETLbz.cjs.js} +2 -2
- package/dist/chunks/{nimbus-provider-DQ1CPSp4.cjs.js.map → nimbus-provider--E4ETLbz.cjs.js.map} +1 -1
- package/dist/chunks/{nimbus-provider-CH5x7sz1.es.js → nimbus-provider-BE3QFNWW.es.js} +2 -2
- package/dist/chunks/{nimbus-provider-CH5x7sz1.es.js.map → nimbus-provider-BE3QFNWW.es.js.map} +1 -1
- package/dist/chunks/number-input-C-suceSs.cjs.js +2 -0
- package/dist/chunks/{number-input-BCyiGbGY.cjs.js.map → number-input-C-suceSs.cjs.js.map} +1 -1
- package/dist/chunks/{number-input-CjBiCFF6.es.js → number-input-COfobs8H.es.js} +347 -339
- package/dist/chunks/{number-input-CjBiCFF6.es.js.map → number-input-COfobs8H.es.js.map} +1 -1
- package/dist/chunks/{pagination-CwZAtcMm.cjs.js → pagination-BM1xkmu9.cjs.js} +2 -2
- package/dist/chunks/{pagination-CwZAtcMm.cjs.js.map → pagination-BM1xkmu9.cjs.js.map} +1 -1
- package/dist/chunks/{pagination-BYCMJoWX.es.js → pagination-C5bOKHnF.es.js} +4 -4
- package/dist/chunks/{pagination-BYCMJoWX.es.js.map → pagination-C5bOKHnF.es.js.map} +1 -1
- package/dist/chunks/password-input-BXIl-f4z.es.js +54 -0
- package/dist/chunks/password-input-BXIl-f4z.es.js.map +1 -0
- package/dist/chunks/password-input-Br-DbsF2.cjs.js +2 -0
- package/dist/chunks/password-input-Br-DbsF2.cjs.js.map +1 -0
- package/dist/chunks/{progress-bar-DhG9TG8r.es.js → progress-bar-8RZO_7Pa.es.js} +2 -2
- package/dist/chunks/{progress-bar-DhG9TG8r.es.js.map → progress-bar-8RZO_7Pa.es.js.map} +1 -1
- package/dist/chunks/{progress-bar-C9ElCIQE.cjs.js → progress-bar-CGfPZTdv.cjs.js} +2 -2
- package/dist/chunks/{progress-bar-C9ElCIQE.cjs.js.map → progress-bar-CGfPZTdv.cjs.js.map} +1 -1
- package/dist/chunks/{radio-input-CV2Am_Ol.es.js → radio-input-CBsoUt1S.es.js} +3 -3
- package/dist/chunks/{radio-input-CV2Am_Ol.es.js.map → radio-input-CBsoUt1S.es.js.map} +1 -1
- package/dist/chunks/{radio-input-A7KxF_yz.cjs.js → radio-input-D7oHngVQ.cjs.js} +2 -2
- package/dist/chunks/{radio-input-A7KxF_yz.cjs.js.map → radio-input-D7oHngVQ.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-Dyt9IoJ_.cjs.js → range-calendar-CWkeoOzl.cjs.js} +2 -2
- package/dist/chunks/{range-calendar-Dyt9IoJ_.cjs.js.map → range-calendar-CWkeoOzl.cjs.js.map} +1 -1
- package/dist/chunks/{range-calendar-BpFwP2wF.es.js → range-calendar-ZSiCkuoX.es.js} +4 -4
- package/dist/chunks/{range-calendar-BpFwP2wF.es.js.map → range-calendar-ZSiCkuoX.es.js.map} +1 -1
- package/dist/chunks/{rich-text-input-sQtbxyfd.cjs.js → rich-text-input-CxWC-yrf.cjs.js} +2 -2
- package/dist/chunks/{rich-text-input-sQtbxyfd.cjs.js.map → rich-text-input-CxWC-yrf.cjs.js.map} +1 -1
- package/dist/chunks/{rich-text-input-BBVWAH5I.es.js → rich-text-input-YYPcexom.es.js} +7 -7
- package/dist/chunks/{rich-text-input-BBVWAH5I.es.js.map → rich-text-input-YYPcexom.es.js.map} +1 -1
- package/dist/chunks/{select-BvwErOqX.es.js → select-Bj9NNlBG.es.js} +156 -146
- package/dist/chunks/{select-BvwErOqX.es.js.map → select-Bj9NNlBG.es.js.map} +1 -1
- package/dist/chunks/select-DA6mGi-n.cjs.js +2 -0
- package/dist/chunks/{select-BL0Jeztf.cjs.js.map → select-DA6mGi-n.cjs.js.map} +1 -1
- package/dist/chunks/{separator-BRUFpi9l.es.js → separator-BBcK9ROS.es.js} +2 -2
- package/dist/chunks/{separator-BRUFpi9l.es.js.map → separator-BBcK9ROS.es.js.map} +1 -1
- package/dist/chunks/{separator-DKPbB_lK.cjs.js → separator-CoMx0Mmv.cjs.js} +2 -2
- package/dist/chunks/{separator-DKPbB_lK.cjs.js.map → separator-CoMx0Mmv.cjs.js.map} +1 -1
- package/dist/chunks/{split-button-B4SnFetQ.es.js → split-button-C5RRpvG-.es.js} +5 -5
- package/dist/chunks/{split-button-B4SnFetQ.es.js.map → split-button-C5RRpvG-.es.js.map} +1 -1
- package/dist/chunks/{split-button-Cs4jynee.cjs.js → split-button-DS-OCnNN.cjs.js} +2 -2
- package/dist/chunks/{split-button-Cs4jynee.cjs.js.map → split-button-DS-OCnNN.cjs.js.map} +1 -1
- package/dist/chunks/{switch-CssXPh09.es.js → switch-CaNbdCzT.es.js} +3 -3
- package/dist/chunks/{switch-CssXPh09.es.js.map → switch-CaNbdCzT.es.js.map} +1 -1
- package/dist/chunks/{switch-DAVy_DYC.cjs.js → switch-uAVIHIFM.cjs.js} +2 -2
- package/dist/chunks/{switch-DAVy_DYC.cjs.js.map → switch-uAVIHIFM.cjs.js.map} +1 -1
- package/dist/chunks/{tag-group-BJ33FcVi.cjs.js → tag-group-BfVRqsqw.cjs.js} +2 -2
- package/dist/chunks/{tag-group-BJ33FcVi.cjs.js.map → tag-group-BfVRqsqw.cjs.js.map} +1 -1
- package/dist/chunks/{tag-group-JeqOcMyb.es.js → tag-group-Bs6sb_ky.es.js} +2 -2
- package/dist/chunks/{tag-group-JeqOcMyb.es.js.map → tag-group-Bs6sb_ky.es.js.map} +1 -1
- package/dist/chunks/text-input-Bm5P6cG3.es.js +48 -0
- package/dist/chunks/text-input-Bm5P6cG3.es.js.map +1 -0
- package/dist/chunks/text-input-DgYI0-uU.cjs.js +2 -0
- package/dist/chunks/text-input-DgYI0-uU.cjs.js.map +1 -0
- package/dist/chunks/time-input-BVrf5gCi.es.js +179 -0
- package/dist/chunks/time-input-BVrf5gCi.es.js.map +1 -0
- package/dist/chunks/time-input-DOacr-Lo.cjs.js +2 -0
- package/dist/chunks/time-input-DOacr-Lo.cjs.js.map +1 -0
- package/dist/chunks/{toggle-button-DSp3s7cp.es.js → toggle-button-Bg4ygY7u.es.js} +3 -3
- package/dist/chunks/{toggle-button-DSp3s7cp.es.js.map → toggle-button-Bg4ygY7u.es.js.map} +1 -1
- package/dist/chunks/{toggle-button-BCDj-UQB.cjs.js → toggle-button-CoA46qg6.cjs.js} +2 -2
- package/dist/chunks/{toggle-button-BCDj-UQB.cjs.js.map → toggle-button-CoA46qg6.cjs.js.map} +1 -1
- package/dist/chunks/{toolbar-_QcKjeZY.es.js → toolbar-BZFjOgau.es.js} +3 -3
- package/dist/chunks/{toolbar-_QcKjeZY.es.js.map → toolbar-BZFjOgau.es.js.map} +1 -1
- package/dist/chunks/{toolbar-DSpz9u4Z.cjs.js → toolbar-CRak3D0J.cjs.js} +2 -2
- package/dist/chunks/{toolbar-DSpz9u4Z.cjs.js.map → toolbar-CRak3D0J.cjs.js.map} +1 -1
- package/dist/combobox.d.ts +26 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.es.js +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.es.js +1 -1
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.es.js +1 -1
- package/dist/components/combobox.cjs +1 -1
- package/dist/components/combobox.es.js +1 -1
- package/dist/components/components.cjs +1 -1
- package/dist/components/components.es.js +33 -33
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.es.js +1 -1
- package/dist/components/date-input.cjs +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.cjs +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.es.js +1 -1
- package/dist/components/icon-button.cjs +1 -1
- package/dist/components/icon-button.es.js +1 -1
- package/dist/components/icon-toggle-button.cjs +1 -1
- package/dist/components/icon-toggle-button.es.js +1 -1
- package/dist/components/money-input.cjs +1 -1
- package/dist/components/money-input.es.js +1 -1
- package/dist/components/multiline-text-input.cjs +1 -1
- package/dist/components/multiline-text-input.es.js +1 -1
- package/dist/components/nimbus-provider.cjs +1 -1
- package/dist/components/nimbus-provider.es.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.es.js +1 -1
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.es.js +1 -1
- package/dist/components/password-input.cjs +1 -1
- package/dist/components/password-input.es.js +1 -1
- package/dist/components/progress-bar.cjs +1 -1
- package/dist/components/progress-bar.es.js +1 -1
- package/dist/components/radio-input.cjs +1 -1
- package/dist/components/radio-input.es.js +1 -1
- package/dist/components/range-calendar.cjs +1 -1
- package/dist/components/range-calendar.es.js +1 -1
- package/dist/components/rich-text-input.cjs +1 -1
- package/dist/components/rich-text-input.es.js +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.es.js +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.es.js +1 -1
- package/dist/components/split-button.cjs +1 -1
- package/dist/components/split-button.es.js +1 -1
- package/dist/components/switch.cjs +1 -1
- package/dist/components/switch.es.js +1 -1
- package/dist/components/tag-group.cjs +1 -1
- package/dist/components/tag-group.es.js +1 -1
- package/dist/components/text-input.cjs +1 -1
- package/dist/components/text-input.es.js +1 -1
- package/dist/components/time-input.cjs +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/components/toggle-button.cjs +1 -1
- package/dist/components/toggle-button.es.js +1 -1
- package/dist/components/toolbar.cjs +1 -1
- package/dist/components/toolbar.es.js +1 -1
- package/dist/components.d.ts +302 -114
- package/dist/data-table.d.ts +6 -6
- package/dist/date-input.d.ts +43 -10
- package/dist/date-picker.d.ts +46 -31
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +316 -128
- package/dist/index.es.js +36 -36
- package/dist/multiline-text-input.d.ts +49 -9
- package/dist/number-input.d.ts +50 -31
- package/dist/password-input.d.ts +59 -25
- package/dist/select.d.ts +19 -2
- package/dist/text-input.d.ts +53 -21
- package/dist/time-input.d.ts +48 -12
- package/package.json +5 -5
- package/dist/chunks/combobox-Bjv3GWGo.es.js.map +0 -1
- package/dist/chunks/combobox-DFEUqaQv.cjs.js +0 -2
- package/dist/chunks/combobox-DFEUqaQv.cjs.js.map +0 -1
- package/dist/chunks/date-input-BfX4o6R4.es.js +0 -16
- package/dist/chunks/date-input-BfX4o6R4.es.js.map +0 -1
- package/dist/chunks/date-input-sKLgo0X8.cjs.js +0 -2
- package/dist/chunks/date-input-sKLgo0X8.cjs.js.map +0 -1
- package/dist/chunks/date-picker-BviqgxDx.es.js +0 -222
- package/dist/chunks/date-picker-BviqgxDx.es.js.map +0 -1
- package/dist/chunks/date-picker-STd_oI72.cjs.js +0 -2
- package/dist/chunks/date-picker-STd_oI72.cjs.js.map +0 -1
- package/dist/chunks/date-range-picker-CsUWSzSC.es.js.map +0 -1
- package/dist/chunks/date-range-picker-cA84RzN7.cjs.js +0 -2
- package/dist/chunks/date-range-picker-cA84RzN7.cjs.js.map +0 -1
- package/dist/chunks/index-DebuynT7.cjs.js +0 -4
- package/dist/chunks/index-DebuynT7.cjs.js.map +0 -1
- package/dist/chunks/index-DwjTNyza.es.js.map +0 -1
- package/dist/chunks/multiline-text-input-B9RhT0Oy.es.js +0 -118
- package/dist/chunks/multiline-text-input-B9RhT0Oy.es.js.map +0 -1
- package/dist/chunks/multiline-text-input-BGT_-xyA.cjs.js +0 -12
- package/dist/chunks/multiline-text-input-BGT_-xyA.cjs.js.map +0 -1
- package/dist/chunks/number-input-BCyiGbGY.cjs.js +0 -2
- package/dist/chunks/password-input-BkTbfljJ.cjs.js +0 -2
- package/dist/chunks/password-input-BkTbfljJ.cjs.js.map +0 -1
- package/dist/chunks/password-input-BlU2h_8U.es.js +0 -67
- package/dist/chunks/password-input-BlU2h_8U.es.js.map +0 -1
- package/dist/chunks/select-BL0Jeztf.cjs.js +0 -2
- package/dist/chunks/text-input-Bu4lGoBD.es.js +0 -18
- package/dist/chunks/text-input-Bu4lGoBD.es.js.map +0 -1
- package/dist/chunks/text-input-DtMgT0KI.cjs.js +0 -2
- package/dist/chunks/text-input-DtMgT0KI.cjs.js.map +0 -1
- package/dist/chunks/time-input-D8D26IcA.es.js +0 -130
- package/dist/chunks/time-input-D8D26IcA.es.js.map +0 -1
- package/dist/chunks/time-input-D9Xmy3YQ.cjs.js +0 -2
- package/dist/chunks/time-input-D9Xmy3YQ.cjs.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiline-text-input-B9RhT0Oy.es.js","sources":["../../src/components/multiline-text-input/multiline-text-input.recipe.tsx","../../src/components/multiline-text-input/multiline-text-input.slots.tsx","../../src/components/multiline-text-input/multiline-text-input.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react/styled-system\";\nimport { designTokens } from \"@commercetools/nimbus-tokens\";\n\n/**\n * Recipe configuration for the MultilineTextInput component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const multilineTextInputRecipe = defineRecipe({\n // Unique class name prefix for the component\n className: \"nimbus-multiline-text-input\",\n\n // Base styles applied to all instances of the component\n base: {\n display: \"block\",\n overflowY: \"auto\",\n borderRadius: \"200\",\n colorPalette: \"neutral\",\n focusVisibleRing: \"outside\",\n bg: \"transparent\",\n outline: \"none\",\n boxShadow: \"inset 0 0 0 var(--border-width) var(--border-color)\",\n resize: \"vertical\",\n fontFamily: \"inherit\",\n _placeholder: {\n opacity: 0.5,\n color: \"currentColor\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n bg: \"neutral.3\",\n },\n \"&[data-invalid='true']\": {\n \"--border-width\": \"sizes.50\",\n \"--border-color\": \"colors.critical.7\",\n color: \"critical.11\",\n },\n \"&::-webkit-resizer\": {\n backgroundImage: `url(\"data:image/svg+xml,${encodeURIComponent(`\n <svg width=\"8\" height=\"8\" viewBox=\"0 0 8 8\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id=\"mask0_4610_25787\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"-1\" y=\"-1\" width=\"9\" height=\"9\">\n <rect width=\"1.03391\" height=\"4.13563\" transform=\"matrix(0.716449 0.69764 -0.716449 0.69764 6.92578 4.05362)\" fill=\"currentColor\"/>\n <rect width=\"1.03391\" height=\"8.27125\" transform=\"matrix(0.716448 0.69764 -0.716448 0.69764 5.87891 -0.0262451)\" fill=\"currentColor\"/>\n </mask>\n <g mask=\"url(#mask0_4610_25787)\">\n <rect width=\"8\" height=\"8\" fill=\"${designTokens.color[\"semantic-palettes\"].primary.light[9]}\"/>\n </g>\n </svg>\n `)}\")`,\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center\",\n backgroundSize: \"200 200\",\n width: \"400\",\n height: \"400\",\n },\n },\n\n variants: {\n size: {\n sm: {\n minH: 800,\n textStyle: \"sm\",\n px: 300,\n py: 100,\n },\n md: {\n minH: 1000,\n textStyle: \"md\",\n px: 400,\n py: 200,\n },\n },\n\n variant: {\n solid: {\n \"--border-width\": \"sizes.25\",\n \"--border-color\": \"colors.neutral.7\",\n backgroundColor: \"neutral.1\",\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n ghost: {\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n },\n },\n\n defaultVariants: {\n size: \"md\",\n variant: \"solid\",\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { multilineTextInputRecipe } from \"./multiline-text-input.recipe\";\n\nexport interface MultilineTextInputRecipeProps\n extends RecipeVariantProps<typeof multilineTextInputRecipe>,\n UnstyledProp {}\n\nexport type MultilineTextInputRootSlotProps = HTMLChakraProps<\n \"textarea\",\n MultilineTextInputRecipeProps\n>;\n\nconst { withContext } = createRecipeContext({\n recipe: multilineTextInputRecipe,\n});\n\n/**\n * Root component that provides the styling context for the MultilineTextInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const MultilineTextInputRootSlot = withContext<\n HTMLTextAreaElement,\n MultilineTextInputRootSlotProps\n>(\"textarea\");\n","import { useRef, useEffect, useCallback } from \"react\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { useObjectRef, useTextField } from \"react-aria\";\nimport { TextArea } from \"react-aria-components\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nimport { MultilineTextInputRootSlot } from \"./multiline-text-input.slots\";\nimport type { MultilineTextInputProps } from \"./multiline-text-input.types\";\nimport { multilineTextInputRecipe } from \"./multiline-text-input.recipe\";\n\n/**\n * # Multiline Text Input\n *\n * A multiline text input component for capturing longer text content.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/forms/multiline-text-input}\n */\nexport const MultilineTextInput = (props: MultilineTextInputProps) => {\n const { ref: forwardedRef, rows = 1, autoGrow = false, ...restProps } = props; // The default `rows` attribute for a textarea is 2, so we need to override it\n const recipe = useRecipe({ recipe: multilineTextInputRecipe });\n\n const localRef = useRef<HTMLTextAreaElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const [recipeProps, remainingProps] = recipe.splitVariantProps(restProps);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n const { inputProps } = useTextField<\"textarea\">(otherProps, ref);\n\n // Auto-grow functionality\n const adjustHeight = useCallback(() => {\n const textarea = ref.current;\n if (!textarea || !autoGrow) return;\n\n // Reset height to auto to get the correct scrollHeight\n textarea.style.height = \"auto\";\n\n // Calculate the new height based on content\n const contentHeight = textarea.scrollHeight;\n\n // Always resize to fit content (both growing and shrinking)\n // This ensures the textarea always fits the content exactly\n const newHeight = contentHeight;\n\n // Apply maxHeight constraint if specified\n const computedStyle = window.getComputedStyle(textarea);\n const maxHeightPxValue = parseInt(computedStyle.maxHeight);\n const finalHeight = maxHeightPxValue\n ? Math.min(newHeight, maxHeightPxValue)\n : newHeight;\n\n // Set the new height\n textarea.style.height = `${finalHeight}px`;\n }, [autoGrow, ref]);\n\n // Set up auto-grow behavior with event listeners\n useEffect(() => {\n const textarea = ref.current;\n if (!textarea || !autoGrow) return;\n\n // Initial adjustment\n adjustHeight();\n\n // Add input event listener for real-time adjustments\n const handleInput = () => {\n adjustHeight();\n };\n\n textarea.addEventListener(\"input\", handleInput);\n\n // Cleanup\n return () => {\n textarea.removeEventListener(\"input\", handleInput);\n };\n }, [adjustHeight, autoGrow, ref]);\n\n return (\n <MultilineTextInputRootSlot {...recipeProps} {...styleProps} asChild>\n <TextArea ref={ref} rows={rows} {...inputProps} />\n </MultilineTextInputRootSlot>\n );\n};\n\nMultilineTextInput.displayName = \"MultilineTextInput\";\n"],"names":["multilineTextInputRecipe","defineRecipe","designTokens","withContext","createRecipeContext","MultilineTextInputRootSlot","MultilineTextInput","props","forwardedRef","rows","autoGrow","restProps","recipe","useRecipe","localRef","useRef","ref","useObjectRef","mergeRefs","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","inputProps","useTextField","adjustHeight","useCallback","textarea","newHeight","computedStyle","maxHeightPxValue","finalHeight","useEffect","handleInput","jsx","TextArea"],"mappings":";;;;;;;;;AAOO,MAAMA,IAA2B,gBAAAC,EAAa;AAAA;AAAA,EAEnD,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,WAAW;AAAA,IACX,cAAc;AAAA,IACd,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,IAET,WAAW;AAAA,MACT,YAAY;AAAA,MACZ,IAAI;AAAA,IAAA;AAAA,IAEN,0BAA0B;AAAA,MACxB,kBAAkB;AAAA,MAClB,kBAAkB;AAAA,MAClB,OAAO;AAAA,IAAA;AAAA,IAET,sBAAsB;AAAA,MACpB,iBAAiB,2BAA2B,mCAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAOtBC,EAAa,MAAM,mBAAmB,EAAE,QAAQ,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,OAGhG,CAAC;AAAA,MACF,kBAAkB;AAAA,MAClB,oBAAoB;AAAA,MACpB,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAGF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,QACF,MAAM;AAAA,QACN,WAAW;AAAA,QACX,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,IAAI;AAAA,QACF,MAAM;AAAA,QACN,WAAW;AAAA,QACX,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAGF,SAAS;AAAA,MACP,OAAO;AAAA,QACL,kBAAkB;AAAA,QAClB,kBAAkB;AAAA,QAClB,iBAAiB;AAAA,QACjB,QAAQ;AAAA,UACN,iBAAiB;AAAA,QAAA;AAAA,MACnB;AAAA,MAEF,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,iBAAiB;AAAA,QAAA;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAAA,EAGF,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,CAAC,GC3EK,EAAE,aAAAC,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,QAAQJ;AACV,CAAC,GAMYK,IAA6B,gBAAAF,EAGxC,UAAU,GCXCG,IAAqB,CAACC,MAAmC;AACpE,QAAM,EAAE,KAAKC,GAAc,MAAAC,IAAO,GAAG,UAAAC,IAAW,IAAO,GAAGC,EAAA,IAAcJ,GAClEK,IAASC,EAAU,EAAE,QAAQb,GAA0B,GAEvDc,IAAWC,EAA4B,IAAI,GAC3CC,IAAMC,EAAaC,EAAUJ,GAAUN,CAAY,CAAC,GAEpD,CAACW,GAAaC,CAAc,IAAIR,EAAO,kBAAkBD,CAAS,GAClE,CAACU,GAAYC,CAAU,IAAIC,EAAkBH,CAAc,GAC3D,EAAE,YAAAI,EAAA,IAAeC,EAAyBH,GAAYN,CAAG,GAGzDU,IAAeC,EAAY,MAAM;AACrC,UAAMC,IAAWZ,EAAI;AACrB,QAAI,CAACY,KAAY,CAAClB,EAAU;AAG5B,IAAAkB,EAAS,MAAM,SAAS;AAOxB,UAAMC,IAJgBD,EAAS,cAOzBE,IAAgB,OAAO,iBAAiBF,CAAQ,GAChDG,IAAmB,SAASD,EAAc,SAAS,GACnDE,IAAcD,IAChB,KAAK,IAAIF,GAAWE,CAAgB,IACpCF;AAGJ,IAAAD,EAAS,MAAM,SAAS,GAAGI,CAAW;AAAA,EACxC,GAAG,CAACtB,GAAUM,CAAG,CAAC;AAGlB,SAAAiB,EAAU,MAAM;AACd,UAAML,IAAWZ,EAAI;AACrB,QAAI,CAACY,KAAY,CAAClB,EAAU;AAG5B,IAAAgB,EAAA;AAGA,UAAMQ,IAAc,MAAM;AACxB,MAAAR,EAAA;AAAA,IACF;AAEA,WAAAE,EAAS,iBAAiB,SAASM,CAAW,GAGvC,MAAM;AACX,MAAAN,EAAS,oBAAoB,SAASM,CAAW;AAAA,IACnD;AAAA,EACF,GAAG,CAACR,GAAchB,GAAUM,CAAG,CAAC,GAG9B,gBAAAmB,EAAC9B,GAAA,EAA4B,GAAGc,GAAc,GAAGE,GAAY,SAAO,IAClE,UAAA,gBAAAc,EAACC,GAAA,EAAS,KAAApB,GAAU,MAAAP,GAAa,GAAGe,GAAY,GAClD;AAEJ;AAEAlB,EAAmB,cAAc;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";const l=require("react/jsx-runtime"),n=require("react"),P=require("@chakra-ui/react"),s=require("@chakra-ui/react/styled-system"),S=require("./TextArea-D3FFXnUy.cjs.js"),$=require("./extractStyleProps-dSQoSYg8.cjs.js"),H=require("@commercetools/nimbus-tokens"),q=require("./useObjectRef-dXOJdONs.cjs.js"),I=require("./useTextField-BcthGRd8.cjs.js"),u=s.defineRecipe({className:"nimbus-multiline-text-input",base:{display:"block",overflowY:"auto",borderRadius:"200",colorPalette:"neutral",focusVisibleRing:"outside",bg:"transparent",outline:"none",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)",resize:"vertical",fontFamily:"inherit",_placeholder:{opacity:.5,color:"currentColor"},_disabled:{layerStyle:"disabled",bg:"neutral.3"},"&[data-invalid='true']":{"--border-width":"sizes.50","--border-color":"colors.critical.7",color:"critical.11"},"&::-webkit-resizer":{backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(`
|
|
2
|
-
<svg width="8" height="8" viewBox="0 0 8 8" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<mask id="mask0_4610_25787" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="-1" y="-1" width="9" height="9">
|
|
4
|
-
<rect width="1.03391" height="4.13563" transform="matrix(0.716449 0.69764 -0.716449 0.69764 6.92578 4.05362)" fill="currentColor"/>
|
|
5
|
-
<rect width="1.03391" height="8.27125" transform="matrix(0.716448 0.69764 -0.716448 0.69764 5.87891 -0.0262451)" fill="currentColor"/>
|
|
6
|
-
</mask>
|
|
7
|
-
<g mask="url(#mask0_4610_25787)">
|
|
8
|
-
<rect width="8" height="8" fill="${H.designTokens.color["semantic-palettes"].primary.light[9]}"/>
|
|
9
|
-
</g>
|
|
10
|
-
</svg>
|
|
11
|
-
`)}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"200 200",width:"400",height:"400"}},variants:{size:{sm:{minH:800,textStyle:"sm",px:300,py:100},md:{minH:1e3,textStyle:"md",px:400,py:200}},variant:{solid:{"--border-width":"sizes.25","--border-color":"colors.neutral.7",backgroundColor:"neutral.1",_hover:{backgroundColor:"primary.2"}},ghost:{_hover:{backgroundColor:"primary.2"}}}},defaultVariants:{size:"md",variant:"solid"}}),{withContext:T}=s.createRecipeContext({recipe:u}),_=T("textarea"),d=p=>{const{ref:h,rows:m=1,autoGrow:r=!1,...g}=p,x=s.useRecipe({recipe:u}),f=n.useRef(null),t=q.$df56164dff5785e2$export$4338b53315abf666(P.mergeRefs(f,h)),[b,y]=x.splitVariantProps(g),[w,k]=$.extractStyleProps(y),{inputProps:v}=I.$2d73ec29415bd339$export$712718f7aec83d5(k,t),o=n.useCallback(()=>{const e=t.current;if(!e||!r)return;e.style.height="auto";const a=e.scrollHeight,R=window.getComputedStyle(e),c=parseInt(R.maxHeight),C=c?Math.min(a,c):a;e.style.height=`${C}px`},[r,t]);return n.useEffect(()=>{const e=t.current;if(!e||!r)return;o();const i=()=>{o()};return e.addEventListener("input",i),()=>{e.removeEventListener("input",i)}},[o,r,t]),l.jsx(_,{...b,...w,asChild:!0,children:l.jsx(S.$216918bed6669f72$export$f5c9f3c2c4054eec,{ref:t,rows:m,...v})})};d.displayName="MultilineTextInput";exports.MultilineTextInput=d;
|
|
12
|
-
//# sourceMappingURL=multiline-text-input-BGT_-xyA.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiline-text-input-BGT_-xyA.cjs.js","sources":["../../src/components/multiline-text-input/multiline-text-input.recipe.tsx","../../src/components/multiline-text-input/multiline-text-input.slots.tsx","../../src/components/multiline-text-input/multiline-text-input.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react/styled-system\";\nimport { designTokens } from \"@commercetools/nimbus-tokens\";\n\n/**\n * Recipe configuration for the MultilineTextInput component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const multilineTextInputRecipe = defineRecipe({\n // Unique class name prefix for the component\n className: \"nimbus-multiline-text-input\",\n\n // Base styles applied to all instances of the component\n base: {\n display: \"block\",\n overflowY: \"auto\",\n borderRadius: \"200\",\n colorPalette: \"neutral\",\n focusVisibleRing: \"outside\",\n bg: \"transparent\",\n outline: \"none\",\n boxShadow: \"inset 0 0 0 var(--border-width) var(--border-color)\",\n resize: \"vertical\",\n fontFamily: \"inherit\",\n _placeholder: {\n opacity: 0.5,\n color: \"currentColor\",\n },\n _disabled: {\n layerStyle: \"disabled\",\n bg: \"neutral.3\",\n },\n \"&[data-invalid='true']\": {\n \"--border-width\": \"sizes.50\",\n \"--border-color\": \"colors.critical.7\",\n color: \"critical.11\",\n },\n \"&::-webkit-resizer\": {\n backgroundImage: `url(\"data:image/svg+xml,${encodeURIComponent(`\n <svg width=\"8\" height=\"8\" viewBox=\"0 0 8 8\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id=\"mask0_4610_25787\" style=\"mask-type:alpha\" maskUnits=\"userSpaceOnUse\" x=\"-1\" y=\"-1\" width=\"9\" height=\"9\">\n <rect width=\"1.03391\" height=\"4.13563\" transform=\"matrix(0.716449 0.69764 -0.716449 0.69764 6.92578 4.05362)\" fill=\"currentColor\"/>\n <rect width=\"1.03391\" height=\"8.27125\" transform=\"matrix(0.716448 0.69764 -0.716448 0.69764 5.87891 -0.0262451)\" fill=\"currentColor\"/>\n </mask>\n <g mask=\"url(#mask0_4610_25787)\">\n <rect width=\"8\" height=\"8\" fill=\"${designTokens.color[\"semantic-palettes\"].primary.light[9]}\"/>\n </g>\n </svg>\n `)}\")`,\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"center\",\n backgroundSize: \"200 200\",\n width: \"400\",\n height: \"400\",\n },\n },\n\n variants: {\n size: {\n sm: {\n minH: 800,\n textStyle: \"sm\",\n px: 300,\n py: 100,\n },\n md: {\n minH: 1000,\n textStyle: \"md\",\n px: 400,\n py: 200,\n },\n },\n\n variant: {\n solid: {\n \"--border-width\": \"sizes.25\",\n \"--border-color\": \"colors.neutral.7\",\n backgroundColor: \"neutral.1\",\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n ghost: {\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n },\n },\n\n defaultVariants: {\n size: \"md\",\n variant: \"solid\",\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { multilineTextInputRecipe } from \"./multiline-text-input.recipe\";\n\nexport interface MultilineTextInputRecipeProps\n extends RecipeVariantProps<typeof multilineTextInputRecipe>,\n UnstyledProp {}\n\nexport type MultilineTextInputRootSlotProps = HTMLChakraProps<\n \"textarea\",\n MultilineTextInputRecipeProps\n>;\n\nconst { withContext } = createRecipeContext({\n recipe: multilineTextInputRecipe,\n});\n\n/**\n * Root component that provides the styling context for the MultilineTextInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const MultilineTextInputRootSlot = withContext<\n HTMLTextAreaElement,\n MultilineTextInputRootSlotProps\n>(\"textarea\");\n","import { useRef, useEffect, useCallback } from \"react\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { useObjectRef, useTextField } from \"react-aria\";\nimport { TextArea } from \"react-aria-components\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nimport { MultilineTextInputRootSlot } from \"./multiline-text-input.slots\";\nimport type { MultilineTextInputProps } from \"./multiline-text-input.types\";\nimport { multilineTextInputRecipe } from \"./multiline-text-input.recipe\";\n\n/**\n * # Multiline Text Input\n *\n * A multiline text input component for capturing longer text content.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/forms/multiline-text-input}\n */\nexport const MultilineTextInput = (props: MultilineTextInputProps) => {\n const { ref: forwardedRef, rows = 1, autoGrow = false, ...restProps } = props; // The default `rows` attribute for a textarea is 2, so we need to override it\n const recipe = useRecipe({ recipe: multilineTextInputRecipe });\n\n const localRef = useRef<HTMLTextAreaElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const [recipeProps, remainingProps] = recipe.splitVariantProps(restProps);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n const { inputProps } = useTextField<\"textarea\">(otherProps, ref);\n\n // Auto-grow functionality\n const adjustHeight = useCallback(() => {\n const textarea = ref.current;\n if (!textarea || !autoGrow) return;\n\n // Reset height to auto to get the correct scrollHeight\n textarea.style.height = \"auto\";\n\n // Calculate the new height based on content\n const contentHeight = textarea.scrollHeight;\n\n // Always resize to fit content (both growing and shrinking)\n // This ensures the textarea always fits the content exactly\n const newHeight = contentHeight;\n\n // Apply maxHeight constraint if specified\n const computedStyle = window.getComputedStyle(textarea);\n const maxHeightPxValue = parseInt(computedStyle.maxHeight);\n const finalHeight = maxHeightPxValue\n ? Math.min(newHeight, maxHeightPxValue)\n : newHeight;\n\n // Set the new height\n textarea.style.height = `${finalHeight}px`;\n }, [autoGrow, ref]);\n\n // Set up auto-grow behavior with event listeners\n useEffect(() => {\n const textarea = ref.current;\n if (!textarea || !autoGrow) return;\n\n // Initial adjustment\n adjustHeight();\n\n // Add input event listener for real-time adjustments\n const handleInput = () => {\n adjustHeight();\n };\n\n textarea.addEventListener(\"input\", handleInput);\n\n // Cleanup\n return () => {\n textarea.removeEventListener(\"input\", handleInput);\n };\n }, [adjustHeight, autoGrow, ref]);\n\n return (\n <MultilineTextInputRootSlot {...recipeProps} {...styleProps} asChild>\n <TextArea ref={ref} rows={rows} {...inputProps} />\n </MultilineTextInputRootSlot>\n );\n};\n\nMultilineTextInput.displayName = \"MultilineTextInput\";\n"],"names":["multilineTextInputRecipe","defineRecipe","designTokens","withContext","createRecipeContext","MultilineTextInputRootSlot","MultilineTextInput","props","forwardedRef","rows","autoGrow","restProps","recipe","useRecipe","localRef","useRef","ref","useObjectRef","mergeRefs","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","inputProps","useTextField","adjustHeight","useCallback","textarea","newHeight","computedStyle","maxHeightPxValue","finalHeight","useEffect","handleInput","jsx","TextArea"],"mappings":"0WAOaA,EAA2BC,EAAAA,aAAa,CAEnD,UAAW,8BAGX,KAAM,CACJ,QAAS,QACT,UAAW,OACX,aAAc,MACd,aAAc,UACd,iBAAkB,UAClB,GAAI,cACJ,QAAS,OACT,UAAW,sDACX,OAAQ,WACR,WAAY,UACZ,aAAc,CACZ,QAAS,GACT,MAAO,cAAA,EAET,UAAW,CACT,WAAY,WACZ,GAAI,WAAA,EAEN,yBAA0B,CACxB,iBAAkB,WAClB,iBAAkB,oBAClB,MAAO,aAAA,EAET,qBAAsB,CACpB,gBAAiB,2BAA2B,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAOtBC,EAAAA,aAAa,MAAM,mBAAmB,EAAE,QAAQ,MAAM,CAAC,CAAC;AAAA;AAAA;AAAA,OAGhG,CAAC,KACF,iBAAkB,YAClB,mBAAoB,SACpB,eAAgB,UAChB,MAAO,MACP,OAAQ,KAAA,CACV,EAGF,SAAU,CACR,KAAM,CACJ,GAAI,CACF,KAAM,IACN,UAAW,KACX,GAAI,IACJ,GAAI,GAAA,EAEN,GAAI,CACF,KAAM,IACN,UAAW,KACX,GAAI,IACJ,GAAI,GAAA,CACN,EAGF,QAAS,CACP,MAAO,CACL,iBAAkB,WAClB,iBAAkB,mBAClB,gBAAiB,YACjB,OAAQ,CACN,gBAAiB,WAAA,CACnB,EAEF,MAAO,CACL,OAAQ,CACN,gBAAiB,WAAA,CACnB,CACF,CACF,EAGF,gBAAiB,CACf,KAAM,KACN,QAAS,OAAA,CAEb,CAAC,EC3EK,CAAE,YAAAC,CAAA,EAAgBC,sBAAoB,CAC1C,OAAQJ,CACV,CAAC,EAMYK,EAA6BF,EAGxC,UAAU,ECXCG,EAAsBC,GAAmC,CACpE,KAAM,CAAE,IAAKC,EAAc,KAAAC,EAAO,EAAG,SAAAC,EAAW,GAAO,GAAGC,CAAA,EAAcJ,EAClEK,EAASC,EAAAA,UAAU,CAAE,OAAQb,EAA0B,EAEvDc,EAAWC,EAAAA,OAA4B,IAAI,EAC3CC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUN,CAAY,CAAC,EAEpD,CAACW,EAAaC,CAAc,EAAIR,EAAO,kBAAkBD,CAAS,EAClE,CAACU,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAC3D,CAAE,WAAAI,CAAA,EAAeC,2CAAyBH,EAAYN,CAAG,EAGzDU,EAAeC,EAAAA,YAAY,IAAM,CACrC,MAAMC,EAAWZ,EAAI,QACrB,GAAI,CAACY,GAAY,CAAClB,EAAU,OAG5BkB,EAAS,MAAM,OAAS,OAOxB,MAAMC,EAJgBD,EAAS,aAOzBE,EAAgB,OAAO,iBAAiBF,CAAQ,EAChDG,EAAmB,SAASD,EAAc,SAAS,EACnDE,EAAcD,EAChB,KAAK,IAAIF,EAAWE,CAAgB,EACpCF,EAGJD,EAAS,MAAM,OAAS,GAAGI,CAAW,IACxC,EAAG,CAACtB,EAAUM,CAAG,CAAC,EAGlBiB,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAML,EAAWZ,EAAI,QACrB,GAAI,CAACY,GAAY,CAAClB,EAAU,OAG5BgB,EAAA,EAGA,MAAMQ,EAAc,IAAM,CACxBR,EAAA,CACF,EAEA,OAAAE,EAAS,iBAAiB,QAASM,CAAW,EAGvC,IAAM,CACXN,EAAS,oBAAoB,QAASM,CAAW,CACnD,CACF,EAAG,CAACR,EAAchB,EAAUM,CAAG,CAAC,EAG9BmB,EAAAA,IAAC9B,EAAA,CAA4B,GAAGc,EAAc,GAAGE,EAAY,QAAO,GAClE,SAAAc,EAAAA,IAACC,EAAAA,0CAAA,CAAS,IAAApB,EAAU,KAAAP,EAAa,GAAGe,EAAY,EAClD,CAEJ,EAEAlB,EAAmB,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const y=require("react/jsx-runtime"),s=require("react"),$a=require("@chakra-ui/react"),pe=require("@chakra-ui/react/styled-system"),ma=require("./box-CWni3A32.cjs.js"),de=require("@commercetools/nimbus-icons"),pa=require("./extractStyleProps-dSQoSYg8.cjs.js"),xe=require("./Button-BtJHe9xY.cjs.js"),xa=require("./Input-HBDt7LmM.cjs.js"),va=require("./index-DebuynT7.cjs.js"),ve=require("react-intl"),La=require("./context-OoV8SSWX.cjs.js"),Da=require("./useObjectRef-dXOJdONs.cjs.js"),Fa=require("./useControlledState-D0L6S_5r.cjs.js"),x=require("./number-DHvo-MDe.cjs.js"),Le=require("./useFormValidation-BEaCuNx1.cjs.js"),be=require("./NumberFormatter-DewVDY5w.cjs.js"),De=require("./useSpinButton-DA7sVP3T.cjs.js"),g=require("./mergeProps-BA5Cwf5w.cjs.js"),Pa=require("./filterDOMProps-WUskt27c.cjs.js"),J=require("./platform-BDLy2vDY.cjs.js"),Na=require("./useFormReset--wPlnEOl.cjs.js"),Sa=require("./useFocus-BtJ38vev.cjs.js"),ga=require("./useFocusWithin-BDSWp3rw.cjs.js"),Ba=require("./useEvent-CuUOU5WV.cjs.js"),Ca=require("./useTextField-BcthGRd8.cjs.js"),ha=require("./useLocalizedStringFormatter-sB0mFYtL.cjs.js"),fe=require("./useProgressBar-DWH4I0qR.cjs.js");function Va(e,a){let{onScroll:r,isDisabled:i}=e,o=s.useCallback(l=>{l.ctrlKey||(l.preventDefault(),l.stopPropagation(),r&&r({deltaX:l.deltaX,deltaY:l.deltaY}))},[r]);Ba.$e9faafb641e167db$export$90fc3a17d93f704c(a,"wheel",i?void 0:o)}function Ea(e){let{minValue:a,maxValue:r,step:i,formatOptions:o,value:l,defaultValue:c=NaN,onChange:p,locale:d,isDisabled:D,isReadOnly:v}=e;l===null&&(l=NaN),l!==void 0&&!isNaN(l)&&(i!==void 0&&!isNaN(i)?l=x.$9446cca9a3875146$export$cb6e0bb50bc19463(l,a,r,i):l=x.$9446cca9a3875146$export$7d15b64cf5a3a4c4(l,a,r)),isNaN(c)||(i!==void 0&&!isNaN(i)?c=x.$9446cca9a3875146$export$cb6e0bb50bc19463(c,a,r,i):c=x.$9446cca9a3875146$export$7d15b64cf5a3a4c4(c,a,r));let[n,t]=Fa.$458b0a5536c1a7cf$export$40bfa8c7b0832715(l,isNaN(c)?NaN:c,p),[b]=s.useState(n),[F,L]=s.useState(()=>isNaN(n)?"":new be.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(d,o).format(n)),P=s.useMemo(()=>new De.$6c7bd7858deea686$export$cd11ab140839f11d(d,o),[d,o]),C=s.useMemo(()=>P.getNumberingSystem(F),[P,F]),N=s.useMemo(()=>new be.$488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(d,{...o,numberingSystem:C}),[d,o,C]),K=s.useMemo(()=>N.resolvedOptions(),[N]),S=s.useCallback(u=>isNaN(u)||u===null?"":N.format(u),[N]),B=Le.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:n}),$=i!==void 0&&!isNaN(i)?i:1;K.style==="percent"&&(i===void 0||isNaN(i))&&($=.01);let[q,W]=s.useState(n),[w,z]=s.useState(d),[I,U]=s.useState(o);(!Object.is(n,q)||d!==w||o!==I)&&(L(S(n)),W(n),z(d),U(o));let f=s.useMemo(()=>P.parse(F),[P,F]),R=()=>{if(!F.length){t(NaN),L(l===void 0?"":S(n));return}if(isNaN(f)){L(S(n));return}let u;i===void 0||isNaN(i)?u=x.$9446cca9a3875146$export$7d15b64cf5a3a4c4(f,a,r):u=x.$9446cca9a3875146$export$cb6e0bb50bc19463(f,a,r,i),u=P.parse(S(u)),t(u),L(S(l===void 0?u:n)),B.commitValidation()},M=(u,j=0)=>{let h=f;if(isNaN(h)){let V=isNaN(j)?0:j;return x.$9446cca9a3875146$export$cb6e0bb50bc19463(V,a,r,$)}else{let V=x.$9446cca9a3875146$export$cb6e0bb50bc19463(h,a,r,$);return u==="+"&&V>h||u==="-"&&V<h?V:x.$9446cca9a3875146$export$cb6e0bb50bc19463(Q(u,h,$),a,r,$)}},k=()=>{let u=M("+",a);u===n&&L(S(u)),t(u),B.commitValidation()},Z=()=>{let u=M("-",r);u===n&&L(S(u)),t(u),B.commitValidation()},A=()=>{r!=null&&(t(x.$9446cca9a3875146$export$cb6e0bb50bc19463(r,a,r,$)),B.commitValidation())},_=()=>{a!=null&&(t(a),B.commitValidation())},T=s.useMemo(()=>!D&&!v&&(isNaN(f)||r===void 0||isNaN(r)||x.$9446cca9a3875146$export$cb6e0bb50bc19463(f,a,r,$)>f||Q("+",f,$)<=r),[D,v,a,r,$,f]),Y=s.useMemo(()=>!D&&!v&&(isNaN(f)||a===void 0||isNaN(a)||x.$9446cca9a3875146$export$cb6e0bb50bc19463(f,a,r,$)<f||Q("-",f,$)>=a),[D,v,a,r,$,f]);return{...B,validate:u=>P.isValidPartialNumber(u,a,r),increment:k,incrementToMax:A,decrement:Z,decrementToMin:_,canIncrement:T,canDecrement:Y,minValue:a,maxValue:r,numberValue:f,defaultNumberValue:isNaN(c)?b:c,setNumberValue:t,setInputValue:L,inputValue:F,commit:R}}function Q(e,a,r){let i=e==="+"?a+r:a-r;if(a%1!==0||r%1!==0){const o=a.toString().split("."),l=r.toString().split("."),c=o[1]&&o[1].length||0,p=l[1]&&l[1].length||0,d=Math.pow(10,Math.max(c,p));a=Math.round(a*d),r=Math.round(r*d),i=e==="+"?a+r:a-r,i/=d}return i}function $e(){return typeof window<"u"&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"}function ya(e,a,r){let i=g.$8ae05eaa5c114e9c$export$7f54fc3180508a52(n=>{let t=r.current;if(!t)return;let b=null;switch(n.inputType){case"historyUndo":case"historyRedo":return;case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":b=t.value.slice(0,t.selectionStart)+t.value.slice(t.selectionEnd);break;case"deleteContentForward":b=t.selectionEnd===t.selectionStart?t.value.slice(0,t.selectionStart)+t.value.slice(t.selectionEnd+1):t.value.slice(0,t.selectionStart)+t.value.slice(t.selectionEnd);break;case"deleteContentBackward":b=t.selectionEnd===t.selectionStart?t.value.slice(0,t.selectionStart-1)+t.value.slice(t.selectionStart):t.value.slice(0,t.selectionStart)+t.value.slice(t.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":b=t.value.slice(t.selectionStart);break;default:n.data!=null&&(b=t.value.slice(0,t.selectionStart)+n.data+t.value.slice(t.selectionEnd));break}(b==null||!a.validate(b))&&n.preventDefault()});s.useEffect(()=>{if(!$e()||!r.current)return;let n=r.current;return n.addEventListener("beforeinput",i,!1),()=>{n.removeEventListener("beforeinput",i,!1)}},[r,i]);let o=$e()?null:n=>{let t=n.target.value.slice(0,n.target.selectionStart)+n.data+n.target.value.slice(n.target.selectionEnd);a.validate(t)||n.preventDefault()},{labelProps:l,inputProps:c,descriptionProps:p,errorMessageProps:d,...D}=Ca.$2d73ec29415bd339$export$712718f7aec83d5(e,r),v=s.useRef(null);return{inputProps:g.$3ef42575df84b30b$export$9d1611c77c2fe928(c,{onBeforeInput:o,onCompositionStart(){let{value:n,selectionStart:t,selectionEnd:b}=r.current;v.current={value:n,selectionStart:t,selectionEnd:b}},onCompositionEnd(){if(r.current&&!a.validate(r.current.value)){let{value:n,selectionStart:t,selectionEnd:b}=v.current;r.current.value=n,r.current.setSelectionRange(t,b),a.setInputValue(n)}}}),labelProps:l,descriptionProps:p,errorMessageProps:d,...D}}var Fe={};Fe={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var Pe={};Pe={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var Ne={};Ne={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var Se={};Se={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var ge={};ge={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var Be={};Be={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var Ce={};Ce={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var he={};he={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var Ve={};Ve={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var Ee={};Ee={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var ye={};ye={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var Ie={};Ie={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var Me={};Me={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var qe={};qe={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var we={};we={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var ke={};ke={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var Oe={};Oe={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var Re={};Re={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var Ae={};Ae={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var Te={};Te={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var je={};je={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var Ke={};Ke={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var We={};We={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var ze={};ze={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var Ue={};Ue={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var Ze={};Ze={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var _e={};_e={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var Ye={};Ye={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var He={};He={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var Ge={};Ge={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var Xe={};Xe={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var Je={};Je={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var Qe={};Qe={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var ea={};ea={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"};var aa={};aa={"ar-AE":Fe,"bg-BG":Pe,"cs-CZ":Ne,"da-DK":Se,"de-DE":ge,"el-GR":Be,"en-US":Ce,"es-ES":he,"et-EE":Ve,"fi-FI":Ee,"fr-FR":ye,"he-IL":Ie,"hr-HR":Me,"hu-HU":qe,"it-IT":we,"ja-JP":ke,"ko-KR":Oe,"lt-LT":Re,"lv-LV":Ae,"nb-NO":Te,"nl-NL":je,"pl-PL":Ke,"pt-BR":We,"pt-PT":ze,"ro-RO":Ue,"ru-RU":Ze,"sk-SK":_e,"sl-SI":Ye,"sr-SP":He,"sv-SE":Ge,"tr-TR":Xe,"uk-UA":Je,"zh-CN":Qe,"zh-TW":ea};function Ia(e){return e&&e.__esModule?e.default:e}function Ma(e,a,r){let{id:i,decrementAriaLabel:o,incrementAriaLabel:l,isDisabled:c,isReadOnly:p,isRequired:d,minValue:D,maxValue:v,autoFocus:n,label:t,formatOptions:b,onBlur:F=()=>{},onFocus:L,onFocusChange:P,onKeyDown:C,onKeyUp:N,description:K,errorMessage:S,isWheelDisabled:B,...$}=e,{increment:q,incrementToMax:W,decrement:w,decrementToMin:z,numberValue:I,inputValue:U,commit:f,commitValidation:R}=a;const M=ha.$fca6afa0e843324b$export$f12b703ca79dfbb1(Ia(aa),"@react-aria/numberfield");let k=g.$bdb11010cef70236$export$f680877a34711e37(i),{focusProps:Z}=Sa.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({onBlur(){f()}}),A=fe.$a916eb452884faea$export$b7a616150fdb9f44(b),_=s.useMemo(()=>A.resolvedOptions(),[A]),T=fe.$a916eb452884faea$export$b7a616150fdb9f44({...b,currencySign:void 0}),Y=s.useMemo(()=>isNaN(I)?"":T.format(I),[T,I]),{spinButtonProps:ae,incrementButtonProps:u,decrementButtonProps:j}=De.$d2e8511e6f209edf$export$e908e06f4b8e3402({isDisabled:c,isReadOnly:p,isRequired:d,maxValue:v,minValue:D,onIncrement:q,onIncrementToMax:W,onDecrement:w,onDecrementToMin:z,value:I,textValue:Y}),[h,V]=s.useState(!1),{focusWithinProps:ta}=ga.$9ab94262bd0047c7$export$420e68273165f4ec({isDisabled:c,onFocusWithinChange:V}),na=s.useCallback(m=>{Math.abs(m.deltaY)<=Math.abs(m.deltaX)||(m.deltaY>0?q():m.deltaY<0&&w())},[w,q]);Va({onScroll:na,isDisabled:B||c||p||!h},r);var H;let re=((H=_.maximumFractionDigits)!==null&&H!==void 0?H:0)>0,te=a.minValue===void 0||isNaN(a.minValue)||a.minValue<0,O="numeric";J.$c87311424ea30a05$export$186c6964ca17d99()?te?O="text":re&&(O="decimal"):J.$c87311424ea30a05$export$a11b0059900ceec8()&&(te?O="numeric":re&&(O="decimal"));let la=m=>{a.validate(m)&&a.setInputValue(m)},ia=Pa.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e),ne=s.useCallback(m=>{m.nativeEvent.isComposing||(m.key==="Enter"?(f(),R()):m.continuePropagation())},[f,R]),{isInvalid:le,validationErrors:ua,validationDetails:sa}=a.displayValidation,{labelProps:ie,inputProps:oa,descriptionProps:ca,errorMessageProps:da}=ya({...$,...ia,name:void 0,form:void 0,label:t,autoFocus:n,isDisabled:c,isReadOnly:p,isRequired:d,validate:void 0,[Le.$e5be200c675c3b3a$export$a763b9476acd3eb]:a,value:U,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:k,type:"text",inputMode:O,onChange:la,onBlur:F,onFocus:L,onFocusChange:P,onKeyDown:s.useMemo(()=>g.$ff5963eb1fccf552$export$e08e3b67e392101e(ne,C),[ne,C]),onKeyUp:N,description:K,errorMessage:S},a,r);Na.$99facab73266f662$export$5add1d006293d136(r,a.defaultNumberValue,a.setNumberValue);let ue=g.$3ef42575df84b30b$export$9d1611c77c2fe928(ae,Z,oa,{role:null,"aria-roledescription":J.$c87311424ea30a05$export$fedb369cb70207f1()?null:M.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});e.validationBehavior==="native"&&(ue["aria-required"]=void 0);let se=m=>{var X;document.activeElement!==r.current&&(m.pointerType==="mouse"?(X=r.current)===null||X===void 0||X.focus():m.target.focus())},G=e["aria-label"]||(typeof e.label=="string"?e.label:""),E;G||(E=e.label!=null?ie.id:e["aria-labelledby"]);let oe=g.$bdb11010cef70236$export$f680877a34711e37(),ce=g.$bdb11010cef70236$export$f680877a34711e37(),ba=g.$3ef42575df84b30b$export$9d1611c77c2fe928(u,{"aria-label":l||M.format("increase",{fieldLabel:G}).trim(),id:E&&!l?oe:null,"aria-labelledby":E&&!l?`${oe} ${E}`:null,"aria-controls":k,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!a.canIncrement,onPressStart:se}),fa=g.$3ef42575df84b30b$export$9d1611c77c2fe928(j,{"aria-label":o||M.format("decrease",{fieldLabel:G}).trim(),id:E&&!o?ce:null,"aria-labelledby":E&&!o?`${ce} ${E}`:null,"aria-controls":k,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!a.canDecrement,onPressStart:se});return{groupProps:{...ta,role:"group","aria-disabled":c,"aria-invalid":le?"true":void 0},labelProps:ie,inputProps:ue,incrementButtonProps:ba,decrementButtonProps:fa,errorMessageProps:da,descriptionProps:ca,isInvalid:le,validationErrors:ua,validationDetails:sa}}const{withContext:ee,withProvider:qa}=pe.createSlotRecipeContext({key:"numberInput"}),wa=qa("div","root"),ka=ee(xa.$3985021b0ad6602f$export$f5b8910cec6cf069,"input"),Oa=ee(xe.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,"incrementButton"),Ra=ee(xe.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,"decrementButton"),me=ve.defineMessages({decrement:{id:"Nimbus.NumberInput.decrement",description:"aria-label for the decrement button in number input",defaultMessage:"Decrement"},increment:{id:"Nimbus.NumberInput.increment",description:"aria-label for the increment button in number input",defaultMessage:"Increment"}}),ra=e=>{const{size:a,ref:r,...i}=e,{locale:o}=La.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=ve.useIntl(),c=s.useRef(null),p=Da.$df56164dff5785e2$export$4338b53315abf666($a.mergeRefs(c,r)),d=pe.useSlotRecipe({recipe:va.numberInputRecipe}),[D,v]=d.splitVariantProps(i),[n,t]=pa.extractStyleProps(v),b={...t,locale:o,incrementAriaLabel:l.formatMessage(me.increment),decrementAriaLabel:l.formatMessage(me.decrement)},F=Ea(b),{inputProps:L,incrementButtonProps:P,decrementButtonProps:C}=Ma(b,F,p),N={"data-invalid":e.isInvalid,"data-disabled":e.isDisabled};return y.jsxs(wa,{...D,...n,size:a,className:e?.className,children:[y.jsx(ka,{ref:p,...L,...N,name:e.name}),y.jsxs(ma.Box,{position:"absolute",top:"0",right:"0",display:"flex",flexDirection:"column",height:"full",children:[y.jsx(Oa,{...P,...N,children:y.jsx(de.KeyboardArrowUp,{})}),y.jsx(Ra,{...C,...N,children:y.jsx(de.KeyboardArrowDown,{})})]})]})};ra.displayName="NumberInput";exports.NumberInput=ra;
|
|
2
|
-
//# sourceMappingURL=number-input-BCyiGbGY.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),a=require("react"),d=require("./box-CWni3A32.cjs.js"),g=require("./icon-button-CiBtEF0y.cjs.js"),c=require("./tooltip-g8-hEdZp.cjs.js"),I=require("./text-input-DtMgT0KI.cjs.js"),l=require("@commercetools/nimbus-icons"),i=require("react-intl"),o=i.defineMessages({hide:{id:"Nimbus.PasswordInput.hide",description:"aria-label & tooltip for hide password button",defaultMessage:"Hide password"},show:{id:"Nimbus.PasswordInput.show",description:"aria-label & tooltip for show password button",defaultMessage:"Show password"}}),u=a.forwardRef((n,p)=>{const{size:e="md",isDisabled:h}=n,[t,w]=a.useState(!1),x=()=>w(!t),r=i.useIntl(),b=e==="md"?"xs":"2xs",f=e==="md"?{top:"100",right:"400"}:{top:"50",right:"400"},m=e==="md"?"1400":"1100";return s.jsxs(d.Box,{display:"inline-block",position:"relative",children:[s.jsx(I.TextInput,{width:"full",ref:p,type:t?"text":"password",...n,pr:m}),s.jsx(d.Box,{position:"absolute",...f,children:s.jsxs(c.Tooltip.Root,{children:[s.jsx(g.IconButton,{size:b,variant:"ghost",tone:"primary","aria-label":t?r.formatMessage(o.hide):r.formatMessage(o.show),onPress:x,isDisabled:h,children:t?s.jsx(l.VisibilityOff,{}):s.jsx(l.Visibility,{})}),s.jsx(c.Tooltip.Content,{children:s.jsx(i.FormattedMessage,{...t?o.hide:o.show})})]})})]})});u.displayName="PasswordInput";exports.PasswordInput=u;
|
|
2
|
-
//# sourceMappingURL=password-input-BkTbfljJ.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password-input-BkTbfljJ.cjs.js","sources":["../../src/components/password-input/password-input.i18n.ts","../../src/components/password-input/password-input.tsx"],"sourcesContent":["import { defineMessages } from \"react-intl\";\n\nexport default defineMessages({\n hide: {\n id: \"Nimbus.PasswordInput.hide\",\n description: \"aria-label & tooltip for hide password button\",\n defaultMessage: \"Hide password\",\n },\n show: {\n id: \"Nimbus.PasswordInput.show\",\n description: \"aria-label & tooltip for show password button\",\n defaultMessage: \"Show password\",\n },\n});\n","import { forwardRef, useState } from \"react\";\nimport { Box, IconButton, Tooltip } from \"@/components\";\nimport { TextInput } from \"@/components/text-input\";\nimport { Visibility, VisibilityOff } from \"@commercetools/nimbus-icons\";\nimport type { PasswordInputProps } from \"./password-input.types\";\nimport { FormattedMessage, useIntl } from \"react-intl\";\nimport messages from \"./password-input.i18n\";\n\n/**\n * # PasswordInput\n *\n * A password input is a text field that hides entered characters for secure password entry.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/passwordinput}\n */\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n (props, forwardedRef) => {\n const { size = \"md\", isDisabled } = props;\n const [showPassword, setShowPassword] = useState(false);\n const toggleVisibility = () => setShowPassword(!showPassword);\n const intl = useIntl();\n /** size icon based on input size */\n const iconSize = size === \"md\" ? \"xs\" : \"2xs\";\n /**\n * position the icon button at the right edge of the input based on\n * the size of the input\n */\n const iconPositionProps =\n size === \"md\"\n ? {\n top: \"100\",\n right: \"400\",\n }\n : {\n top: \"50\",\n right: \"400\",\n };\n\n /** safe space between the text within the input and the icon button */\n const iconButtonSafeSpace = size === \"md\" ? \"1400\" : \"1100\";\n\n return (\n <Box display=\"inline-block\" position=\"relative\">\n <TextInput\n width=\"full\"\n ref={forwardedRef}\n type={showPassword ? \"text\" : \"password\"}\n {...props}\n pr={iconButtonSafeSpace}\n />\n <Box position=\"absolute\" {...iconPositionProps}>\n <Tooltip.Root>\n <IconButton\n size={iconSize}\n variant=\"ghost\"\n tone=\"primary\"\n aria-label={\n showPassword\n ? intl.formatMessage(messages.hide)\n : intl.formatMessage(messages.show)\n }\n onPress={toggleVisibility}\n isDisabled={isDisabled}\n >\n {showPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n <Tooltip.Content>\n <FormattedMessage\n {...(showPassword ? messages.hide : messages.show)}\n />\n </Tooltip.Content>\n </Tooltip.Root>\n </Box>\n </Box>\n );\n }\n);\n\nPasswordInput.displayName = \"PasswordInput\";\n"],"names":["messages","defineMessages","PasswordInput","forwardRef","props","forwardedRef","size","isDisabled","showPassword","setShowPassword","useState","toggleVisibility","intl","useIntl","iconSize","iconPositionProps","iconButtonSafeSpace","jsxs","Box","jsx","TextInput","Tooltip","IconButton","VisibilityOff","Visibility","FormattedMessage"],"mappings":"qSAEAA,EAAeC,iBAAe,CAC5B,KAAM,CACJ,GAAI,4BACJ,YAAa,gDACb,eAAgB,eAAA,EAElB,KAAM,CACJ,GAAI,4BACJ,YAAa,gDACb,eAAgB,eAAA,CAEpB,CAAC,ECEYC,EAAgBC,EAAAA,WAC3B,CAACC,EAAOC,IAAiB,CACvB,KAAM,CAAE,KAAAC,EAAO,KAAM,WAAAC,CAAA,EAAeH,EAC9B,CAACI,EAAcC,CAAe,EAAIC,EAAAA,SAAS,EAAK,EAChDC,EAAmB,IAAMF,EAAgB,CAACD,CAAY,EACtDI,EAAOC,EAAAA,QAAA,EAEPC,EAAWR,IAAS,KAAO,KAAO,MAKlCS,EACJT,IAAS,KACL,CACE,IAAK,MACL,MAAO,KAAA,EAET,CACE,IAAK,KACL,MAAO,KAAA,EAITU,EAAsBV,IAAS,KAAO,OAAS,OAErD,OACEW,EAAAA,KAACC,EAAAA,IAAA,CAAI,QAAQ,eAAe,SAAS,WACnC,SAAA,CAAAC,EAAAA,IAACC,EAAAA,UAAA,CACC,MAAM,OACN,IAAKf,EACL,KAAMG,EAAe,OAAS,WAC7B,GAAGJ,EACJ,GAAIY,CAAA,CAAA,EAENG,EAAAA,IAACD,EAAAA,KAAI,SAAS,WAAY,GAAGH,EAC3B,SAAAE,OAACI,EAAAA,QAAQ,KAAR,CACC,SAAA,CAAAF,EAAAA,IAACG,EAAAA,WAAA,CACC,KAAMR,EACN,QAAQ,QACR,KAAK,UACL,aACEN,EACII,EAAK,cAAcZ,EAAS,IAAI,EAChCY,EAAK,cAAcZ,EAAS,IAAI,EAEtC,QAASW,EACT,WAAAJ,EAEC,SAAAC,EAAeW,MAACI,EAAAA,cAAA,CAAA,CAAc,QAAMC,EAAAA,WAAA,CAAA,CAAW,CAAA,CAAA,EAElDL,EAAAA,IAACE,EAAAA,QAAQ,QAAR,CACC,SAAAF,EAAAA,IAACM,EAAAA,iBAAA,CACE,GAAIjB,EAAeR,EAAS,KAAOA,EAAS,IAAA,CAAA,CAC/C,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,EACF,CAEJ,CACF,EAEAE,EAAc,YAAc"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as w, useState as u } from "react";
|
|
3
|
-
import { B as n } from "./box-DuBoAZvq.es.js";
|
|
4
|
-
import { I as b } from "./icon-button-N3Uzjv8o.es.js";
|
|
5
|
-
import { b as d } from "./tooltip-B1YdruCE.es.js";
|
|
6
|
-
import { T as g } from "./text-input-Bu4lGoBD.es.js";
|
|
7
|
-
import { VisibilityOff as P, Visibility as x } from "@commercetools/nimbus-icons";
|
|
8
|
-
import { defineMessages as I, useIntl as S, FormattedMessage as y } from "react-intl";
|
|
9
|
-
const t = /* @__PURE__ */ I({
|
|
10
|
-
hide: {
|
|
11
|
-
id: "Nimbus.PasswordInput.hide",
|
|
12
|
-
description: "aria-label & tooltip for hide password button",
|
|
13
|
-
defaultMessage: "Hide password"
|
|
14
|
-
},
|
|
15
|
-
show: {
|
|
16
|
-
id: "Nimbus.PasswordInput.show",
|
|
17
|
-
description: "aria-label & tooltip for show password button",
|
|
18
|
-
defaultMessage: "Show password"
|
|
19
|
-
}
|
|
20
|
-
}), M = /* @__PURE__ */ w(
|
|
21
|
-
(e, p) => {
|
|
22
|
-
const { size: i = "md", isDisabled: l } = e, [s, m] = u(!1), c = () => m(!s), r = S(), f = i === "md" ? "xs" : "2xs", h = i === "md" ? {
|
|
23
|
-
top: "100",
|
|
24
|
-
right: "400"
|
|
25
|
-
} : {
|
|
26
|
-
top: "50",
|
|
27
|
-
right: "400"
|
|
28
|
-
};
|
|
29
|
-
return /* @__PURE__ */ a(n, { display: "inline-block", position: "relative", children: [
|
|
30
|
-
/* @__PURE__ */ o(
|
|
31
|
-
g,
|
|
32
|
-
{
|
|
33
|
-
width: "full",
|
|
34
|
-
ref: p,
|
|
35
|
-
type: s ? "text" : "password",
|
|
36
|
-
...e,
|
|
37
|
-
pr: i === "md" ? "1400" : "1100"
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
/* @__PURE__ */ o(n, { position: "absolute", ...h, children: /* @__PURE__ */ a(d.Root, { children: [
|
|
41
|
-
/* @__PURE__ */ o(
|
|
42
|
-
b,
|
|
43
|
-
{
|
|
44
|
-
size: f,
|
|
45
|
-
variant: "ghost",
|
|
46
|
-
tone: "primary",
|
|
47
|
-
"aria-label": s ? r.formatMessage(t.hide) : r.formatMessage(t.show),
|
|
48
|
-
onPress: c,
|
|
49
|
-
isDisabled: l,
|
|
50
|
-
children: s ? /* @__PURE__ */ o(P, {}) : /* @__PURE__ */ o(x, {})
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
/* @__PURE__ */ o(d.Content, { children: /* @__PURE__ */ o(
|
|
54
|
-
y,
|
|
55
|
-
{
|
|
56
|
-
...s ? t.hide : t.show
|
|
57
|
-
}
|
|
58
|
-
) })
|
|
59
|
-
] }) })
|
|
60
|
-
] });
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
M.displayName = "PasswordInput";
|
|
64
|
-
export {
|
|
65
|
-
M as P
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=password-input-BlU2h_8U.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password-input-BlU2h_8U.es.js","sources":["../../src/components/password-input/password-input.i18n.ts","../../src/components/password-input/password-input.tsx"],"sourcesContent":["import { defineMessages } from \"react-intl\";\n\nexport default defineMessages({\n hide: {\n id: \"Nimbus.PasswordInput.hide\",\n description: \"aria-label & tooltip for hide password button\",\n defaultMessage: \"Hide password\",\n },\n show: {\n id: \"Nimbus.PasswordInput.show\",\n description: \"aria-label & tooltip for show password button\",\n defaultMessage: \"Show password\",\n },\n});\n","import { forwardRef, useState } from \"react\";\nimport { Box, IconButton, Tooltip } from \"@/components\";\nimport { TextInput } from \"@/components/text-input\";\nimport { Visibility, VisibilityOff } from \"@commercetools/nimbus-icons\";\nimport type { PasswordInputProps } from \"./password-input.types\";\nimport { FormattedMessage, useIntl } from \"react-intl\";\nimport messages from \"./password-input.i18n\";\n\n/**\n * # PasswordInput\n *\n * A password input is a text field that hides entered characters for secure password entry.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/passwordinput}\n */\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n (props, forwardedRef) => {\n const { size = \"md\", isDisabled } = props;\n const [showPassword, setShowPassword] = useState(false);\n const toggleVisibility = () => setShowPassword(!showPassword);\n const intl = useIntl();\n /** size icon based on input size */\n const iconSize = size === \"md\" ? \"xs\" : \"2xs\";\n /**\n * position the icon button at the right edge of the input based on\n * the size of the input\n */\n const iconPositionProps =\n size === \"md\"\n ? {\n top: \"100\",\n right: \"400\",\n }\n : {\n top: \"50\",\n right: \"400\",\n };\n\n /** safe space between the text within the input and the icon button */\n const iconButtonSafeSpace = size === \"md\" ? \"1400\" : \"1100\";\n\n return (\n <Box display=\"inline-block\" position=\"relative\">\n <TextInput\n width=\"full\"\n ref={forwardedRef}\n type={showPassword ? \"text\" : \"password\"}\n {...props}\n pr={iconButtonSafeSpace}\n />\n <Box position=\"absolute\" {...iconPositionProps}>\n <Tooltip.Root>\n <IconButton\n size={iconSize}\n variant=\"ghost\"\n tone=\"primary\"\n aria-label={\n showPassword\n ? intl.formatMessage(messages.hide)\n : intl.formatMessage(messages.show)\n }\n onPress={toggleVisibility}\n isDisabled={isDisabled}\n >\n {showPassword ? <VisibilityOff /> : <Visibility />}\n </IconButton>\n <Tooltip.Content>\n <FormattedMessage\n {...(showPassword ? messages.hide : messages.show)}\n />\n </Tooltip.Content>\n </Tooltip.Root>\n </Box>\n </Box>\n );\n }\n);\n\nPasswordInput.displayName = \"PasswordInput\";\n"],"names":["messages","defineMessages","PasswordInput","forwardRef","props","forwardedRef","size","isDisabled","showPassword","setShowPassword","useState","toggleVisibility","intl","useIntl","iconSize","iconPositionProps","jsxs","Box","jsx","TextInput","Tooltip","IconButton","VisibilityOff","Visibility","FormattedMessage"],"mappings":";;;;;;;;AAEA,MAAAA,IAAe,gBAAAC,EAAe;AAAA,EAC5B,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAEpB,CAAC,GCEYC,IAAgB,gBAAAC;AAAA,EAC3B,CAACC,GAAOC,MAAiB;AACvB,UAAM,EAAE,MAAAC,IAAO,MAAM,YAAAC,EAAA,IAAeH,GAC9B,CAACI,GAAcC,CAAe,IAAIC,EAAS,EAAK,GAChDC,IAAmB,MAAMF,EAAgB,CAACD,CAAY,GACtDI,IAAOC,EAAA,GAEPC,IAAWR,MAAS,OAAO,OAAO,OAKlCS,IACJT,MAAS,OACL;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,IAAA,IAET;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,IAAA;AAMf,WACE,gBAAAU,EAACC,GAAA,EAAI,SAAQ,gBAAe,UAAS,YACnC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,KAAKd;AAAA,UACL,MAAMG,IAAe,SAAS;AAAA,UAC7B,GAAGJ;AAAA,UACJ,IATsBE,MAAS,OAAO,SAAS;AAAA,QAS3C;AAAA,MAAA;AAAA,MAEN,gBAAAY,EAACD,KAAI,UAAS,YAAY,GAAGF,GAC3B,UAAA,gBAAAC,EAACI,EAAQ,MAAR,EACC,UAAA;AAAA,QAAA,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,MAAMP;AAAA,YACN,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,cACEN,IACII,EAAK,cAAcZ,EAAS,IAAI,IAChCY,EAAK,cAAcZ,EAAS,IAAI;AAAA,YAEtC,SAASW;AAAA,YACT,YAAAJ;AAAA,YAEC,UAAAC,IAAe,gBAAAU,EAACI,GAAA,CAAA,CAAc,sBAAMC,GAAA,CAAA,CAAW;AAAA,UAAA;AAAA,QAAA;AAAA,QAElD,gBAAAL,EAACE,EAAQ,SAAR,EACC,UAAA,gBAAAF;AAAA,UAACM;AAAA,UAAA;AAAA,YACE,GAAIhB,IAAeR,EAAS,OAAOA,EAAS;AAAA,UAAA;AAAA,QAAA,EAC/C,CACF;AAAA,MAAA,EAAA,CACF,EAAA,CACF;AAAA,IAAA,GACF;AAAA,EAEJ;AACF;AAEAE,EAAc,cAAc;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),i=require("react"),T=require("@chakra-ui/react/styled-system"),z=require("@commercetools/nimbus-icons"),Y=require("./box-CWni3A32.cjs.js"),L=require("./Button-BtJHe9xY.cjs.js"),F=require("./Dialog-K19USc7c.cjs.js"),h=require("./utils-BHdR5Nww.cjs.js"),ne=require("./FieldError-DyGFfqST.cjs.js"),se=require("./Form-BuOomA4T.cjs.js"),de=require("./intlStrings-ClBuC6xN.cjs.js"),_=require("./Label-BgrYyYXn.cjs.js"),B=require("./ListBox-BHUS7cW2.cjs.js"),N=require("./Text-BWSfeB9p.cjs.js"),ee=require("./Separator-CTkcgvBE.cjs.js"),D=require("./mergeProps-BA5Cwf5w.cjs.js"),G=require("./filterDOMProps-WUskt27c.cjs.js"),te=require("./OverlayArrow-CYjyBtg8.cjs.js"),ce=require("./useLocalizedStringFormatter-sB0mFYtL.cjs.js"),le=require("./useFormValidation-BEaCuNx1.cjs.js"),ue=require("./useSingleSelectListState-C-E1yca1.cjs.js"),fe=require("./useFocusRing-CzFer4bD.cjs.js"),Z=require("./SelectionManager-CmUHDDN6.cjs.js"),be=require("./useFocusVisible-Co0C61s7.cjs.js"),$e=require("./useCollator-YVJAe1GI.cjs.js"),pe=require("./useField-DmqO9k7a.cjs.js"),ve=require("./useFormReset--wPlnEOl.cjs.js"),xe=require("./VisuallyHidden-Bv_AJXZ7.cjs.js"),me=require("./icon-button-CiBtEF0y.cjs.js"),oe=require("react-intl"),he=require("./index-DebuynT7.cjs.js"),ie=require("./extractStyleProps-dSQoSYg8.cjs.js"),V=require("@chakra-ui/react/flex"),ye=require("./Header-zz3aj0c7.cjs.js"),H=new WeakMap;function Se(e,t,n){let{keyboardDelegate:r,isDisabled:l,isRequired:d,name:u,form:a,validationBehavior:c="aria"}=e,$=$e.$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",sensitivity:"base"}),o=i.useMemo(()=>r||new Z.$2a25aae57d74318e$export$a05409b8bb224a5a(t.collection,t.disabledKeys,n,$),[r,t.collection,t.disabledKeys,$,n]),{menuTriggerProps:p,menuProps:v}=F.$168583247155ddda$export$dc9c12ed27dd1b49({isDisabled:l,type:"listbox"},t,n),f=b=>{switch(b.key){case"ArrowLeft":{var S,g;b.preventDefault();let q=t.selectedKey!=null?(S=o.getKeyAbove)===null||S===void 0?void 0:S.call(o,t.selectedKey):(g=o.getFirstKey)===null||g===void 0?void 0:g.call(o);q&&t.setSelectedKey(q);break}case"ArrowRight":{var M,k;b.preventDefault();let q=t.selectedKey!=null?(M=o.getKeyBelow)===null||M===void 0?void 0:M.call(o,t.selectedKey):(k=o.getFirstKey)===null||k===void 0?void 0:k.call(o);q&&t.setSelectedKey(q);break}}},{typeSelectProps:x}=Z.$fb3050f43d946246$export$e32c88dfddc6e1d8({keyboardDelegate:o,selectionManager:t.selectionManager,onTypeSelect(b){t.setSelectedKey(b)}}),{isInvalid:P,validationErrors:R,validationDetails:j}=t.displayValidation,{labelProps:O,fieldProps:C,descriptionProps:y,errorMessageProps:w}=pe.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:P,errorMessage:e.errorMessage||R});x.onKeyDown=x.onKeyDownCapture,delete x.onKeyDownCapture;let E=G.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),m=D.$3ef42575df84b30b$export$9d1611c77c2fe928(x,p,C),K=D.$bdb11010cef70236$export$f680877a34711e37();return H.set(t,{isDisabled:l,isRequired:d,name:u,form:a,validationBehavior:c}),{labelProps:{...O,onClick:()=>{if(!e.isDisabled){var b;(b=n.current)===null||b===void 0||b.focus(),be.$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")}}},triggerProps:D.$3ef42575df84b30b$export$9d1611c77c2fe928(E,{...m,isDisabled:l,onKeyDown:D.$ff5963eb1fccf552$export$e08e3b67e392101e(m.onKeyDown,f,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[K,m["aria-labelledby"],m["aria-label"]&&!m["aria-labelledby"]?m.id:null].filter(Boolean).join(" "),onFocus(b){t.isFocused||(e.onFocus&&e.onFocus(b),e.onFocusChange&&e.onFocusChange(!0),t.setFocused(!0))},onBlur(b){t.isOpen||(e.onBlur&&e.onBlur(b),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))}}),valueProps:{id:K},menuProps:{...v,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:b=>{b.currentTarget.contains(b.relatedTarget)||(e.onBlur&&e.onBlur(b),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))},"aria-labelledby":[C["aria-labelledby"],m["aria-label"]&&!C["aria-labelledby"]?m.id:null].filter(Boolean).join(" ")},descriptionProps:y,errorMessageProps:w,isInvalid:P,validationErrors:R,validationDetails:j,hiddenSelectProps:{isDisabled:l,name:u,label:e.label,state:t,triggerRef:n,form:a}}}function ge(e,t,n){let r=H.get(t)||{},{autoComplete:l,name:d=r.name,form:u=r.form,isDisabled:a=r.isDisabled}=e,{validationBehavior:c,isRequired:$}=r,{visuallyHiddenProps:o}=xe.$5c3e21d68f1c4674$export$a966af930f325cab({style:{position:"fixed",top:0,left:0}});ve.$99facab73266f662$export$5add1d006293d136(e.selectRef,t.defaultSelectedKey,t.setSelectedKey),le.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:c,focus:()=>{var f;return(f=n.current)===null||f===void 0?void 0:f.focus()}},t,e.selectRef);let p=i.useCallback(f=>t.setSelectedKey(f.currentTarget.value),[t.setSelectedKey]);var v;return{containerProps:{...o,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:l,disabled:a,required:c==="native"&&$,name:d,form:u,value:(v=t.selectedKey)!==null&&v!==void 0?v:"",onChange:p,onInput:p}}}function Pe(e){let{state:t,triggerRef:n,label:r,name:l,form:d,isDisabled:u}=e,a=i.useRef(null),c=i.useRef(null),{containerProps:$,selectProps:o}=ge({...e,selectRef:t.collection.size<=300?a:c},t,n);if(t.collection.size<=300)return i.createElement("div",{...$,"data-testid":"hidden-select-container"},i.createElement("label",null,r,i.createElement("select",{...o,ref:a},i.createElement("option",null),[...t.collection.getKeys()].map(v=>{let f=t.collection.getItem(v);if(f&&f.type==="item")return i.createElement("option",{key:f.key,value:f.key},f.textValue)}))));if(l){let v=H.get(t)||{},{validationBehavior:f}=v;var p;let x={type:"hidden",autoComplete:o.autoComplete,name:l,form:d,disabled:u,value:(p=t.selectedKey)!==null&&p!==void 0?p:""};return f==="native"?i.createElement("input",{...x,ref:c,style:{display:"none"},type:"text",required:o.required,onChange:()=>{}}):i.createElement("input",{...x,ref:c})}return null}function Re(e){let t=te.$fc909762b330b746$export$61c6a8c84e605fb6(e),[n,r]=i.useState(null),l=ue.$a0d645289fe9b86b$export$e7f05e985daf4b5f({...e,onSelectionChange:o=>{e.onSelectionChange!=null&&e.onSelectionChange(o),t.close(),d.commitValidation()}}),d=le.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:l.selectedKey}),[u,a]=i.useState(!1),[c]=i.useState(l.selectedKey);var $;return{...d,...l,...t,defaultSelectedKey:($=e.defaultSelectedKey)!==null&&$!==void 0?$:c,focusStrategy:n,open(o=null){l.collection.size!==0&&(r(o),t.open())},toggle(o=null){l.collection.size!==0&&(r(o),t.toggle())},isFocused:u,setFocused:a}}function Ce(e){return e&&e.__esModule?e.default:e}const W=i.createContext(null),A=i.createContext(null),qe=i.forwardRef(function(t,n){[t,n]=h.$64fa3d84918910a7$export$29f1550f4b0d4415(t,n,W);let{children:r,isDisabled:l=!1,isInvalid:d=!1,isRequired:u=!1}=t,a=i.useMemo(()=>typeof r=="function"?r({isOpen:!1,isDisabled:l,isInvalid:d,isRequired:u,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):r,[r,l,d,u]);return i.createElement(ee.$e1995378a142960e$export$bf788dd355e3a401,{content:a},c=>i.createElement(Fe,{props:t,collection:c,selectRef:n}))}),De=[_.$01b77f81d0f07f68$export$75b6ee27786ba447,L.$d2b4bc8c273e7be6$export$24d547caef80ccd1,N.$514c0188e459b4c0$export$9afb8bc826b033ea];function Fe({props:e,selectRef:t,collection:n}){let{validationBehavior:r}=h.$64fa3d84918910a7$export$fabf2dc03a41866e(se.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var l,d;let u=(d=(l=e.validationBehavior)!==null&&l!==void 0?l:r)!==null&&d!==void 0?d:"native",a=Re({...e,collection:n,children:void 0,validationBehavior:u}),{isFocusVisible:c,focusProps:$}=fe.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),o=i.useRef(null),[p,v]=h.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:f,triggerProps:x,valueProps:P,menuProps:R,descriptionProps:j,errorMessageProps:O,hiddenSelectProps:C,...y}=Se({...h.$64fa3d84918910a7$export$ef03459518577ad4(e),label:v,validationBehavior:u},a,o),[w,E]=i.useState(null),m=i.useCallback(()=>{o.current&&E(o.current.offsetWidth+"px")},[o]);te.$9daab02d461809db$export$683480f191c0e3ea({ref:o,onResize:m});let K=i.useMemo(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:c,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1}),[a.isOpen,a.isFocused,c,e.isDisabled,y.isInvalid,e.isRequired]),b=h.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:K,defaultClassName:"react-aria-Select"}),S=G.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});delete S.id;let g=i.useRef(null);return i.createElement(h.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[W,e],[A,a],[re,P],[_.$01b77f81d0f07f68$export$75b6ee27786ba447,{...f,ref:p,elementType:"span"}],[L.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...x,ref:o,isPressed:a.isOpen,autoFocus:e.autoFocus}],[F.$de32f1b87079253c$export$d2f961adcb0afbe,a],[F.$07b14b47974efb58$export$9b9a0cd73afb7ca4,{trigger:"Select",triggerRef:o,scrollRef:g,placement:"bottom start",style:{"--trigger-width":w},"aria-labelledby":R["aria-labelledby"],clearContexts:De}],[B.$eed445e0843c11d0$export$7ff8f37d2d81a48d,{...R,ref:g}],[B.$eed445e0843c11d0$export$7c5906fe4f1f2af2,a],[N.$514c0188e459b4c0$export$9afb8bc826b033ea,{slots:{description:j,errorMessage:O}}],[ne.$ee014567cb39d3f0$export$ff05c3ac10437e03,y]]},i.createElement("div",{...D.$3ef42575df84b30b$export$9d1611c77c2fe928(S,b,$),ref:t,slot:e.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":c||void 0,"data-open":a.isOpen||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":y.isInvalid||void 0,"data-required":e.isRequired||void 0},b.children,i.createElement(Pe,{...C,autoComplete:e.autoComplete})))}const re=i.createContext(null),Be=i.forwardRef(function(t,n){var r,l;[t,n]=h.$64fa3d84918910a7$export$29f1550f4b0d4415(t,n,re);let d=i.useContext(A),{placeholder:u}=h.$64fa3d84918910a7$export$fabf2dc03a41866e(W),a=d.selectedKey!=null?d.collection.getItem(d.selectedKey):null,c=a?.props.children;typeof c=="function"&&(c=c({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"}));let $=ce.$fca6afa0e843324b$export$f12b703ca79dfbb1(Ce(de.$df39c1238ae2b5f3$exports),"react-aria-components");var o,p,v;let f=h.$64fa3d84918910a7$export$4d86445c2cf5e3({...t,defaultChildren:(o=c??u)!==null&&o!==void 0?o:$.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(p=(r=d.selectedItem)===null||r===void 0?void 0:r.value)!==null&&p!==void 0?p:null,selectedText:(v=(l=d.selectedItem)===null||l===void 0?void 0:l.textValue)!==null&&v!==void 0?v:null,isPlaceholder:!a}}),x=G.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(t,{global:!0});return i.createElement("span",{ref:n,...x,...f,"data-placeholder":!a||void 0},i.createElement(N.$514c0188e459b4c0$export$9afb8bc826b033ea.Provider,{value:void 0},f.children))}),{withProvider:Ie,withContext:I}=T.createSlotRecipeContext({key:"select"}),Ke=Ie("div","root"),je=I("button","trigger"),Oe=I("span","triggerLabel"),we=I("div","options"),Ee=I("div","option"),Me=I("div","optionGroup"),ke=oe.defineMessages({clearSelection:{id:"Nimbus.Select.clearSelection",description:"aria-label for select clear button",defaultMessage:"Clear selection"}}),ae=()=>{const e=i.useContext(A),t=oe.useIntl();if(!e?.selectedKey)return null;const n=()=>{e?.setSelectedKey(null)};return s.jsx(F.$f1ab8c75478c6f73$export$cf75428e0b9ed1ea,{children:s.jsx(me.IconButton,{pointerEvents:"all",size:"2xs",variant:"ghost","aria-label":t.formatMessage(ke.clearSelection),"aria-labelledby":"",onPress:n,children:s.jsx(z.Close,{})})})};ae.displayName="Select.ClearButton";const U=i.forwardRef((e,t)=>{const{children:n,isLoading:r,isDisabled:l,isClearable:d=!0}=e,u=T.useSlotRecipe({recipe:he.selectSlotRecipe}),[a,c]=u.splitVariantProps(e),[$,o]=ie.extractStyleProps(c),p={...o,isDisabled:r||l};return s.jsx(Ke,{asChild:!0,ref:t,...a,...$,children:s.jsxs(qe,{...p,children:[s.jsxs(T.chakra.div,{position:"relative",children:[s.jsx(je,{zIndex:0,asChild:!0,children:s.jsx(L.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{children:s.jsx(Oe,{asChild:!0,children:s.jsx(Be,{})})})}),s.jsxs(V.Flex,{position:"absolute",top:"0",bottom:"0",zIndex:1,right:"400",pointerEvents:"none",children:[d&&s.jsx(V.Flex,{width:"600",my:"auto",children:s.jsx(ae,{})}),s.jsx(V.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:s.jsx(Y.Box,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:r?s.jsx(Y.Box,{asChild:!0,animation:"spin",animationDuration:"slowest",children:s.jsx(z.Loop,{})}):s.jsx(z.KeyboardArrowDown,{})})})]})]}),s.jsx(F.$07b14b47974efb58$export$5b6b19405a83ff9d,{children:n})]})})});U.displayName="Select.Root";const X=e=>{const{ref:t,...n}=e,[r,l]=ie.extractStyleProps(n);return s.jsx(we,{asChild:!0,...r,children:s.jsx(B.$eed445e0843c11d0$export$41f133550aa26f48,{ref:t,...l})})};X.displayName="Select.Options";const J=({ref:e,...t})=>s.jsx(Ee,{asChild:!0,ref:e,children:s.jsx(B.$eed445e0843c11d0$export$a11e76429ed99b4,{...t})});J.displayName="Select.Option";const Q=e=>{const{ref:t,label:n,items:r,children:l,...d}=e;if(r&&typeof l!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return s.jsxs(B.$eed445e0843c11d0$export$dca12b0bb56e4fc,{ref:t,...d,children:[s.jsx(Me,{asChild:!0,children:s.jsx(ye.$72a5793c14baf454$export$8b251419efc915eb,{children:n})}),r?s.jsx(ee.$e1995378a142960e$export$fb8073518f34e6ec,{items:r,children:u=>typeof l=="function"?l(u):null}):l]})};Q.displayName="Select.OptionGroup";const Ve={Root:U,Options:X,Option:J,OptionGroup:Q};exports.Select=Ve;exports.SelectOption=J;exports.SelectOptionGroup=Q;exports.SelectOptions=X;exports.SelectRoot=U;
|
|
2
|
-
//# sourceMappingURL=select-BL0Jeztf.cjs.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as $ } from "react";
|
|
3
|
-
import { mergeRefs as d } from "@chakra-ui/react";
|
|
4
|
-
import { createRecipeContext as l, useRecipe as u } from "@chakra-ui/react/styled-system";
|
|
5
|
-
import { $ as P } from "./Input-BiHwUBo4.es.js";
|
|
6
|
-
import { e as R } from "./extractStyleProps-lz7NzsNX.es.js";
|
|
7
|
-
import { t as r } from "./index-DwjTNyza.es.js";
|
|
8
|
-
import { $ as b } from "./useObjectRef-CaJ5pgjX.es.js";
|
|
9
|
-
import { $ as h } from "./useTextField-BnL6tOdd.es.js";
|
|
10
|
-
const { withContext: I } = /* @__PURE__ */ l({ recipe: r }), T = /* @__PURE__ */ I("input"), y = (o) => {
|
|
11
|
-
const { ref: p, ...s } = o, c = u({ recipe: r }), i = $(null), t = b(d(i, p)), [f, n] = c.splitVariantProps(s), [m, a] = R(n), { inputProps: x } = h(a, t);
|
|
12
|
-
return /* @__PURE__ */ e(T, { ...f, ...m, asChild: !0, children: /* @__PURE__ */ e(P, { ref: t, ...x }) });
|
|
13
|
-
};
|
|
14
|
-
y.displayName = "TextInput";
|
|
15
|
-
export {
|
|
16
|
-
y as T
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=text-input-Bu4lGoBD.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-Bu4lGoBD.es.js","sources":["../../src/components/text-input/text-input.slots.tsx","../../src/components/text-input/text-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { textInputRecipe } from \"./text-input.recipe\";\n\nexport interface TextInputRecipeProps\n extends RecipeVariantProps<typeof textInputRecipe>,\n UnstyledProp {}\n\nexport type TextInputRootSlotProps = HTMLChakraProps<\n \"input\",\n TextInputRecipeProps\n>;\n\nconst { withContext } = createRecipeContext({ recipe: textInputRecipe });\n\n/**\n * Root component that provides the styling context for the TextInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const TextInputRootSlot = withContext<\n HTMLInputElement,\n TextInputRootSlotProps\n>(\"input\");\n","import { useRef } from \"react\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { useObjectRef, useTextField } from \"react-aria\";\nimport { Input } from \"react-aria-components\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nimport { TextInputRootSlot } from \"./text-input.slots\";\nimport type { TextInputProps } from \"./text-input.types\";\nimport { textInputRecipe } from \"./text-input.recipe\";\n\n/**\n * # TextInput\n *\n * An input component that takes in a text as input\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/textinput}\n */\nexport const TextInput = (props: TextInputProps) => {\n const { ref: forwardedRef, ...restProps } = props;\n const recipe = useRecipe({ recipe: textInputRecipe });\n\n const localRef = useRef<HTMLInputElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const [recipeProps, remainingProps] = recipe.splitVariantProps(restProps);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n const { inputProps } = useTextField(otherProps, ref);\n\n return (\n <TextInputRootSlot {...recipeProps} {...styleProps} asChild>\n <Input ref={ref} {...inputProps} />\n </TextInputRootSlot>\n );\n};\n\nTextInput.displayName = \"TextInput\";\n"],"names":["withContext","createRecipeContext","textInputRecipe","TextInputRootSlot","TextInput","props","forwardedRef","restProps","recipe","useRecipe","localRef","useRef","ref","useObjectRef","mergeRefs","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","inputProps","useTextField","jsx","Input"],"mappings":";;;;;;;;;AAkBA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,QAAQC,GAAiB,GAM1DC,IAAoB,gBAAAH,EAG/B,OAAO,GCTII,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,KAAKC,GAAc,GAAGC,MAAcF,GACtCG,IAASC,EAAU,EAAE,QAAQP,GAAiB,GAE9CQ,IAAWC,EAAyB,IAAI,GACxCC,IAAMC,EAAaC,EAAUJ,GAAUJ,CAAY,CAAC,GAEpD,CAACS,GAAaC,CAAc,IAAIR,EAAO,kBAAkBD,CAAS,GAClE,CAACU,GAAYC,CAAU,IAAIC,EAAkBH,CAAc,GAC3D,EAAE,YAAAI,EAAA,IAAeC,EAAaH,GAAYN,CAAG;AAEnD,SACE,gBAAAU,EAACnB,GAAA,EAAmB,GAAGY,GAAc,GAAGE,GAAY,SAAO,IACzD,UAAA,gBAAAK,EAACC,GAAA,EAAM,KAAAX,GAAW,GAAGQ,GAAY,GACnC;AAEJ;AAEAhB,EAAU,cAAc;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),R=require("react"),q=require("@chakra-ui/react"),r=require("@chakra-ui/react/styled-system"),P=require("./Input-HBDt7LmM.cjs.js"),$=require("./extractStyleProps-dSQoSYg8.cjs.js"),s=require("./index-DebuynT7.cjs.js"),I=require("./useObjectRef-dXOJdONs.cjs.js"),b=require("./useTextField-BcthGRd8.cjs.js"),{withContext:y}=r.createRecipeContext({recipe:s.textInputRecipe}),m=y("input"),c=o=>{const{ref:n,...i}=o,p=r.useRecipe({recipe:s.textInputRecipe}),u=R.useRef(null),e=I.$df56164dff5785e2$export$4338b53315abf666(q.mergeRefs(u,n)),[x,a]=p.splitVariantProps(i),[f,d]=$.extractStyleProps(a),{inputProps:l}=b.$2d73ec29415bd339$export$712718f7aec83d5(d,e);return t.jsx(m,{...x,...f,asChild:!0,children:t.jsx(P.$3985021b0ad6602f$export$f5b8910cec6cf069,{ref:e,...l})})};c.displayName="TextInput";exports.TextInput=c;
|
|
2
|
-
//# sourceMappingURL=text-input-DtMgT0KI.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-DtMgT0KI.cjs.js","sources":["../../src/components/text-input/text-input.slots.tsx","../../src/components/text-input/text-input.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { textInputRecipe } from \"./text-input.recipe\";\n\nexport interface TextInputRecipeProps\n extends RecipeVariantProps<typeof textInputRecipe>,\n UnstyledProp {}\n\nexport type TextInputRootSlotProps = HTMLChakraProps<\n \"input\",\n TextInputRecipeProps\n>;\n\nconst { withContext } = createRecipeContext({ recipe: textInputRecipe });\n\n/**\n * Root component that provides the styling context for the TextInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const TextInputRootSlot = withContext<\n HTMLInputElement,\n TextInputRootSlotProps\n>(\"input\");\n","import { useRef } from \"react\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { useObjectRef, useTextField } from \"react-aria\";\nimport { Input } from \"react-aria-components\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nimport { TextInputRootSlot } from \"./text-input.slots\";\nimport type { TextInputProps } from \"./text-input.types\";\nimport { textInputRecipe } from \"./text-input.recipe\";\n\n/**\n * # TextInput\n *\n * An input component that takes in a text as input\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/textinput}\n */\nexport const TextInput = (props: TextInputProps) => {\n const { ref: forwardedRef, ...restProps } = props;\n const recipe = useRecipe({ recipe: textInputRecipe });\n\n const localRef = useRef<HTMLInputElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const [recipeProps, remainingProps] = recipe.splitVariantProps(restProps);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n const { inputProps } = useTextField(otherProps, ref);\n\n return (\n <TextInputRootSlot {...recipeProps} {...styleProps} asChild>\n <Input ref={ref} {...inputProps} />\n </TextInputRootSlot>\n );\n};\n\nTextInput.displayName = \"TextInput\";\n"],"names":["withContext","createRecipeContext","textInputRecipe","TextInputRootSlot","TextInput","props","forwardedRef","restProps","recipe","useRecipe","localRef","useRef","ref","useObjectRef","mergeRefs","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","inputProps","useTextField","jsx","Input"],"mappings":"kWAkBM,CAAE,YAAAA,CAAA,EAAgBC,EAAAA,oBAAoB,CAAE,OAAQC,EAAAA,gBAAiB,EAM1DC,EAAoBH,EAG/B,OAAO,ECTII,EAAaC,GAA0B,CAClD,KAAM,CAAE,IAAKC,EAAc,GAAGC,GAAcF,EACtCG,EAASC,EAAAA,UAAU,CAAE,OAAQP,EAAAA,gBAAiB,EAE9CQ,EAAWC,EAAAA,OAAyB,IAAI,EACxCC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUJ,CAAY,CAAC,EAEpD,CAACS,EAAaC,CAAc,EAAIR,EAAO,kBAAkBD,CAAS,EAClE,CAACU,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAC3D,CAAE,WAAAI,CAAA,EAAeC,2CAAaH,EAAYN,CAAG,EAEnD,OACEU,EAAAA,IAACnB,EAAA,CAAmB,GAAGY,EAAc,GAAGE,EAAY,QAAO,GACzD,SAAAK,EAAAA,IAACC,EAAAA,0CAAA,CAAM,IAAAX,EAAW,GAAGQ,EAAY,EACnC,CAEJ,EAEAhB,EAAU,YAAc"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { defineSlotRecipe as p, createSlotRecipeContext as c, useRecipe as u } from "@chakra-ui/react/styled-system";
|
|
3
|
-
import { c as m, a as b, b as f } from "./DateField-Dm2Qlhbk.es.js";
|
|
4
|
-
import { e as y } from "./extractStyleProps-lz7NzsNX.es.js";
|
|
5
|
-
const t = /* @__PURE__ */ p({
|
|
6
|
-
// Unique class name prefix for the component
|
|
7
|
-
className: "nimbus-time-input",
|
|
8
|
-
slots: ["root", "segmentGroup", "segment"],
|
|
9
|
-
// Base styles applied to all instances of the component
|
|
10
|
-
base: {
|
|
11
|
-
root: {
|
|
12
|
-
display: "inline-block"
|
|
13
|
-
},
|
|
14
|
-
segmentGroup: {
|
|
15
|
-
display: "flex",
|
|
16
|
-
borderRadius: "200",
|
|
17
|
-
bg: "transparent",
|
|
18
|
-
boxShadow: "inset 0 0 0 var(--border-width) var(--border-color)",
|
|
19
|
-
width: "100%",
|
|
20
|
-
alignItems: "center",
|
|
21
|
-
"&[data-focus-within='true']": {
|
|
22
|
-
// TODO: can't use focusRing prop, find other solution (helper, util, etc.)
|
|
23
|
-
outlineWidth: "var(--focus-ring-width)",
|
|
24
|
-
outlineColor: "var(--focus-ring-color)",
|
|
25
|
-
outlineStyle: "var(--focus-ring-style)",
|
|
26
|
-
outlineOffset: "var(--focus-ring-offset)"
|
|
27
|
-
},
|
|
28
|
-
"&[data-invalid='true']": {
|
|
29
|
-
"--border-color": "colors.critical.7",
|
|
30
|
-
color: "critical.11"
|
|
31
|
-
},
|
|
32
|
-
"&[data-disabled='true']": {
|
|
33
|
-
layerStyle: "disabled",
|
|
34
|
-
bg: "neutral.3"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
segment: {
|
|
38
|
-
fontVariantNumeric: "tabular-nums",
|
|
39
|
-
outline: "0",
|
|
40
|
-
px: "50",
|
|
41
|
-
borderRadius: "50",
|
|
42
|
-
"&:empty": {
|
|
43
|
-
border: "1px solid"
|
|
44
|
-
},
|
|
45
|
-
"&[data-focused='true']": {
|
|
46
|
-
bg: "primary.10",
|
|
47
|
-
color: "primary.contrast"
|
|
48
|
-
},
|
|
49
|
-
"&[data-placeholder='true']:not([data-focused='true'])": {
|
|
50
|
-
opacity: 0.5
|
|
51
|
-
},
|
|
52
|
-
/**
|
|
53
|
-
* The first and last segment contains a hidden character for screen readers
|
|
54
|
-
* that indicates number reading direction. Since this character is
|
|
55
|
-
* inside a segment element, it creates unwanted padding. This CSS
|
|
56
|
-
* removes the extra padding and aligns the text to match a regular
|
|
57
|
-
* TextInput's text position.
|
|
58
|
-
*/
|
|
59
|
-
"&[data-type='literal']&:first-of-type, &[data-type='literal']&:last-of-type": {
|
|
60
|
-
px: "0",
|
|
61
|
-
ml: "-50"
|
|
62
|
-
},
|
|
63
|
-
"&[data-type='minute']": {
|
|
64
|
-
// for reference
|
|
65
|
-
},
|
|
66
|
-
"&[data-type='hour']": {
|
|
67
|
-
// for reference
|
|
68
|
-
},
|
|
69
|
-
"&[data-type='dayPeriod']": {
|
|
70
|
-
// for reference
|
|
71
|
-
},
|
|
72
|
-
"&[data-type='timeZoneName']": {
|
|
73
|
-
// for reference
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
// Available variants for customizing the component's appearance
|
|
78
|
-
variants: {
|
|
79
|
-
// Size variants from smallest to largest
|
|
80
|
-
size: {
|
|
81
|
-
sm: {
|
|
82
|
-
segmentGroup: {
|
|
83
|
-
h: 800,
|
|
84
|
-
textStyle: "sm",
|
|
85
|
-
px: 300
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
md: {
|
|
89
|
-
segmentGroup: {
|
|
90
|
-
h: 1e3,
|
|
91
|
-
textStyle: "md",
|
|
92
|
-
px: 400
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
variant: {
|
|
97
|
-
solid: {
|
|
98
|
-
segmentGroup: {
|
|
99
|
-
"--border-width": "sizes.25",
|
|
100
|
-
"--border-color": "colors.neutral.7",
|
|
101
|
-
backgroundColor: "neutral.1",
|
|
102
|
-
_hover: {
|
|
103
|
-
backgroundColor: "primary.2"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
ghost: {
|
|
108
|
-
segmentGroup: {
|
|
109
|
-
_hover: {
|
|
110
|
-
backgroundColor: "primary.2"
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
defaultVariants: {
|
|
117
|
-
size: "md",
|
|
118
|
-
variant: "solid"
|
|
119
|
-
}
|
|
120
|
-
}), { withProvider: g, withContext: r } = /* @__PURE__ */ c({
|
|
121
|
-
recipe: t
|
|
122
|
-
}), h = /* @__PURE__ */ g("div", "root"), x = /* @__PURE__ */ r("div", "segmentGroup"), v = /* @__PURE__ */ r("div", "segment"), S = (o) => {
|
|
123
|
-
const a = u({ recipe: t }), [i, s] = a.splitVariantProps(o), [n, d] = y(s);
|
|
124
|
-
return /* @__PURE__ */ e(h, { asChild: !0, ...i, ...n, children: /* @__PURE__ */ e(m, { ...d, children: /* @__PURE__ */ e(x, { asChild: !0, children: /* @__PURE__ */ e(b, { children: (l) => /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(f, { segment: l }) }) }) }) }) });
|
|
125
|
-
};
|
|
126
|
-
S.displayName = "TimeInput";
|
|
127
|
-
export {
|
|
128
|
-
S as T
|
|
129
|
-
};
|
|
130
|
-
//# sourceMappingURL=time-input-D8D26IcA.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-input-D8D26IcA.es.js","sources":["../../src/components/time-input/time-input.recipe.ts","../../src/components/time-input/time-input.slots.tsx","../../src/components/time-input/time-input.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Recipe configuration for the TimeInput component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const timeInputRecipe = defineSlotRecipe({\n // Unique class name prefix for the component\n className: \"nimbus-time-input\",\n slots: [\"root\", \"segmentGroup\", \"segment\"],\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-block\",\n },\n segmentGroup: {\n display: \"flex\",\n borderRadius: \"200\",\n bg: \"transparent\",\n boxShadow: \"inset 0 0 0 var(--border-width) var(--border-color)\",\n width: \"100%\",\n alignItems: \"center\",\n\n \"&[data-focus-within='true']\": {\n // TODO: can't use focusRing prop, find other solution (helper, util, etc.)\n outlineWidth: \"var(--focus-ring-width)\",\n outlineColor: \"var(--focus-ring-color)\",\n outlineStyle: \"var(--focus-ring-style)\",\n outlineOffset: \"var(--focus-ring-offset)\",\n },\n \"&[data-invalid='true']\": {\n \"--border-color\": \"colors.critical.7\",\n color: \"critical.11\",\n },\n \"&[data-disabled='true']\": {\n layerStyle: \"disabled\",\n bg: \"neutral.3\",\n },\n },\n segment: {\n fontVariantNumeric: \"tabular-nums\",\n outline: \"0\",\n px: \"50\",\n borderRadius: \"50\",\n\n \"&:empty\": {\n border: \"1px solid\",\n },\n\n \"&[data-focused='true']\": {\n bg: \"primary.10\",\n color: \"primary.contrast\",\n },\n\n \"&[data-placeholder='true']:not([data-focused='true'])\": {\n opacity: 0.5,\n },\n\n /**\n * The first and last segment contains a hidden character for screen readers\n * that indicates number reading direction. Since this character is\n * inside a segment element, it creates unwanted padding. This CSS\n * removes the extra padding and aligns the text to match a regular\n * TextInput's text position.\n */\n \"&[data-type='literal']&:first-of-type, &[data-type='literal']&:last-of-type\":\n {\n px: \"0\",\n ml: \"-50\",\n },\n\n \"&[data-type='minute']\": {\n // for reference\n },\n \"&[data-type='hour']\": {\n // for reference\n },\n \"&[data-type='dayPeriod']\": {\n // for reference\n },\n \"&[data-type='timeZoneName']\": {\n // for reference\n },\n },\n },\n\n // Available variants for customizing the component's appearance\n variants: {\n // Size variants from smallest to largest\n size: {\n sm: {\n segmentGroup: {\n h: 800,\n textStyle: \"sm\",\n px: 300,\n },\n },\n md: {\n segmentGroup: {\n h: 1000,\n textStyle: \"md\",\n px: 400,\n },\n },\n },\n variant: {\n solid: {\n segmentGroup: {\n \"--border-width\": \"sizes.25\",\n \"--border-color\": \"colors.neutral.7\",\n backgroundColor: \"neutral.1\",\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n },\n ghost: {\n segmentGroup: {\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n },\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"solid\",\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { timeInputRecipe } from \"./time-input.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface TimeInputRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TimeInputRootProps\n extends HTMLChakraProps<\"div\", TimeInputRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: timeInputRecipe,\n});\n\n/**\n * Root component that provides the styling context for the TimeInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const TimeInputRootSlot = withProvider<\n HTMLDivElement,\n TimeInputRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the TimeField part of the TimeInput.\n */\nexport const TimeInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the TimeField part of the TimeInput.\n */\nexport const TimeInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n TimeInputRootSlot,\n TimeInputSegmentGroupSlot,\n TimeInputSegmentSlot,\n} from \"./time-input.slots\";\n\nimport { TimeField, DateInput, DateSegment } from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { timeInputRecipe } from \"./time-input.recipe\";\nimport type { TimeInputProps } from \"./time-input.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * TimeInput\n * ============================================================\n * allows entering a time in the currently selected locale\n */\nexport const TimeInput = (props: TimeInputProps) => {\n const recipe = useRecipe({ recipe: timeInputRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <TimeInputRootSlot asChild {...recipeProps} {...styleProps}>\n <TimeField {...otherProps}>\n <TimeInputSegmentGroupSlot asChild>\n <DateInput>\n {(segment) => (\n <TimeInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </TimeInputSegmentSlot>\n )}\n </DateInput>\n </TimeInputSegmentGroupSlot>\n </TimeField>\n </TimeInputRootSlot>\n );\n};\n\nTimeInput.displayName = \"TimeInput\";\n"],"names":["timeInputRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","TimeInputRootSlot","TimeInputSegmentGroupSlot","TimeInputSegmentSlot","TimeInput","props","recipe","useRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","jsx","TimeField","DateInput","segment","DateSegment"],"mappings":";;;;AAMO,MAAMA,IAAkB,gBAAAC,EAAiB;AAAA;AAAA,EAE9C,WAAW;AAAA,EACX,OAAO,CAAC,QAAQ,gBAAgB,SAAS;AAAA;AAAA,EAGzC,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,IAAA;AAAA,IAEX,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,cAAc;AAAA,MACd,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,OAAO;AAAA,MACP,YAAY;AAAA,MAEZ,+BAA+B;AAAA;AAAA,QAE7B,cAAc;AAAA,QACd,cAAc;AAAA,QACd,cAAc;AAAA,QACd,eAAe;AAAA,MAAA;AAAA,MAEjB,0BAA0B;AAAA,QACxB,kBAAkB;AAAA,QAClB,OAAO;AAAA,MAAA;AAAA,MAET,2BAA2B;AAAA,QACzB,YAAY;AAAA,QACZ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,SAAS;AAAA,MACP,oBAAoB;AAAA,MACpB,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,cAAc;AAAA,MAEd,WAAW;AAAA,QACT,QAAQ;AAAA,MAAA;AAAA,MAGV,0BAA0B;AAAA,QACxB,IAAI;AAAA,QACJ,OAAO;AAAA,MAAA;AAAA,MAGT,yDAAyD;AAAA,QACvD,SAAS;AAAA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUX,+EACE;AAAA,QACE,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAGR,yBAAyB;AAAA;AAAA,MAAA;AAAA,MAGzB,uBAAuB;AAAA;AAAA,MAAA;AAAA,MAGvB,4BAA4B;AAAA;AAAA,MAAA;AAAA,MAG5B,+BAA+B;AAAA;AAAA,MAAA;AAAA,IAE/B;AAAA,EACF;AAAA;AAAA,EAIF,UAAU;AAAA;AAAA,IAER,MAAM;AAAA,MACJ,IAAI;AAAA,QACF,cAAc;AAAA,UACZ,GAAG;AAAA,UACH,WAAW;AAAA,UACX,IAAI;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,IAAI;AAAA,QACF,cAAc;AAAA,UACZ,GAAG;AAAA,UACH,WAAW;AAAA,UACX,IAAI;AAAA,QAAA;AAAA,MACN;AAAA,IACF;AAAA,IAEF,SAAS;AAAA,MACP,OAAO;AAAA,QACL,cAAc;AAAA,UACZ,kBAAkB;AAAA,UAClB,kBAAkB;AAAA,UAClB,iBAAiB;AAAA,UACjB,QAAQ;AAAA,YACN,iBAAiB;AAAA,UAAA;AAAA,QACnB;AAAA,MACF;AAAA,MAEF,OAAO;AAAA,QACL,cAAc;AAAA,UACZ,QAAQ;AAAA,YACN,iBAAiB;AAAA,UAAA;AAAA,QACnB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb,CAAC,GCzGK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQJ;AACV,CAAC,GAMYK,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAKFI,IAA4B,gBAAAH,EAGvC,OAAO,cAAc,GAKVI,IAAuB,gBAAAJ,EAGlC,OAAO,SAAS,GCnCLK,IAAY,CAACC,MAA0B;AAClD,QAAMC,IAASC,EAAU,EAAE,QAAQX,GAAiB,GAC9C,CAACY,GAAaC,CAAc,IAAIH,EAAO,kBAAkBD,CAAK,GAC9D,CAACK,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAAI,EAACZ,GAAA,EAAkB,SAAO,IAAE,GAAGO,GAAc,GAAGE,GAC9C,UAAA,gBAAAG,EAACC,GAAA,EAAW,GAAGH,GACb,4BAACT,GAAA,EAA0B,SAAO,IAChC,UAAA,gBAAAW,EAACE,GAAA,EACE,UAAA,CAACC,MACA,gBAAAH,EAACV,KAAqB,SAAO,IAC3B,UAAA,gBAAAU,EAACI,GAAA,EAAY,SAAAD,EAAA,CAAkB,EAAA,CACjC,GAEJ,EAAA,CACF,GACF,GACF;AAEJ;AAEAZ,EAAU,cAAc;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),r=require("@chakra-ui/react/styled-system"),t=require("./DateField-rweHHCKR.cjs.js"),m=require("./extractStyleProps-dSQoSYg8.cjs.js"),o=r.defineSlotRecipe({className:"nimbus-time-input",slots:["root","segmentGroup","segment"],base:{root:{display:"inline-block"},segmentGroup:{display:"flex",borderRadius:"200",bg:"transparent",boxShadow:"inset 0 0 0 var(--border-width) var(--border-color)",width:"100%",alignItems:"center","&[data-focus-within='true']":{outlineWidth:"var(--focus-ring-width)",outlineColor:"var(--focus-ring-color)",outlineStyle:"var(--focus-ring-style)",outlineOffset:"var(--focus-ring-offset)"},"&[data-invalid='true']":{"--border-color":"colors.critical.7",color:"critical.11"},"&[data-disabled='true']":{layerStyle:"disabled",bg:"neutral.3"}},segment:{fontVariantNumeric:"tabular-nums",outline:"0",px:"50",borderRadius:"50","&:empty":{border:"1px solid"},"&[data-focused='true']":{bg:"primary.10",color:"primary.contrast"},"&[data-placeholder='true']:not([data-focused='true'])":{opacity:.5},"&[data-type='literal']&:first-of-type, &[data-type='literal']&:last-of-type":{px:"0",ml:"-50"},"&[data-type='minute']":{},"&[data-type='hour']":{},"&[data-type='dayPeriod']":{},"&[data-type='timeZoneName']":{}}},variants:{size:{sm:{segmentGroup:{h:800,textStyle:"sm",px:300}},md:{segmentGroup:{h:1e3,textStyle:"md",px:400}}},variant:{solid:{segmentGroup:{"--border-width":"sizes.25","--border-color":"colors.neutral.7",backgroundColor:"neutral.1",_hover:{backgroundColor:"primary.2"}}},ghost:{segmentGroup:{_hover:{backgroundColor:"primary.2"}}}}},defaultVariants:{size:"md",variant:"solid"}}),{withProvider:y,withContext:i}=r.createSlotRecipeContext({recipe:o}),b=y("div","root"),f=i("div","segmentGroup"),g=i("div","segment"),a=s=>{const n=r.useRecipe({recipe:o}),[d,l]=n.splitVariantProps(s),[c,u]=m.extractStyleProps(l);return e.jsx(b,{asChild:!0,...d,...c,children:e.jsx(t.$40825cdb76e74f70$export$5eaee2322dd727eb,{...u,children:e.jsx(f,{asChild:!0,children:e.jsx(t.$40825cdb76e74f70$export$7edc06cf1783b30f,{children:p=>e.jsx(g,{asChild:!0,children:e.jsx(t.$40825cdb76e74f70$export$336ab7fa954c4b5f,{segment:p})})})})})})};a.displayName="TimeInput";exports.TimeInput=a;
|
|
2
|
-
//# sourceMappingURL=time-input-D9Xmy3YQ.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time-input-D9Xmy3YQ.cjs.js","sources":["../../src/components/time-input/time-input.recipe.ts","../../src/components/time-input/time-input.slots.tsx","../../src/components/time-input/time-input.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Recipe configuration for the TimeInput component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const timeInputRecipe = defineSlotRecipe({\n // Unique class name prefix for the component\n className: \"nimbus-time-input\",\n slots: [\"root\", \"segmentGroup\", \"segment\"],\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-block\",\n },\n segmentGroup: {\n display: \"flex\",\n borderRadius: \"200\",\n bg: \"transparent\",\n boxShadow: \"inset 0 0 0 var(--border-width) var(--border-color)\",\n width: \"100%\",\n alignItems: \"center\",\n\n \"&[data-focus-within='true']\": {\n // TODO: can't use focusRing prop, find other solution (helper, util, etc.)\n outlineWidth: \"var(--focus-ring-width)\",\n outlineColor: \"var(--focus-ring-color)\",\n outlineStyle: \"var(--focus-ring-style)\",\n outlineOffset: \"var(--focus-ring-offset)\",\n },\n \"&[data-invalid='true']\": {\n \"--border-color\": \"colors.critical.7\",\n color: \"critical.11\",\n },\n \"&[data-disabled='true']\": {\n layerStyle: \"disabled\",\n bg: \"neutral.3\",\n },\n },\n segment: {\n fontVariantNumeric: \"tabular-nums\",\n outline: \"0\",\n px: \"50\",\n borderRadius: \"50\",\n\n \"&:empty\": {\n border: \"1px solid\",\n },\n\n \"&[data-focused='true']\": {\n bg: \"primary.10\",\n color: \"primary.contrast\",\n },\n\n \"&[data-placeholder='true']:not([data-focused='true'])\": {\n opacity: 0.5,\n },\n\n /**\n * The first and last segment contains a hidden character for screen readers\n * that indicates number reading direction. Since this character is\n * inside a segment element, it creates unwanted padding. This CSS\n * removes the extra padding and aligns the text to match a regular\n * TextInput's text position.\n */\n \"&[data-type='literal']&:first-of-type, &[data-type='literal']&:last-of-type\":\n {\n px: \"0\",\n ml: \"-50\",\n },\n\n \"&[data-type='minute']\": {\n // for reference\n },\n \"&[data-type='hour']\": {\n // for reference\n },\n \"&[data-type='dayPeriod']\": {\n // for reference\n },\n \"&[data-type='timeZoneName']\": {\n // for reference\n },\n },\n },\n\n // Available variants for customizing the component's appearance\n variants: {\n // Size variants from smallest to largest\n size: {\n sm: {\n segmentGroup: {\n h: 800,\n textStyle: \"sm\",\n px: 300,\n },\n },\n md: {\n segmentGroup: {\n h: 1000,\n textStyle: \"md\",\n px: 400,\n },\n },\n },\n variant: {\n solid: {\n segmentGroup: {\n \"--border-width\": \"sizes.25\",\n \"--border-color\": \"colors.neutral.7\",\n backgroundColor: \"neutral.1\",\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n },\n ghost: {\n segmentGroup: {\n _hover: {\n backgroundColor: \"primary.2\",\n },\n },\n },\n },\n },\n defaultVariants: {\n size: \"md\",\n variant: \"solid\",\n },\n});\n","import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { timeInputRecipe } from \"./time-input.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface TimeInputRecipeProps extends RecipeProps<\"div\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TimeInputRootProps\n extends HTMLChakraProps<\"div\", TimeInputRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: timeInputRecipe,\n});\n\n/**\n * Root component that provides the styling context for the TimeInput component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const TimeInputRootSlot = withProvider<\n HTMLDivElement,\n TimeInputRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the TimeField part of the TimeInput.\n */\nexport const TimeInputSegmentGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segmentGroup\");\n\n/**\n * Slot component for the TimeField part of the TimeInput.\n */\nexport const TimeInputSegmentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"segment\");\n","import {\n TimeInputRootSlot,\n TimeInputSegmentGroupSlot,\n TimeInputSegmentSlot,\n} from \"./time-input.slots\";\n\nimport { TimeField, DateInput, DateSegment } from \"react-aria-components\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { timeInputRecipe } from \"./time-input.recipe\";\nimport type { TimeInputProps } from \"./time-input.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * TimeInput\n * ============================================================\n * allows entering a time in the currently selected locale\n */\nexport const TimeInput = (props: TimeInputProps) => {\n const recipe = useRecipe({ recipe: timeInputRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <TimeInputRootSlot asChild {...recipeProps} {...styleProps}>\n <TimeField {...otherProps}>\n <TimeInputSegmentGroupSlot asChild>\n <DateInput>\n {(segment) => (\n <TimeInputSegmentSlot asChild>\n <DateSegment segment={segment} />\n </TimeInputSegmentSlot>\n )}\n </DateInput>\n </TimeInputSegmentGroupSlot>\n </TimeField>\n </TimeInputRootSlot>\n );\n};\n\nTimeInput.displayName = \"TimeInput\";\n"],"names":["timeInputRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","TimeInputRootSlot","TimeInputSegmentGroupSlot","TimeInputSegmentSlot","TimeInput","props","recipe","useRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","jsx","TimeField","DateInput","segment","DateSegment"],"mappings":"wLAMaA,EAAkBC,EAAAA,iBAAiB,CAE9C,UAAW,oBACX,MAAO,CAAC,OAAQ,eAAgB,SAAS,EAGzC,KAAM,CACJ,KAAM,CACJ,QAAS,cAAA,EAEX,aAAc,CACZ,QAAS,OACT,aAAc,MACd,GAAI,cACJ,UAAW,sDACX,MAAO,OACP,WAAY,SAEZ,8BAA+B,CAE7B,aAAc,0BACd,aAAc,0BACd,aAAc,0BACd,cAAe,0BAAA,EAEjB,yBAA0B,CACxB,iBAAkB,oBAClB,MAAO,aAAA,EAET,0BAA2B,CACzB,WAAY,WACZ,GAAI,WAAA,CACN,EAEF,QAAS,CACP,mBAAoB,eACpB,QAAS,IACT,GAAI,KACJ,aAAc,KAEd,UAAW,CACT,OAAQ,WAAA,EAGV,yBAA0B,CACxB,GAAI,aACJ,MAAO,kBAAA,EAGT,wDAAyD,CACvD,QAAS,EAAA,EAUX,8EACE,CACE,GAAI,IACJ,GAAI,KAAA,EAGR,wBAAyB,CAAA,EAGzB,sBAAuB,CAAA,EAGvB,2BAA4B,CAAA,EAG5B,8BAA+B,CAAA,CAE/B,CACF,EAIF,SAAU,CAER,KAAM,CACJ,GAAI,CACF,aAAc,CACZ,EAAG,IACH,UAAW,KACX,GAAI,GAAA,CACN,EAEF,GAAI,CACF,aAAc,CACZ,EAAG,IACH,UAAW,KACX,GAAI,GAAA,CACN,CACF,EAEF,QAAS,CACP,MAAO,CACL,aAAc,CACZ,iBAAkB,WAClB,iBAAkB,mBAClB,gBAAiB,YACjB,OAAQ,CACN,gBAAiB,WAAA,CACnB,CACF,EAEF,MAAO,CACL,aAAc,CACZ,OAAQ,CACN,gBAAiB,WAAA,CACnB,CACF,CACF,CACF,EAEF,gBAAiB,CACf,KAAM,KACN,QAAS,OAAA,CAEb,CAAC,ECzGK,CAAE,aAAAC,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQJ,CACV,CAAC,EAMYK,EAAoBH,EAG/B,MAAO,MAAM,EAKFI,EAA4BH,EAGvC,MAAO,cAAc,EAKVI,EAAuBJ,EAGlC,MAAO,SAAS,ECnCLK,EAAaC,GAA0B,CAClD,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQX,EAAiB,EAC9C,CAACY,EAAaC,CAAc,EAAIH,EAAO,kBAAkBD,CAAK,EAC9D,CAACK,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAEjE,OACEI,EAAAA,IAACZ,EAAA,CAAkB,QAAO,GAAE,GAAGO,EAAc,GAAGE,EAC9C,SAAAG,EAAAA,IAACC,4CAAA,CAAW,GAAGH,EACb,eAACT,EAAA,CAA0B,QAAO,GAChC,SAAAW,EAAAA,IAACE,EAAAA,0CAAA,CACE,SAACC,GACAH,EAAAA,IAACV,GAAqB,QAAO,GAC3B,SAAAU,MAACI,EAAAA,0CAAA,CAAY,QAAAD,CAAA,CAAkB,CAAA,CACjC,EAEJ,CAAA,CACF,EACF,EACF,CAEJ,EAEAZ,EAAU,YAAc"}
|