@utilitywarehouse/hearth-react 0.34.3 → 0.34.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +7 -5
- package/dist/{chunk-AOWHE3JS.cjs → chunk-2DOX5QRE.cjs} +2 -2
- package/dist/{chunk-AOWHE3JS.cjs.map → chunk-2DOX5QRE.cjs.map} +1 -1
- package/dist/{chunk-2MQ6FGCP.js → chunk-2T6JOGY4.js} +2 -2
- package/dist/{chunk-SWIT4LGB.cjs → chunk-2UQFNTOW.cjs} +2 -2
- package/dist/{chunk-SWIT4LGB.cjs.map → chunk-2UQFNTOW.cjs.map} +1 -1
- package/dist/{chunk-OOUAAVCO.cjs → chunk-2YOFE27F.cjs} +2 -2
- package/dist/{chunk-OOUAAVCO.cjs.map → chunk-2YOFE27F.cjs.map} +1 -1
- package/dist/chunk-3KHNXMYU.js +4 -0
- package/dist/chunk-3KHNXMYU.js.map +1 -0
- package/dist/chunk-53VJM6HN.js +4 -0
- package/dist/chunk-53VJM6HN.js.map +1 -0
- package/dist/{chunk-75OLYAFB.cjs → chunk-6BVOGEQF.cjs} +2 -2
- package/dist/{chunk-75OLYAFB.cjs.map → chunk-6BVOGEQF.cjs.map} +1 -1
- package/dist/{chunk-X2QPGOUI.cjs → chunk-6GC2HQ72.cjs} +2 -2
- package/dist/{chunk-X2QPGOUI.cjs.map → chunk-6GC2HQ72.cjs.map} +1 -1
- package/dist/chunk-6TVIKYYN.js +4 -0
- package/dist/chunk-6TVIKYYN.js.map +1 -0
- package/dist/{chunk-GAFUPNEN.js → chunk-7BU5PUFF.js} +2 -2
- package/dist/chunk-7BU5PUFF.js.map +1 -0
- package/dist/{chunk-UNIBG2C6.js → chunk-7VHYXPJC.js} +2 -2
- package/dist/chunk-AEY4Y3ZM.cjs +4 -0
- package/dist/{chunk-YEZ6N62U.cjs.map → chunk-AEY4Y3ZM.cjs.map} +1 -1
- package/dist/chunk-AJDKAYX2.js +4 -0
- package/dist/{chunk-FSOQCT7B.js.map → chunk-AJDKAYX2.js.map} +1 -1
- package/dist/{chunk-I4T6DB7C.js → chunk-ALOYQFUV.js} +2 -2
- package/dist/chunk-ALOYQFUV.js.map +1 -0
- package/dist/chunk-ASLPRJKG.cjs +4 -0
- package/dist/chunk-ASLPRJKG.cjs.map +1 -0
- package/dist/{chunk-F7A4D3PD.cjs → chunk-BCWX6IU3.cjs} +2 -2
- package/dist/chunk-BCWX6IU3.cjs.map +1 -0
- package/dist/{chunk-RF5NDA46.cjs → chunk-C7UHLFA4.cjs} +2 -2
- package/dist/chunk-C7UHLFA4.cjs.map +1 -0
- package/dist/{chunk-WYLVXCEC.js → chunk-DDEAM7YH.js} +2 -2
- package/dist/chunk-DDEAM7YH.js.map +1 -0
- package/dist/{chunk-BB2SOLJS.cjs → chunk-DFHWFPXL.cjs} +2 -2
- package/dist/{chunk-BB2SOLJS.cjs.map → chunk-DFHWFPXL.cjs.map} +1 -1
- package/dist/{chunk-OQ7TRS57.js → chunk-DYMXUQM4.js} +2 -2
- package/dist/{chunk-VVBUEPWH.js → chunk-EERWIJJE.js} +2 -2
- package/dist/chunk-EEUINYIO.js +4 -0
- package/dist/{chunk-ICJHFSP5.js.map → chunk-EEUINYIO.js.map} +1 -1
- package/dist/chunk-ESNSLBNQ.js +4 -0
- package/dist/{chunk-BXDF7Z4R.js.map → chunk-ESNSLBNQ.js.map} +1 -1
- package/dist/{chunk-Y2YBHHIX.js → chunk-EWEFZ6ZZ.js} +2 -2
- package/dist/{chunk-IEKB4IRY.js → chunk-F4VHCEOC.js} +2 -2
- package/dist/{chunk-UNDW2NW7.cjs → chunk-FODRPEXV.cjs} +2 -2
- package/dist/chunk-FODRPEXV.cjs.map +1 -0
- package/dist/chunk-FOTB6NKY.cjs +4 -0
- package/dist/chunk-FOTB6NKY.cjs.map +1 -0
- package/dist/chunk-GI6ISM62.js +4 -0
- package/dist/chunk-GI6ISM62.js.map +1 -0
- package/dist/{chunk-7ILZKQOQ.js → chunk-HH27I2KI.js} +2 -2
- package/dist/chunk-HKZR7WEU.js +4 -0
- package/dist/chunk-HKZR7WEU.js.map +1 -0
- package/dist/chunk-HMJ7G2EA.cjs +4 -0
- package/dist/chunk-HMJ7G2EA.cjs.map +1 -0
- package/dist/{chunk-LUPMXBAE.cjs → chunk-HWN35OXS.cjs} +2 -2
- package/dist/{chunk-LUPMXBAE.cjs.map → chunk-HWN35OXS.cjs.map} +1 -1
- package/dist/chunk-I34GF57U.cjs +4 -0
- package/dist/{chunk-WMOTZLQC.cjs.map → chunk-I34GF57U.cjs.map} +1 -1
- package/dist/{chunk-5QRJL6UW.cjs → chunk-IPBCLSDB.cjs} +2 -2
- package/dist/{chunk-5QRJL6UW.cjs.map → chunk-IPBCLSDB.cjs.map} +1 -1
- package/dist/chunk-IV4TGFTS.cjs +4 -0
- package/dist/chunk-IV4TGFTS.cjs.map +1 -0
- package/dist/chunk-IWL2NRQW.js +4 -0
- package/dist/chunk-IWL2NRQW.js.map +1 -0
- package/dist/chunk-J4MYTSQR.js +4 -0
- package/dist/chunk-J4MYTSQR.js.map +1 -0
- package/dist/chunk-J6RR5ZAC.js +4 -0
- package/dist/chunk-J6RR5ZAC.js.map +1 -0
- package/dist/chunk-KLWPH3KA.js +4 -0
- package/dist/{chunk-XBK44AAM.js.map → chunk-KLWPH3KA.js.map} +1 -1
- package/dist/{chunk-XAJGQUSC.js → chunk-KNPNKYUS.js} +2 -2
- package/dist/chunk-LWJNN4FX.cjs +4 -0
- package/dist/chunk-LWJNN4FX.cjs.map +1 -0
- package/dist/{chunk-A5H4YOM6.cjs → chunk-LY2R2ZLM.cjs} +2 -2
- package/dist/{chunk-A5H4YOM6.cjs.map → chunk-LY2R2ZLM.cjs.map} +1 -1
- package/dist/{chunk-GLKPD2GP.cjs → chunk-MIQ4OWR2.cjs} +2 -2
- package/dist/{chunk-GLKPD2GP.cjs.map → chunk-MIQ4OWR2.cjs.map} +1 -1
- package/dist/chunk-MLPWLB6K.js +4 -0
- package/dist/chunk-MLPWLB6K.js.map +1 -0
- package/dist/chunk-MQPXIAIR.js +4 -0
- package/dist/chunk-MQPXIAIR.js.map +1 -0
- package/dist/{chunk-HE73I4VO.cjs → chunk-MT7HVLG6.cjs} +2 -2
- package/dist/{chunk-HE73I4VO.cjs.map → chunk-MT7HVLG6.cjs.map} +1 -1
- package/dist/{chunk-EC7L4PCG.cjs → chunk-NADTSPIX.cjs} +2 -2
- package/dist/{chunk-EC7L4PCG.cjs.map → chunk-NADTSPIX.cjs.map} +1 -1
- package/dist/chunk-NP362J2E.cjs +4 -0
- package/dist/chunk-NP362J2E.cjs.map +1 -0
- package/dist/chunk-OO46QHIG.js +4 -0
- package/dist/chunk-OO46QHIG.js.map +1 -0
- package/dist/{chunk-RVXQZ4CI.cjs → chunk-OP6OD46L.cjs} +2 -2
- package/dist/{chunk-RVXQZ4CI.cjs.map → chunk-OP6OD46L.cjs.map} +1 -1
- package/dist/{chunk-L3VPQN5T.js → chunk-OTXFBNCU.js} +2 -2
- package/dist/{chunk-XMFWH5SU.js → chunk-OUXB7ICZ.js} +2 -2
- package/dist/chunk-OUXB7ICZ.js.map +1 -0
- package/dist/chunk-P7QOD4IU.cjs +4 -0
- package/dist/chunk-P7QOD4IU.cjs.map +1 -0
- package/dist/chunk-PFUJ3AOW.cjs +4 -0
- package/dist/chunk-PFUJ3AOW.cjs.map +1 -0
- package/dist/{chunk-KKHWPT5B.js → chunk-PGDFEVA5.js} +2 -2
- package/dist/{chunk-N2PQS6HG.js → chunk-PJCXETFD.js} +2 -2
- package/dist/chunk-PUDGKBPK.cjs +4 -0
- package/dist/chunk-PUDGKBPK.cjs.map +1 -0
- package/dist/chunk-Q3DKQMOH.cjs +4 -0
- package/dist/chunk-Q3DKQMOH.cjs.map +1 -0
- package/dist/{chunk-KRABYJRM.cjs → chunk-Q4GDPLX2.cjs} +2 -2
- package/dist/{chunk-KRABYJRM.cjs.map → chunk-Q4GDPLX2.cjs.map} +1 -1
- package/dist/chunk-Q6ZC2EJ2.js +4 -0
- package/dist/chunk-Q6ZC2EJ2.js.map +1 -0
- package/dist/{chunk-OLBF7CZD.cjs → chunk-QE5G52MR.cjs} +2 -2
- package/dist/{chunk-OLBF7CZD.cjs.map → chunk-QE5G52MR.cjs.map} +1 -1
- package/dist/chunk-QLMLIOWZ.cjs +4 -0
- package/dist/chunk-QLMLIOWZ.cjs.map +1 -0
- package/dist/chunk-QNITBIE4.js +4 -0
- package/dist/chunk-QNITBIE4.js.map +1 -0
- package/dist/{chunk-YABVOAPK.js → chunk-QUPHSWAC.js} +2 -2
- package/dist/{chunk-WDL4OS5J.cjs → chunk-RG53XPCM.cjs} +2 -2
- package/dist/{chunk-WDL4OS5J.cjs.map → chunk-RG53XPCM.cjs.map} +1 -1
- package/dist/chunk-RLXZVTER.js +4 -0
- package/dist/chunk-RLXZVTER.js.map +1 -0
- package/dist/chunk-RNP3S7YU.js +4 -0
- package/dist/chunk-RNP3S7YU.js.map +1 -0
- package/dist/{chunk-3OBTLZHR.js → chunk-RQVUMCZA.js} +2 -2
- package/dist/chunk-RQXSWZUH.cjs +4 -0
- package/dist/chunk-RQXSWZUH.cjs.map +1 -0
- package/dist/chunk-RS5YT3MK.cjs +4 -0
- package/dist/chunk-RS5YT3MK.cjs.map +1 -0
- package/dist/chunk-RV2FEKIE.cjs +4 -0
- package/dist/chunk-RV2FEKIE.cjs.map +1 -0
- package/dist/{chunk-XCT44JDG.js → chunk-S4U7KSTZ.js} +2 -2
- package/dist/chunk-SIUB7RNN.js +4 -0
- package/dist/chunk-SIUB7RNN.js.map +1 -0
- package/dist/chunk-SSI6IYHS.cjs +4 -0
- package/dist/chunk-SSI6IYHS.cjs.map +1 -0
- package/dist/chunk-TEIATTNR.js +4 -0
- package/dist/chunk-TEIATTNR.js.map +1 -0
- package/dist/{chunk-JK5AQFF2.js → chunk-U65H447D.js} +2 -2
- package/dist/chunk-U7CFC6Z2.cjs +4 -0
- package/dist/chunk-U7CFC6Z2.cjs.map +1 -0
- package/dist/{chunk-JCNQCBO7.cjs → chunk-UG5NCEQH.cjs} +2 -2
- package/dist/{chunk-JCNQCBO7.cjs.map → chunk-UG5NCEQH.cjs.map} +1 -1
- package/dist/chunk-UPYADVVW.js +4 -0
- package/dist/chunk-UPYADVVW.js.map +1 -0
- package/dist/{chunk-U44ALMBI.js → chunk-UYQNCEW5.js} +2 -2
- package/dist/{chunk-HNPNWQMD.js → chunk-V4BZIPQB.js} +2 -2
- package/dist/{chunk-R6KCU4S7.cjs → chunk-V5F33HLX.cjs} +2 -2
- package/dist/{chunk-R6KCU4S7.cjs.map → chunk-V5F33HLX.cjs.map} +1 -1
- package/dist/chunk-VEOECLHI.cjs +4 -0
- package/dist/chunk-VEOECLHI.cjs.map +1 -0
- package/dist/chunk-VSV7P6QO.cjs +4 -0
- package/dist/{chunk-WB4GZ3CX.cjs.map → chunk-VSV7P6QO.cjs.map} +1 -1
- package/dist/{chunk-3SXNUUIV.cjs → chunk-VZ37XNSE.cjs} +2 -2
- package/dist/{chunk-3SXNUUIV.cjs.map → chunk-VZ37XNSE.cjs.map} +1 -1
- package/dist/{chunk-W35QJTJH.js → chunk-VZM5CVIO.js} +2 -2
- package/dist/chunk-WCHIJDDF.cjs +4 -0
- package/dist/chunk-WCHIJDDF.cjs.map +1 -0
- package/dist/{chunk-WAS47BSQ.js → chunk-X6FC4KSH.js} +2 -2
- package/dist/{chunk-NEUOBQLL.cjs → chunk-XKBBOWVM.cjs} +2 -2
- package/dist/{chunk-NEUOBQLL.cjs.map → chunk-XKBBOWVM.cjs.map} +1 -1
- package/dist/{chunk-L7I7AUWH.cjs → chunk-XL66CZU5.cjs} +2 -2
- package/dist/{chunk-L7I7AUWH.cjs.map → chunk-XL66CZU5.cjs.map} +1 -1
- package/dist/{chunk-UQEUXEEG.js → chunk-XNL45RW3.js} +2 -2
- package/dist/{chunk-4VS7B2ZG.cjs → chunk-XPN7BKU2.cjs} +2 -2
- package/dist/{chunk-4VS7B2ZG.cjs.map → chunk-XPN7BKU2.cjs.map} +1 -1
- package/dist/{chunk-TGMNEOLU.cjs → chunk-XYL3ZE55.cjs} +2 -2
- package/dist/chunk-XYL3ZE55.cjs.map +1 -0
- package/dist/{chunk-QVE4N4F2.js → chunk-YEUIB4QY.js} +2 -2
- package/dist/chunk-YOSI2OCC.js +4 -0
- package/dist/{chunk-F6H2C3OA.js.map → chunk-YOSI2OCC.js.map} +1 -1
- package/dist/{chunk-XZBPR3WG.cjs → chunk-ZKHAEQHH.cjs} +2 -2
- package/dist/{chunk-XZBPR3WG.cjs.map → chunk-ZKHAEQHH.cjs.map} +1 -1
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/AlertIconButton.cjs +1 -1
- package/dist/components/Alert/AlertIconButton.js +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.ts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.js +1 -1
- package/dist/components/CardAccordion/CardAccordion.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordion.js +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.js +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.js +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.cjs +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.d.ts.map +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.js +1 -1
- package/dist/components/Combobox/Combobox.cjs +1 -1
- package/dist/components/Combobox/Combobox.cjs.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/components/DateInput/DateInput.cjs +1 -1
- package/dist/components/DateInput/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput/DateInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/DatePickerHeader.cjs +1 -1
- package/dist/components/DatePicker/DatePickerHeader.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerHeader.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.cjs +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +1 -1
- package/dist/components/ExpandableCard/ExpandableCardGroup.cjs +1 -1
- package/dist/components/ExpandableCard/ExpandableCardGroup.js +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.cjs +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.d.ts.map +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.js +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListActionButton.cjs +1 -1
- package/dist/components/List/ListActionButton.d.ts.map +1 -1
- package/dist/components/List/ListActionButton.js +1 -1
- package/dist/components/List/ListItemButton.cjs +1 -1
- package/dist/components/List/ListItemButton.d.ts.map +1 -1
- package/dist/components/List/ListItemButton.js +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBar/ProgressBarCircular.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBarCircular.js +1 -1
- package/dist/components/ProgressBar/ProgressBarLinear.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBarLinear.js +1 -1
- package/dist/components/ProgressStepper/ProgressStepButton.cjs +1 -1
- package/dist/components/ProgressStepper/ProgressStepButton.js +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.cjs.map +1 -1
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.cjs +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioTile/RadioTile.cjs +1 -1
- package/dist/components/RadioTile/RadioTile.cjs.map +1 -1
- package/dist/components/RadioTile/RadioTile.d.ts.map +1 -1
- package/dist/components/RadioTile/RadioTile.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +1 -1
- package/dist/components/SectionHeader/SectionHeader.js +1 -1
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Skeleton/SkeletonBodyText.cjs +1 -1
- package/dist/components/Skeleton/SkeletonBodyText.js +1 -1
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.cjs +1 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/TablePagination.cjs +1 -1
- package/dist/components/Table/TablePagination.js +1 -1
- package/dist/components/Tabs/TabsList.cjs +1 -1
- package/dist/components/Tabs/TabsList.d.ts.map +1 -1
- package/dist/components/Tabs/TabsList.js +1 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextInput/TextInput.cjs +1 -1
- package/dist/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/ToastProvider.cjs +1 -1
- package/dist/components/Toast/ToastProvider.cjs.map +1 -1
- package/dist/components/Toast/ToastProvider.d.ts +1 -1
- package/dist/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/Toast/ToastProvider.js +1 -1
- package/dist/components/UnstyledIconButton/UnstyledIconButton.cjs +1 -1
- package/dist/components/UnstyledIconButton/UnstyledIconButton.d.ts.map +1 -1
- package/dist/components/UnstyledIconButton/UnstyledIconButton.js +1 -1
- package/dist/components/VerificationInput/VerificationInput.cjs +1 -1
- package/dist/components/VerificationInput/VerificationInput.d.ts.map +1 -1
- package/dist/components/VerificationInput/VerificationInput.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/public/llms/components/button.md +5 -3
- package/public/llms/components/icon-button.md +5 -3
- package/public/llms/components/search-input.md +4 -3
- package/public/llms/components/switch.md +2 -3
- package/public/llms/components/unstyled-icon-button.md +5 -3
- package/public/llms/docs/getting-started.md +1 -1
- package/styles.css +1 -1
- package/dist/chunk-2MIDU3YN.cjs +0 -4
- package/dist/chunk-2MIDU3YN.cjs.map +0 -1
- package/dist/chunk-55RXL2DV.js +0 -4
- package/dist/chunk-55RXL2DV.js.map +0 -1
- package/dist/chunk-6WCPGWVO.cjs +0 -4
- package/dist/chunk-6WCPGWVO.cjs.map +0 -1
- package/dist/chunk-B2HYTGSB.js +0 -4
- package/dist/chunk-B2HYTGSB.js.map +0 -1
- package/dist/chunk-BDJRXINR.js +0 -4
- package/dist/chunk-BDJRXINR.js.map +0 -1
- package/dist/chunk-BVXR3BGZ.cjs +0 -4
- package/dist/chunk-BVXR3BGZ.cjs.map +0 -1
- package/dist/chunk-BXDF7Z4R.js +0 -4
- package/dist/chunk-C3INLFOU.cjs +0 -4
- package/dist/chunk-C3INLFOU.cjs.map +0 -1
- package/dist/chunk-CAZQKOY3.cjs +0 -4
- package/dist/chunk-CAZQKOY3.cjs.map +0 -1
- package/dist/chunk-CQ2YNOHB.js +0 -4
- package/dist/chunk-CQ2YNOHB.js.map +0 -1
- package/dist/chunk-CVKTRCKW.js +0 -4
- package/dist/chunk-CVKTRCKW.js.map +0 -1
- package/dist/chunk-CW6UT3QU.js +0 -4
- package/dist/chunk-CW6UT3QU.js.map +0 -1
- package/dist/chunk-EFQSAW3M.js +0 -4
- package/dist/chunk-EFQSAW3M.js.map +0 -1
- package/dist/chunk-F6H2C3OA.js +0 -4
- package/dist/chunk-F7A4D3PD.cjs.map +0 -1
- package/dist/chunk-FSOQCT7B.js +0 -4
- package/dist/chunk-GAFUPNEN.js.map +0 -1
- package/dist/chunk-HMT3R4UW.cjs +0 -4
- package/dist/chunk-HMT3R4UW.cjs.map +0 -1
- package/dist/chunk-I4T6DB7C.js.map +0 -1
- package/dist/chunk-ICJHFSP5.js +0 -4
- package/dist/chunk-IXUXDCQL.cjs +0 -4
- package/dist/chunk-IXUXDCQL.cjs.map +0 -1
- package/dist/chunk-J55UWDJJ.js +0 -4
- package/dist/chunk-J55UWDJJ.js.map +0 -1
- package/dist/chunk-JEJLX5DM.js +0 -4
- package/dist/chunk-JEJLX5DM.js.map +0 -1
- package/dist/chunk-KZRXT3QQ.cjs +0 -4
- package/dist/chunk-KZRXT3QQ.cjs.map +0 -1
- package/dist/chunk-LBC2WFPQ.js +0 -4
- package/dist/chunk-LBC2WFPQ.js.map +0 -1
- package/dist/chunk-LRFEHB5Y.js +0 -4
- package/dist/chunk-LRFEHB5Y.js.map +0 -1
- package/dist/chunk-MD3VAECH.js +0 -4
- package/dist/chunk-MD3VAECH.js.map +0 -1
- package/dist/chunk-O7X6QXBO.js +0 -4
- package/dist/chunk-O7X6QXBO.js.map +0 -1
- package/dist/chunk-P4FX42C6.cjs +0 -4
- package/dist/chunk-P4FX42C6.cjs.map +0 -1
- package/dist/chunk-PEG7JY2N.js +0 -4
- package/dist/chunk-PEG7JY2N.js.map +0 -1
- package/dist/chunk-QLKWVS6B.js +0 -4
- package/dist/chunk-QLKWVS6B.js.map +0 -1
- package/dist/chunk-QWB4MMLE.js +0 -4
- package/dist/chunk-QWB4MMLE.js.map +0 -1
- package/dist/chunk-RF5NDA46.cjs.map +0 -1
- package/dist/chunk-S7R53S6F.js +0 -4
- package/dist/chunk-S7R53S6F.js.map +0 -1
- package/dist/chunk-TGMNEOLU.cjs.map +0 -1
- package/dist/chunk-TTW4NON4.cjs +0 -4
- package/dist/chunk-TTW4NON4.cjs.map +0 -1
- package/dist/chunk-UFHEYLW3.cjs +0 -4
- package/dist/chunk-UFHEYLW3.cjs.map +0 -1
- package/dist/chunk-UNDW2NW7.cjs.map +0 -1
- package/dist/chunk-UVHPJNXC.cjs +0 -4
- package/dist/chunk-UVHPJNXC.cjs.map +0 -1
- package/dist/chunk-VME2FDDL.cjs +0 -4
- package/dist/chunk-VME2FDDL.cjs.map +0 -1
- package/dist/chunk-WB4GZ3CX.cjs +0 -4
- package/dist/chunk-WFVKT4MG.cjs +0 -4
- package/dist/chunk-WFVKT4MG.cjs.map +0 -1
- package/dist/chunk-WMOTZLQC.cjs +0 -4
- package/dist/chunk-WW43YAWT.cjs +0 -4
- package/dist/chunk-WW43YAWT.cjs.map +0 -1
- package/dist/chunk-WYLVXCEC.js.map +0 -1
- package/dist/chunk-XBK44AAM.js +0 -4
- package/dist/chunk-XMFWH5SU.js.map +0 -1
- package/dist/chunk-YAI34QHN.cjs +0 -4
- package/dist/chunk-YAI34QHN.cjs.map +0 -1
- package/dist/chunk-YEZ6N62U.cjs +0 -4
- package/dist/chunk-YMTA7AWP.cjs +0 -4
- package/dist/chunk-YMTA7AWP.cjs.map +0 -1
- package/dist/chunk-Z6QLCWLT.js +0 -4
- package/dist/chunk-Z6QLCWLT.js.map +0 -1
- package/dist/chunk-ZMDXNCUJ.cjs +0 -4
- package/dist/chunk-ZMDXNCUJ.cjs.map +0 -1
- /package/dist/{chunk-2MQ6FGCP.js.map → chunk-2T6JOGY4.js.map} +0 -0
- /package/dist/{chunk-UNIBG2C6.js.map → chunk-7VHYXPJC.js.map} +0 -0
- /package/dist/{chunk-OQ7TRS57.js.map → chunk-DYMXUQM4.js.map} +0 -0
- /package/dist/{chunk-VVBUEPWH.js.map → chunk-EERWIJJE.js.map} +0 -0
- /package/dist/{chunk-Y2YBHHIX.js.map → chunk-EWEFZ6ZZ.js.map} +0 -0
- /package/dist/{chunk-IEKB4IRY.js.map → chunk-F4VHCEOC.js.map} +0 -0
- /package/dist/{chunk-7ILZKQOQ.js.map → chunk-HH27I2KI.js.map} +0 -0
- /package/dist/{chunk-XAJGQUSC.js.map → chunk-KNPNKYUS.js.map} +0 -0
- /package/dist/{chunk-L3VPQN5T.js.map → chunk-OTXFBNCU.js.map} +0 -0
- /package/dist/{chunk-KKHWPT5B.js.map → chunk-PGDFEVA5.js.map} +0 -0
- /package/dist/{chunk-N2PQS6HG.js.map → chunk-PJCXETFD.js.map} +0 -0
- /package/dist/{chunk-YABVOAPK.js.map → chunk-QUPHSWAC.js.map} +0 -0
- /package/dist/{chunk-3OBTLZHR.js.map → chunk-RQVUMCZA.js.map} +0 -0
- /package/dist/{chunk-XCT44JDG.js.map → chunk-S4U7KSTZ.js.map} +0 -0
- /package/dist/{chunk-JK5AQFF2.js.map → chunk-U65H447D.js.map} +0 -0
- /package/dist/{chunk-U44ALMBI.js.map → chunk-UYQNCEW5.js.map} +0 -0
- /package/dist/{chunk-HNPNWQMD.js.map → chunk-V4BZIPQB.js.map} +0 -0
- /package/dist/{chunk-W35QJTJH.js.map → chunk-VZM5CVIO.js.map} +0 -0
- /package/dist/{chunk-WAS47BSQ.js.map → chunk-X6FC4KSH.js.map} +0 -0
- /package/dist/{chunk-UQEUXEEG.js.map → chunk-XNL45RW3.js.map} +0 -0
- /package/dist/{chunk-QVE4N4F2.js.map → chunk-YEUIB4QY.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/PasswordInput/PasswordInput.tsx"],"sourcesContent":["'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport { forwardRef, useRef, useState, useCallback, useEffect } from 'react';\nimport type { RefObject } from 'react';\nimport type { PasswordInputProps } from './PasswordInput.props';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { EyeOffSmallIcon, EyeSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport type { InputBaseElement } from '../InputBase/InputBase';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\n\nconst COMPONENT_NAME = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use PasswordInput to securely collect a user's password, with a built-in\n * control for toggling visibility of the entered value. It automatically\n * resets to hidden when its parent form is submitted. For general text entry\n * use TextInput instead, and for search input use SearchInput.\n *\n * @summary An input for securely entering a password, with a visibility toggle.\n */\nexport const PasswordInput = forwardRef<InputBaseElement, PasswordInputProps>(\n ({ className, disabled, id: providedId, ...props }, forwardedRef) => {\n const internalRef = useRef<HTMLInputElement | null>(null);\n const inputRef = useMergedRefs(forwardedRef, internalRef);\n\n const [visible, setVisible] = useState(false);\n const [showVisibilityMessage, setShowVisibilityMessage] = useState(false);\n\n const handleVisibility = useCallback(() => {\n const newVisibilityState = !visible;\n const newVisibilityMessageState = !showVisibilityMessage;\n setVisible(newVisibilityState);\n setShowVisibilityMessage(newVisibilityMessageState);\n }, [visible, showVisibilityMessage]);\n\n // If the PasswordInput is inside a form we should switch the input type\n // back to password when its parent form is submitted\n useEffect(() => {\n // Get the ref value and ensure proper typing\n let currentElement: HTMLInputElement | null = null;\n if (internalRef && typeof internalRef === 'object' && internalRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = internalRef as RefObject<HTMLInputElement>;\n currentElement = refObject.current;\n }\n\n const handleSubmit = () => {\n if (currentElement?.type) {\n currentElement.type = 'password';\n setVisible(false);\n }\n };\n\n if (currentElement && currentElement.form !== null) {\n currentElement.form.addEventListener('submit', handleSubmit);\n }\n return () => {\n if (currentElement?.form) {\n currentElement.form.removeEventListener('submit', handleSubmit);\n }\n };\n }, [internalRef]);\n\n const visibilityMessage = `Your password is ${visible ? 'shown' : 'hidden'}!`;\n\n useEffect(() => {\n setTimeout(() => {\n setShowVisibilityMessage(false);\n }, 1500);\n }, [showVisibilityMessage]);\n\n const { id } = useIds({ providedId, prefix: 'password-input' });\n\n return (\n <>\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type={visible ? 'text' : 'password'}\n disabled={disabled}\n id={id}\n data-testid={componentClassName}\n {...props}\n >\n <InputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"toggle password visibility\"\n onClick={handleVisibility}\n disabled={disabled}\n aria-pressed={visible}\n >\n {visible ? <EyeSmallIcon /> : <EyeOffSmallIcon />}\n </UnstyledIconButton>\n </InputSlot>\n </TextInput>\n <div data-visually-hidden aria-live=\"assertive\" role=\"status\">\n {showVisibilityMessage ? visibilityMessage : ''}\n </div>\n </>\n );\n }\n);\n\nPasswordInput.displayName = COMPONENT_NAME;\n"],"mappings":";;gPAIA,OAAS,cAAAA,EAAY,UAAAC,EAAQ,YAAAC,EAAU,eAAAC,EAAa,aAAAC,MAAiB,QAMrE,OAAS,mBAAAC,EAAiB,gBAAAC,MAAoB,uCAG9C,OAAS,iBAAAC,MAAqB,+BAmExB,mBAAAC,EAkBmB,OAAAC,EAlBnB,QAAAC,MAAA,oBAjEN,IAAMC,EAAiB,gBACjBC,EAAqBC,EAAiBF,CAAc,EAU7CG,EAAgBC,EAC3B,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAIC,EAAY,GAAGC,CAAM,EAAGC,IAAiB,CACnE,IAAMC,EAAcC,EAAgC,IAAI,EAClDC,EAAWhB,EAAca,EAAcC,CAAW,EAElD,CAACG,EAASC,CAAU,EAAIC,EAAS,EAAK,EACtC,CAACC,EAAuBC,CAAwB,EAAIF,EAAS,EAAK,EAElEG,EAAmBC,EAAY,IAAM,CACzC,IAAMC,EAAqB,CAACP,EACtBQ,EAA4B,CAACL,EACnCF,EAAWM,CAAkB,EAC7BH,EAAyBI,CAAyB,CACpD,EAAG,CAACR,EAASG,CAAqB,CAAC,EAInCM,EAAU,IAAM,CAEd,IAAIC,EAA0C,KAC1Cb,GAAe,OAAOA,GAAgB,UAAYA,EAAY,UAGhEa,EADkBb,EACS,SAG7B,IAAMc,EAAe,IAAM,CACrBD,GAAgB,OAClBA,EAAe,KAAO,WACtBT,EAAW,EAAK,EAEpB,EAEA,OAAIS,GAAkBA,EAAe,OAAS,MAC5CA,EAAe,KAAK,iBAAiB,SAAUC,CAAY,EAEtD,IAAM,CACPD,GAAgB,MAClBA,EAAe,KAAK,oBAAoB,SAAUC,CAAY,CAElE,CACF,EAAG,CAACd,CAAW,CAAC,EAEhB,IAAMe,EAAoB,oBAAoBZ,EAAU,QAAU,QAAQ,IAE1ES,EAAU,IAAM,CACd,WAAW,IAAM,CACfL,EAAyB,EAAK,CAChC,EAAG,IAAI,CACT,EAAG,CAACD,CAAqB,CAAC,EAE1B,GAAM,CAAE,GAAAU,CAAG,EAAIC,EAAO,CAAE,WAAApB,EAAY,OAAQ,gBAAiB,CAAC,EAE9D,OACER,EAAAF,EAAA,CACE,UAAAC,EAAC8B,EAAA,CACC,IAAKhB,EACL,UAAWiB,EAAG5B,EAAoBI,CAAS,EAC3C,KAAMQ,EAAU,OAAS,WACzB,SAAUP,EACV,GAAIoB,EACJ,cAAazB,EACZ,GAAGO,EAEJ,SAAAV,EAACgC,EAAA,CAAU,UAAU,SACnB,SAAAhC,EAACiC,EAAA,CACC,KAAK,SACL,MAAM,6BACN,QAASb,EACT,SAAUZ,EACV,eAAcO,EAEb,SAAAA,EAAUf,EAACkC,EAAA,EAAa,EAAKlC,EAACmC,EAAA,EAAgB,EACjD,EACF,EACF,EACAnC,EAAC,OAAI,uBAAoB,GAAC,YAAU,YAAY,KAAK,SAClD,SAAAkB,EAAwBS,EAAoB,GAC/C,GACF,CAEJ,CACF,EAEAtB,EAAc,YAAcH","names":["forwardRef","useRef","useState","useCallback","useEffect","EyeOffSmallIcon","EyeSmallIcon","useMergedRefs","Fragment","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","PasswordInput","forwardRef","className","disabled","providedId","props","forwardedRef","internalRef","useRef","inputRef","visible","setVisible","useState","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","useCallback","newVisibilityState","newVisibilityMessageState","useEffect","currentElement","handleSubmit","visibilityMessage","id","useIds","TextInput","cn","InputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"]}
|
package/dist/chunk-QLKWVS6B.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import{a as S}from"./chunk-UDOSOH3G.js";import{a as p}from"./chunk-OPPG3NOC.js";import{a as d}from"./chunk-7X24J4CX.js";import{a as n}from"./chunk-KGEVWEVL.js";import{a as s}from"./chunk-J3AJBV4B.js";import{b as r}from"./chunk-PDEVCIQ3.js";import{forwardRef as F}from"react";import{Select as t,ScrollArea as i}from"radix-ui";import{ExpandSmallIcon as $}from"@utilitywarehouse/hearth-react-icons";import{jsx as e,jsxs as a}from"react/jsx-runtime";var f="Select",o=r(f),O=F((P,v)=>{let{className:N,children:b,placeholder:u,validationStatus:T,validationText:A,label:g,labelVariant:h,helperText:w,id:x,disabled:l,required:I,...V}=n(P,p),{id:c,labelId:R,helperTextId:C,validationTextId:y}=d({providedId:x,prefix:"select"}),m=!l,E={id:c,labelId:R,helperTextId:C,validationTextId:y,label:g,labelVariant:h,helperText:w,validationText:m?A:void 0,validationStatus:m?T:void 0,required:I};return e(S,{className:s(o,N),"data-disabled":l?"":void 0,"data-testid":o,...E,children:a(t.Root,{...V,children:[a(t.Trigger,{id:c,ref:v,className:`${o}Trigger`,disabled:l,children:[e(t.Value,{placeholder:u,"data-truncate":!0}),e(t.Icon,{className:`${o}TriggerIcon`,children:e($,{})})]}),e(t.Portal,{children:e(t.Content,{className:`${o}Content`,position:"popper",side:"bottom",sideOffset:4,children:a(i.Root,{className:r("ScrollAreaRoot"),type:"auto",children:[e(t.Viewport,{className:`${o}Viewport`,children:e(i.Viewport,{className:r("ScrollAreaViewport"),children:b})}),e(i.Scrollbar,{className:r("ScrollAreaScrollbar"),orientation:"vertical",children:e(i.Thumb,{className:r("ScrollAreaThumb")})})]})})})]})})});O.displayName=f;export{O as a};
|
|
4
|
-
//# sourceMappingURL=chunk-QLKWVS6B.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Select/Select.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport type { SelectProps } from './Select.props';\nimport { Select as SelectPrimitive, ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { ExpandSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport { FormField } from '../FormField/FormField';\n\nconst COMPONENT_NAME = 'Select';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype SelectElement = ComponentRef<'button'>;\n\n/**\n * Use Select to let users choose a single option from a list, when the choice\n * requires a final submit action to confirm — for a choice that applies\n * immediately, consider SegmentedControl instead. Wrap SelectItem children to\n * define the options, and always provide a `label`.\n *\n * @summary A dropdown for selecting a single option from a list of choices.\n */\nexport const Select = forwardRef<SelectElement, SelectProps>((props, ref) => {\n const {\n className,\n children,\n placeholder,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n required,\n ...selectProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'select',\n });\n\n const showValidation = !disabled;\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n };\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <SelectPrimitive.Root {...selectProps}>\n <SelectPrimitive.Trigger\n id={id}\n ref={ref}\n className={`${componentClassName}Trigger`}\n disabled={disabled}\n >\n <SelectPrimitive.Value placeholder={placeholder} data-truncate />\n <SelectPrimitive.Icon className={`${componentClassName}TriggerIcon`}>\n <ExpandSmallIcon />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n className={`${componentClassName}Content`}\n position=\"popper\"\n side=\"bottom\"\n sideOffset={4}\n >\n <ScrollAreaPrimitive.Root className={withGlobalPrefix('ScrollAreaRoot')} type=\"auto\">\n <SelectPrimitive.Viewport className={`${componentClassName}Viewport`}>\n <ScrollAreaPrimitive.Viewport className={withGlobalPrefix('ScrollAreaViewport')}>\n {children}\n </ScrollAreaPrimitive.Viewport>\n </SelectPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar\n className={withGlobalPrefix('ScrollAreaScrollbar')}\n orientation=\"vertical\"\n >\n <ScrollAreaPrimitive.Thumb className={withGlobalPrefix('ScrollAreaThumb')} />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n </SelectPrimitive.Root>\n </FormField>\n );\n});\n\nSelect.displayName = COMPONENT_NAME;\n"],"mappings":";;gPAEA,OAAS,cAAAA,MAAkB,QAO3B,OAAS,UAAUC,EAAiB,cAAcC,MAA2B,WAC7E,OAAS,mBAAAC,MAAuB,uCA6DxB,OAME,OAAAC,EANF,QAAAC,MAAA,oBAzDR,IAAMC,EAAiB,SACjBC,EAAqBC,EAAiBF,CAAc,EAY7CG,EAASC,EAAuC,CAACC,EAAOC,IAAQ,CAC3E,GAAM,CACJ,UAAAC,EACA,SAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,MAAAC,EACA,aAAAC,EACA,WAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAIC,EAAad,EAAOe,CAAc,EAEhC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,EAAc,iBAAAC,CAAiB,EAAIC,EAAO,CAC7D,WAAAV,EACA,OAAQ,QACV,CAAC,EAEKW,EAAiB,CAACV,EAElBW,EAAiB,CACrB,GAAAN,EACA,QAAAC,EACA,aAAAC,EACA,iBAAAC,EACA,MAAAZ,EACA,aAAAC,EACA,WAAAC,EACA,eAAgBY,EAAiBf,EAAiB,OAClD,iBAAkBe,EAAiBhB,EAAmB,OACtD,SAAAO,CACF,EAEA,OACEnB,EAAC8B,EAAA,CACC,UAAWC,EAAG5B,EAAoBM,CAAS,EAC3C,gBAAeS,EAAW,GAAK,OAC/B,cAAaf,EACZ,GAAG0B,EAEJ,SAAA5B,EAAC+B,EAAgB,KAAhB,CAAsB,GAAGZ,EACxB,UAAAnB,EAAC+B,EAAgB,QAAhB,CACC,GAAIT,EACJ,IAAKf,EACL,UAAW,GAAGL,CAAkB,UAChC,SAAUe,EAEV,UAAAlB,EAACgC,EAAgB,MAAhB,CAAsB,YAAarB,EAAa,gBAAa,GAAC,EAC/DX,EAACgC,EAAgB,KAAhB,CAAqB,UAAW,GAAG7B,CAAkB,cACpD,SAAAH,EAACiC,EAAA,EAAgB,EACnB,GACF,EACAjC,EAACgC,EAAgB,OAAhB,CACC,SAAAhC,EAACgC,EAAgB,QAAhB,CACC,UAAW,GAAG7B,CAAkB,UAChC,SAAS,SACT,KAAK,SACL,WAAY,EAEZ,SAAAF,EAACiC,EAAoB,KAApB,CAAyB,UAAW9B,EAAiB,gBAAgB,EAAG,KAAK,OAC5E,UAAAJ,EAACgC,EAAgB,SAAhB,CAAyB,UAAW,GAAG7B,CAAkB,WACxD,SAAAH,EAACkC,EAAoB,SAApB,CAA6B,UAAW9B,EAAiB,oBAAoB,EAC3E,SAAAM,EACH,EACF,EACAV,EAACkC,EAAoB,UAApB,CACC,UAAW9B,EAAiB,qBAAqB,EACjD,YAAY,WAEZ,SAAAJ,EAACkC,EAAoB,MAApB,CAA0B,UAAW9B,EAAiB,iBAAiB,EAAG,EAC7E,GACF,EACF,EACF,GACF,EACF,CAEJ,CAAC,EAEDC,EAAO,YAAcH","names":["forwardRef","SelectPrimitive","ScrollAreaPrimitive","ExpandSmallIcon","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","Select","forwardRef","props","ref","className","children","placeholder","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","required","selectProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","FormField","cn","SelectPrimitive","ExpandSmallIcon","ScrollAreaPrimitive"]}
|
package/dist/chunk-QWB4MMLE.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import{a as b}from"./chunk-GBTQPGQG.js";import{c as R}from"./chunk-HY32GRZP.js";import{a as u}from"./chunk-JWPVXXER.js";import{a as f}from"./chunk-4MNQRAHO.js";import{a as h}from"./chunk-7X24J4CX.js";import{a as p}from"./chunk-J3AJBV4B.js";import{b as c}from"./chunk-PDEVCIQ3.js";import{forwardRef as E}from"react";import{RadioGroup as y}from"radix-ui";import{jsx as o,jsxs as t}from"react/jsx-runtime";var v="Radio",e=c(v),F=E(({id:w,label:i,helperText:r,image:x,className:N,labelFontWeight:g,disabled:a,"aria-labelledby":d,...I},G)=>{let{id:s,labelId:m,helperTextId:n}=h({providedId:w,prefix:"radio"}),{hasGroupHelperText:P,"aria-describedby":C}=R(),l=!P&&r!==void 0,T=!!i;return t("div",{className:p(e,N),"data-testid":e,"data-disabled":a?!0:void 0,children:[o("div",{className:`${e}Container`,children:o(y.Item,{ref:G,...I,disabled:a,id:s,"aria-describedby":l?n:C,"aria-labelledby":d||(i?m:void 0),className:`${e}Item`,children:o(y.Indicator,{className:`${e}Indicator`})})}),T?t(f,{direction:"column",gap:"50",children:[t(b,{id:m,htmlFor:s,disableUserSelect:!0,fontWeight:g,children:[x,i]}),l?o(u,{id:n,disableUserSelect:!0,children:r}):null]}):null]})});F.displayName=v;export{F as a};
|
|
4
|
-
//# sourceMappingURL=chunk-QWB4MMLE.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { RadioProps } from './Radio.props';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { useIds } from '../../hooks/use-ids';\nimport { HelperText } from '../HelperText/HelperText';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst COMPONENT_NAME = 'Radio';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype RadioElement = ComponentRef<'button'>;\n\n/**\n * Use Radio to let a user select a single option from a set of mutually\n * exclusive choices, always as a child of RadioGroup. RadioTile is preferred\n * for most cases as it offers a larger, more prominent target — reach for\n * Radio only when a compact, plain radio button is needed.\n *\n * @summary A single radio button for selecting one option from a set, used within RadioGroup.\n */\nexport const Radio = forwardRef<RadioElement, RadioProps>(\n (\n {\n id: providedId,\n label,\n helperText,\n image,\n className,\n labelFontWeight,\n disabled,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n const showLabel = !!label;\n return (\n <div\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n data-disabled={disabled ? true : undefined}\n >\n <div className={`${componentClassName}Container`}>\n <RadioGroupPrimitive.Item\n ref={ref}\n {...props}\n // We're not following the same pattern as Button here, where we\n // use `aria-disabled` instead, as focusing the radio item\n // selects it. Screen readers users can still navigate to the\n // radio item using the virtual keyboard. At the same time\n // keyboard users will not need to tab through disabled radio\n // items, which is the expected behavior for radio groups.\n disabled={disabled}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n className={`${componentClassName}Item`}\n >\n <RadioGroupPrimitive.Indicator className={`${componentClassName}Indicator`} />\n </RadioGroupPrimitive.Item>\n </div>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label id={labelId} htmlFor={id} disableUserSelect fontWeight={labelFontWeight}>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </div>\n );\n }\n);\n\nRadio.displayName = COMPONENT_NAME;\n"],"mappings":";;wRAEA,OAAS,cAAAA,MAAkB,QAI3B,OAAS,cAAcC,MAA2B,WA8DtC,cAAAC,EAKA,QAAAC,MALA,oBAtDZ,IAAMC,EAAiB,QACjBC,EAAqBC,EAAiBF,CAAc,EAY7CG,EAAQC,EACnB,CACE,CACE,GAAIC,EACJ,MAAAC,EACA,WAAAC,EACA,MAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,SAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAb,EAAY,OAAQ,OAAQ,CAAC,EACtE,CAAE,mBAAAc,EAAoB,mBAAoBC,CAAgB,EAAIC,EAAiB,EAC/EC,EAAyB,CAACH,GAAsBZ,IAAe,OAC/DgB,EAAY,CAAC,CAACjB,EACpB,OACEP,EAAC,OACC,UAAWyB,EAAGvB,EAAoBQ,CAAS,EAC3C,cAAaR,EACb,gBAAeU,EAAW,GAAO,OAEjC,UAAAb,EAAC,OAAI,UAAW,GAAGG,CAAkB,YACnC,SAAAH,EAAC2B,EAAoB,KAApB,CACC,IAAKX,EACJ,GAAGD,EAOJ,SAAUF,EACV,GAAII,EACJ,mBAAkBO,EAAiBL,EAAeG,EAClD,kBAAiBR,IAAkCN,EAAQU,EAAU,QACrE,UAAW,GAAGf,CAAkB,OAEhC,SAAAH,EAAC2B,EAAoB,UAApB,CAA8B,UAAW,GAAGxB,CAAkB,YAAa,EAC9E,EACF,EACCsB,EACCxB,EAAC2B,EAAA,CAAK,UAAU,SAAS,IAAI,KAC3B,UAAA3B,EAAC4B,EAAA,CAAM,GAAIX,EAAS,QAASD,EAAI,kBAAiB,GAAC,WAAYL,EAC5D,UAAAF,EACAF,GACH,EACCgB,EACCxB,EAAC8B,EAAA,CAAW,GAAIX,EAAc,kBAAiB,GAC5C,SAAAV,EACH,EACE,MACN,EACE,MACN,CAEJ,CACF,EAEAJ,EAAM,YAAcH","names":["forwardRef","RadioGroupPrimitive","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","Radio","forwardRef","providedId","label","helperText","image","className","labelFontWeight","disabled","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","showLabel","cn","RadioGroupPrimitive","Flex","Label","HelperText"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-RF5NDA46.cjs","../src/components/List/ListItemButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ListItemButton","forwardRef","className","heading","helperText","leadingContent","trailingContent","badge","badgePlacement","children","disabled","onClick","props","ref","contentProps","jsx","cn","ListItemContent","ChevronRightSmallIcon"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wECGpF,8BAGX,+CAwCoC,IAtCzDA,CAAAA,CAAiB,gBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAiBC,+BAAAA,CAE1B,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAe,CACnB,OAAA,CAAAX,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAE,CAAAA,CACA,cAAA,CAAAC,CACF,CAAA,CACA,OACEO,6BAAAA,QAAC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,iCAAAA,CAAGlB,CAAoBI,CAAS,CAAA,CAC1C,GAAGU,CAAAA,CACJ,eAAA,CAAeF,CAAAA,EAAY,KAAA,CAAA,CAC3B,OAAA,CAASA,CAAAA,CAAW,KAAA,CAAA,CAAYC,CAAAA,CAEhC,QAAA,CAAAI,6BAAAA,mBAACE,CAAA,CACC,eAAA,CAAiBX,CAAAA,EAAoCS,6BAAAA,uCAACG,CAAA,CAAA,CAAsB,CAAA,CAC3E,GAAGJ,CAAAA,CAEH,QAAA,CAAAL,CAAAA,CACH,CAAA,CACF,CAEJ,CACF,CAAA,CAEAT,CAAAA,CAAe,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-RF5NDA46.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport type { ListItemButtonProps } from './ListItemButton.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { ListItemContent } from './ListItemContent';\nimport type { ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'ListItemButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ListItemButtonElement = ComponentRef<'button'>;\n\nexport const ListItemButton = forwardRef<ListItemButtonElement, ListItemButtonProps>(\n (\n {\n className,\n heading,\n helperText,\n leadingContent,\n trailingContent,\n badge,\n badgePlacement,\n children,\n disabled,\n onClick,\n ...props\n },\n ref\n ) => {\n const contentProps = {\n heading,\n helperText,\n leadingContent,\n badge,\n badgePlacement,\n };\n return (\n <button\n ref={ref}\n className={cn(componentClassName, className)}\n {...props}\n aria-disabled={disabled || undefined}\n onClick={disabled ? undefined : onClick}\n >\n <ListItemContent\n trailingContent={trailingContent ? trailingContent : <ChevronRightSmallIcon />}\n {...contentProps}\n >\n {children}\n </ListItemContent>\n </button>\n );\n }\n);\n\nListItemButton.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-S7R53S6F.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import{a as M}from"./chunk-WYLVXCEC.js";import{a as x}from"./chunk-PPBAWDAY.js";import{a as N}from"./chunk-UDOSOH3G.js";import{a as w}from"./chunk-OPPG3NOC.js";import{a as D}from"./chunk-7X24J4CX.js";import{a as g}from"./chunk-VKE2TXPE.js";import{a as v}from"./chunk-KGEVWEVL.js";import{a as k}from"./chunk-J3AJBV4B.js";import{b}from"./chunk-PDEVCIQ3.js";import ee from"react-datepicker";import{offset as ae}from"@floating-ui/dom";import{Portal as te}from"radix-ui";import{forwardRef as oe,useState as V}from"react";import{jsx as o}from"react/jsx-runtime";var T="DatePicker",e=b(T),re=oe((E,I)=>{let{className:O,onChange:d,onCalendarOpen:l,onCalendarClose:p,validationStatus:r,validationText:c,label:H,labelVariant:R,helperText:m,id:S,disabled:f,readOnly:y,required:P,disableTodayIndicator:F,...$}=v(E,w),[A,u]=V(!1),[a,s]=V("days"),{id:Y,labelId:C,helperTextId:h,validationTextId:n}=D({providedId:S,prefix:"date-picker"}),i=!y&&!f,K={id:Y,labelId:C,helperTextId:h,validationTextId:n,label:H,labelVariant:R,helperText:m,validationText:i?c:void 0,validationStatus:i?r:void 0,required:P},L=g(m?h:void 0,i&&c!==void 0?n:void 0),W={days:"days",months:"days",years:"months"},q={days:"months",months:"years",years:"days"},B=(t,j)=>{a!=="days"&&s(W[a]),d!==void 0&&d(t,j)},G=()=>{u(!0),l&&l()},_=()=>{u(!1),s("days"),p&&p()},z={customInput:o(x,{ref:I,className:"","data-calendar-state":A?"open":"closed"}),renderCustomHeader:t=>o(M,{...t,view:a,onClick:()=>{s(q[a])},disableTodayIndicator:F})},J={"aria-labelledby":C,"aria-describedby":L,"aria-invalid":r==="invalid"?!0:void 0,"aria-errormessage":r==="invalid"?n:void 0},Q={calendarClassName:`${e}Calendar`,dayClassName:()=>`${e}Day`,weekClassName:()=>`${e}Week`,monthClassName:()=>`${e}Month`,yearClassName:()=>`${e}Year`,popperClassName:`${e}Popper`},U={required:P,disabled:f,readOnly:y,calendarStartDay:1,showIcon:!1,dateFormat:"dd/MM/yyyy",formatWeekDay:t=>t.toString().charAt(0)},X={showPopperArrow:!1,popperModifiers:[ae(-6)],popperPlacement:"bottom-start",popperProps:{strategy:"fixed"},popperContainer:te.Root},Z={...{onChange:B,onCalendarClose:_,onCalendarOpen:G},...U,...J,...X,...Q,...{showMonthYearPicker:a==="months",showYearPicker:a==="years",shouldCloseOnSelect:a==="days",closeOnScroll:!0},...z,...$};return o(N,{className:k(e,O),"data-testid":e,...K,children:o(ee,{...Z,selectsRange:!1,selectsMultiple:!1})})});re.displayName=T;export{re as a};
|
|
4
|
-
//# sourceMappingURL=chunk-S7R53S6F.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport DatePickerPrimitive from 'react-datepicker';\nimport type { ReactDatePickerCustomHeaderProps } from 'react-datepicker';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { cn } from '../../helpers/cn';\nimport { offset } from '@floating-ui/dom';\nimport type { DatePickerProps, View } from './DatePicker.props';\nimport { DatePickerTrigger } from './DatePickerTrigger';\nimport { DatePickerHeader } from './DatePickerHeader';\nimport { FormField } from '../FormField/FormField';\nimport { useIds } from '../../hooks/use-ids';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { Portal } from 'radix-ui';\nimport { forwardRef, useState } from 'react';\nimport type { ComponentRef, MouseEvent, KeyboardEvent } from 'react';\n\nconst COMPONENT_NAME = 'DatePicker';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype DatePickerElement = ComponentRef<'button'>;\n\n/**\n * Use DatePicker when a user needs to specify a single date via an\n * expandable calendar. It is built on the React Datepicker library and only\n * supports single-date selection — range and multi-date selection are not\n * supported.\n *\n * For faster, manual date entry without a calendar, use DateInput instead.\n *\n * @summary A field for selecting a single date from an expandable calendar.\n */\nexport const DatePicker = forwardRef<DatePickerElement, DatePickerProps>((props, ref) => {\n const {\n className,\n onChange,\n onCalendarOpen,\n onCalendarClose,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n readOnly,\n required,\n disableTodayIndicator,\n ...datePickerProps\n } = extractProps(props, marginPropDefs);\n\n const [calendarOpen, setCalendarOpen] = useState(false);\n const [view, setView] = useState<View>('days');\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'date-picker',\n });\n\n const showValidation = Boolean(!readOnly && !disabled);\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n };\n\n const ariaDescribedbyValue = mergeIds(\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n const prevView: { [key in View]: View } = {\n days: 'days',\n months: 'days',\n years: 'months',\n };\n\n const nextView: { [key in View]: View } = {\n days: 'months',\n months: 'years',\n years: 'days',\n };\n\n const handleChange = (\n date: Date | null,\n event?: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>\n ) => {\n if (view !== 'days') {\n setView(prevView[view]);\n }\n if (onChange !== undefined) {\n onChange(date, event);\n }\n };\n\n const handleCalendarOpen = () => {\n setCalendarOpen(true);\n if (onCalendarOpen) {\n onCalendarOpen();\n }\n };\n\n const handleCalendarClose = () => {\n setCalendarOpen(false);\n setView('days');\n if (onCalendarClose) {\n onCalendarClose();\n }\n };\n\n const customComponents = {\n customInput: (\n <DatePickerTrigger\n ref={ref}\n className=\"\"\n data-calendar-state={calendarOpen ? 'open' : 'closed'}\n />\n ),\n renderCustomHeader: (props: ReactDatePickerCustomHeaderProps) => (\n <DatePickerHeader\n {...props}\n view={view}\n onClick={() => {\n setView(nextView[view]);\n }}\n disableTodayIndicator={disableTodayIndicator}\n />\n ),\n };\n\n const ariaProps = {\n 'aria-labelledby': labelId,\n 'aria-describedby': ariaDescribedbyValue,\n 'aria-invalid': validationStatus === 'invalid' ? true : undefined,\n 'aria-errormessage': validationStatus === 'invalid' ? validationTextId : undefined,\n };\n\n const classNameProps = {\n calendarClassName: `${componentClassName}Calendar`,\n dayClassName: () => `${componentClassName}Day`,\n weekClassName: () => `${componentClassName}Week`,\n monthClassName: () => `${componentClassName}Month`,\n yearClassName: () => `${componentClassName}Year`,\n popperClassName: `${componentClassName}Popper`,\n };\n\n const defaultProps = {\n required,\n disabled,\n readOnly,\n calendarStartDay: 1,\n showIcon: false,\n dateFormat: 'dd/MM/yyyy',\n formatWeekDay: (day: Date) => day.toString().charAt(0),\n };\n\n const popperProps = {\n showPopperArrow: false,\n popperModifiers: [offset(-6)],\n popperPlacement: 'bottom-start',\n popperProps: { strategy: 'fixed' },\n popperContainer: Portal.Root,\n };\n\n const eventHandlingProps = {\n onChange: handleChange,\n onCalendarClose: handleCalendarClose,\n onCalendarOpen: handleCalendarOpen,\n };\n\n const stateProps = {\n showMonthYearPicker: view === 'months',\n showYearPicker: view === 'years',\n shouldCloseOnSelect: view === 'days',\n closeOnScroll: true,\n };\n\n const reactDatePickerProps = {\n ...eventHandlingProps,\n ...defaultProps,\n ...ariaProps,\n ...popperProps,\n ...classNameProps,\n ...stateProps,\n ...customComponents,\n ...datePickerProps,\n };\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <DatePickerPrimitive\n {...reactDatePickerProps}\n // @ts-expect-error having to be explicit about these types to ensure onChange type is correct\n selectsRange={false}\n // @ts-expect-error having to be explicit about these types to ensure onChange type is correct\n selectsMultiple={false}\n />\n </FormField>\n );\n});\n\nDatePicker.displayName = COMPONENT_NAME;\n"],"mappings":";;mWAGA,OAAOA,OAAyB,mBAKhC,OAAS,UAAAC,OAAc,mBAOvB,OAAS,UAAAC,OAAc,WACvB,OAAS,cAAAC,GAAY,YAAAC,MAAgB,QA0G/B,cAAAC,MAAA,oBAvGN,IAAMC,EAAiB,aACjBC,EAAqBC,EAAiBF,CAAc,EAc7CG,GAAaN,GAA+C,CAACO,EAAOC,IAAQ,CACvF,GAAM,CACJ,UAAAC,EACA,SAAAC,EACA,eAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,MAAAC,EACA,aAAAC,EACA,WAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,sBAAAC,EACA,GAAGC,CACL,EAAIC,EAAajB,EAAOkB,CAAc,EAEhC,CAACC,EAAcC,CAAe,EAAI1B,EAAS,EAAK,EAChD,CAAC2B,EAAMC,CAAO,EAAI5B,EAAe,MAAM,EAEvC,CAAE,GAAA6B,EAAI,QAAAC,EAAS,aAAAC,EAAc,iBAAAC,CAAiB,EAAIC,EAAO,CAC7D,WAAAhB,EACA,OAAQ,aACV,CAAC,EAEKiB,EAAyB,CAACf,GAAY,CAACD,EAEvCiB,EAAiB,CACrB,GAAAN,EACA,QAAAC,EACA,aAAAC,EACA,iBAAAC,EACA,MAAAlB,EACA,aAAAC,EACA,WAAAC,EACA,eAAgBkB,EAAiBrB,EAAiB,OAClD,iBAAkBqB,EAAiBtB,EAAmB,OACtD,SAAAQ,CACF,EAEMgB,EAAuBC,EACzBrB,EAAae,EAAe,OAC9BG,GAAkBrB,IAAmB,OAAYmB,EAAmB,MACtE,EAEMM,EAAoC,CACxC,KAAM,OACN,OAAQ,OACR,MAAO,QACT,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EAAuB,CAC3B,GAdyB,CACzB,SAAUd,EACV,gBAAiBI,EACjB,eAAgBD,CAClB,EAWE,GAAGO,EACH,GAAGF,EACH,GAAGI,EACH,GAAGH,EACH,GAbiB,CACjB,oBAAqBtB,IAAS,SAC9B,eAAgBA,IAAS,QACzB,oBAAqBA,IAAS,OAC9B,cAAe,EACjB,EASE,GAAGkB,EACH,GAAGvB,CACL,EAEA,OACErB,EAACsD,EAAA,CACC,UAAWC,EAAGrD,EAAoBK,CAAS,EAC3C,cAAaL,EACZ,GAAGgC,EAEJ,SAAAlC,EAACwD,GAAA,CACE,GAAGH,EAEJ,aAAc,GAEd,gBAAiB,GACnB,EACF,CAEJ,CAAC,EAEDjD,GAAW,YAAcH","names":["DatePickerPrimitive","offset","Portal","forwardRef","useState","jsx","COMPONENT_NAME","componentClassName","withGlobalPrefix","DatePicker","props","ref","className","onChange","onCalendarOpen","onCalendarClose","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","readOnly","required","disableTodayIndicator","datePickerProps","extractProps","marginPropDefs","calendarOpen","setCalendarOpen","view","setView","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","prevView","nextView","handleChange","date","event","handleCalendarOpen","handleCalendarClose","customComponents","DatePickerTrigger","DatePickerHeader","ariaProps","classNameProps","defaultProps","day","popperProps","offset","reactDatePickerProps","FormField","cn","DatePickerPrimitive"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-TGMNEOLU.cjs","../src/components/ProgressStepper/ProgressStepButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ProgressStepButton","forwardRef","label","className","status","disabled","onClick","ariaLabel","props","ref","isActive","jsx","ProgressStep","cn","Link"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,8BCAxI,+CAoCf,IA5BNA,CAAAA,CAAiB,oBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAY7CC,CAAAA,aAAqBC,+BAAAA,CAC/B,CAAE,KAAA,CAAAC,CAAAA,CAAO,SAAA,CAAAC,CAAAA,CAAW,MAAA,CAAAC,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAcC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAQ,CAC3F,IAAMC,CAAAA,CAAWN,CAAAA,GAAW,QAAA,CAE5B,OACEO,6BAAAA,mBAACC,CAAA,CACC,MAAA,CAAQR,CAAAA,CACR,SAAA,CAAWS,iCAAAA,CAAGf,CAAoBK,CAAS,CAAA,CAC3C,YAAA,CAAYI,CAAAA,CACZ,KAAA,CAAOL,CAAAA,CAEN,QAAA,CAAAQ,CAAAA,CACCR,CAAAA,CAEAS,6BAAAA,mBAACG,CAAA,CAAK,OAAA,CAAO,CAAA,CAAA,CAAC,eAAA,CAAeT,CAAAA,CAC3B,QAAA,CAAAM,6BAAAA,QAAC,CAAA,CAAO,GAAA,CAAKF,CAAAA,CAAM,GAAGD,CAAAA,CAAO,OAAA,CAASH,CAAAA,CAAW,KAAA,CAAA,CAAYC,CAAAA,CAC1D,QAAA,CAAAJ,CAAAA,CACH,CAAA,CACF,CAAA,CAEJ,CAEJ,CACF,CAAA,CAEAF,CAAAA,CAAmB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-TGMNEOLU.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Link } from '../Link/Link';\nimport { cn } from '../../helpers/cn';\nimport type { ProgressStepButtonProps } from './ProgressStep.props';\nimport { ProgressStep } from './ProgressStep';\n\nconst COMPONENT_NAME = 'ProgressStepButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ProgressStepButtonElement = ComponentRef<'button'>;\n\n/**\n * Use ProgressStepButton for a step within a `ProgressStepper` that triggers\n * an action — such as returning to a previous step — rather than navigating\n * to a new URL. Renders as a `ProgressStep` wrapping a `button`; use\n * `ProgressStepLink` instead when the step should navigate via `href`.\n *\n * @summary An interactive ProgressStepper step that triggers an action.\n */\nexport const ProgressStepButton = forwardRef<ProgressStepButtonElement, ProgressStepButtonProps>(\n ({ label, className, status, disabled, onClick, 'aria-label': ariaLabel, ...props }, ref) => {\n const isActive = status === 'active';\n\n return (\n <ProgressStep\n status={status}\n className={cn(componentClassName, className)}\n aria-label={ariaLabel}\n label={label}\n >\n {isActive ? (\n label\n ) : (\n <Link asChild aria-disabled={disabled}>\n <button ref={ref} {...props} onClick={disabled ? undefined : onClick}>\n {label}\n </button>\n </Link>\n )}\n </ProgressStep>\n );\n }\n);\n\nProgressStepButton.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-TTW4NON4.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkHIF6HKZ3cjs = require('./chunk-HIF6HKZ3.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var v="TextInput",y=_chunk4Q432K4Wcjs.b.call(void 0, v),k= exports.a =_react.forwardRef.call(void 0, (P,N)=>{let{className:B,validationStatus:i,validationText:d,label:F,labelVariant:E,helperText:r,children:O,id:g,disabled:e,readOnly:n,hideLabel:w,required:o,placeholder:C,"aria-describedby":D,...V}=_chunkZPJNQBTNcjs.a.call(void 0, P,_chunkOB7O3UFLcjs.a),{id:l,labelId:s,helperTextId:p,validationTextId:a}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:g,prefix:"text-input"}),t=!n&&!e,q={id:l,labelId:s,helperTextId:p,validationTextId:a,label:F,labelVariant:E,helperText:r,validationText:t?d:void 0,validationStatus:t?i:void 0,hideLabel:w,required:o},M=_chunkHIF6HKZ3cjs.a.call(void 0, D,r?p:void 0,t&&d!==void 0?a:void 0);return _jsxruntime.jsx.call(void 0, _chunkZ6OA4XPPcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, y,B),"data-disabled":e?"":void 0,"data-testid":y,...q,children:_jsxruntime.jsx.call(void 0, _chunkB2HYSLUXcjs.a,{ref:N,spellCheck:"false",id:l,required:o,disabled:e,readOnly:n,placeholder:e?void 0:C,"aria-labelledby":s,"aria-describedby":M,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?a:void 0,...V,children:O})})});k.displayName=v;exports.a = k;
|
|
4
|
-
//# sourceMappingURL=chunk-TTW4NON4.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-TTW4NON4.cjs","../src/components/TextInput/TextInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","TextInput","forwardRef","props","ref","className","validationStatus","validationText","label","labelVariant","helperText","children","providedId","disabled","readOnly","hideLabel","required","placeholder","ariaDescribedby","textInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","jsx","FormField","cn","InputBase"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCS5S,+C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AA,CAEMa,CAAAA,CAAuBC,iCAAAA,CAC3BZ,CACER,CAAAA,CAAac,CAAAA,CAAe,KAAA,CAAA,CAC9BG,CAAAA,EAAkBpB,CAAAA,GAAmB,KAAA,CAAA,CAAYkB,CAAAA,CAAmB,KAAA,CACtE,CAAA,CAEA,OACEM,6BAAAA,mBAACC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAGlC,CAAoBM,CAAS,CAAA,CAC3C,eAAA,CAAeQ,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAC/B,aAAA,CAAad,CAAAA,CACZ,GAAG6B,CAAAA,CAEJ,QAAA,CAAAG,6BAAAA,mBAACG,CAAA,CACC,GAAA,CAAK9B,CAAAA,CACL,UAAA,CAAW,OAAA,CACX,EAAA,CAAIkB,CAAAA,CACJ,QAAA,CAAUN,CAAAA,CACV,QAAA,CAAUH,CAAAA,CACV,QAAA,CAAUC,CAAAA,CACV,WAAA,CAAcD,CAAAA,CAAyB,KAAA,CAAA,CAAdI,CAAAA,CACzB,iBAAA,CAAiBM,CAAAA,CACjB,kBAAA,CAAkBM,CAAAA,CAClB,cAAA,CAAcvB,CAAAA,GAAqB,SAAA,CAAY,CAAA,CAAA,CAAO,KAAA,CAAA,CACtD,mBAAA,CAAmBA,CAAAA,GAAqB,SAAA,CAAYmB,CAAAA,CAAmB,KAAA,CAAA,CACtE,GAAGN,CAAAA,CAEH,QAAA,CAAAR,CAAAA,CACH,CAAA,CACF,CAEJ,CAAC,CAAA,CAEDV,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-TTW4NON4.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { TextInputProps } from './TextInput.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { cn } from '../../helpers/cn';\nimport { useIds } from '../../hooks/use-ids';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { InputBase, type InputBaseElement } from '../InputBase/InputBase';\nimport { FormField } from '../FormField/FormField';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'TextInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use TextInput for a single-line text or data entry field. For passwords,\n * search, currency, one-time passcodes, or dates, use PasswordInput,\n * SearchInput, CurrencyInput, VerificationInput, or DateInput instead. A\n * `label` is required and should be clear and descriptive to guide the user.\n *\n * @summary A single-line text input field for entering text and data.\n */\nexport const TextInput = forwardRef<InputBaseElement, TextInputProps>((props, ref) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n children,\n id: providedId,\n disabled,\n readOnly,\n hideLabel,\n required,\n placeholder,\n 'aria-describedby': ariaDescribedby,\n ...textInputProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'text-input',\n });\n\n const showValidation = Boolean(!readOnly && !disabled);\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n hideLabel,\n required,\n };\n\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <InputBase\n ref={ref}\n spellCheck=\"false\"\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={!disabled ? placeholder : undefined}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n {...textInputProps}\n >\n {children}\n </InputBase>\n </FormField>\n );\n});\n\nTextInput.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-UFHEYLW3.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _radixui = require('radix-ui');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var f="Select",o=_chunk4Q432K4Wcjs.b.call(void 0, f),O= exports.a =_react.forwardRef.call(void 0, (P,v)=>{let{className:N,children:b,placeholder:u,validationStatus:T,validationText:A,label:g,labelVariant:h,helperText:w,id:x,disabled:l,required:I,...V}=_chunkZPJNQBTNcjs.a.call(void 0, P,_chunkOB7O3UFLcjs.a),{id:c,labelId:R,helperTextId:C,validationTextId:y}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:x,prefix:"select"}),m=!l,E={id:c,labelId:R,helperTextId:C,validationTextId:y,label:g,labelVariant:h,helperText:w,validationText:m?A:void 0,validationStatus:m?T:void 0,required:I};return _jsxruntime.jsx.call(void 0, _chunkZ6OA4XPPcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, o,N),"data-disabled":l?"":void 0,"data-testid":o,...E,children:_jsxruntime.jsxs.call(void 0, _radixui.Select.Root,{...V,children:[_jsxruntime.jsxs.call(void 0, _radixui.Select.Trigger,{id:c,ref:v,className:`${o}Trigger`,disabled:l,children:[_jsxruntime.jsx.call(void 0, _radixui.Select.Value,{placeholder:u,"data-truncate":!0}),_jsxruntime.jsx.call(void 0, _radixui.Select.Icon,{className:`${o}TriggerIcon`,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ExpandSmallIcon,{})})]}),_jsxruntime.jsx.call(void 0, _radixui.Select.Portal,{children:_jsxruntime.jsx.call(void 0, _radixui.Select.Content,{className:`${o}Content`,position:"popper",side:"bottom",sideOffset:4,children:_jsxruntime.jsxs.call(void 0, _radixui.ScrollArea.Root,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaRoot"),type:"auto",children:[_jsxruntime.jsx.call(void 0, _radixui.Select.Viewport,{className:`${o}Viewport`,children:_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Viewport,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaViewport"),children:b})}),_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Scrollbar,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaScrollbar"),orientation:"vertical",children:_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Thumb,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaThumb")})})]})})})]})})});O.displayName=f;exports.a = O;
|
|
4
|
-
//# sourceMappingURL=chunk-UFHEYLW3.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-UFHEYLW3.cjs","../src/components/Select/Select.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Select","forwardRef","props","ref","className","children","placeholder","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","required","selectProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","jsx","FormField","cn","jsxs","SelectPrimitive"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCA1N,mCAOkD,wEAC7C,+CA6DxB,IAzDFA,CAAAA,CAAiB,QAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CA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QAAA,CAAAI,8BAAAA,eAACC,CAAgB,IAAA,CAAhB,CAAsB,GAAGd,CAAAA,CACxB,QAAA,CAAA,CAAAa,8BAAAA,eAACC,CAAgB,OAAA,CAAhB,CACC,EAAA,CAAIX,CAAAA,CACJ,GAAA,CAAKf,CAAAA,CACL,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-UFHEYLW3.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport type { SelectProps } from './Select.props';\nimport { Select as SelectPrimitive, ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { ExpandSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport { FormField } from '../FormField/FormField';\n\nconst COMPONENT_NAME = 'Select';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype SelectElement = ComponentRef<'button'>;\n\n/**\n * Use Select to let users choose a single option from a list, when the choice\n * requires a final submit action to confirm — for a choice that applies\n * immediately, consider SegmentedControl instead. Wrap SelectItem children to\n * define the options, and always provide a `label`.\n *\n * @summary A dropdown for selecting a single option from a list of choices.\n */\nexport const Select = forwardRef<SelectElement, SelectProps>((props, ref) => {\n const {\n className,\n children,\n placeholder,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n required,\n ...selectProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'select',\n });\n\n const showValidation = !disabled;\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n };\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <SelectPrimitive.Root {...selectProps}>\n <SelectPrimitive.Trigger\n id={id}\n ref={ref}\n className={`${componentClassName}Trigger`}\n disabled={disabled}\n >\n <SelectPrimitive.Value placeholder={placeholder} data-truncate />\n <SelectPrimitive.Icon className={`${componentClassName}TriggerIcon`}>\n <ExpandSmallIcon />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n className={`${componentClassName}Content`}\n position=\"popper\"\n side=\"bottom\"\n sideOffset={4}\n >\n <ScrollAreaPrimitive.Root className={withGlobalPrefix('ScrollAreaRoot')} type=\"auto\">\n <SelectPrimitive.Viewport className={`${componentClassName}Viewport`}>\n <ScrollAreaPrimitive.Viewport className={withGlobalPrefix('ScrollAreaViewport')}>\n {children}\n </ScrollAreaPrimitive.Viewport>\n </SelectPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar\n className={withGlobalPrefix('ScrollAreaScrollbar')}\n orientation=\"vertical\"\n >\n <ScrollAreaPrimitive.Thumb className={withGlobalPrefix('ScrollAreaThumb')} />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n </SelectPrimitive.Root>\n </FormField>\n );\n});\n\nSelect.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-UNDW2NW7.cjs","../src/components/List/ListActionButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ListActionButton","forwardRef","className","children","disabled","onClick","props","ref","jsx","BodyText","jsxs","cn","ChevronRightSmallIcon"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,8BCA/F,wEAIW,+CAchC,IAXAA,CAAAA,CAAiB,kBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAmBC,+BAAAA,CAG7B,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAAA,CAAU,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAErDC,6BAAAA,mBAACC,CAAA,CAAS,GAAA,CAAKF,CAAAA,CAAK,IAAA,CAAK,IAAA,CAAK,MAAA,CAAO,UAAA,CAAW,OAAA,CAAO,CAAA,CAAA,CACrD,QAAA,CAAAG,8BAAAA,QAAC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAGb,CAAoBI,CAAS,CAAA,CAC1C,GAAGI,CAAAA,CACJ,eAAA,CAAeF,CAAAA,EAAY,KAAA,CAAA,CAC3B,OAAA,CAASA,CAAAA,CAAW,KAAA,CAAA,CAAYC,CAAAA,CAE/B,QAAA,CAAA,CAAAF,CAAAA,CACDK,6BAAAA,uCAACI,CAAA,CAAA,CAAsB,CAAA,CAAA,CACzB,CAAA,CACF,CAEH,CAAA,CAEDZ,CAAAA,CAAiB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-UNDW2NW7.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef, ComponentPropsWithRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { BodyText } from '../BodyText/BodyText';\n\nconst COMPONENT_NAME = 'ListActionButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ListActionButtonElement = ComponentRef<'button'>;\n\nexport const ListActionButton = forwardRef<\n ListActionButtonElement,\n ComponentPropsWithRef<'button'>\n>(({ className, children, disabled, onClick, ...props }, ref) => {\n return (\n <BodyText ref={ref} size=\"md\" weight=\"semibold\" asChild>\n <button\n className={cn(componentClassName, className)}\n {...props}\n aria-disabled={disabled || undefined}\n onClick={disabled ? undefined : onClick}\n >\n {children}\n <ChevronRightSmallIcon />\n </button>\n </BodyText>\n );\n});\n\nListActionButton.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-UVHPJNXC.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkMZMYW4KCcjs = require('./chunk-MZMYW4KC.cjs');var _chunkWSD52THLcjs = require('./chunk-WSD52THL.cjs');var _chunkDR4D5JX2cjs = require('./chunk-DR4D5JX2.cjs');var _chunkS3DGCUDLcjs = require('./chunk-S3DGCUDL.cjs');var _chunkRAIRXO6Fcjs = require('./chunk-RAIRXO6F.cjs');var _chunkQKGE3FJXcjs = require('./chunk-QKGE3FJX.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkHIF6HKZ3cjs = require('./chunk-HIF6HKZ3.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var H="Checkbox",a=_chunk4Q432K4Wcjs.b.call(void 0, H),Q= exports.a =_react.forwardRef.call(void 0, (S,E)=>{let{id:L,label:m,helperText:r,className:U,disabled:p,onCheckedChange:b,value:t="on","aria-labelledby":D,image:M,validationStatus:n,validationText:l,...O}=_chunkZPJNQBTNcjs.a.call(void 0, S,_chunkOB7O3UFLcjs.a),{id:f,labelId:x,helperTextId:h,validationTextId:d}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:L,prefix:"checkbox"}),e=_chunkWSD52THLcjs.c.call(void 0, ),i=_chunkDR4D5JX2cjs.c.call(void 0, ),$=_optionalChain([i, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(t)]),A=_optionalChain([e, 'optionalAccess', _5 => _5.hasGroupHelperText]),B=_optionalChain([e, 'optionalAccess', _6 => _6.hasGroupValidationText]),_=e?e["aria-describedby"]:"",q=!A&&!!r,u=!!m,C=!B&&n!==void 0&&l!==void 0,z=_chunkHIF6HKZ3cjs.a.call(void 0, _,r?h:void 0,C&&l!==void 0?d:void 0);return _jsxruntime.jsxs.call(void 0, _chunkQKGE3FJXcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, a,U),"data-testid":a,"data-disabled":p?"":void 0,children:[_jsxruntime.jsx.call(void 0, _radixui.Checkbox.Root,{ref:E,className:`${a}Root`,name:_optionalChain([i, 'optionalAccess', _7 => _7.name]),checked:$,value:t,...O,id:f,disabled:p,"aria-describedby":z,"aria-labelledby":D||u?x:void 0,"aria-errormessage":n==="invalid"?d:void 0,onCheckedChange:k=>{e&&(k?_optionalChain([i, 'optionalAccess', _8 => _8.onItemCheck, 'call', _9 => _9(t)]):_optionalChain([i, 'optionalAccess', _10 => _10.onItemUncheck, 'call', _11 => _11(t)])),b&&b(k)},children:_jsxruntime.jsx.call(void 0, _radixui.Checkbox.Indicator,{asChild:!0,className:`${a}Indicator`,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.TickSmallIcon,{})})}),u?_jsxruntime.jsxs.call(void 0, _chunkQKGE3FJXcjs.a,{direction:"column",children:[_jsxruntime.jsxs.call(void 0, _chunkMZMYW4KCcjs.a,{id:x,htmlFor:f,disableUserSelect:!0,children:[M,m]}),q?_jsxruntime.jsx.call(void 0, _chunkRAIRXO6Fcjs.a,{id:h,disableUserSelect:!0,children:r}):null,C?_jsxruntime.jsx.call(void 0, _chunkS3DGCUDLcjs.a,{id:d,status:n,disableUserSelect:!0,children:l}):null]}):null]})});Q.displayName=H;exports.a = Q;
|
|
4
|
-
//# sourceMappingURL=chunk-UVHPJNXC.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-UVHPJNXC.cjs","../src/components/Checkbox/Checkbox.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Checkbox","forwardRef","props","ref","providedId","label","helperText","className","disabled","onCheckedChange","value","ariaLabelledby","image","validationStatus","validationText","checkboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","hasGroupValidationText","ariaDescribedby","showHelperText","showLabel","showValidation","ariaDescribedbyValue","mergeIds","jsxs","Flex","cn","jsx","CheckboxPrimitive"],"mappings":"AAAA,ylBAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wECK7c,mCAKgB,8BAMnB,+CAoFjB,IAlFJA,CAAAA,CAAiB,UAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAa7CC,CAAAA,aAAWC,+BAAAA,CAA4CC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACjF,GAAM,CACJ,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,C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A,CAAWC,iCAAAA,CAAGxC,CAAoBS,CAAS,CAAA,CAC3C,aAAA,CAAaT,CAAAA,CACb,eAAA,CAAeU,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAE/B,QAAA,CAAA,CAAA+B,6BAAAA,iBAACC,CAAkB,IAAA,CAAlB,CACC,GAAA,CAAKrC,CAAAA,CACL,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-UVHPJNXC.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport type { CheckboxProps } from './Checkbox.props';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup.context';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport type { ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'Checkbox';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype CheckboxElement = ComponentRef<'button'>;\n\n/**\n * Use Checkbox to let a user toggle a dual-state option between checked and\n * not checked. It can be used independently, but when presenting multiple\n * checkboxes together use `CheckboxGroup` instead, which handles their state\n * and layout. If not using the `label` prop, provide an `aria-label` or\n * `aria-labelledby` so the checkbox has an accessible name.\n *\n * @summary A dual-state control letting a user toggle between checked and not checked.\n */\nexport const Checkbox = forwardRef<CheckboxElement, CheckboxProps>((props, ref) => {\n const {\n id: providedId,\n label,\n helperText,\n className,\n disabled,\n onCheckedChange,\n value = 'on',\n 'aria-labelledby': ariaLabelledby,\n image,\n validationStatus,\n validationText,\n ...checkboxProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'checkbox',\n });\n const context = useFormGroupBase();\n const checkboxContext = useCheckboxGroup();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const hasGroupValidationText = context?.hasGroupValidationText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n const showValidation =\n !hasGroupValidationText && validationStatus !== undefined && validationText !== undefined;\n\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n return (\n <Flex\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n data-disabled={disabled ? '' : undefined}\n >\n <CheckboxPrimitive.Root\n ref={ref}\n className={`${componentClassName}Root`}\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...checkboxProps}\n id={id}\n disabled={disabled}\n aria-describedby={ariaDescribedbyValue}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <CheckboxPrimitive.Indicator asChild className={`${componentClassName}Indicator`}>\n <TickSmallIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n {showLabel ? (\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n {showValidation ? (\n <ValidationText id={validationTextId} status={validationStatus} disableUserSelect>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n ) : null}\n </Flex>\n );\n});\n\nCheckbox.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-VME2FDDL.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkY4KCRRDDcjs = require('./chunk-Y4KCRRDD.cjs');var _chunkN4PBDFEJcjs = require('./chunk-N4PBDFEJ.cjs');var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _combobox = require('@base-ui/react/combobox');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var T="Combobox",i=_chunk4Q432K4Wcjs.b.call(void 0, T);function K(s){let{className:g,children:p,triggerOnlyOnType:c,validationStatus:A,validationText:O,label:B,labelVariant:V,helperText:E,id:F,disabled:t,required:w,noOptionsFoundText:M,statusText:d,loading:R,hideLabel:L,placeholder:U,...$}=_chunkZPJNQBTNcjs.a.call(void 0, s,_chunkOB7O3UFLcjs.a),{id:u,labelId:k,helperTextId:q,validationTextId:z}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:F,prefix:"combobox"}),f=!t,D={id:u,labelId:k,helperTextId:q,validationTextId:z,label:B,labelVariant:V,helperText:E,validationText:f?O:void 0,validationStatus:f?A:void 0,required:w,hideLabel:L},G=!!d||!!s.items||!!p;return _jsxruntime.jsx.call(void 0, _chunkZ6OA4XPPcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, i,g),"data-disabled":t?"":void 0,"data-testid":i,...D,children:_jsxruntime.jsxs.call(void 0, _combobox.Combobox.Root,{openOnInputClick:!c,...$,children:[_jsxruntime.jsx.call(void 0, _combobox.Combobox.Input,{render:_jsxruntime.jsxs.call(void 0, _chunkB2HYSLUXcjs.a,{id:u,disabled:t,placeholder:U,children:[_jsxruntime.jsx.call(void 0, _combobox.Combobox.Trigger,{disabled:t,render:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"prefix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{type:"button",label:"Open popup",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SearchMediumIcon,{})})})}),R?_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkHHKQ3ZBDcjs.a,{size:"xs",color:"primary"})}):null,_jsxruntime.jsx.call(void 0, _combobox.Combobox.Clear,{render:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{type:"button",label:"Clear selection",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseSmallIcon,{})})})}),c?null:_jsxruntime.jsx.call(void 0, _combobox.Combobox.Trigger,{disabled:t,render:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{type:"button",label:"Open popup",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ExpandSmallIcon,{})})})})]})}),G?_jsxruntime.jsx.call(void 0, _combobox.Combobox.Portal,{children:_jsxruntime.jsx.call(void 0, _combobox.Combobox.Positioner,{side:"bottom",sideOffset:16,align:"start",alignOffset:-47,children:_jsxruntime.jsxs.call(void 0, _combobox.Combobox.Popup,{className:`${i}Popup`,children:[d?_jsxruntime.jsx.call(void 0, _combobox.Combobox.Status,{className:`${i}StatusText`,children:d}):null,s.items?_jsxruntime.jsx.call(void 0, _chunkY4KCRRDDcjs.a,{className:`${i}Empty`,children:M}):null,_jsxruntime.jsxs.call(void 0, _radixui.ScrollArea.Root,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaRoot"),type:"auto",children:[_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Viewport,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaViewport"),children:_jsxruntime.jsx.call(void 0, _combobox.Combobox.List,{className:`${i}List`,children:p||(b=>_jsxruntime.jsx.call(void 0, _chunkN4PBDFEJcjs.a,{value:b,children:b},b))})}),_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Scrollbar,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaScrollbar"),orientation:"vertical",children:_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Thumb,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaThumb")})})]})]})})}):null]})})}K.displayName=T;exports.a = K;
|
|
4
|
-
//# sourceMappingURL=chunk-VME2FDDL.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-VME2FDDL.cjs","../src/components/Combobox/Combobox.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Combobox","props","className","children","triggerOnlyOnType","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","required","noOptionsFoundText","statusText","loading","hideLabel","placeholder","comboboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","popupHasContent","jsx","FormField","cn","jsxs","ComboboxPrimitive","InputBase","InputSlot","UnstyledIconButton","SearchMediumIcon","Spinner","CloseSmallIcon","ExpandSmallIcon"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mDCOxb,wEAOvC,mCAE2C,+CA0EtC,IArENA,CAAAA,CAAiB,UAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAYnD,SAASC,CAAAA,CACdC,CAAAA,CACA,CACA,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAalB,CAAOmB,mBAAc,CAAA,CAEhC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAAA,CAAc,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,iCAAAA,CACtD,UAAA,CAAAf,CAAAA,CACA,MAAA,CAAQ,UACV,CAAC,CAAA,CAEKgB,CAAAA,CAAiB,CAACf,CAAAA,CAElBgB,CAAAA,CAAiB,CACrB,EAAA,CAAAN,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,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Eb,QAAA,CAAAD,8BAAAA,kBAACC,CAAkB,KAAA,CAAlB,CAAwB,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-VME2FDDL.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { useIds } from '../../hooks/use-ids';\nimport { FormField } from '../FormField/FormField';\nimport type { ComboboxProps } from './Combobox.props';\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';\nimport { InputBase } from '../InputBase/InputBase';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport {\n CloseSmallIcon,\n ExpandSmallIcon,\n SearchMediumIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { ComboboxItem } from './ComboboxItem';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { ComboboxEmpty } from './ComboboxEmpty';\nimport { Spinner } from '../Spinner/Spinner';\n\nconst COMPONENT_NAME = 'Combobox';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use Combobox to let users type to filter results and select from a\n * predefined list of options. Pass options via the `items` prop to have them\n * rendered automatically, or render `ComboboxItem` children yourself for more\n * control. Set `triggerOnlyOnType` when the user must type before options are\n * surfaced (e.g. a postcode or address lookup); leave it unset when there is a\n * predefined list to choose from by clicking.\n *\n * @summary A text input that lets users filter and select from a list of options.\n */\nexport function Combobox<Value, Multiple extends boolean | undefined = false>(\n props: ComboboxProps<Value, Multiple>\n) {\n const {\n className,\n children,\n triggerOnlyOnType,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n required,\n noOptionsFoundText,\n statusText,\n loading,\n hideLabel,\n placeholder,\n ...comboboxProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'combobox',\n });\n\n const showValidation = !disabled;\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n hideLabel,\n };\n\n const popupHasContent = Boolean(statusText) || Boolean(props.items) || Boolean(children);\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <ComboboxPrimitive.Root openOnInputClick={!triggerOnlyOnType} {...comboboxProps}>\n <ComboboxPrimitive.Input\n render={\n <InputBase id={id} disabled={disabled} placeholder={placeholder}>\n <ComboboxPrimitive.Trigger\n disabled={disabled}\n render={\n <InputSlot placement=\"prefix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Open popup\" disabled={disabled}>\n <SearchMediumIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n {loading ? (\n <InputSlot placement=\"suffix\">\n <Spinner size=\"xs\" color=\"primary\" />\n </InputSlot>\n ) : null}\n <ComboboxPrimitive.Clear\n render={\n <InputSlot placement=\"suffix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Clear selection\" disabled={disabled}>\n <CloseSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n {triggerOnlyOnType ? null : (\n <ComboboxPrimitive.Trigger\n disabled={disabled}\n render={\n <InputSlot placement=\"suffix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Open popup\" disabled={disabled}>\n <ExpandSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n )}\n </InputBase>\n }\n />\n\n {popupHasContent ? (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side=\"bottom\"\n sideOffset={16}\n align=\"start\"\n alignOffset={-47}\n >\n <ComboboxPrimitive.Popup className={`${componentClassName}Popup`}>\n {statusText ? (\n <ComboboxPrimitive.Status className={`${componentClassName}StatusText`}>\n {statusText}\n </ComboboxPrimitive.Status>\n ) : null}\n {props.items ? (\n <ComboboxEmpty className={`${componentClassName}Empty`}>\n {noOptionsFoundText}\n </ComboboxEmpty>\n ) : null}\n <ScrollAreaPrimitive.Root\n className={withGlobalPrefix('ScrollAreaRoot')}\n type=\"auto\"\n >\n <ScrollAreaPrimitive.Viewport className={withGlobalPrefix('ScrollAreaViewport')}>\n <ComboboxPrimitive.List className={`${componentClassName}List`}>\n {children\n ? children\n : (item: string) => (\n <ComboboxItem key={item} value={item}>\n {item}\n </ComboboxItem>\n )}\n </ComboboxPrimitive.List>\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar\n className={withGlobalPrefix('ScrollAreaScrollbar')}\n orientation=\"vertical\"\n >\n <ScrollAreaPrimitive.Thumb className={withGlobalPrefix('ScrollAreaThumb')} />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n ) : null}\n </ComboboxPrimitive.Root>\n </FormField>\n );\n}\n\nCombobox.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-WB4GZ3CX.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkDLU27EEOcjs = require('./chunk-DLU27EEO.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var c="DatePickerHeader",r=_chunk4Q432K4Wcjs.b.call(void 0, c),O= exports.a =({date:o,decreaseYear:i,increaseYear:m,decreaseMonth:y,increaseMonth:p,prevMonthButtonDisabled:u,nextMonthButtonDisabled:h,prevYearButtonDisabled:b,nextYearButtonDisabled:f,view:e,onClick:C,visibleYearsRange:n,disableTodayIndicator:N})=>{let k={days:[["January","February","March","April","May","June","July","August","September","October","November","December"][o.getMonth()],o.getFullYear()].join(" "),months:o.getFullYear().toString(),years:n?[n.startYear,"-",n.endYear].join(" "):void 0},P=e==="days"?y:e==="years"?i:void 0,D=e==="days"?p:e==="years"?m:void 0,x=e==="days"&&u||e==="years"&&b,M=e==="days"&&h||e==="years"&&f,S=`previous ${e==="days"?"month":"year"}`,H=`next ${e==="days"?"month":"year"}`;return _jsxruntime.jsxs.call(void 0, "div",{className:r,"data-monthyear-state":e==="days"?"closed":"open","data-disable-today-indicator":N?"":void 0,children:[_jsxruntime.jsx.call(void 0, _chunkDLU27EEOcjs.a,{asChild:!0,size:"md",weight:"semibold",children:_jsxruntime.jsxs.call(void 0, "button",{className:`${r}MonthButton`,onClick:C,children:[k[e],e==="days"?_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronDownSmallIcon,{"aria-hidden":!0}):_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronUpSmallIcon,{"aria-hidden":!0})]})}),e!=="months"?_jsxruntime.jsxs.call(void 0, "div",{className:`${r}Control`,children:[_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{onClick:P,disabled:x,label:S,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronLeftSmallIcon,{})}),_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{onClick:D,disabled:M,label:H,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{})})]}):null]})};O.displayName=c;exports.a = O;
|
|
4
|
-
//# sourceMappingURL=chunk-WB4GZ3CX.cjs.map
|
package/dist/chunk-WFVKT4MG.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkYQOUIHWNcjs = require('./chunk-YQOUIHWN.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _chunk5XQBCR7Qcjs = require('./chunk-5XQBCR7Q.cjs');var _chunkZSLWPF2Ucjs = require('./chunk-ZSLWPF2U.cjs');var _react = require('react');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var u="UnstyledIconButton",c=_chunk4Q432K4Wcjs.b.call(void 0, u),z= exports.a =_react.forwardRef.call(void 0, (o,y)=>{let{className:C,children:t,label:B,disabled:n,inverted:I,loading:e,onClick:P,asChild:r,...b}=_chunkZPJNQBTNcjs.a.call(void 0, o,_chunkYQOUIHWNcjs.a),S=_chunk5XQBCR7Qcjs.a.call(void 0, o.size||"md",{md:"sm",sm:"xs"}),N=r?_radixui.Slot.Root:"button";return _jsxruntime.jsx.call(void 0, N,{ref:y,className:_chunkONNSZMWFcjs.a.call(void 0, c,C),"aria-label":B,"aria-disabled":n||e,"data-inverted":I?"":void 0,onClick:n?void 0:P,"data-testid":c,...b,children:e?_chunkZSLWPF2Ucjs.a.call(void 0, {asChild:r,children:t},()=>_jsxruntime.jsx.call(void 0, _chunkHHKQ3ZBDcjs.a,{size:S,currentColor:!0})):t})});z.displayName=u;exports.a = z;
|
|
4
|
-
//# sourceMappingURL=chunk-WFVKT4MG.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-WFVKT4MG.cjs","../src/components/UnstyledIconButton/UnstyledIconButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","UnstyledIconButton","forwardRef","props","ref","className","children","label","disabled","inverted","loading","onClick","asChild","unstyledIconButtonProps","extractProps","unstyledIconButtonPropDefs","spinnerSize","getResponsiveTranslation","Component","Slot","js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ChCc,6BAAAA,mBAACG,CAAA,CAAQ,IAAA,CAAMP,CAAAA,CAAqC,YAAA,CAAY,CAAA,CAAA,CAAC,CAClE,CAAA,CACDV,CAAAA,CACN,CAEJ,CACF,CAAA,CAEAL,CAAAA,CAAmB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-WFVKT4MG.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { unstyledIconButtonPropDefs } from './UnstyledIconButton.props';\nimport type { UnstyledIconButtonProps } from './UnstyledIconButton.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Spinner } from '../Spinner/Spinner';\nimport type { SpinnerProps } from '../Spinner/Spinner.props';\nimport { Slot } from 'radix-ui';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport { getResponsiveTranslation } from '../../helpers/get-responsive-translation';\n\nconst COMPONENT_NAME = 'UnstyledIconButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype UnstyledIconButtonElement = ComponentRef<'button'>;\n\n/**\n * Use UnstyledIconButton for an icon-only button with no visual styling of\n * its own: a plain, unstyled base for building custom icon button variants.\n * For a fully-styled icon button, use IconButton instead. A `label` is\n * required, since the button contains only an icon with no visible text.\n *\n * @summary An unstyled, icon-only button base for building custom icon buttons.\n */\nexport const UnstyledIconButton = forwardRef<UnstyledIconButtonElement, UnstyledIconButtonProps>(\n (props, ref) => {\n const {\n className,\n children,\n label,\n disabled,\n inverted,\n loading,\n onClick,\n asChild,\n ...unstyledIconButtonProps\n } = extractProps(props, unstyledIconButtonPropDefs);\n\n const spinnerSize = getResponsiveTranslation(props.size || 'md', { md: 'sm', sm: 'xs' });\n const Component = asChild ? Slot.Root : 'button';\n\n return (\n <Component\n ref={ref}\n className={cn(componentClassName, className)}\n aria-label={label}\n aria-disabled={disabled || loading}\n data-inverted={inverted ? '' : undefined}\n onClick={disabled ? undefined : onClick}\n data-testid={componentClassName}\n {...unstyledIconButtonProps}\n >\n {loading\n ? getSubtree({ asChild, children }, () => (\n <Spinner size={spinnerSize as SpinnerProps['size']} currentColor />\n ))\n : children}\n </Component>\n );\n }\n);\n\nUnstyledIconButton.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-WMOTZLQC.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _radixui = require('radix-ui');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var g="TabsList",s=_chunk4Q432K4Wcjs.b.call(void 0, g),U= exports.a =_react.forwardRef.call(void 0, ({className:I,children:R,...y},C)=>{let m=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, null),[E,N]=_react.useState.call(void 0, 0),[W,w]=_react.useState.call(void 0, 0),[h,M]=_react.useState.call(void 0, !1),[p,O]=_react.useState.call(void 0, !1),a=_react.useCallback.call(void 0, ()=>{let e=m.current;if(!e)return;let t=e.querySelector("."+_chunk4Q432K4Wcjs.b.call(void 0, 'Tab[data-state="active"]'));t&&(N(t.offsetLeft),w(t.offsetWidth))},[]),i=_react.useCallback.call(void 0, ()=>{let e=c.current;if(!e)return;let t=e.scrollWidth>e.clientWidth+1,r=t&&e.scrollLeft>0,o=t&&e.scrollLeft+e.clientWidth<e.scrollWidth-1;M(r),O(o)},[]);_react.useLayoutEffect.call(void 0, ()=>{a(),i();let e=m.current,t=c.current;if(!e&&!t)return;let r=new ResizeObserver(()=>{a(),i()});e&&r.observe(e),t&&r.observe(t);let o=new MutationObserver(()=>{a(),i()});e&&o.observe(e,{subtree:!0,attributes:!0,attributeFilter:["data-state"],childList:!0});let L=()=>i();return _optionalChain([t, 'optionalAccess', _ => _.addEventListener, 'call', _2 => _2("scroll",L,{passive:!0})]),()=>{r.disconnect(),o.disconnect(),_optionalChain([t, 'optionalAccess', _3 => _3.removeEventListener, 'call', _4 => _4("scroll",L)])}},[a,i]);let d=_react.useCallback.call(void 0, e=>{let t=c.current;if(!t)return;let r=t.clientWidth*.6,o=Math.max(0,Math.min(t.scrollLeft+e*r,t.scrollWidth-t.clientWidth));t.scrollTo({left:o,behavior:"smooth"})},[]),$=_react.useCallback.call(void 0, ()=>d(-1),[d]),x=_react.useCallback.call(void 0, ()=>d(1),[d]);return _jsxruntime.jsxs.call(void 0, _radixui.Tabs.List,{ref:C,className:_chunkONNSZMWFcjs.a.call(void 0, s,I),...y,children:[h?_jsxruntime.jsx.call(void 0, "div",{className:`${s}ScrollButtonLeft`,"aria-hidden":!0,children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"scroll left",tabIndex:-1,onClick:$,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronLeftSmallIcon,{})})}):null,_jsxruntime.jsx.call(void 0, "div",{className:_chunkONNSZMWFcjs.a.call(void 0, `${s}Scroll`),"data-scroll-left":h?"":void 0,"data-scroll-right":p?"":void 0,ref:c,children:_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Container`,ref:m,children:[R,_jsxruntime.jsx.call(void 0, "div",{className:`${s}Indicator`,style:{transform:`translateX(${E}px)`,width:`${W}px`}})]})}),p?_jsxruntime.jsx.call(void 0, "div",{className:`${s}ScrollButtonRight`,"aria-hidden":!0,children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"scroll right",tabIndex:-1,onClick:x,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{})})}):null]})});U.displayName=g;exports.a = U;
|
|
4
|
-
//# sourceMappingURL=chunk-WMOTZLQC.cjs.map
|
package/dist/chunk-WW43YAWT.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkMZMYW4KCcjs = require('./chunk-MZMYW4KC.cjs');var _chunkWSD52THLcjs = require('./chunk-WSD52THL.cjs');var _chunkRAIRXO6Fcjs = require('./chunk-RAIRXO6F.cjs');var _chunkIVFMFU6Ucjs = require('./chunk-IVFMFU6U.cjs');var _chunkQKGE3FJXcjs = require('./chunk-QKGE3FJX.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var I="RadioTile",T=_chunk4Q432K4Wcjs.b.call(void 0, I),S= exports.a =_react.forwardRef.call(void 0, ({className:N,id:y,label:r,helperText:t,image:P,"aria-labelledby":a,badge:v,flex:C,flexBasis:G,flexShrink:h,flexGrow:B,disabled:E,...F},H)=>{let{id:d,labelId:m,helperTextId:l}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:y,prefix:"radio"}),{hasGroupHelperText:w,"aria-describedby":M}=_chunkWSD52THLcjs.c.call(void 0, ),s=!w&&t!==void 0;return _jsxruntime.jsx.call(void 0, _chunkIVFMFU6Ucjs.a,{asChild:!0,"data-testid":T,...{flex:C,flexBasis:G,flexShrink:h,flexGrow:B},children:_jsxruntime.jsx.call(void 0, _radixui.RadioGroup.Item,{ref:H,className:_chunkONNSZMWFcjs.a.call(void 0, T,N),...F,disabled:E,id:d,"aria-describedby":s?l:M,"aria-labelledby":a||(r?m:void 0),children:_jsxruntime.jsxs.call(void 0, "div",{className:_chunk4Q432K4Wcjs.b.call(void 0, "RadioContainer"),children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunk4Q432K4Wcjs.b.call(void 0, "RadioItem"),children:_jsxruntime.jsx.call(void 0, _radixui.RadioGroup.Indicator,{className:_chunk4Q432K4Wcjs.b.call(void 0, "RadioIndicator")})}),_jsxruntime.jsxs.call(void 0, _chunkQKGE3FJXcjs.a,{direction:"column",alignItems:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkMZMYW4KCcjs.a,{id:m,htmlFor:d,disableUserSelect:!0,children:[P,r]}),s?_jsxruntime.jsx.call(void 0, _chunkRAIRXO6Fcjs.a,{id:l,disableUserSelect:!0,children:t}):null,v]})]})})})});S.displayName=I;exports.a = S;
|
|
4
|
-
//# sourceMappingURL=chunk-WW43YAWT.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-WW43YAWT.cjs","../src/components/RadioTile/RadioTile.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","RadioTile","forwardRef","className","providedId","label","helperText","image","ariaLabelledby","badge","flex","flexBasis","flexShrink","flexGrow","disabled","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","jsx","Box","RadioGroupPrimitive","cn","jsxs","Flex","Label","HelperText"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCA5S,mCAKuB,+CAyDpC,IAjDRA,CAAAA,CAAiB,WAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA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A,CAAiBd,CAAAA,EAAAA,CAAkCH,CAAAA,CAAQa,CAAAA,CAAU,KAAA,CAAA,CAAA,CAErE,QAAA,CAAAW,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW7B,iCAAAA,gBAAiC,CAAA,CAC/C,QAAA,CAAA,CAAAyB,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWzB,iCAAAA,WAA4B,CAAA,CAC1C,QAAA,CAAAyB,6BAAAA,mBAACE,CAAoB,SAAA,CAApB,CAA8B,SAAA,CAAW3B,iCAAAA,gBAAiC,CAAA,CAAG,CAAA,CAChF,CAAA,CACA6B,8BAAAA,mBAACC,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,UAAA,CAAW,OAAA,CAClC,QAAA,CAAA,CAAAD,8BAAAA,mBAACE,CAAA,CAAM,EAAA,CAAIb,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAC/C,QAAA,CAAA,CAAAV,CAAAA,CACAF,CAAAA,CAAAA,CACH,CAAA,CACCmB,CAAAA,CACCC,6BAAAA,mBAACO,CAAA,CAAW,EAAA,CAAIb,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAC5C,QAAA,CAAAb,CAAAA,CACH,CAAA,CACE,IAAA,CACHG,CAAAA,CAAAA,CACH,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CACF,CAEJ,CACF,CAAA,CAEAR,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-WW43YAWT.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { RadioTileProps } from './RadioTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\nimport { Box } from '../Box/Box';\n\nconst COMPONENT_NAME = 'RadioTile';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype RadioTileElement = ComponentRef<'button'>;\n\n/**\n * Use RadioTile within a RadioGroup as the default way to present a grouped\n * set of selectable options — it offers a larger, tile-style target than\n * Radio. Use RadioCard instead when the option needs to display additional\n * child content, or Radio for a plain, compact radio button.\n *\n * @summary A tile-styled radio option for use within RadioGroup.\n */\nexport const RadioTile = forwardRef<RadioTileElement, RadioTileProps>(\n (\n {\n className,\n id: providedId,\n label,\n helperText,\n image,\n 'aria-labelledby': ariaLabelledby,\n badge,\n flex,\n flexBasis,\n flexShrink,\n flexGrow,\n disabled,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n const flexItemProps = { flex, flexBasis, flexShrink, flexGrow };\n return (\n <Box asChild data-testid={componentClassName} {...flexItemProps}>\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(componentClassName, className)}\n {...props}\n disabled={disabled}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n >\n <div className={withGlobalPrefix('RadioContainer')}>\n <div className={withGlobalPrefix('RadioItem')}>\n <RadioGroupPrimitive.Indicator className={withGlobalPrefix('RadioIndicator')} />\n </div>\n <Flex direction=\"column\" alignItems=\"start\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n {badge}\n </Flex>\n </div>\n </RadioGroupPrimitive.Item>\n </Box>\n );\n }\n);\n\nRadioTile.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DatePicker/DatePickerHeader.tsx"],"sourcesContent":["'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { DatePickerHeaderProps } from './DatePickerHeader.props';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport {\n ChevronDownSmallIcon,\n ChevronLeftSmallIcon,\n ChevronRightSmallIcon,\n ChevronUpSmallIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { BodyText } from '../BodyText/BodyText';\nimport type { View } from './DatePicker.props';\n\nconst COMPONENT_NAME = 'DatePickerHeader';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const DatePickerHeader = ({\n date,\n decreaseYear,\n increaseYear,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n prevYearButtonDisabled,\n nextYearButtonDisabled,\n view,\n onClick,\n visibleYearsRange,\n disableTodayIndicator,\n}: DatePickerHeaderProps) => {\n const MONTHS = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ] as const;\n\n const buttonText: { [key in View]: string | undefined } = {\n days: [MONTHS[date.getMonth()], date.getFullYear()].join(' '),\n months: date.getFullYear().toString(),\n years: visibleYearsRange\n ? [visibleYearsRange.startYear, '-', visibleYearsRange.endYear].join(' ')\n : undefined,\n };\n\n const handlePrevClick =\n view === 'days' ? decreaseMonth : view === 'years' ? decreaseYear : undefined;\n const handleNextClick =\n view === 'days' ? increaseMonth : view === 'years' ? increaseYear : undefined;\n\n const isPrevDisabled =\n (view === 'days' && prevMonthButtonDisabled) || (view === 'years' && prevYearButtonDisabled);\n const isNextDisabled =\n (view === 'days' && nextMonthButtonDisabled) || (view === 'years' && nextYearButtonDisabled);\n\n const prevLabel = `previous ${view === 'days' ? 'month' : 'year'}`;\n const nextLabel = `next ${view === 'days' ? 'month' : 'year'}`;\n\n return (\n <div\n className={componentClassName}\n data-monthyear-state={view === 'days' ? 'closed' : 'open'}\n data-disable-today-indicator={disableTodayIndicator ? '' : undefined}\n >\n <BodyText asChild size=\"md\" weight=\"semibold\">\n <button className={`${componentClassName}MonthButton`} onClick={onClick}>\n {buttonText[view]}\n {view === 'days' ? (\n <ChevronDownSmallIcon aria-hidden />\n ) : (\n <ChevronUpSmallIcon aria-hidden />\n )}\n </button>\n </BodyText>\n\n {view !== 'months' ? (\n <div className={`${componentClassName}Control`}>\n <UnstyledIconButton onClick={handlePrevClick} disabled={isPrevDisabled} label={prevLabel}>\n <ChevronLeftSmallIcon />\n </UnstyledIconButton>\n <UnstyledIconButton onClick={handleNextClick} disabled={isNextDisabled} label={nextLabel}>\n <ChevronRightSmallIcon />\n </UnstyledIconButton>\n </div>\n ) : null}\n </div>\n );\n};\n\nDatePickerHeader.displayName = COMPONENT_NAME;\n"],"mappings":";;mHAKA,OACE,wBAAAA,EACA,wBAAAC,EACA,yBAAAC,EACA,sBAAAC,MACK,uCAiEC,OAGI,OAAAC,EAHJ,QAAAC,MAAA,oBA7DR,IAAMC,EAAiB,mBACjBC,EAAqBC,EAAiBF,CAAc,EAE7CG,EAAmB,CAAC,CAC/B,KAAAC,EACA,aAAAC,EACA,aAAAC,EACA,cAAAC,EACA,cAAAC,EACA,wBAAAC,EACA,wBAAAC,EACA,uBAAAC,EACA,uBAAAC,EACA,KAAAC,EACA,QAAAC,EACA,kBAAAC,EACA,sBAAAC,CACF,IAA6B,CAgB3B,IAAMC,EAAoD,CACxD,KAAM,CAhBO,CACb,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,UACF,EAGgBb,EAAK,SAAS,CAAC,EAAGA,EAAK,YAAY,CAAC,EAAE,KAAK,GAAG,EAC5D,OAAQA,EAAK,YAAY,EAAE,SAAS,EACpC,MAAOW,EACH,CAACA,EAAkB,UAAW,IAAKA,EAAkB,OAAO,EAAE,KAAK,GAAG,EACtE,MACN,EAEMG,EACJL,IAAS,OAASN,EAAgBM,IAAS,QAAUR,EAAe,OAChEc,EACJN,IAAS,OAASL,EAAgBK,IAAS,QAAUP,EAAe,OAEhEc,EACHP,IAAS,QAAUJ,GAA6BI,IAAS,SAAWF,EACjEU,EACHR,IAAS,QAAUH,GAA6BG,IAAS,SAAWD,EAEjEU,EAAY,YAAYT,IAAS,OAAS,QAAU,MAAM,GAC1DU,EAAY,QAAQV,IAAS,OAAS,QAAU,MAAM,GAE5D,OACEd,EAAC,OACC,UAAWE,EACX,uBAAsBY,IAAS,OAAS,SAAW,OACnD,+BAA8BG,EAAwB,GAAK,OAE3D,UAAAlB,EAAC0B,EAAA,CAAS,QAAO,GAAC,KAAK,KAAK,OAAO,WACjC,SAAAzB,EAAC,UAAO,UAAW,GAAGE,CAAkB,cAAe,QAASa,EAC7D,UAAAG,EAAWJ,CAAI,EACfA,IAAS,OACRf,EAAC2B,EAAA,CAAqB,cAAW,GAAC,EAElC3B,EAAC4B,EAAA,CAAmB,cAAW,GAAC,GAEpC,EACF,EAECb,IAAS,SACRd,EAAC,OAAI,UAAW,GAAGE,CAAkB,UACnC,UAAAH,EAAC6B,EAAA,CAAmB,QAAST,EAAiB,SAAUE,EAAgB,MAAOE,EAC7E,SAAAxB,EAAC8B,EAAA,EAAqB,EACxB,EACA9B,EAAC6B,EAAA,CAAmB,QAASR,EAAiB,SAAUE,EAAgB,MAAOE,EAC7E,SAAAzB,EAAC+B,EAAA,EAAsB,EACzB,GACF,EACE,MACN,CAEJ,EAEA1B,EAAiB,YAAcH","names":["ChevronDownSmallIcon","ChevronLeftSmallIcon","ChevronRightSmallIcon","ChevronUpSmallIcon","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","DatePickerHeader","date","decreaseYear","increaseYear","decreaseMonth","increaseMonth","prevMonthButtonDisabled","nextMonthButtonDisabled","prevYearButtonDisabled","nextYearButtonDisabled","view","onClick","visibleYearsRange","disableTodayIndicator","buttonText","handlePrevClick","handleNextClick","isPrevDisabled","isNextDisabled","prevLabel","nextLabel","BodyText","ChevronDownSmallIcon","ChevronUpSmallIcon","UnstyledIconButton","ChevronLeftSmallIcon","ChevronRightSmallIcon"]}
|
package/dist/chunk-XBK44AAM.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import{a as i}from"./chunk-B7TICI4V.js";import{a as p}from"./chunk-OHQ72FBJ.js";import{a as s}from"./chunk-J3AJBV4B.js";import{b as n}from"./chunk-PDEVCIQ3.js";import{forwardRef as g}from"react";import{jsx as o}from"react/jsx-runtime";var m="ProgressStepButton",S=n(m),B=g(({label:t,className:a,status:e,disabled:r,onClick:f,"aria-label":P,...l},c)=>{let u=e==="active";return o(i,{status:e,className:s(S,a),"aria-label":P,label:t,children:u?t:o(p,{asChild:!0,"aria-disabled":r,children:o("button",{ref:c,...l,onClick:r?void 0:f,children:t})})})});B.displayName=m;export{B as a};
|
|
4
|
-
//# sourceMappingURL=chunk-XBK44AAM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/List/ListActionButton.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef, ComponentPropsWithRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { BodyText } from '../BodyText/BodyText';\n\nconst COMPONENT_NAME = 'ListActionButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ListActionButtonElement = ComponentRef<'button'>;\n\nexport const ListActionButton = forwardRef<\n ListActionButtonElement,\n ComponentPropsWithRef<'button'>\n>(({ className, children, disabled, onClick, ...props }, ref) => {\n return (\n <BodyText ref={ref} size=\"md\" weight=\"semibold\" asChild>\n <button\n className={cn(componentClassName, className)}\n {...props}\n aria-disabled={disabled || undefined}\n onClick={disabled ? undefined : onClick}\n >\n {children}\n <ChevronRightSmallIcon />\n </button>\n </BodyText>\n );\n});\n\nListActionButton.displayName = COMPONENT_NAME;\n"],"mappings":";;wHAEA,OAAS,cAAAA,MAAkB,QAI3B,OAAS,yBAAAC,MAA6B,uCAchC,OAOE,OAAAC,EAPF,QAAAC,MAAA,oBAXN,IAAMC,EAAiB,mBACjBC,EAAqBC,EAAiBF,CAAc,EAI7CG,EAAmBC,EAG9B,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,SAAAC,EAAU,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAErDZ,EAACa,EAAA,CAAS,IAAKD,EAAK,KAAK,KAAK,OAAO,WAAW,QAAO,GACrD,SAAAX,EAAC,UACC,UAAWa,EAAGX,EAAoBI,CAAS,EAC1C,GAAGI,EACJ,gBAAeF,GAAY,OAC3B,QAASA,EAAW,OAAYC,EAE/B,UAAAF,EACDR,EAACe,EAAA,EAAsB,GACzB,EACF,CAEH,EAEDV,EAAiB,YAAcH","names":["forwardRef","ChevronRightSmallIcon","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","ListActionButton","forwardRef","className","children","disabled","onClick","props","ref","BodyText","cn","ChevronRightSmallIcon"]}
|
package/dist/chunk-YAI34QHN.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkHIF6HKZ3cjs = require('./chunk-HIF6HKZ3.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var T="VerificationInput",n=_chunk4Q432K4Wcjs.b.call(void 0, T),A= exports.a =_react.forwardRef.call(void 0, (N,O)=>{let{className:V,disabled:a,readOnly:d,label:x,labelVariant:F,helperText:s,validationText:l,validationStatus:e,required:R,id:w,"aria-describedby":h,...E}=_chunkZPJNQBTNcjs.a.call(void 0, N,_chunkOB7O3UFLcjs.a),{id:S,labelId:m,helperTextId:p,validationTextId:r}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:w,prefix:"verification-input"}),i=!d&&!a,C={id:S,labelId:m,helperTextId:p,validationTextId:r,label:x,labelVariant:F,helperText:s,validationText:i?l:void 0,validationStatus:i?e:void 0,required:R},D=_chunkHIF6HKZ3cjs.a.call(void 0, h,s?p:void 0,i&&l!==void 0?r:void 0);return _jsxruntime.jsx.call(void 0, _chunkZ6OA4XPPcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, n,V),"data-disabled":a?"":void 0,"data-testid":n,...C,children:_jsxruntime.jsxs.call(void 0, _radixui.unstable_OneTimePasswordField.Root,{className:`${n}Root`,disabled:a,readOnly:d,"aria-labelledby":m,"aria-describedby":D,"aria-invalid":e==="invalid"?!0:void 0,"aria-errormessage":e==="invalid"?r:void 0,"data-validation-status":i?e:void 0,...E,children:[Array.from({length:6}).map((B,_)=>_jsxruntime.jsx.call(void 0, _radixui.unstable_OneTimePasswordField.Input,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkB2HYSLUXcjs.a,{})},_)),_jsxruntime.jsx.call(void 0, _radixui.unstable_OneTimePasswordField.HiddenInput,{ref:O})]})})});A.displayName=T;exports.a = A;
|
|
4
|
-
//# sourceMappingURL=chunk-YAI34QHN.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-YAI34QHN.cjs","../src/components/VerificationInput/VerificationInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","VerificationInput","forwardRef","props","ref","className","disabled","readOnly","label","labelVariant","helperText","validationText","validationStatus","required","providedId","ariaDescribedby","verificationInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","jsx","FormField","cn","jsxs","OneTimePasswordFieldPrimitive"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCAxP,8BAUpD,+CAmEnB,IAhEFA,CAAAA,CAAiB,mBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAW7CC,CAAAA,aAAoBC,+BAAAA,CAC9BC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACd,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,kBAAA,CAAoBC,CAAAA,CACpB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAad,CAAOe,mBAAc,CAAA,CAEhC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAAA,CAAc,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,iCAAAA,CACtD,UAAA,CAAAT,CAAAA,CACA,MAAA,CAAQ,oBACV,CAAC,CAAA,CAEKU,CAAAA,CAAyB,CAACjB,CAAAA,EAAY,CAACD,CAAAA,CAEvCmB,CAAAA,CAAiB,CACrB,EAAA,CAAAN,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,KAAA,CAAAd,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBc,CAAAA,CAAiBb,CAAAA,CAAiB,KAAA,CAAA,CAClD,gBAAA,CAAkBa,CAAAA,CAAiBZ,CAAAA,CAAmB,KAAA,CAAA,CACtD,QAAA,CAAAC,CACF,CAAA,CAEMa,CAAAA,CAAuBC,iCAAAA,CAC3BZ,CACEL,CAAAA,CAAaW,CAAAA,CAAe,KAAA,CAAA,CAC9BG,CAAAA,EAAkBb,CAAAA,GAAmB,KAAA,CAAA,CAAYW,CAAAA,CAAmB,KAAA,CACtE,CAAA,CAIA,OACEM,6BAAAA,mBAACC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAG/B,CAAoBM,CAAS,CAAA,CAC3C,eAAA,CAAeC,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAC/B,aAAA,CAAaP,CAAAA,CACZ,GAAG0B,CAAAA,CAEJ,QAAA,CAAAM,8BAAAA,sCAACC,CAA8B,IAAA,CAA9B,CACC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-YAI34QHN.cjs","sourcesContent":[null,"'use client';\n\nimport { unstable_OneTimePasswordField as OneTimePasswordFieldPrimitive } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { VerificationInputProps } from './VerificationInput.props';\nimport { FormField } from '../FormField/FormField';\nimport { useIds } from '../../hooks/use-ids';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { InputBase } from '../InputBase/InputBase';\nimport { cn } from '../../helpers/cn';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'VerificationInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport type VerificationInputElement = ComponentRef<'input'>;\n\n/**\n * Use VerificationInput to let users enter a one-time password (OTP) sent via\n * SMS, email, or an authenticator app. For general text entry, use TextInput;\n * for passwords, use PasswordInput instead. A `label` is required.\n *\n * @summary An input for entering a one-time password (OTP).\n */\nexport const VerificationInput = forwardRef<VerificationInputElement, VerificationInputProps>(\n (props, ref) => {\n const {\n className,\n disabled,\n readOnly,\n label,\n labelVariant,\n helperText,\n validationText,\n validationStatus,\n required,\n id: providedId,\n 'aria-describedby': ariaDescribedby,\n ...verificationInputProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'verification-input',\n });\n\n const showValidation = Boolean(!readOnly && !disabled);\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n };\n\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n const PASSWORD_LENGTH = 6;\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <OneTimePasswordFieldPrimitive.Root\n className={`${componentClassName}Root`}\n disabled={disabled}\n readOnly={readOnly}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n data-validation-status={showValidation ? validationStatus : undefined}\n {...verificationInputProps}\n >\n {Array.from({ length: PASSWORD_LENGTH }).map((_, i) => (\n <OneTimePasswordFieldPrimitive.Input key={i} asChild>\n <InputBase />\n </OneTimePasswordFieldPrimitive.Input>\n ))}\n\n <OneTimePasswordFieldPrimitive.HiddenInput ref={ref} />\n </OneTimePasswordFieldPrimitive.Root>\n </FormField>\n );\n }\n);\n\nVerificationInput.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-YEZ6N62U.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkBB2SOLJScjs = require('./chunk-BB2SOLJS.cjs');var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkDLU27EEOcjs = require('./chunk-DLU27EEO.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var b="Pagination",s=_chunk4Q432K4Wcjs.b.call(void 0, b),m="...",M=7,_=(a,i)=>{if(i<=M)return Array.from({length:i},(r,d)=>d+1);let e=[],n=a<=4,t=a>i-4;return n?(e.push(1,2,3,4,5),e.push(m),e.push(i)):t?(e.push(1),e.push(m),e.push(i-4,i-3,i-2,i-1,i)):(e.push(1),e.push(m),e.push(a-1,a,a+1),e.push(m),e.push(i)),e},w= exports.a =_react.forwardRef.call(void 0, (a,i)=>{let{className:e,currentPage:n,totalPages:t,onPageChange:r,condensed:d=!1,hideSkipButtons:u=!1,as:C="div",...g}=_chunkZPJNQBTNcjs.a.call(void 0, a,_chunkOB7O3UFLcjs.a),B=_(n,t),P=()=>{n>1&&r(n-1)},E=()=>{n<t&&r(n+1)},k=()=>{n!==1&&r(1)},L=()=>{n!==t&&r(t)};return _jsxruntime.jsx.call(void 0, _radixui.Slot.Root,{ref:i,"aria-label":"pagination",className:_chunkONNSZMWFcjs.a.call(void 0, s,e),"data-testid":s,...g,children:_jsxruntime.jsx.call(void 0, C,{children:_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Container`,children:[_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Controllers`,children:[!u&&_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to first page",onClick:k,disabled:n===1,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SkipFirstSmallIcon,{})}),_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to previous page",onClick:P,disabled:n===1,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronLeftSmallIcon,{})})]}),d?_jsxruntime.jsxs.call(void 0, _chunkDLU27EEOcjs.a,{size:"md",color:"primary",children:["Page ",n," of ",t]}):_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, "ol",{className:`${s}Pages`,children:B.map((l,$)=>{if(l===m)return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, _chunkDLU27EEOcjs.a,{size:"md",color:"primary",className:`${s}Ellipsis`,children:m})},`ellipsis-${$}`);let h=l===n;return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, _chunkBB2SOLJScjs.a,{className:`${s}Page`,variant:"ghost",colorScheme:"functional",onClick:()=>r(l),"data-active":h?"":void 0,"aria-label":`Go to page ${l}`,"aria-current":h?"page":void 0,children:l})},l)})})}),_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Controllers`,children:[_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to next page",onClick:E,disabled:n===t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{})}),!u&&_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to last page",onClick:L,disabled:n===t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SkipLastSmallIcon,{})})]})]})})})});w.displayName=b;exports.a = w;
|
|
4
|
-
//# sourceMappingURL=chunk-YEZ6N62U.cjs.map
|
package/dist/chunk-YMTA7AWP.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkTTW4NON4cjs = require('./chunk-TTW4NON4.cjs');var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _useMergedRefs = require('@base-ui/utils/useMergedRefs');var _jsxruntime = require('react/jsx-runtime');var w="PasswordInput",I=_chunk4Q432K4Wcjs.b.call(void 0, w),L= exports.a =_react.forwardRef.call(void 0, ({className:E,disabled:r,id:v,...M},P)=>{let e=_react.useRef.call(void 0, null),S=_useMergedRefs.useMergedRefs.call(void 0, P,e),[s,l]=_react.useState.call(void 0, !1),[i,a]=_react.useState.call(void 0, !1),h=_react.useCallback.call(void 0, ()=>{let t=!s,n=!i;l(t),a(n)},[s,i]);_react.useEffect.call(void 0, ()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let n=()=>{_optionalChain([t, 'optionalAccess', _ => _.type])&&(t.type="password",l(!1))};return t&&t.form!==null&&t.form.addEventListener("submit",n),()=>{_optionalChain([t, 'optionalAccess', _2 => _2.form])&&t.form.removeEventListener("submit",n)}},[e]);let g=`Your password is ${s?"shown":"hidden"}!`;_react.useEffect.call(void 0, ()=>{setTimeout(()=>{a(!1)},1500)},[i]);let{id:O}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:v,prefix:"password-input"});return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkTTW4NON4cjs.a,{ref:S,className:_chunkONNSZMWFcjs.a.call(void 0, I,E),type:s?"text":"password",disabled:r,id:O,"data-testid":I,...M,children:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{type:"button",label:"toggle password visibility",onClick:h,disabled:r,"aria-pressed":s,children:s?_jsxruntime.jsx.call(void 0, _hearthreacticons.EyeSmallIcon,{}):_jsxruntime.jsx.call(void 0, _hearthreacticons.EyeOffSmallIcon,{})})})}),_jsxruntime.jsx.call(void 0, "div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status",children:i?g:""})]})});L.displayName=w;exports.a = L;
|
|
4
|
-
//# sourceMappingURL=chunk-YMTA7AWP.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-YMTA7AWP.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","PasswordInput","forwardRef","className","disabled","providedId","props","forwardedRef","internalRef","useRef","inputRef","useMergedRefs","visible","setVisible","useState","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","useCallback","newVisibilityState","newVisibilityMessageState","useEffect","currentElement","handleSubmit","visibilityMessage","id","useIds","jsxs","Fragment","jsx","TextInput","cn","InputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"],"mappings":"AAAA,ylBAAY;AACZ;AACA,wDAAwC,wDAAyC,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AUiB,6BAAAA,8BAACK,CAAA,CAAA,CAAa,CAAA,CAAKL,6BAAAA,iCAACM,CAAA,CAAA,CAAgB,CAAA,CACjD,CAAA,CACF,CAAA,CACF,CAAA,CACAN,6BAAAA,KAAC,CAAA,CAAI,sBAAA,CAAoB,CAAA,CAAA,CAAC,WAAA,CAAU,WAAA,CAAY,IAAA,CAAK,QAAA,CAClD,QAAA,CAAAd,CAAAA,CAAwBS,CAAAA,CAAoB,EAAA,CAC/C,CAAA,CAAA,CACF,CAEJ,CACF,CAAA,CAEAvB,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-YMTA7AWP.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport { forwardRef, useRef, useState, useCallback, useEffect } from 'react';\nimport type { RefObject } from 'react';\nimport type { PasswordInputProps } from './PasswordInput.props';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { EyeOffSmallIcon, EyeSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport type { InputBaseElement } from '../InputBase/InputBase';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\n\nconst COMPONENT_NAME = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use PasswordInput to securely collect a user's password, with a built-in\n * control for toggling visibility of the entered value. It automatically\n * resets to hidden when its parent form is submitted. For general text entry\n * use TextInput instead, and for search input use SearchInput.\n *\n * @summary An input for securely entering a password, with a visibility toggle.\n */\nexport const PasswordInput = forwardRef<InputBaseElement, PasswordInputProps>(\n ({ className, disabled, id: providedId, ...props }, forwardedRef) => {\n const internalRef = useRef<HTMLInputElement | null>(null);\n const inputRef = useMergedRefs(forwardedRef, internalRef);\n\n const [visible, setVisible] = useState(false);\n const [showVisibilityMessage, setShowVisibilityMessage] = useState(false);\n\n const handleVisibility = useCallback(() => {\n const newVisibilityState = !visible;\n const newVisibilityMessageState = !showVisibilityMessage;\n setVisible(newVisibilityState);\n setShowVisibilityMessage(newVisibilityMessageState);\n }, [visible, showVisibilityMessage]);\n\n // If the PasswordInput is inside a form we should switch the input type\n // back to password when its parent form is submitted\n useEffect(() => {\n // Get the ref value and ensure proper typing\n let currentElement: HTMLInputElement | null = null;\n if (internalRef && typeof internalRef === 'object' && internalRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = internalRef as RefObject<HTMLInputElement>;\n currentElement = refObject.current;\n }\n\n const handleSubmit = () => {\n if (currentElement?.type) {\n currentElement.type = 'password';\n setVisible(false);\n }\n };\n\n if (currentElement && currentElement.form !== null) {\n currentElement.form.addEventListener('submit', handleSubmit);\n }\n return () => {\n if (currentElement?.form) {\n currentElement.form.removeEventListener('submit', handleSubmit);\n }\n };\n }, [internalRef]);\n\n const visibilityMessage = `Your password is ${visible ? 'shown' : 'hidden'}!`;\n\n useEffect(() => {\n setTimeout(() => {\n setShowVisibilityMessage(false);\n }, 1500);\n }, [showVisibilityMessage]);\n\n const { id } = useIds({ providedId, prefix: 'password-input' });\n\n return (\n <>\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type={visible ? 'text' : 'password'}\n disabled={disabled}\n id={id}\n data-testid={componentClassName}\n {...props}\n >\n <InputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"toggle password visibility\"\n onClick={handleVisibility}\n disabled={disabled}\n aria-pressed={visible}\n >\n {visible ? <EyeSmallIcon /> : <EyeOffSmallIcon />}\n </UnstyledIconButton>\n </InputSlot>\n </TextInput>\n <div data-visually-hidden aria-live=\"assertive\" role=\"status\">\n {showVisibilityMessage ? visibilityMessage : ''}\n </div>\n </>\n );\n }\n);\n\nPasswordInput.displayName = COMPONENT_NAME;\n"]}
|
package/dist/chunk-Z6QLCWLT.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import{a as w}from"./chunk-Y2QJQIJP.js";import{a as h}from"./chunk-XVM5ECBR.js";import{a as u}from"./chunk-OPPG3NOC.js";import{a as b}from"./chunk-7X24J4CX.js";import{a as p}from"./chunk-KGEVWEVL.js";import{a as d}from"./chunk-J3AJBV4B.js";import{b as f}from"./chunk-PDEVCIQ3.js";import{Switch as S}from"radix-ui";import{CloseSmallIcon as L,TickSmallIcon as M}from"@utilitywarehouse/hearth-react-icons";import{forwardRef as O,useRef as x,useEffect as B}from"react";import{jsx as n,jsxs as E}from"react/jsx-runtime";var v="Switch",o=f(v),g=O(({...C},N)=>{let{className:P,label:r,id:R,"aria-labelledby":T,disabled:e,onCheckedChange:y,...k}=p(C,w,u),{id:l,labelId:c}=b({providedId:R,prefix:"switch"}),a=!!r,I=x(null),t=N||I;return B(()=>{let s=m=>{m.preventDefault()},i=null;return t&&typeof t=="object"&&t.current&&(i=t.current),i&&e&&i.addEventListener("click",s),()=>{i&&i.removeEventListener("click",s)}},[t,e]),E("div",{"aria-disabled":e||void 0,className:o,"data-testid":o,children:[a?n(h,{as:"label",size:"lg",id:c,htmlFor:l,children:r}):null,n(S.Root,{ref:t,className:d(`${o}Root`,P),id:l,"aria-labelledby":T??(a?c:void 0),"aria-disabled":e||void 0,"data-disabled":e||void 0,onCheckedChange:e?void 0:y,...k,children:E(S.Thumb,{className:`${o}Thumb`,children:[n(L,{className:`${o}CloseIcon`}),n(M,{className:`${o}TickIcon`})]})})]})});g.displayName=v;export{g as a};
|
|
4
|
-
//# sourceMappingURL=chunk-Z6QLCWLT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { switchPropDefs } from './Switch.props';\nimport type { SwitchProps } from './Switch.props';\nimport { cn } from '../../helpers/cn';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\nimport { extractProps } from '../../helpers/extract-props';\nimport { CloseSmallIcon, TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { BodyText } from '../BodyText/BodyText';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { forwardRef, useRef, useEffect } from 'react';\nimport type { ComponentRef, RefObject } from 'react';\n\nconst COMPONENT_NAME = 'Switch';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype SwitchElement = ComponentRef<'button'>;\n\n/**\n * Use Switch to let users toggle a single setting on or off immediately,\n * such as activating or deactivating a feature. For choosing between more\n * than two related options, use ToggleGroup or SegmentedControl instead.\n * Always provide a `label`, or otherwise label the component for screen\n * reader users if the visible `label` prop isn't used.\n *\n * @summary A toggle control for switching a single setting on or off.\n */\nexport const Switch = forwardRef<SwitchElement, SwitchProps>(({ ...props }, forwardedRef) => {\n const {\n className,\n label,\n id: providedId,\n 'aria-labelledby': ariaLabelledby,\n disabled,\n onCheckedChange,\n ...switchProps\n } = extractProps(props, switchPropDefs, marginPropDefs);\n const { id, labelId } = useIds({ providedId, prefix: 'switch' });\n const showLabel = !!label;\n const internalRef = useRef<HTMLButtonElement | null>(null);\n const switchRef = forwardedRef || internalRef;\n\n // We're using aria-disabled rather than disabled, so that the element can\n // still be focused with a keyboard. Therefore we need to prevent the\n // internal button from being clickable when the component is disabled.\n useEffect(() => {\n const handleClick = (e: MouseEvent) => {\n e.preventDefault();\n };\n\n // Get the ref value and ensure proper typing\n let currentElement: HTMLButtonElement | null = null;\n if (switchRef && typeof switchRef === 'object' && switchRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = switchRef as RefObject<HTMLButtonElement>;\n currentElement = refObject.current;\n }\n\n if (currentElement && disabled) {\n currentElement.addEventListener('click', handleClick);\n }\n\n return () => {\n if (currentElement) {\n currentElement.removeEventListener('click', handleClick);\n }\n };\n }, [switchRef, disabled]);\n\n return (\n <div\n aria-disabled={disabled || undefined}\n className={componentClassName}\n data-testid={componentClassName}\n >\n {showLabel ? (\n <BodyText as=\"label\" size=\"lg\" id={labelId} htmlFor={id}>\n {label}\n </BodyText>\n ) : null}\n <SwitchPrimitive.Root\n ref={switchRef}\n className={cn(`${componentClassName}Root`, className)}\n id={id}\n aria-labelledby={ariaLabelledby ?? (showLabel ? labelId : undefined)}\n aria-disabled={disabled || undefined}\n data-disabled={disabled || undefined}\n onCheckedChange={disabled ? undefined : onCheckedChange}\n {...switchProps}\n >\n <SwitchPrimitive.Thumb className={`${componentClassName}Thumb`}>\n <CloseSmallIcon className={`${componentClassName}CloseIcon`} />\n <TickSmallIcon className={`${componentClassName}TickIcon`} />\n </SwitchPrimitive.Thumb>\n </SwitchPrimitive.Root>\n </div>\n );\n});\n\nSwitch.displayName = COMPONENT_NAME;\n"],"mappings":";;wRAMA,OAAS,UAAUA,MAAuB,WAE1C,OAAS,kBAAAC,EAAgB,iBAAAC,MAAqB,uCAI9C,OAAS,cAAAC,EAAY,UAAAC,EAAQ,aAAAC,MAAiB,QAkEtC,cAAAC,EAcA,QAAAC,MAdA,oBA/DR,IAAMC,EAAiB,SACjBC,EAAqBC,EAAiBF,CAAc,EAa7CG,EAASR,EAAuC,CAAC,CAAE,GAAGS,CAAM,EAAGC,IAAiB,CAC3F,GAAM,CACJ,UAAAC,EACA,MAAAC,EACA,GAAIC,EACJ,kBAAmBC,EACnB,SAAAC,EACA,gBAAAC,EACA,GAAGC,CACL,EAAIC,EAAaT,EAAOU,EAAgBC,CAAc,EAChD,CAAE,GAAAC,EAAI,QAAAC,CAAQ,EAAIC,EAAO,CAAE,WAAAV,EAAY,OAAQ,QAAS,CAAC,EACzDW,EAAY,CAAC,CAACZ,EACda,EAAcxB,EAAiC,IAAI,EACnDyB,EAAYhB,GAAgBe,EAKlC,OAAAvB,EAAU,IAAM,CACd,IAAMyB,EAAeC,GAAkB,CACrCA,EAAE,eAAe,CACnB,EAGIC,EAA2C,KAC/C,OAAIH,GAAa,OAAOA,GAAc,UAAYA,EAAU,UAG1DG,EADkBH,EACS,SAGzBG,GAAkBd,GACpBc,EAAe,iBAAiB,QAASF,CAAW,EAG/C,IAAM,CACPE,GACFA,EAAe,oBAAoB,QAASF,CAAW,CAE3D,CACF,EAAG,CAACD,EAAWX,CAAQ,CAAC,EAGtBX,EAAC,OACC,gBAAeW,GAAY,OAC3B,UAAWT,EACX,cAAaA,EAEZ,UAAAkB,EACCrB,EAAC2B,EAAA,CAAS,GAAG,QAAQ,KAAK,KAAK,GAAIR,EAAS,QAASD,EAClD,SAAAT,EACH,EACE,KACJT,EAAC4B,EAAgB,KAAhB,CACC,IAAKL,EACL,UAAWM,EAAG,GAAG1B,CAAkB,OAAQK,CAAS,EACpD,GAAIU,EACJ,kBAAiBP,IAAmBU,EAAYF,EAAU,QAC1D,gBAAeP,GAAY,OAC3B,gBAAeA,GAAY,OAC3B,gBAAiBA,EAAW,OAAYC,EACvC,GAAGC,EAEJ,SAAAb,EAAC2B,EAAgB,MAAhB,CAAsB,UAAW,GAAGzB,CAAkB,QACrD,UAAAH,EAAC8B,EAAA,CAAe,UAAW,GAAG3B,CAAkB,YAAa,EAC7DH,EAAC+B,EAAA,CAAc,UAAW,GAAG5B,CAAkB,WAAY,GAC7D,EACF,GACF,CAEJ,CAAC,EAEDE,EAAO,YAAcH","names":["SwitchPrimitive","CloseSmallIcon","TickSmallIcon","forwardRef","useRef","useEffect","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","Switch","props","forwardedRef","className","label","providedId","ariaLabelledby","disabled","onCheckedChange","switchProps","extractProps","switchPropDefs","marginPropDefs","id","labelId","useIds","showLabel","internalRef","switchRef","handleClick","e","currentElement","BodyText","SwitchPrimitive","cn","CloseSmallIcon","TickSmallIcon"]}
|
package/dist/chunk-ZMDXNCUJ.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
|
|
3
|
-
var _chunkMZMYW4KCcjs = require('./chunk-MZMYW4KC.cjs');var _chunkWSD52THLcjs = require('./chunk-WSD52THL.cjs');var _chunkRAIRXO6Fcjs = require('./chunk-RAIRXO6F.cjs');var _chunkQKGE3FJXcjs = require('./chunk-QKGE3FJX.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var v="Radio",e=_chunk4Q432K4Wcjs.b.call(void 0, v),F= exports.a =_react.forwardRef.call(void 0, ({id:w,label:i,helperText:r,image:x,className:N,labelFontWeight:g,disabled:a,"aria-labelledby":d,...I},G)=>{let{id:s,labelId:m,helperTextId:n}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:w,prefix:"radio"}),{hasGroupHelperText:P,"aria-describedby":C}=_chunkWSD52THLcjs.c.call(void 0, ),l=!P&&r!==void 0,T=!!i;return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkONNSZMWFcjs.a.call(void 0, e,N),"data-testid":e,"data-disabled":a?!0:void 0,children:[_jsxruntime.jsx.call(void 0, "div",{className:`${e}Container`,children:_jsxruntime.jsx.call(void 0, _radixui.RadioGroup.Item,{ref:G,...I,disabled:a,id:s,"aria-describedby":l?n:C,"aria-labelledby":d||(i?m:void 0),className:`${e}Item`,children:_jsxruntime.jsx.call(void 0, _radixui.RadioGroup.Indicator,{className:`${e}Indicator`})})}),T?_jsxruntime.jsxs.call(void 0, _chunkQKGE3FJXcjs.a,{direction:"column",gap:"50",children:[_jsxruntime.jsxs.call(void 0, _chunkMZMYW4KCcjs.a,{id:m,htmlFor:s,disableUserSelect:!0,fontWeight:g,children:[x,i]}),l?_jsxruntime.jsx.call(void 0, _chunkRAIRXO6Fcjs.a,{id:n,disableUserSelect:!0,children:r}):null]}):null]})});F.displayName=v;exports.a = F;
|
|
4
|
-
//# sourceMappingURL=chunk-ZMDXNCUJ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZMDXNCUJ.cjs","../src/components/Radio/Radio.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Radio","forwardRef","providedId","label","helperText","image","className","labelFontWeight","disabled","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","showLabel","jsxs","cn","jsx"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCAnQ,mCAIuB,+CA8DtC,IAtDNA,CAAAA,CAAiB,OAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAY7CC,CAAAA,aAAQC,+BAAAA,CAEjB,CACE,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAb,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAc,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAiB,CAC/EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBZ,CAAAA,GAAe,KAAA,CAAA,CAC/DgB,CAAAA,CAAY,CAAC,CAACjB,CAAAA,CACpB,OACEkB,8BAAAA,KAAC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAGxB,CAAoBQ,CAAS,CAAA,CAC3C,aAAA,CAAaR,CAAAA,CACb,eAAA,CAAeU,CAAAA,CAAW,CAAA,CAAA,CAAO,KAAA,CAAA,CAEjC,QAAA,CAAA,CAAAe,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZMDXNCUJ.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { RadioProps } from './Radio.props';\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { useIds } from '../../hooks/use-ids';\nimport { HelperText } from '../HelperText/HelperText';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst COMPONENT_NAME = 'Radio';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype RadioElement = ComponentRef<'button'>;\n\n/**\n * Use Radio to let a user select a single option from a set of mutually\n * exclusive choices, always as a child of RadioGroup. RadioTile is preferred\n * for most cases as it offers a larger, more prominent target — reach for\n * Radio only when a compact, plain radio button is needed.\n *\n * @summary A single radio button for selecting one option from a set, used within RadioGroup.\n */\nexport const Radio = forwardRef<RadioElement, RadioProps>(\n (\n {\n id: providedId,\n label,\n helperText,\n image,\n className,\n labelFontWeight,\n disabled,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n const showLabel = !!label;\n return (\n <div\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n data-disabled={disabled ? true : undefined}\n >\n <div className={`${componentClassName}Container`}>\n <RadioGroupPrimitive.Item\n ref={ref}\n {...props}\n // We're not following the same pattern as Button here, where we\n // use `aria-disabled` instead, as focusing the radio item\n // selects it. Screen readers users can still navigate to the\n // radio item using the virtual keyboard. At the same time\n // keyboard users will not need to tab through disabled radio\n // items, which is the expected behavior for radio groups.\n disabled={disabled}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n className={`${componentClassName}Item`}\n >\n <RadioGroupPrimitive.Indicator className={`${componentClassName}Indicator`} />\n </RadioGroupPrimitive.Item>\n </div>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label id={labelId} htmlFor={id} disableUserSelect fontWeight={labelFontWeight}>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </div>\n );\n }\n);\n\nRadio.displayName = COMPONENT_NAME;\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|