Booby traps are illegal if designed to cause bodily harm. It's not so cut-and-dry when it's something merely annoying, like a glitter bomb, though I would definitely not want to be the manufacturer trying to defend that in court.
Pepper spray, whose purpose is to cause bodily harm, was included in the list of ingredients, so the described booby trap would, indeed, be a prohibited “intended to cause bodily harm” one. (Actually, not only do the general laws on booby traps come into play, but using pepper spray other than in immediate self-defense in California is a crime.)
I realize that. That's why I said "annoying", not "less-than-lethal", and used glitter as an example.
Hm, okay, so let's take the pepper spray out then. Ink, honey, feathers, flour, glitter, fart spray.