@metamask/design-system-react 0.20.0 → 0.22.0
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/CHANGELOG.md +25 -1
- package/dist/components/AvatarGroup/AvatarGroup.cjs +18 -13
- package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.cjs +16 -17
- package/dist/components/AvatarGroup/AvatarGroup.constants.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.cts +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.mts +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.mjs +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.constants.mjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.cts +8 -21
- package/dist/components/AvatarGroup/AvatarGroup.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.mts +8 -21
- package/dist/components/AvatarGroup/AvatarGroup.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.mjs +9 -4
- package/dist/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.d.cts +7 -24
- package/dist/components/AvatarGroup/AvatarGroup.types.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.d.mts +7 -24
- package/dist/components/AvatarGroup/AvatarGroup.types.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.mjs.map +1 -1
- package/dist/components/AvatarGroup/index.cjs +3 -3
- package/dist/components/AvatarGroup/index.cjs.map +1 -1
- package/dist/components/AvatarGroup/index.d.cts +1 -1
- package/dist/components/AvatarGroup/index.d.cts.map +1 -1
- package/dist/components/AvatarGroup/index.d.mts +1 -1
- package/dist/components/AvatarGroup/index.d.mts.map +1 -1
- package/dist/components/AvatarGroup/index.mjs +1 -1
- package/dist/components/AvatarGroup/index.mjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.cjs +43 -0
- package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.d.cts +4 -0
- package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.d.mts +4 -0
- package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.mjs +24 -0
- package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.cjs +3 -0
- package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.cts +51 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.mts +51 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.mjs +2 -0
- package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -0
- package/dist/components/HeaderBase/index.cjs +6 -0
- package/dist/components/HeaderBase/index.cjs.map +1 -0
- package/dist/components/HeaderBase/index.d.cts +3 -0
- package/dist/components/HeaderBase/index.d.cts.map +1 -0
- package/dist/components/HeaderBase/index.d.mts +3 -0
- package/dist/components/HeaderBase/index.d.mts.map +1 -0
- package/dist/components/HeaderBase/index.mjs +2 -0
- package/dist/components/HeaderBase/index.mjs.map +1 -0
- package/dist/components/Icon/icons/Candlestick.cjs +1 -1
- package/dist/components/Icon/icons/Candlestick.cjs.map +1 -1
- package/dist/components/Icon/icons/Candlestick.mjs +1 -1
- package/dist/components/Icon/icons/Candlestick.mjs.map +1 -1
- package/dist/components/Icon/icons/Group.cjs +32 -0
- package/dist/components/Icon/icons/Group.cjs.map +1 -0
- package/dist/components/Icon/icons/Group.d.cts +4 -0
- package/dist/components/Icon/icons/Group.d.cts.map +1 -0
- package/dist/components/Icon/icons/Group.d.mts +4 -0
- package/dist/components/Icon/icons/Group.d.mts.map +1 -0
- package/dist/components/Icon/icons/Group.mjs +7 -0
- package/dist/components/Icon/icons/Group.mjs.map +1 -0
- package/dist/components/Icon/icons/ListArrow.cjs +32 -0
- package/dist/components/Icon/icons/ListArrow.cjs.map +1 -0
- package/dist/components/Icon/icons/ListArrow.d.cts +4 -0
- package/dist/components/Icon/icons/ListArrow.d.cts.map +1 -0
- package/dist/components/Icon/icons/ListArrow.d.mts +4 -0
- package/dist/components/Icon/icons/ListArrow.d.mts.map +1 -0
- package/dist/components/Icon/icons/ListArrow.mjs +7 -0
- package/dist/components/Icon/icons/ListArrow.mjs.map +1 -0
- package/dist/components/Icon/icons/Merge.cjs +32 -0
- package/dist/components/Icon/icons/Merge.cjs.map +1 -0
- package/dist/components/Icon/icons/Merge.d.cts +4 -0
- package/dist/components/Icon/icons/Merge.d.cts.map +1 -0
- package/dist/components/Icon/icons/Merge.d.mts +4 -0
- package/dist/components/Icon/icons/Merge.d.mts.map +1 -0
- package/dist/components/Icon/icons/Merge.mjs +7 -0
- package/dist/components/Icon/icons/Merge.mjs.map +1 -0
- package/dist/components/Icon/icons/Musd.cjs +32 -0
- package/dist/components/Icon/icons/Musd.cjs.map +1 -0
- package/dist/components/Icon/icons/Musd.d.cts +4 -0
- package/dist/components/Icon/icons/Musd.d.cts.map +1 -0
- package/dist/components/Icon/icons/Musd.d.mts +4 -0
- package/dist/components/Icon/icons/Musd.d.mts.map +1 -0
- package/dist/components/Icon/icons/Musd.mjs +7 -0
- package/dist/components/Icon/icons/Musd.mjs.map +1 -0
- package/dist/components/Icon/icons/MusdFilled.cjs +32 -0
- package/dist/components/Icon/icons/MusdFilled.cjs.map +1 -0
- package/dist/components/Icon/icons/MusdFilled.d.cts +4 -0
- package/dist/components/Icon/icons/MusdFilled.d.cts.map +1 -0
- package/dist/components/Icon/icons/MusdFilled.d.mts +4 -0
- package/dist/components/Icon/icons/MusdFilled.d.mts.map +1 -0
- package/dist/components/Icon/icons/MusdFilled.mjs +7 -0
- package/dist/components/Icon/icons/MusdFilled.mjs.map +1 -0
- package/dist/components/Icon/icons/PieChart.cjs +32 -0
- package/dist/components/Icon/icons/PieChart.cjs.map +1 -0
- package/dist/components/Icon/icons/PieChart.d.cts +4 -0
- package/dist/components/Icon/icons/PieChart.d.cts.map +1 -0
- package/dist/components/Icon/icons/PieChart.d.mts +4 -0
- package/dist/components/Icon/icons/PieChart.d.mts.map +1 -0
- package/dist/components/Icon/icons/PieChart.mjs +7 -0
- package/dist/components/Icon/icons/PieChart.mjs.map +1 -0
- package/dist/components/Icon/icons/Predictions.cjs +32 -0
- package/dist/components/Icon/icons/Predictions.cjs.map +1 -0
- package/dist/components/Icon/icons/Predictions.d.cts +4 -0
- package/dist/components/Icon/icons/Predictions.d.cts.map +1 -0
- package/dist/components/Icon/icons/Predictions.d.mts +4 -0
- package/dist/components/Icon/icons/Predictions.d.mts.map +1 -0
- package/dist/components/Icon/icons/Predictions.mjs +7 -0
- package/dist/components/Icon/icons/Predictions.mjs.map +1 -0
- package/dist/components/Icon/icons/index.cjs +14 -0
- package/dist/components/Icon/icons/index.cjs.map +1 -1
- package/dist/components/Icon/icons/index.d.cts +7 -0
- package/dist/components/Icon/icons/index.d.cts.map +1 -1
- package/dist/components/Icon/icons/index.d.mts +7 -0
- package/dist/components/Icon/icons/index.d.mts.map +1 -1
- package/dist/components/Icon/icons/index.mjs +14 -0
- package/dist/components/Icon/icons/index.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +4 -3
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.cts +1 -5
- package/dist/components/Input/Input.d.cts.map +1 -1
- package/dist/components/Input/Input.d.mts +1 -5
- package/dist/components/Input/Input.d.mts.map +1 -1
- package/dist/components/Input/Input.mjs +4 -3
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/Input.types.cjs.map +1 -1
- package/dist/components/Input/Input.types.d.cts +2 -20
- package/dist/components/Input/Input.types.d.cts.map +1 -1
- package/dist/components/Input/Input.types.d.mts +2 -20
- package/dist/components/Input/Input.types.d.mts.map +1 -1
- package/dist/components/Input/Input.types.mjs.map +1 -1
- package/dist/components/Modal/Modal.cjs +49 -0
- package/dist/components/Modal/Modal.cjs.map +1 -0
- package/dist/components/Modal/Modal.context.cjs +14 -0
- package/dist/components/Modal/Modal.context.cjs.map +1 -0
- package/dist/components/Modal/Modal.context.d.cts +6 -0
- package/dist/components/Modal/Modal.context.d.cts.map +1 -0
- package/dist/components/Modal/Modal.context.d.mts +6 -0
- package/dist/components/Modal/Modal.context.d.mts.map +1 -0
- package/dist/components/Modal/Modal.context.mjs +10 -0
- package/dist/components/Modal/Modal.context.mjs.map +1 -0
- package/dist/components/Modal/Modal.d.cts +4 -0
- package/dist/components/Modal/Modal.d.cts.map +1 -0
- package/dist/components/Modal/Modal.d.mts +4 -0
- package/dist/components/Modal/Modal.d.mts.map +1 -0
- package/dist/components/Modal/Modal.mjs +30 -0
- package/dist/components/Modal/Modal.mjs.map +1 -0
- package/dist/components/Modal/Modal.types.cjs +3 -0
- package/dist/components/Modal/Modal.types.cjs.map +1 -0
- package/dist/components/Modal/Modal.types.d.cts +64 -0
- package/dist/components/Modal/Modal.types.d.cts.map +1 -0
- package/dist/components/Modal/Modal.types.d.mts +64 -0
- package/dist/components/Modal/Modal.types.d.mts.map +1 -0
- package/dist/components/Modal/Modal.types.mjs +2 -0
- package/dist/components/Modal/Modal.types.mjs.map +1 -0
- package/dist/components/Modal/index.cjs +8 -0
- package/dist/components/Modal/index.cjs.map +1 -0
- package/dist/components/Modal/index.d.cts +5 -0
- package/dist/components/Modal/index.d.cts.map +1 -0
- package/dist/components/Modal/index.d.mts +5 -0
- package/dist/components/Modal/index.d.mts.map +1 -0
- package/dist/components/Modal/index.mjs +3 -0
- package/dist/components/Modal/index.mjs.map +1 -0
- package/dist/components/ModalBody/ModalBody.cjs +32 -0
- package/dist/components/ModalBody/ModalBody.cjs.map +1 -0
- package/dist/components/ModalBody/ModalBody.d.cts +4 -0
- package/dist/components/ModalBody/ModalBody.d.cts.map +1 -0
- package/dist/components/ModalBody/ModalBody.d.mts +4 -0
- package/dist/components/ModalBody/ModalBody.d.mts.map +1 -0
- package/dist/components/ModalBody/ModalBody.mjs +13 -0
- package/dist/components/ModalBody/ModalBody.mjs.map +1 -0
- package/dist/components/ModalBody/ModalBody.types.cjs +3 -0
- package/dist/components/ModalBody/ModalBody.types.cjs.map +1 -0
- package/dist/components/ModalBody/ModalBody.types.d.cts +13 -0
- package/dist/components/ModalBody/ModalBody.types.d.cts.map +1 -0
- package/dist/components/ModalBody/ModalBody.types.d.mts +13 -0
- package/dist/components/ModalBody/ModalBody.types.d.mts.map +1 -0
- package/dist/components/ModalBody/ModalBody.types.mjs +2 -0
- package/dist/components/ModalBody/ModalBody.types.mjs.map +1 -0
- package/dist/components/ModalBody/index.cjs +6 -0
- package/dist/components/ModalBody/index.cjs.map +1 -0
- package/dist/components/ModalBody/index.d.cts +3 -0
- package/dist/components/ModalBody/index.d.cts.map +1 -0
- package/dist/components/ModalBody/index.d.mts +3 -0
- package/dist/components/ModalBody/index.d.mts.map +1 -0
- package/dist/components/ModalBody/index.mjs +2 -0
- package/dist/components/ModalBody/index.mjs.map +1 -0
- package/dist/components/ModalContent/ModalContent.cjs +73 -0
- package/dist/components/ModalContent/ModalContent.cjs.map +1 -0
- package/dist/components/ModalContent/ModalContent.constants.cjs +34 -0
- package/dist/components/ModalContent/ModalContent.constants.cjs.map +1 -0
- package/dist/components/ModalContent/ModalContent.constants.d.cts +31 -0
- package/dist/components/ModalContent/ModalContent.constants.d.cts.map +1 -0
- package/dist/components/ModalContent/ModalContent.constants.d.mts +31 -0
- package/dist/components/ModalContent/ModalContent.constants.d.mts.map +1 -0
- package/dist/components/ModalContent/ModalContent.constants.mjs +31 -0
- package/dist/components/ModalContent/ModalContent.constants.mjs.map +1 -0
- package/dist/components/ModalContent/ModalContent.d.cts +4 -0
- package/dist/components/ModalContent/ModalContent.d.cts.map +1 -0
- package/dist/components/ModalContent/ModalContent.d.mts +4 -0
- package/dist/components/ModalContent/ModalContent.d.mts.map +1 -0
- package/dist/components/ModalContent/ModalContent.mjs +54 -0
- package/dist/components/ModalContent/ModalContent.mjs.map +1 -0
- package/dist/components/ModalContent/ModalContent.types.cjs +15 -0
- package/dist/components/ModalContent/ModalContent.types.cjs.map +1 -0
- package/dist/components/ModalContent/ModalContent.types.d.cts +51 -0
- package/dist/components/ModalContent/ModalContent.types.d.cts.map +1 -0
- package/dist/components/ModalContent/ModalContent.types.d.mts +51 -0
- package/dist/components/ModalContent/ModalContent.types.d.mts.map +1 -0
- package/dist/components/ModalContent/ModalContent.types.mjs +12 -0
- package/dist/components/ModalContent/ModalContent.types.mjs.map +1 -0
- package/dist/components/ModalContent/index.cjs +10 -0
- package/dist/components/ModalContent/index.cjs.map +1 -0
- package/dist/components/ModalContent/index.d.cts +5 -0
- package/dist/components/ModalContent/index.d.cts.map +1 -0
- package/dist/components/ModalContent/index.d.mts +5 -0
- package/dist/components/ModalContent/index.d.mts.map +1 -0
- package/dist/components/ModalContent/index.mjs +4 -0
- package/dist/components/ModalContent/index.mjs.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.cjs +56 -0
- package/dist/components/ModalFocus/ModalFocus.cjs.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.d.cts +4 -0
- package/dist/components/ModalFocus/ModalFocus.d.cts.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.d.mts +4 -0
- package/dist/components/ModalFocus/ModalFocus.d.mts.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.mjs +34 -0
- package/dist/components/ModalFocus/ModalFocus.mjs.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.types.cjs +3 -0
- package/dist/components/ModalFocus/ModalFocus.types.cjs.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.types.d.cts +36 -0
- package/dist/components/ModalFocus/ModalFocus.types.d.cts.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.types.d.mts +36 -0
- package/dist/components/ModalFocus/ModalFocus.types.d.mts.map +1 -0
- package/dist/components/ModalFocus/ModalFocus.types.mjs +2 -0
- package/dist/components/ModalFocus/ModalFocus.types.mjs.map +1 -0
- package/dist/components/ModalFocus/index.cjs +6 -0
- package/dist/components/ModalFocus/index.cjs.map +1 -0
- package/dist/components/ModalFocus/index.d.cts +3 -0
- package/dist/components/ModalFocus/index.d.cts.map +1 -0
- package/dist/components/ModalFocus/index.d.mts +3 -0
- package/dist/components/ModalFocus/index.d.mts.map +1 -0
- package/dist/components/ModalFocus/index.mjs +2 -0
- package/dist/components/ModalFocus/index.mjs.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.cjs +44 -0
- package/dist/components/ModalFooter/ModalFooter.cjs.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.d.cts +4 -0
- package/dist/components/ModalFooter/ModalFooter.d.cts.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.d.mts +4 -0
- package/dist/components/ModalFooter/ModalFooter.d.mts.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.mjs +25 -0
- package/dist/components/ModalFooter/ModalFooter.mjs.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.types.cjs +14 -0
- package/dist/components/ModalFooter/ModalFooter.types.cjs.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.types.d.cts +63 -0
- package/dist/components/ModalFooter/ModalFooter.types.d.cts.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.types.d.mts +63 -0
- package/dist/components/ModalFooter/ModalFooter.types.d.mts.map +1 -0
- package/dist/components/ModalFooter/ModalFooter.types.mjs +11 -0
- package/dist/components/ModalFooter/ModalFooter.types.mjs.map +1 -0
- package/dist/components/ModalFooter/index.cjs +8 -0
- package/dist/components/ModalFooter/index.cjs.map +1 -0
- package/dist/components/ModalFooter/index.d.cts +4 -0
- package/dist/components/ModalFooter/index.d.cts.map +1 -0
- package/dist/components/ModalFooter/index.d.mts +4 -0
- package/dist/components/ModalFooter/index.d.mts.map +1 -0
- package/dist/components/ModalFooter/index.mjs +3 -0
- package/dist/components/ModalFooter/index.mjs.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.cjs +32 -0
- package/dist/components/ModalOverlay/ModalOverlay.cjs.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.d.cts +4 -0
- package/dist/components/ModalOverlay/ModalOverlay.d.cts.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.d.mts +4 -0
- package/dist/components/ModalOverlay/ModalOverlay.d.mts.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.mjs +13 -0
- package/dist/components/ModalOverlay/ModalOverlay.mjs.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.cjs +3 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.cjs.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.d.cts +9 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.d.cts.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.d.mts +9 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.d.mts.map +1 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.mjs +2 -0
- package/dist/components/ModalOverlay/ModalOverlay.types.mjs.map +1 -0
- package/dist/components/ModalOverlay/index.cjs +6 -0
- package/dist/components/ModalOverlay/index.cjs.map +1 -0
- package/dist/components/ModalOverlay/index.d.cts +3 -0
- package/dist/components/ModalOverlay/index.d.cts.map +1 -0
- package/dist/components/ModalOverlay/index.d.mts +3 -0
- package/dist/components/ModalOverlay/index.d.mts.map +1 -0
- package/dist/components/ModalOverlay/index.mjs +2 -0
- package/dist/components/ModalOverlay/index.mjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +46 -0
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.cts +4 -0
- package/dist/components/Skeleton/Skeleton.d.cts.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.mts +4 -0
- package/dist/components/Skeleton/Skeleton.d.mts.map +1 -0
- package/dist/components/Skeleton/Skeleton.mjs +27 -0
- package/dist/components/Skeleton/Skeleton.mjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.cjs +3 -0
- package/dist/components/Skeleton/Skeleton.types.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.d.cts +38 -0
- package/dist/components/Skeleton/Skeleton.types.d.cts.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.d.mts +38 -0
- package/dist/components/Skeleton/Skeleton.types.d.mts.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.mjs +2 -0
- package/dist/components/Skeleton/Skeleton.types.mjs.map +1 -0
- package/dist/components/Skeleton/index.cjs +6 -0
- package/dist/components/Skeleton/index.cjs.map +1 -0
- package/dist/components/Skeleton/index.d.cts +3 -0
- package/dist/components/Skeleton/index.d.cts.map +1 -0
- package/dist/components/Skeleton/index.d.mts +3 -0
- package/dist/components/Skeleton/index.d.mts.map +1 -0
- package/dist/components/Skeleton/index.mjs +2 -0
- package/dist/components/Skeleton/index.mjs.map +1 -0
- package/dist/components/index.cjs +22 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +16 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +16 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +8 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/types/index.cjs +3 -15
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +0 -10
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +0 -10
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +0 -11
- package/dist/types/index.mjs.map +1 -1
- package/package.json +5 -4
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InputPropsShared } from "@metamask/design-system-shared";
|
|
2
2
|
import type { ComponentPropsWithoutRef } from "react";
|
|
3
|
-
export type InputProps = Omit<ComponentPropsWithoutRef<'input'>, 'disabled' | 'readOnly'> & {
|
|
4
|
-
/**
|
|
5
|
-
* Optional enum to select between Typography variants.
|
|
6
|
-
*
|
|
7
|
-
* @default TextVariant.BodyMd
|
|
8
|
-
*/
|
|
9
|
-
textVariant?: TextVariant;
|
|
10
|
-
/**
|
|
11
|
-
* Optional boolean to disable Input.
|
|
12
|
-
*
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Optional boolean to show readonly input.
|
|
18
|
-
*
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
isReadonly?: boolean;
|
|
3
|
+
export type InputProps = Omit<ComponentPropsWithoutRef<'input'>, 'defaultValue' | 'disabled' | 'readOnly' | 'value'> & InputPropsShared & {
|
|
22
4
|
/**
|
|
23
5
|
* Optional prop for additional CSS classes.
|
|
24
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uCAAuC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc;AAEtD,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,wBAAwB,CAAC,OAAO,CAAC,EACjC,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CACnD,GACC,gBAAgB,GAAG;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InputPropsShared } from "@metamask/design-system-shared";
|
|
2
2
|
import type { ComponentPropsWithoutRef } from "react";
|
|
3
|
-
export type InputProps = Omit<ComponentPropsWithoutRef<'input'>, 'disabled' | 'readOnly'> & {
|
|
4
|
-
/**
|
|
5
|
-
* Optional enum to select between Typography variants.
|
|
6
|
-
*
|
|
7
|
-
* @default TextVariant.BodyMd
|
|
8
|
-
*/
|
|
9
|
-
textVariant?: TextVariant;
|
|
10
|
-
/**
|
|
11
|
-
* Optional boolean to disable Input.
|
|
12
|
-
*
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Optional boolean to show readonly input.
|
|
18
|
-
*
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
isReadonly?: boolean;
|
|
3
|
+
export type InputProps = Omit<ComponentPropsWithoutRef<'input'>, 'defaultValue' | 'disabled' | 'readOnly' | 'value'> & InputPropsShared & {
|
|
22
4
|
/**
|
|
23
5
|
* Optional prop for additional CSS classes.
|
|
24
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uCAAuC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc;AAEtD,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,wBAAwB,CAAC,OAAO,CAAC,EACjC,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CACnD,GACC,gBAAgB,GAAG;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { InputPropsShared } from '@metamask/design-system-shared';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nexport type InputProps = Omit<\n ComponentPropsWithoutRef<'input'>,\n 'defaultValue' | 'disabled' | 'readOnly' | 'value'\n> &\n InputPropsShared & {\n /**\n * Optional prop for additional CSS classes.\n */\n className?: string;\n /**\n * Optional inline styles.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Modal = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const react_dom_1 = require("react-dom");
|
|
29
|
+
const tw_merge_1 = require("../../utils/tw-merge.cjs");
|
|
30
|
+
const Modal_context_1 = require("./Modal.context.cjs");
|
|
31
|
+
exports.Modal = (0, react_1.forwardRef)(({ className, isOpen, onClose, children, isClosedOnOutsideClick = true, isClosedOnEscapeKey = true, autoFocus = true, initialFocusRef, finalFocusRef, restoreFocus, ...props }, ref) => {
|
|
32
|
+
if (!isOpen) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const context = {
|
|
36
|
+
isOpen,
|
|
37
|
+
onClose,
|
|
38
|
+
isClosedOnOutsideClick,
|
|
39
|
+
isClosedOnEscapeKey,
|
|
40
|
+
autoFocus,
|
|
41
|
+
initialFocusRef,
|
|
42
|
+
finalFocusRef,
|
|
43
|
+
restoreFocus,
|
|
44
|
+
};
|
|
45
|
+
return (0, react_dom_1.createPortal)(react_1.default.createElement(Modal_context_1.ModalContext.Provider, { value: context },
|
|
46
|
+
react_1.default.createElement("div", { ref: ref, className: (0, tw_merge_1.twMerge)(className), ...props }, children)), document.body);
|
|
47
|
+
});
|
|
48
|
+
exports.Modal.displayName = 'Modal';
|
|
49
|
+
//# sourceMappingURL=Modal.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.cjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,yCAAyC;AAEzC,uDAA+C;AAE/C,uDAA+C;AAIlC,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CACE,EACE,SAAS,EACT,MAAM,EACN,OAAO,EACP,QAAQ,EACR,sBAAsB,GAAG,IAAI,EAC7B,mBAAmB,GAAG,IAAI,EAC1B,SAAS,GAAG,IAAI,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,MAAM,OAAO,GAAqB;QAChC,MAAM;QACN,OAAO;QACP,sBAAsB;QACtB,mBAAmB;QACnB,SAAS;QACT,eAAe;QACf,aAAa;QACb,YAAY;KACb,CAAC;IAEF,OAAO,IAAA,wBAAY,EACjB,8BAAC,4BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO;QACnC,uCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,kBAAO,EAAC,SAAS,CAAC,KAAM,KAAK,IACpD,QAAQ,CACL,CACgB,EACxB,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { twMerge } from '../../utils/tw-merge';\n\nimport { ModalContext } from './Modal.context';\nimport type { ModalContextType } from './Modal.context';\nimport type { ModalProps } from './Modal.types';\n\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n className,\n isOpen,\n onClose,\n children,\n isClosedOnOutsideClick = true,\n isClosedOnEscapeKey = true,\n autoFocus = true,\n initialFocusRef,\n finalFocusRef,\n restoreFocus,\n ...props\n },\n ref,\n ) => {\n if (!isOpen) {\n return null;\n }\n\n const context: ModalContextType = {\n isOpen,\n onClose,\n isClosedOnOutsideClick,\n isClosedOnEscapeKey,\n autoFocus,\n initialFocusRef,\n finalFocusRef,\n restoreFocus,\n };\n\n return createPortal(\n <ModalContext.Provider value={context}>\n <div ref={ref} className={twMerge(className)} {...props}>\n {children}\n </div>\n </ModalContext.Provider>,\n document.body,\n );\n },\n);\n\nModal.displayName = 'Modal';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useModalContext = exports.ModalContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.ModalContext = (0, react_1.createContext)(undefined);
|
|
6
|
+
const useModalContext = () => {
|
|
7
|
+
const context = (0, react_1.useContext)(exports.ModalContext);
|
|
8
|
+
if (!context) {
|
|
9
|
+
throw new Error('useModalContext must be used within a Modal — make sure the consuming component is rendered inside <Modal />.');
|
|
10
|
+
}
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
13
|
+
exports.useModalContext = useModalContext;
|
|
14
|
+
//# sourceMappingURL=Modal.context.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.context.cjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.context.ts"],"names":[],"mappings":";;;AAAA,iCAAkD;AAMrC,QAAA,YAAY,GAAG,IAAA,qBAAa,EACvC,SAAS,CACV,CAAC;AAEK,MAAM,eAAe,GAAG,GAAqB,EAAE;IACpD,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,oBAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,+GAA+G,CAChH,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B","sourcesContent":["import { createContext, useContext } from 'react';\n\nimport type { ModalProps } from './Modal.types';\n\nexport type ModalContextType = Omit<ModalProps, 'children'>;\n\nexport const ModalContext = createContext<ModalContextType | undefined>(\n undefined,\n);\n\nexport const useModalContext = (): ModalContextType => {\n const context = useContext(ModalContext);\n if (!context) {\n throw new Error(\n 'useModalContext must be used within a Modal — make sure the consuming component is rendered inside <Modal />.',\n );\n }\n return context;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ModalProps } from "./Modal.types.cjs";
|
|
3
|
+
export type ModalContextType = Omit<ModalProps, 'children'>;
|
|
4
|
+
export declare const ModalContext: import("react").Context<ModalContextType | undefined>;
|
|
5
|
+
export declare const useModalContext: () => ModalContextType;
|
|
6
|
+
//# sourceMappingURL=Modal.context.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.context.d.cts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.context.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE5D,eAAO,MAAM,YAAY,uDAExB,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,gBAQlC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ModalProps } from "./Modal.types.mjs";
|
|
3
|
+
export type ModalContextType = Omit<ModalProps, 'children'>;
|
|
4
|
+
export declare const ModalContext: import("react").Context<ModalContextType | undefined>;
|
|
5
|
+
export declare const useModalContext: () => ModalContextType;
|
|
6
|
+
//# sourceMappingURL=Modal.context.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.context.d.mts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.context.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAE5D,eAAO,MAAM,YAAY,uDAExB,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,gBAQlC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
export const ModalContext = createContext(undefined);
|
|
3
|
+
export const useModalContext = () => {
|
|
4
|
+
const context = useContext(ModalContext);
|
|
5
|
+
if (!context) {
|
|
6
|
+
throw new Error('useModalContext must be used within a Modal — make sure the consuming component is rendered inside <Modal />.');
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Modal.context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.context.mjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc;AAMlD,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CACvC,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAqB,EAAE;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,+GAA+G,CAChH,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { createContext, useContext } from 'react';\n\nimport type { ModalProps } from './Modal.types';\n\nexport type ModalContextType = Omit<ModalProps, 'children'>;\n\nexport const ModalContext = createContext<ModalContextType | undefined>(\n undefined,\n);\n\nexport const useModalContext = (): ModalContextType => {\n const context = useContext(ModalContext);\n if (!context) {\n throw new Error(\n 'useModalContext must be used within a Modal — make sure the consuming component is rendered inside <Modal />.',\n );\n }\n return context;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.cts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAO1C,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,eAAO,MAAM,KAAK,gGAyCjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.mts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAO1C,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,eAAO,MAAM,KAAK,gGAyCjB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import $React, { forwardRef } from "react";
|
|
8
|
+
const React = $importDefault($React);
|
|
9
|
+
import { createPortal } from "react-dom";
|
|
10
|
+
import { twMerge } from "../../utils/tw-merge.mjs";
|
|
11
|
+
import { ModalContext } from "./Modal.context.mjs";
|
|
12
|
+
export const Modal = forwardRef(({ className, isOpen, onClose, children, isClosedOnOutsideClick = true, isClosedOnEscapeKey = true, autoFocus = true, initialFocusRef, finalFocusRef, restoreFocus, ...props }, ref) => {
|
|
13
|
+
if (!isOpen) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const context = {
|
|
17
|
+
isOpen,
|
|
18
|
+
onClose,
|
|
19
|
+
isClosedOnOutsideClick,
|
|
20
|
+
isClosedOnEscapeKey,
|
|
21
|
+
autoFocus,
|
|
22
|
+
initialFocusRef,
|
|
23
|
+
finalFocusRef,
|
|
24
|
+
restoreFocus,
|
|
25
|
+
};
|
|
26
|
+
return createPortal(React.createElement(ModalContext.Provider, { value: context },
|
|
27
|
+
React.createElement("div", { ref: ref, className: twMerge(className), ...props }, children)), document.body);
|
|
28
|
+
});
|
|
29
|
+
Modal.displayName = 'Modal';
|
|
30
|
+
//# sourceMappingURL=Modal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.mjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAC1C,OAAO,EAAE,YAAY,EAAE,kBAAkB;AAEzC,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAE/C,OAAO,EAAE,YAAY,EAAE,4BAAwB;AAI/C,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EACE,SAAS,EACT,MAAM,EACN,OAAO,EACP,QAAQ,EACR,sBAAsB,GAAG,IAAI,EAC7B,mBAAmB,GAAG,IAAI,EAC1B,SAAS,GAAG,IAAI,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,MAAM,OAAO,GAAqB;QAChC,MAAM;QACN,OAAO;QACP,sBAAsB;QACtB,mBAAmB;QACnB,SAAS;QACT,eAAe;QACf,aAAa;QACb,YAAY;KACb,CAAC;IAEF,OAAO,YAAY,CACjB,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO;QACnC,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,KAAM,KAAK,IACpD,QAAQ,CACL,CACgB,EACxB,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { twMerge } from '../../utils/tw-merge';\n\nimport { ModalContext } from './Modal.context';\nimport type { ModalContextType } from './Modal.context';\nimport type { ModalProps } from './Modal.types';\n\nexport const Modal = forwardRef<HTMLDivElement, ModalProps>(\n (\n {\n className,\n isOpen,\n onClose,\n children,\n isClosedOnOutsideClick = true,\n isClosedOnEscapeKey = true,\n autoFocus = true,\n initialFocusRef,\n finalFocusRef,\n restoreFocus,\n ...props\n },\n ref,\n ) => {\n if (!isOpen) {\n return null;\n }\n\n const context: ModalContextType = {\n isOpen,\n onClose,\n isClosedOnOutsideClick,\n isClosedOnEscapeKey,\n autoFocus,\n initialFocusRef,\n finalFocusRef,\n restoreFocus,\n };\n\n return createPortal(\n <ModalContext.Provider value={context}>\n <div ref={ref} className={twMerge(className)} {...props}>\n {children}\n </div>\n </ModalContext.Provider>,\n document.body,\n );\n },\n);\n\nModal.displayName = 'Modal';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.types.cjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport type { FocusableElement } from '../ModalFocus/ModalFocus.types';\n\nexport type ModalProps = Omit<ComponentProps<'div'>, 'children'> & {\n /**\n * Whether the modal is open. When `false`, nothing is rendered (and the\n * portal subtree is unmounted, releasing focus state).\n */\n isOpen: boolean;\n /**\n * Fired when the modal requests close — wire your state setter here.\n * Triggered by the configured close-on-overlay-click and close-on-escape\n * behaviors as well as any custom close affordances inside `children`.\n */\n onClose: () => void;\n /**\n * The modal subtree. Typically composed of `ModalOverlay` and\n * `ModalContent` (which read shared behavior via `useModalContext`).\n */\n children: ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Modal root.\n * Merged with the component's defaults via `twMerge`.\n */\n className?: string;\n /**\n * When `true`, clicking the overlay (outside the modal content) closes the\n * modal.\n *\n * @default true\n */\n isClosedOnOutsideClick?: boolean;\n /**\n * When `true`, pressing Escape closes the modal. When `false`, ensure the\n * modal exposes a visible/keyboard-reachable close affordance for\n * keyboard-only users.\n *\n * @default true\n */\n isClosedOnEscapeKey?: boolean;\n /**\n * When `true`, the first focusable element within the modal subtree is\n * focused on mount.\n *\n * @default true\n */\n autoFocus?: boolean;\n /**\n * The element to receive focus when the modal opens. Overrides `autoFocus`'s\n * \"first focusable\" behavior.\n */\n initialFocusRef?: RefObject<FocusableElement>;\n /**\n * The element to receive focus when the modal closes/unmounts.\n */\n finalFocusRef?: RefObject<FocusableElement>;\n /**\n * When `true`, focus is restored to the element that opened the modal once\n * the modal closes. Ignored when `finalFocusRef` is provided.\n *\n * @default false\n */\n restoreFocus?: boolean;\n};\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode, RefObject } from "react";
|
|
2
|
+
import type { FocusableElement } from "../ModalFocus/ModalFocus.types.cjs";
|
|
3
|
+
export type ModalProps = Omit<ComponentProps<'div'>, 'children'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the modal is open. When `false`, nothing is rendered (and the
|
|
6
|
+
* portal subtree is unmounted, releasing focus state).
|
|
7
|
+
*/
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Fired when the modal requests close — wire your state setter here.
|
|
11
|
+
* Triggered by the configured close-on-overlay-click and close-on-escape
|
|
12
|
+
* behaviors as well as any custom close affordances inside `children`.
|
|
13
|
+
*/
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* The modal subtree. Typically composed of `ModalOverlay` and
|
|
17
|
+
* `ModalContent` (which read shared behavior via `useModalContext`).
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Optional prop for additional CSS classes to be applied to the Modal root.
|
|
22
|
+
* Merged with the component's defaults via `twMerge`.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* When `true`, clicking the overlay (outside the modal content) closes the
|
|
27
|
+
* modal.
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
isClosedOnOutsideClick?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* When `true`, pressing Escape closes the modal. When `false`, ensure the
|
|
34
|
+
* modal exposes a visible/keyboard-reachable close affordance for
|
|
35
|
+
* keyboard-only users.
|
|
36
|
+
*
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
isClosedOnEscapeKey?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* When `true`, the first focusable element within the modal subtree is
|
|
42
|
+
* focused on mount.
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
autoFocus?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The element to receive focus when the modal opens. Overrides `autoFocus`'s
|
|
49
|
+
* "first focusable" behavior.
|
|
50
|
+
*/
|
|
51
|
+
initialFocusRef?: RefObject<FocusableElement>;
|
|
52
|
+
/**
|
|
53
|
+
* The element to receive focus when the modal closes/unmounts.
|
|
54
|
+
*/
|
|
55
|
+
finalFocusRef?: RefObject<FocusableElement>;
|
|
56
|
+
/**
|
|
57
|
+
* When `true`, focus is restored to the element that opened the modal once
|
|
58
|
+
* the modal closes. Ignored when `finalFocusRef` is provided.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
restoreFocus?: boolean;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Modal.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.types.d.cts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,2CAAuC;AAEvE,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjE;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9C;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode, RefObject } from "react";
|
|
2
|
+
import type { FocusableElement } from "../ModalFocus/ModalFocus.types.mjs";
|
|
3
|
+
export type ModalProps = Omit<ComponentProps<'div'>, 'children'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the modal is open. When `false`, nothing is rendered (and the
|
|
6
|
+
* portal subtree is unmounted, releasing focus state).
|
|
7
|
+
*/
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Fired when the modal requests close — wire your state setter here.
|
|
11
|
+
* Triggered by the configured close-on-overlay-click and close-on-escape
|
|
12
|
+
* behaviors as well as any custom close affordances inside `children`.
|
|
13
|
+
*/
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* The modal subtree. Typically composed of `ModalOverlay` and
|
|
17
|
+
* `ModalContent` (which read shared behavior via `useModalContext`).
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Optional prop for additional CSS classes to be applied to the Modal root.
|
|
22
|
+
* Merged with the component's defaults via `twMerge`.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* When `true`, clicking the overlay (outside the modal content) closes the
|
|
27
|
+
* modal.
|
|
28
|
+
*
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
isClosedOnOutsideClick?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* When `true`, pressing Escape closes the modal. When `false`, ensure the
|
|
34
|
+
* modal exposes a visible/keyboard-reachable close affordance for
|
|
35
|
+
* keyboard-only users.
|
|
36
|
+
*
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
isClosedOnEscapeKey?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* When `true`, the first focusable element within the modal subtree is
|
|
42
|
+
* focused on mount.
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
autoFocus?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The element to receive focus when the modal opens. Overrides `autoFocus`'s
|
|
49
|
+
* "first focusable" behavior.
|
|
50
|
+
*/
|
|
51
|
+
initialFocusRef?: RefObject<FocusableElement>;
|
|
52
|
+
/**
|
|
53
|
+
* The element to receive focus when the modal closes/unmounts.
|
|
54
|
+
*/
|
|
55
|
+
finalFocusRef?: RefObject<FocusableElement>;
|
|
56
|
+
/**
|
|
57
|
+
* When `true`, focus is restored to the element that opened the modal once
|
|
58
|
+
* the modal closes. Ignored when `finalFocusRef` is provided.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
restoreFocus?: boolean;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Modal.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.types.d.mts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,2CAAuC;AAEvE,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACjE;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9C;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.types.mjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport type { FocusableElement } from '../ModalFocus/ModalFocus.types';\n\nexport type ModalProps = Omit<ComponentProps<'div'>, 'children'> & {\n /**\n * Whether the modal is open. When `false`, nothing is rendered (and the\n * portal subtree is unmounted, releasing focus state).\n */\n isOpen: boolean;\n /**\n * Fired when the modal requests close — wire your state setter here.\n * Triggered by the configured close-on-overlay-click and close-on-escape\n * behaviors as well as any custom close affordances inside `children`.\n */\n onClose: () => void;\n /**\n * The modal subtree. Typically composed of `ModalOverlay` and\n * `ModalContent` (which read shared behavior via `useModalContext`).\n */\n children: ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the Modal root.\n * Merged with the component's defaults via `twMerge`.\n */\n className?: string;\n /**\n * When `true`, clicking the overlay (outside the modal content) closes the\n * modal.\n *\n * @default true\n */\n isClosedOnOutsideClick?: boolean;\n /**\n * When `true`, pressing Escape closes the modal. When `false`, ensure the\n * modal exposes a visible/keyboard-reachable close affordance for\n * keyboard-only users.\n *\n * @default true\n */\n isClosedOnEscapeKey?: boolean;\n /**\n * When `true`, the first focusable element within the modal subtree is\n * focused on mount.\n *\n * @default true\n */\n autoFocus?: boolean;\n /**\n * The element to receive focus when the modal opens. Overrides `autoFocus`'s\n * \"first focusable\" behavior.\n */\n initialFocusRef?: RefObject<FocusableElement>;\n /**\n * The element to receive focus when the modal closes/unmounts.\n */\n finalFocusRef?: RefObject<FocusableElement>;\n /**\n * When `true`, focus is restored to the element that opened the modal once\n * the modal closes. Ignored when `finalFocusRef` is provided.\n *\n * @default false\n */\n restoreFocus?: boolean;\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useModalContext = exports.Modal = void 0;
|
|
4
|
+
var Modal_1 = require("./Modal.cjs");
|
|
5
|
+
Object.defineProperty(exports, "Modal", { enumerable: true, get: function () { return Modal_1.Modal; } });
|
|
6
|
+
var Modal_context_1 = require("./Modal.context.cjs");
|
|
7
|
+
Object.defineProperty(exports, "useModalContext", { enumerable: true, get: function () { return Modal_context_1.useModalContext; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,qDAAkD;AAAzC,gHAAA,eAAe,OAAA","sourcesContent":["export { Modal } from './Modal';\nexport { useModalContext } from './Modal.context';\nexport type { ModalContextType } from './Modal.context';\nexport type { ModalProps } from './Modal.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,eAAe,EAAE,4BAAwB;AAClD,YAAY,EAAE,gBAAgB,EAAE,4BAAwB;AACxD,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,eAAe,EAAE,4BAAwB;AAClD,YAAY,EAAE,gBAAgB,EAAE,4BAAwB;AACxD,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,eAAe,EAAE,4BAAwB","sourcesContent":["export { Modal } from './Modal';\nexport { useModalContext } from './Modal.context';\nexport type { ModalContextType } from './Modal.context';\nexport type { ModalProps } from './Modal.types';\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ModalBody = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const tw_merge_1 = require("../../utils/tw-merge.cjs");
|
|
29
|
+
const Box_1 = require("../Box/index.cjs");
|
|
30
|
+
exports.ModalBody = (0, react_1.forwardRef)(({ className, children, tabIndex = 0, ...props }, ref) => (react_1.default.createElement(Box_1.Box, { ref: ref, paddingHorizontal: 4, tabIndex: tabIndex, className: (0, tw_merge_1.twMerge)('relative max-h-full overflow-y-auto', className), ...props }, children)));
|
|
31
|
+
exports.ModalBody.displayName = 'ModalBody';
|
|
32
|
+
//# sourceMappingURL=ModalBody.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.cjs","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,uDAA+C;AAC/C,0CAA6B;AAIhB,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACxD,8BAAC,SAAG,IACF,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,IAAA,kBAAO,EAAC,qCAAqC,EAAE,SAAS,CAAC,KAChE,KAAK,IAER,QAAQ,CACL,CACP,CACF,CAAC;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Box } from '../Box';\n\nimport type { ModalBodyProps } from './ModalBody.types';\n\nexport const ModalBody = forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ className, children, tabIndex = 0, ...props }, ref) => (\n <Box\n ref={ref}\n paddingHorizontal={4}\n tabIndex={tabIndex}\n className={twMerge('relative max-h-full overflow-y-auto', className)}\n {...props}\n >\n {children}\n </Box>\n ),\n);\n\nModalBody.displayName = 'ModalBody';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.d.cts","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAK1C,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS,oGAYrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.d.mts","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAK1C,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS,oGAYrB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import $React, { forwardRef } from "react";
|
|
8
|
+
const React = $importDefault($React);
|
|
9
|
+
import { twMerge } from "../../utils/tw-merge.mjs";
|
|
10
|
+
import { Box } from "../Box/index.mjs";
|
|
11
|
+
export const ModalBody = forwardRef(({ className, children, tabIndex = 0, ...props }, ref) => (React.createElement(Box, { ref: ref, paddingHorizontal: 4, tabIndex: tabIndex, className: twMerge('relative max-h-full overflow-y-auto', className), ...props }, children)));
|
|
12
|
+
ModalBody.displayName = 'ModalBody';
|
|
13
|
+
//# sourceMappingURL=ModalBody.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.mjs","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,GAAG,EAAE,yBAAe;AAI7B,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACxD,oBAAC,GAAG,IACF,GAAG,EAAE,GAAG,EACR,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,CAAC,qCAAqC,EAAE,SAAS,CAAC,KAChE,KAAK,IAER,QAAQ,CACL,CACP,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Box } from '../Box';\n\nimport type { ModalBodyProps } from './ModalBody.types';\n\nexport const ModalBody = forwardRef<HTMLDivElement, ModalBodyProps>(\n ({ className, children, tabIndex = 0, ...props }, ref) => (\n <Box\n ref={ref}\n paddingHorizontal={4}\n tabIndex={tabIndex}\n className={twMerge('relative max-h-full overflow-y-auto', className)}\n {...props}\n >\n {children}\n </Box>\n ),\n);\n\nModalBody.displayName = 'ModalBody';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.types.cjs","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nexport type ModalBodyProps = ComponentProps<'div'> & {\n /**\n * The content of the ModalBody.\n */\n children?: ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the ModalBody component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export type ModalBodyProps = ComponentProps<'div'> & {
|
|
3
|
+
/**
|
|
4
|
+
* The content of the ModalBody.
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Optional prop for additional CSS classes to be applied to the ModalBody component.
|
|
9
|
+
* These classes will be merged with the component's default classes using twMerge.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ModalBody.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.types.d.cts","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc;AAEvD,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export type ModalBodyProps = ComponentProps<'div'> & {
|
|
3
|
+
/**
|
|
4
|
+
* The content of the ModalBody.
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Optional prop for additional CSS classes to be applied to the ModalBody component.
|
|
9
|
+
* These classes will be merged with the component's default classes using twMerge.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ModalBody.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.types.d.mts","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc;AAEvD,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalBody.types.mjs","sourceRoot":"","sources":["../../../src/components/ModalBody/ModalBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\n\nexport type ModalBodyProps = ComponentProps<'div'> & {\n /**\n * The content of the ModalBody.\n */\n children?: ReactNode;\n /**\n * Optional prop for additional CSS classes to be applied to the ModalBody component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModalBody = void 0;
|
|
4
|
+
var ModalBody_1 = require("./ModalBody.cjs");
|
|
5
|
+
Object.defineProperty(exports, "ModalBody", { enumerable: true, get: function () { return ModalBody_1.ModalBody; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/ModalBody/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAA/B,sGAAA,SAAS,OAAA","sourcesContent":["export { ModalBody } from './ModalBody';\nexport type { ModalBodyProps } from './ModalBody.types';\n"]}
|