Logical stimuli-triggered delivery of small molecules from hydrogel biomaterials