@sharedex/ui 0.9.0 → 0.10.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/README.md +37 -2
- package/dist/backgrounds/hosts/CssHost.d.ts +2 -6
- package/dist/backgrounds/hosts/CssHost.js +3 -17
- package/dist/backgrounds/hosts/styleHref.d.ts +6 -0
- package/dist/backgrounds/hosts/styleHref.js +20 -0
- package/dist/buttons/pick.d.ts +9 -3
- package/dist/buttons/pick.js +4 -1
- package/dist/forms/base.d.ts +1 -0
- package/dist/forms/base.js +224 -0
- package/dist/forms/buddy.d.ts +6 -0
- package/dist/forms/buddy.js +150 -0
- package/dist/forms/chips.d.ts +1 -0
- package/dist/forms/chips.js +140 -0
- package/dist/forms/choice.d.ts +1 -0
- package/dist/forms/choice.js +208 -0
- package/dist/forms/controls/CheckGroup.d.ts +65 -0
- package/dist/forms/controls/CheckGroup.js +99 -0
- package/dist/forms/controls/Checkbox.d.ts +43 -0
- package/dist/forms/controls/Checkbox.js +67 -0
- package/dist/forms/controls/ChipGroup.d.ts +50 -0
- package/dist/forms/controls/ChipGroup.js +56 -0
- package/dist/forms/controls/Combobox.d.ts +75 -0
- package/dist/forms/controls/Combobox.js +249 -0
- package/dist/forms/controls/ErrorSummary.d.ts +29 -0
- package/dist/forms/controls/ErrorSummary.js +79 -0
- package/dist/forms/controls/Field.d.ts +92 -0
- package/dist/forms/controls/Field.js +219 -0
- package/dist/forms/controls/FileDrop.d.ts +81 -0
- package/dist/forms/controls/FileDrop.js +328 -0
- package/dist/forms/controls/FormBuddy.d.ts +22 -0
- package/dist/forms/controls/FormBuddy.js +143 -0
- package/dist/forms/controls/FormReveal.d.ts +21 -0
- package/dist/forms/controls/FormReveal.js +19 -0
- package/dist/forms/controls/FormSteps.d.ts +75 -0
- package/dist/forms/controls/FormSteps.js +205 -0
- package/dist/forms/controls/FormSwap.d.ts +27 -0
- package/dist/forms/controls/FormSwap.js +38 -0
- package/dist/forms/controls/InlineEdit.d.ts +50 -0
- package/dist/forms/controls/InlineEdit.js +136 -0
- package/dist/forms/controls/NumberField.d.ts +43 -0
- package/dist/forms/controls/NumberField.js +205 -0
- package/dist/forms/controls/OtpField.d.ts +46 -0
- package/dist/forms/controls/OtpField.js +195 -0
- package/dist/forms/controls/PasswordRules.d.ts +31 -0
- package/dist/forms/controls/PasswordRules.js +85 -0
- package/dist/forms/controls/RadioGroup.d.ts +69 -0
- package/dist/forms/controls/RadioGroup.js +95 -0
- package/dist/forms/controls/Range.d.ts +60 -0
- package/dist/forms/controls/Range.js +169 -0
- package/dist/forms/controls/SaveStatus.d.ts +25 -0
- package/dist/forms/controls/SaveStatus.js +88 -0
- package/dist/forms/controls/Select.d.ts +46 -0
- package/dist/forms/controls/Select.js +35 -0
- package/dist/forms/controls/Switch.d.ts +54 -0
- package/dist/forms/controls/Switch.js +91 -0
- package/dist/forms/controls/TagsField.d.ts +68 -0
- package/dist/forms/controls/TagsField.js +0 -0
- package/dist/forms/controls/choiceChecks.d.ts +11 -0
- package/dist/forms/controls/choiceChecks.js +19 -0
- package/dist/forms/controls/choiceParts.d.ts +40 -0
- package/dist/forms/controls/choiceParts.js +49 -0
- package/dist/forms/controls/fieldChecks.d.ts +17 -0
- package/dist/forms/controls/fieldChecks.js +34 -0
- package/dist/forms/controls/fieldTools.d.ts +62 -0
- package/dist/forms/controls/fieldTools.js +54 -0
- package/dist/forms/controls/pickerChecks.d.ts +10 -0
- package/dist/forms/controls/pickerChecks.js +27 -0
- package/dist/forms/controls/rangeChecks.d.ts +11 -0
- package/dist/forms/controls/rangeChecks.js +23 -0
- package/dist/forms/controls/shared.d.ts +8 -0
- package/dist/forms/controls/shared.js +18 -0
- package/dist/forms/effects/cards.d.ts +11 -0
- package/dist/forms/effects/cards.js +52 -0
- package/dist/forms/effects/check/checkCard.d.ts +10 -0
- package/dist/forms/effects/check/checkCard.js +15 -0
- package/dist/forms/effects/check/checkCard.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkCard.schema.js +9 -0
- package/dist/forms/effects/check/checkConfetti.d.ts +18 -0
- package/dist/forms/effects/check/checkConfetti.js +38 -0
- package/dist/forms/effects/check/checkConfetti.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkConfetti.schema.js +13 -0
- package/dist/forms/effects/check/checkDraw.d.ts +7 -0
- package/dist/forms/effects/check/checkDraw.js +12 -0
- package/dist/forms/effects/check/checkDraw.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkDraw.schema.js +9 -0
- package/dist/forms/effects/check/checkHeart.d.ts +9 -0
- package/dist/forms/effects/check/checkHeart.js +84 -0
- package/dist/forms/effects/check/checkHeart.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkHeart.schema.js +10 -0
- package/dist/forms/effects/check/checkJelly.d.ts +9 -0
- package/dist/forms/effects/check/checkJelly.js +23 -0
- package/dist/forms/effects/check/checkJelly.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkJelly.schema.js +10 -0
- package/dist/forms/effects/check/checkMerge.d.ts +9 -0
- package/dist/forms/effects/check/checkMerge.js +37 -0
- package/dist/forms/effects/check/checkMerge.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkMerge.schema.js +10 -0
- package/dist/forms/effects/check/checkMixed.d.ts +7 -0
- package/dist/forms/effects/check/checkMixed.js +25 -0
- package/dist/forms/effects/check/checkMixed.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkMixed.schema.js +9 -0
- package/dist/forms/effects/check/checkMorph.d.ts +9 -0
- package/dist/forms/effects/check/checkMorph.js +53 -0
- package/dist/forms/effects/check/checkMorph.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkMorph.schema.js +10 -0
- package/dist/forms/effects/check/checkPop.d.ts +9 -0
- package/dist/forms/effects/check/checkPop.js +27 -0
- package/dist/forms/effects/check/checkPop.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkPop.schema.js +10 -0
- package/dist/forms/effects/check/checkRipple.d.ts +7 -0
- package/dist/forms/effects/check/checkRipple.js +33 -0
- package/dist/forms/effects/check/checkRipple.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkRipple.schema.js +9 -0
- package/dist/forms/effects/check/checkScribble.d.ts +11 -0
- package/dist/forms/effects/check/checkScribble.js +42 -0
- package/dist/forms/effects/check/checkScribble.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkScribble.schema.js +11 -0
- package/dist/forms/effects/check/checkStrike.d.ts +9 -0
- package/dist/forms/effects/check/checkStrike.js +54 -0
- package/dist/forms/effects/check/checkStrike.schema.d.ts +1 -0
- package/dist/forms/effects/check/checkStrike.schema.js +10 -0
- package/dist/forms/effects/chip/chipCheck.d.ts +7 -0
- package/dist/forms/effects/chip/chipCheck.js +26 -0
- package/dist/forms/effects/chip/chipCheck.schema.d.ts +1 -0
- package/dist/forms/effects/chip/chipCheck.schema.js +9 -0
- package/dist/forms/effects/chip/chipMerge.d.ts +9 -0
- package/dist/forms/effects/chip/chipMerge.js +63 -0
- package/dist/forms/effects/chip/chipMerge.schema.d.ts +1 -0
- package/dist/forms/effects/chip/chipMerge.schema.js +10 -0
- package/dist/forms/effects/file/fileButton.d.ts +7 -0
- package/dist/forms/effects/file/fileButton.js +28 -0
- package/dist/forms/effects/file/fileButton.schema.d.ts +1 -0
- package/dist/forms/effects/file/fileButton.schema.js +9 -0
- package/dist/forms/effects/file/fileCards.d.ts +7 -0
- package/dist/forms/effects/file/fileCards.js +38 -0
- package/dist/forms/effects/file/fileCards.schema.d.ts +1 -0
- package/dist/forms/effects/file/fileCards.schema.js +9 -0
- package/dist/forms/effects/file/fileDrag.d.ts +9 -0
- package/dist/forms/effects/file/fileDrag.js +45 -0
- package/dist/forms/effects/file/fileDrag.schema.d.ts +1 -0
- package/dist/forms/effects/file/fileDrag.schema.js +10 -0
- package/dist/forms/effects/file/filePage.d.ts +7 -0
- package/dist/forms/effects/file/filePage.js +46 -0
- package/dist/forms/effects/file/filePage.schema.d.ts +1 -0
- package/dist/forms/effects/file/filePage.schema.js +9 -0
- package/dist/forms/effects/file/filePreview.d.ts +7 -0
- package/dist/forms/effects/file/filePreview.js +17 -0
- package/dist/forms/effects/file/filePreview.schema.d.ts +1 -0
- package/dist/forms/effects/file/filePreview.schema.js +9 -0
- package/dist/forms/effects/file/fileProgress.d.ts +9 -0
- package/dist/forms/effects/file/fileProgress.js +92 -0
- package/dist/forms/effects/file/fileProgress.schema.d.ts +1 -0
- package/dist/forms/effects/file/fileProgress.schema.js +10 -0
- package/dist/forms/effects/file/fileReject.d.ts +7 -0
- package/dist/forms/effects/file/fileReject.js +24 -0
- package/dist/forms/effects/file/fileReject.schema.d.ts +1 -0
- package/dist/forms/effects/file/fileReject.schema.js +9 -0
- package/dist/forms/effects/input/inputAside.d.ts +11 -0
- package/dist/forms/effects/input/inputAside.js +42 -0
- package/dist/forms/effects/input/inputAside.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputAside.schema.js +11 -0
- package/dist/forms/effects/input/inputBeam.d.ts +14 -0
- package/dist/forms/effects/input/inputBeam.js +51 -0
- package/dist/forms/effects/input/inputBeam.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputBeam.schema.js +18 -0
- package/dist/forms/effects/input/inputCaret.d.ts +13 -0
- package/dist/forms/effects/input/inputCaret.js +33 -0
- package/dist/forms/effects/input/inputCaret.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputCaret.schema.js +26 -0
- package/dist/forms/effects/input/inputCounter.d.ts +16 -0
- package/dist/forms/effects/input/inputCounter.js +84 -0
- package/dist/forms/effects/input/inputCounter.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputCounter.schema.js +12 -0
- package/dist/forms/effects/input/inputCycle.d.ts +19 -0
- package/dist/forms/effects/input/inputCycle.js +93 -0
- package/dist/forms/effects/input/inputCycle.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputCycle.schema.js +11 -0
- package/dist/forms/effects/input/inputDepth.d.ts +11 -0
- package/dist/forms/effects/input/inputDepth.js +31 -0
- package/dist/forms/effects/input/inputDepth.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputDepth.schema.js +11 -0
- package/dist/forms/effects/input/inputDraw.d.ts +13 -0
- package/dist/forms/effects/input/inputDraw.js +27 -0
- package/dist/forms/effects/input/inputDraw.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputDraw.schema.js +12 -0
- package/dist/forms/effects/input/inputFlap.d.ts +9 -0
- package/dist/forms/effects/input/inputFlap.js +24 -0
- package/dist/forms/effects/input/inputFlap.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputFlap.schema.js +10 -0
- package/dist/forms/effects/input/inputFloat.d.ts +12 -0
- package/dist/forms/effects/input/inputFloat.js +46 -0
- package/dist/forms/effects/input/inputFloat.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputFloat.schema.js +10 -0
- package/dist/forms/effects/input/inputFlood.d.ts +11 -0
- package/dist/forms/effects/input/inputFlood.js +30 -0
- package/dist/forms/effects/input/inputFlood.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputFlood.schema.js +11 -0
- package/dist/forms/effects/input/inputFrame.d.ts +18 -0
- package/dist/forms/effects/input/inputFrame.js +77 -0
- package/dist/forms/effects/input/inputFrame.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputFrame.schema.js +13 -0
- package/dist/forms/effects/input/inputIcon.d.ts +11 -0
- package/dist/forms/effects/input/inputIcon.js +18 -0
- package/dist/forms/effects/input/inputIcon.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputIcon.schema.js +11 -0
- package/dist/forms/effects/input/inputNotch.d.ts +9 -0
- package/dist/forms/effects/input/inputNotch.js +70 -0
- package/dist/forms/effects/input/inputNotch.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputNotch.schema.js +10 -0
- package/dist/forms/effects/input/inputReveal.d.ts +15 -0
- package/dist/forms/effects/input/inputReveal.js +56 -0
- package/dist/forms/effects/input/inputReveal.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputReveal.schema.js +16 -0
- package/dist/forms/effects/input/inputRing.d.ts +13 -0
- package/dist/forms/effects/input/inputRing.js +27 -0
- package/dist/forms/effects/input/inputRing.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputRing.schema.js +12 -0
- package/dist/forms/effects/input/inputRise.d.ts +9 -0
- package/dist/forms/effects/input/inputRise.js +22 -0
- package/dist/forms/effects/input/inputRise.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputRise.schema.js +10 -0
- package/dist/forms/effects/input/inputSearch.d.ts +9 -0
- package/dist/forms/effects/input/inputSearch.js +37 -0
- package/dist/forms/effects/input/inputSearch.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputSearch.schema.js +10 -0
- package/dist/forms/effects/input/inputSkeleton.d.ts +7 -0
- package/dist/forms/effects/input/inputSkeleton.js +41 -0
- package/dist/forms/effects/input/inputSkeleton.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputSkeleton.schema.js +9 -0
- package/dist/forms/effects/input/inputSpotlight.d.ts +9 -0
- package/dist/forms/effects/input/inputSpotlight.js +20 -0
- package/dist/forms/effects/input/inputSpotlight.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputSpotlight.schema.js +10 -0
- package/dist/forms/effects/input/inputStrength.d.ts +9 -0
- package/dist/forms/effects/input/inputStrength.js +29 -0
- package/dist/forms/effects/input/inputStrength.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputStrength.schema.js +10 -0
- package/dist/forms/effects/input/inputSwap.d.ts +11 -0
- package/dist/forms/effects/input/inputSwap.js +39 -0
- package/dist/forms/effects/input/inputSwap.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputSwap.schema.js +11 -0
- package/dist/forms/effects/input/inputUnderline.d.ts +13 -0
- package/dist/forms/effects/input/inputUnderline.js +36 -0
- package/dist/forms/effects/input/inputUnderline.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputUnderline.schema.js +18 -0
- package/dist/forms/effects/input/inputWave.d.ts +11 -0
- package/dist/forms/effects/input/inputWave.js +23 -0
- package/dist/forms/effects/input/inputWave.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputWave.schema.js +11 -0
- package/dist/forms/effects/input/inputWavy.d.ts +11 -0
- package/dist/forms/effects/input/inputWavy.js +53 -0
- package/dist/forms/effects/input/inputWavy.schema.d.ts +1 -0
- package/dist/forms/effects/input/inputWavy.schema.js +11 -0
- package/dist/forms/effects/kit.d.ts +213 -0
- package/dist/forms/effects/kit.js +226 -0
- package/dist/forms/effects/picker/chipPop.d.ts +7 -0
- package/dist/forms/effects/picker/chipPop.js +28 -0
- package/dist/forms/effects/picker/chipPop.schema.d.ts +1 -0
- package/dist/forms/effects/picker/chipPop.schema.js +9 -0
- package/dist/forms/effects/picker/listHighlight.d.ts +9 -0
- package/dist/forms/effects/picker/listHighlight.js +42 -0
- package/dist/forms/effects/picker/listHighlight.schema.d.ts +1 -0
- package/dist/forms/effects/picker/listHighlight.schema.js +10 -0
- package/dist/forms/effects/picker/listMatch.d.ts +7 -0
- package/dist/forms/effects/picker/listMatch.js +21 -0
- package/dist/forms/effects/picker/listMatch.schema.d.ts +1 -0
- package/dist/forms/effects/picker/listMatch.schema.js +9 -0
- package/dist/forms/effects/picker/pickerArrow.d.ts +9 -0
- package/dist/forms/effects/picker/pickerArrow.js +17 -0
- package/dist/forms/effects/picker/pickerArrow.schema.d.ts +1 -0
- package/dist/forms/effects/picker/pickerArrow.schema.js +10 -0
- package/dist/forms/effects/picker/pickerCheck.d.ts +7 -0
- package/dist/forms/effects/picker/pickerCheck.js +31 -0
- package/dist/forms/effects/picker/pickerCheck.schema.d.ts +1 -0
- package/dist/forms/effects/picker/pickerCheck.schema.js +9 -0
- package/dist/forms/effects/picker/pickerOpen.d.ts +12 -0
- package/dist/forms/effects/picker/pickerOpen.js +34 -0
- package/dist/forms/effects/picker/pickerOpen.schema.d.ts +1 -0
- package/dist/forms/effects/picker/pickerOpen.schema.js +16 -0
- package/dist/forms/effects/picker/pickerSheet.d.ts +9 -0
- package/dist/forms/effects/picker/pickerSheet.js +47 -0
- package/dist/forms/effects/picker/pickerSheet.schema.d.ts +1 -0
- package/dist/forms/effects/picker/pickerSheet.schema.js +10 -0
- package/dist/forms/effects/picker/pickerStagger.d.ts +9 -0
- package/dist/forms/effects/picker/pickerStagger.js +31 -0
- package/dist/forms/effects/picker/pickerStagger.schema.d.ts +1 -0
- package/dist/forms/effects/picker/pickerStagger.schema.js +10 -0
- package/dist/forms/effects/radio/radioCard.d.ts +10 -0
- package/dist/forms/effects/radio/radioCard.js +15 -0
- package/dist/forms/effects/radio/radioCard.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioCard.schema.js +9 -0
- package/dist/forms/effects/radio/radioCircle.d.ts +9 -0
- package/dist/forms/effects/radio/radioCircle.js +49 -0
- package/dist/forms/effects/radio/radioCircle.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioCircle.schema.js +10 -0
- package/dist/forms/effects/radio/radioDot.d.ts +7 -0
- package/dist/forms/effects/radio/radioDot.js +10 -0
- package/dist/forms/effects/radio/radioDot.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioDot.schema.js +9 -0
- package/dist/forms/effects/radio/radioEmoji.d.ts +9 -0
- package/dist/forms/effects/radio/radioEmoji.js +94 -0
- package/dist/forms/effects/radio/radioEmoji.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioEmoji.schema.js +10 -0
- package/dist/forms/effects/radio/radioPulse.d.ts +9 -0
- package/dist/forms/effects/radio/radioPulse.js +24 -0
- package/dist/forms/effects/radio/radioPulse.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioPulse.schema.js +10 -0
- package/dist/forms/effects/radio/radioScale.d.ts +9 -0
- package/dist/forms/effects/radio/radioScale.js +73 -0
- package/dist/forms/effects/radio/radioScale.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioScale.schema.js +10 -0
- package/dist/forms/effects/radio/radioSegment.d.ts +7 -0
- package/dist/forms/effects/radio/radioSegment.js +52 -0
- package/dist/forms/effects/radio/radioSegment.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioSegment.schema.js +9 -0
- package/dist/forms/effects/radio/radioStars.d.ts +15 -0
- package/dist/forms/effects/radio/radioStars.js +125 -0
- package/dist/forms/effects/radio/radioStars.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioStars.schema.js +13 -0
- package/dist/forms/effects/radio/radioTravel.d.ts +9 -0
- package/dist/forms/effects/radio/radioTravel.js +49 -0
- package/dist/forms/effects/radio/radioTravel.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioTravel.schema.js +10 -0
- package/dist/forms/effects/radio/radioUnderline.d.ts +9 -0
- package/dist/forms/effects/radio/radioUnderline.js +61 -0
- package/dist/forms/effects/radio/radioUnderline.schema.d.ts +1 -0
- package/dist/forms/effects/radio/radioUnderline.schema.js +10 -0
- package/dist/forms/effects/radio/shape.d.ts +13 -0
- package/dist/forms/effects/radio/shape.js +61 -0
- package/dist/forms/effects/range/rangeBubble.d.ts +9 -0
- package/dist/forms/effects/range/rangeBubble.js +54 -0
- package/dist/forms/effects/range/rangeBubble.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeBubble.schema.js +10 -0
- package/dist/forms/effects/range/rangeElastic.d.ts +9 -0
- package/dist/forms/effects/range/rangeElastic.js +101 -0
- package/dist/forms/effects/range/rangeElastic.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeElastic.schema.js +10 -0
- package/dist/forms/effects/range/rangeFace.d.ts +11 -0
- package/dist/forms/effects/range/rangeFace.js +68 -0
- package/dist/forms/effects/range/rangeFace.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeFace.schema.js +11 -0
- package/dist/forms/effects/range/rangeFill.d.ts +7 -0
- package/dist/forms/effects/range/rangeFill.js +29 -0
- package/dist/forms/effects/range/rangeFill.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeFill.schema.js +9 -0
- package/dist/forms/effects/range/rangeHistogram.d.ts +14 -0
- package/dist/forms/effects/range/rangeHistogram.js +65 -0
- package/dist/forms/effects/range/rangeHistogram.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeHistogram.schema.js +11 -0
- package/dist/forms/effects/range/rangeThumb.d.ts +9 -0
- package/dist/forms/effects/range/rangeThumb.js +39 -0
- package/dist/forms/effects/range/rangeThumb.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeThumb.schema.js +10 -0
- package/dist/forms/effects/range/rangeTicks.d.ts +9 -0
- package/dist/forms/effects/range/rangeTicks.js +44 -0
- package/dist/forms/effects/range/rangeTicks.schema.d.ts +1 -0
- package/dist/forms/effects/range/rangeTicks.schema.js +18 -0
- package/dist/forms/effects/ring.d.ts +5 -0
- package/dist/forms/effects/ring.js +12 -0
- package/dist/forms/effects/step/stepProgress.d.ts +9 -0
- package/dist/forms/effects/step/stepProgress.js +35 -0
- package/dist/forms/effects/step/stepProgress.schema.d.ts +1 -0
- package/dist/forms/effects/step/stepProgress.schema.js +10 -0
- package/dist/forms/effects/step/stepSlide.d.ts +9 -0
- package/dist/forms/effects/step/stepSlide.js +50 -0
- package/dist/forms/effects/step/stepSlide.schema.d.ts +1 -0
- package/dist/forms/effects/step/stepSlide.schema.js +10 -0
- package/dist/forms/effects/switch/switchBulb.d.ts +9 -0
- package/dist/forms/effects/switch/switchBulb.js +70 -0
- package/dist/forms/effects/switch/switchBulb.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchBulb.schema.js +10 -0
- package/dist/forms/effects/switch/switchDayNight.d.ts +15 -0
- package/dist/forms/effects/switch/switchDayNight.js +96 -0
- package/dist/forms/effects/switch/switchDayNight.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchDayNight.schema.js +13 -0
- package/dist/forms/effects/switch/switchFace.d.ts +7 -0
- package/dist/forms/effects/switch/switchFace.js +75 -0
- package/dist/forms/effects/switch/switchFace.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchFace.schema.js +9 -0
- package/dist/forms/effects/switch/switchFlip.d.ts +7 -0
- package/dist/forms/effects/switch/switchFlip.js +45 -0
- package/dist/forms/effects/switch/switchFlip.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchFlip.schema.js +9 -0
- package/dist/forms/effects/switch/switchGoo.d.ts +7 -0
- package/dist/forms/effects/switch/switchGoo.js +95 -0
- package/dist/forms/effects/switch/switchGoo.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchGoo.schema.js +9 -0
- package/dist/forms/effects/switch/switchIcon.d.ts +9 -0
- package/dist/forms/effects/switch/switchIcon.js +63 -0
- package/dist/forms/effects/switch/switchIcon.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchIcon.schema.js +10 -0
- package/dist/forms/effects/switch/switchLabels.d.ts +11 -0
- package/dist/forms/effects/switch/switchLabels.js +55 -0
- package/dist/forms/effects/switch/switchLabels.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchLabels.schema.js +11 -0
- package/dist/forms/effects/switch/switchMorph.d.ts +9 -0
- package/dist/forms/effects/switch/switchMorph.js +22 -0
- package/dist/forms/effects/switch/switchMorph.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchMorph.schema.js +10 -0
- package/dist/forms/effects/switch/switchNeon.d.ts +11 -0
- package/dist/forms/effects/switch/switchNeon.js +53 -0
- package/dist/forms/effects/switch/switchNeon.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchNeon.schema.js +11 -0
- package/dist/forms/effects/switch/switchSlide.d.ts +7 -0
- package/dist/forms/effects/switch/switchSlide.js +11 -0
- package/dist/forms/effects/switch/switchSlide.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchSlide.schema.js +9 -0
- package/dist/forms/effects/switch/switchStretch.d.ts +9 -0
- package/dist/forms/effects/switch/switchStretch.js +21 -0
- package/dist/forms/effects/switch/switchStretch.schema.d.ts +1 -0
- package/dist/forms/effects/switch/switchStretch.schema.js +10 -0
- package/dist/forms/effects/valid/validAsync.d.ts +7 -0
- package/dist/forms/effects/valid/validAsync.js +36 -0
- package/dist/forms/effects/valid/validAsync.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validAsync.schema.js +9 -0
- package/dist/forms/effects/valid/validBubble.d.ts +7 -0
- package/dist/forms/effects/valid/validBubble.js +61 -0
- package/dist/forms/effects/valid/validBubble.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validBubble.schema.js +9 -0
- package/dist/forms/effects/valid/validCheck.d.ts +9 -0
- package/dist/forms/effects/valid/validCheck.js +50 -0
- package/dist/forms/effects/valid/validCheck.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validCheck.schema.js +10 -0
- package/dist/forms/effects/valid/validColor.d.ts +11 -0
- package/dist/forms/effects/valid/validColor.js +28 -0
- package/dist/forms/effects/valid/validColor.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validColor.schema.js +11 -0
- package/dist/forms/effects/valid/validFlash.d.ts +9 -0
- package/dist/forms/effects/valid/validFlash.js +36 -0
- package/dist/forms/effects/valid/validFlash.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validFlash.schema.js +10 -0
- package/dist/forms/effects/valid/validMessage.d.ts +7 -0
- package/dist/forms/effects/valid/validMessage.js +24 -0
- package/dist/forms/effects/valid/validMessage.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validMessage.schema.js +9 -0
- package/dist/forms/effects/valid/validShake.d.ts +9 -0
- package/dist/forms/effects/valid/validShake.js +37 -0
- package/dist/forms/effects/valid/validShake.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validShake.schema.js +10 -0
- package/dist/forms/effects/valid/validSwap.d.ts +7 -0
- package/dist/forms/effects/valid/validSwap.js +33 -0
- package/dist/forms/effects/valid/validSwap.schema.d.ts +1 -0
- package/dist/forms/effects/valid/validSwap.schema.js +9 -0
- package/dist/forms/errors.d.ts +12 -0
- package/dist/forms/errors.js +20 -0
- package/dist/forms/file.d.ts +1 -0
- package/dist/forms/file.js +268 -0
- package/dist/forms/files.d.ts +7 -0
- package/dist/forms/files.js +29 -0
- package/dist/forms/formSteps.d.ts +9 -0
- package/dist/forms/formSteps.js +6 -0
- package/dist/forms/ids.d.ts +17 -0
- package/dist/forms/ids.js +13 -0
- package/dist/forms/inline.d.ts +3 -0
- package/dist/forms/inline.js +128 -0
- package/dist/forms/number.d.ts +1 -0
- package/dist/forms/number.js +67 -0
- package/dist/forms/otp.d.ts +4 -0
- package/dist/forms/otp.js +171 -0
- package/dist/forms/picker.d.ts +1 -0
- package/dist/forms/picker.js +303 -0
- package/dist/forms/range.d.ts +3 -0
- package/dist/forms/range.js +223 -0
- package/dist/forms/registry.d.ts +4 -0
- package/dist/forms/registry.js +133 -0
- package/dist/forms/reveal.d.ts +6 -0
- package/dist/forms/reveal.js +51 -0
- package/dist/forms/runtime/focus.d.ts +16 -0
- package/dist/forms/runtime/focus.js +55 -0
- package/dist/forms/runtime/listMatch.d.ts +2 -0
- package/dist/forms/runtime/listMatch.js +33 -0
- package/dist/forms/runtime/origin.d.ts +10 -0
- package/dist/forms/runtime/origin.js +25 -0
- package/dist/forms/runtime/placePopup.d.ts +10 -0
- package/dist/forms/runtime/placePopup.js +55 -0
- package/dist/forms/runtime/useFlip.d.ts +7 -0
- package/dist/forms/runtime/useFlip.js +38 -0
- package/dist/forms/runtime/useMorph.d.ts +8 -0
- package/dist/forms/runtime/useMorph.js +56 -0
- package/dist/forms/runtime/useOffScreen.d.ts +3 -0
- package/dist/forms/runtime/useOffScreen.js +16 -0
- package/dist/forms/runtime/useSwitchDrag.d.ts +8 -0
- package/dist/forms/runtime/useSwitchDrag.js +83 -0
- package/dist/forms/runtime/vanish.d.ts +6 -0
- package/dist/forms/runtime/vanish.js +185 -0
- package/dist/forms/steps.d.ts +1 -0
- package/dist/forms/steps.js +149 -0
- package/dist/forms/swap.d.ts +7 -0
- package/dist/forms/swap.js +149 -0
- package/dist/forms/switch.d.ts +1 -0
- package/dist/forms/switch.js +99 -0
- package/dist/forms/tools.d.ts +3 -0
- package/dist/forms/tools.js +248 -0
- package/dist/forms/types.d.ts +161 -0
- package/dist/forms/types.js +5 -0
- package/dist/index.d.ts +234 -0
- package/dist/index.js +119 -0
- package/dist/schema/forms.d.ts +3 -0
- package/dist/schema/forms.js +194 -0
- package/dist/schema/index.d.ts +2 -1
- package/dist/schema/index.js +3 -1
- package/dist/schema/types.d.ts +2 -2
- package/dist/schema/types.js +1 -0
- package/guides/README.md +62 -61
- package/guides/contact.md +100 -77
- package/guides/forms.md +105 -0
- package/package.json +1 -1
- package/styles/form.css +594 -0
- package/theme.css +6 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { attachVanish } from "../../runtime/vanish.js";
|
|
2
|
+
import { FILLED, PAD_X, PAD_Y, START, at, controlOf, defineForm, fieldOf, layerOf, loopPaused, v, varName } from "../kit.js";
|
|
3
|
+
const ID = "inputCycle";
|
|
4
|
+
/** Phrases past this many are left out: a longer cycle is a slideshow, not a hint. */
|
|
5
|
+
export const CYCLE_MAX = 8;
|
|
6
|
+
const WORDS = ["Search anything", "Try “red shoes”", "Try “size 42”"];
|
|
7
|
+
const LAYER = layerOf(ID, "cycle");
|
|
8
|
+
const LINE = `${LAYER} > [data-sx-field-part="line"]`;
|
|
9
|
+
/** Where a phrase comes in: 12% of its turn slides it in, 12% slides the last one out. */
|
|
10
|
+
const MOVE = 0.12;
|
|
11
|
+
// The phrases stack in one cell and take turns, each with its own delay, in one animation per count of phrases (picked
|
|
12
|
+
// with :has(), so one stylesheet serves any list). Each slides up into place, stays, and slides up and out as the
|
|
13
|
+
// next one comes in.
|
|
14
|
+
const pct = (n) => `${Number(n.toFixed(3))}%`;
|
|
15
|
+
const counts = Array.from({ length: CYCLE_MAX - 1 }, (_, k) => k + 2);
|
|
16
|
+
const CSS = `${counts
|
|
17
|
+
.map((n) => ` ${at(`${LAYER}:has(> [data-sx-field-part="line"]:nth-child(${n}):last-child) > [data-sx-field-part="line"]`)} {
|
|
18
|
+
animation: sx-form-inputCycle-${n} calc(${v(ID, "hold")} * ${n}) ease-in-out calc((var(--sx-field-i) - ${MOVE}) * ${v(ID, "hold")}) infinite;
|
|
19
|
+
}
|
|
20
|
+
@keyframes sx-form-inputCycle-${n} {
|
|
21
|
+
0% {
|
|
22
|
+
translate: 0 100%;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
${pct((MOVE * 100) / n)}, ${pct(100 / n)} {
|
|
26
|
+
translate: 0 0;
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
29
|
+
${pct(((1 + MOVE) * 100) / n)}, 100% {
|
|
30
|
+
translate: 0 -100%;
|
|
31
|
+
opacity: 0;
|
|
32
|
+
}
|
|
33
|
+
}`)
|
|
34
|
+
.join("\n")}
|
|
35
|
+
${loopPaused(LINE)}
|
|
36
|
+
${at(LAYER)} {
|
|
37
|
+
transition: opacity 0.2s ease-out;
|
|
38
|
+
}`;
|
|
39
|
+
// What holds under reduced motion: the first phrase, still, where the placeholder would be, while the field is empty.
|
|
40
|
+
// It steps aside while a floating label rests on the field, and while typed text turns to dust.
|
|
41
|
+
const STATE = ` ${at(controlOf(ID))} {
|
|
42
|
+
--sx-field-placeholder: transparent;
|
|
43
|
+
}
|
|
44
|
+
${at(LAYER)} {
|
|
45
|
+
display: grid;
|
|
46
|
+
align-items: start;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
padding-block: ${PAD_Y};
|
|
49
|
+
padding-inline: ${START} ${PAD_X};
|
|
50
|
+
color: var(--sx-field-placeholder, var(--color-sx-muted));
|
|
51
|
+
line-height: 1.5;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
}
|
|
56
|
+
${at(LINE)} {
|
|
57
|
+
grid-area: 1 / 1;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
opacity: 0;
|
|
61
|
+
}
|
|
62
|
+
${at(`${LINE}:first-child`)} {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
${at(`${fieldOf(ID)}:not(${FILLED}):not([data-sx-vanishing]) ${LAYER}`)} {
|
|
66
|
+
opacity: 1;
|
|
67
|
+
}
|
|
68
|
+
${at(`${fieldOf(ID)}:is([data-sx-field~="inputFloat"], [data-sx-field~="inputNotch"], [data-sx-field~="inputAside"]):not(:focus-within) ${LAYER}`)} {
|
|
69
|
+
opacity: 0;
|
|
70
|
+
}
|
|
71
|
+
${at(`${fieldOf(ID)}[data-sx-field~="inputFloat"] ${LAYER}`)} {
|
|
72
|
+
padding-block: calc(${PAD_Y} + 0.5rem) calc(${PAD_Y} - 0.25rem);
|
|
73
|
+
}
|
|
74
|
+
@media (pointer: coarse) {
|
|
75
|
+
${at(LAYER)} {
|
|
76
|
+
font-size: max(16px, 1em);
|
|
77
|
+
}
|
|
78
|
+
}`;
|
|
79
|
+
/**
|
|
80
|
+
* The empty field's placeholder cycles through phrases, each sliding up into place; with `vanish`, the text you send
|
|
81
|
+
* breaks into dust and the field empties.
|
|
82
|
+
*/
|
|
83
|
+
export function inputCycle(options = {}) {
|
|
84
|
+
const words = (options.words ?? WORDS).slice(0, CYCLE_MAX);
|
|
85
|
+
const vanish = options.vanish ?? true;
|
|
86
|
+
return defineForm(ID, CSS, {
|
|
87
|
+
state: STATE,
|
|
88
|
+
vars: { [varName(ID, "hold")]: `${options.hold ?? 3}s` },
|
|
89
|
+
layers: [{ slot: "fill", part: "cycle", lines: words, keep: true }],
|
|
90
|
+
needs: { inView: true },
|
|
91
|
+
...(vanish ? { program: { attach: attachVanish, signature: "vanish" } } : {}),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_CYCLE_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_CYCLE_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputCycle",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputCycle",
|
|
6
|
+
fields: {
|
|
7
|
+
words: { kind: "texts", label: "Phrases", min: 1, max: 8, default: ["Search anything", "Try “red shoes”", "Try “size 42”"], help: "Shown in turn while the field is empty." },
|
|
8
|
+
hold: { kind: "number", label: "Each phrase stays", min: 1.5, max: 8, step: 0.5, unit: "s", default: 3 },
|
|
9
|
+
vanish: { kind: "boolean", label: "Text turns to dust on send", default: true, help: "Runs code: the page needs \"use client\"." },
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputDepthOptions {
|
|
3
|
+
/** `"sink"`: the field presses into the page (an inner shadow fades in). `"lift"`: a hard shadow slides out from behind it (brutalist). Default `"sink"`. */
|
|
4
|
+
readonly kind?: "sink" | "lift";
|
|
5
|
+
/** The shadow's colour. Default `var(--color-sx-ink)`. */
|
|
6
|
+
readonly color?: string;
|
|
7
|
+
/** Seconds it takes. Default `0.25`. */
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
}
|
|
10
|
+
/** The field sinks into the page, or lifts off a hard shadow, on focus. */
|
|
11
|
+
export declare function inputDepth(options?: InputDepthOptions): FormEffect;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DIR, at, defineForm, layerOf, timed, v, varName, whenFocused } from "../kit.js";
|
|
2
|
+
import { ringOff } from "../ring.js";
|
|
3
|
+
const ID = "inputDepth";
|
|
4
|
+
const SINK = layerOf(ID, "sink");
|
|
5
|
+
const LIFT = layerOf(ID, "lift");
|
|
6
|
+
// Both kinds in one sheet, keyed on the layer's part. The shadows are fixed and never animate: the inner one fades in
|
|
7
|
+
// on a layer behind the text, the hard one slides out from behind the box.
|
|
8
|
+
const CSS = ` ${at(SINK)} {
|
|
9
|
+
box-shadow: inset 0 2px 6px color-mix(in oklab, ${v(ID, "color")} 30%, transparent);
|
|
10
|
+
opacity: 0;
|
|
11
|
+
${timed(ID, "opacity")}
|
|
12
|
+
}
|
|
13
|
+
${whenFocused(ID, SINK, "opacity: 1;")}
|
|
14
|
+
${at(LIFT)} {
|
|
15
|
+
background: ${v(ID, "color")};
|
|
16
|
+
opacity: 0;
|
|
17
|
+
${timed(ID, "opacity, translate")}
|
|
18
|
+
}
|
|
19
|
+
${whenFocused(ID, LIFT, `opacity: 1; translate: calc(${DIR} * 0.25rem) 0.25rem;`)}`;
|
|
20
|
+
/** The field sinks into the page, or lifts off a hard shadow, on focus. */
|
|
21
|
+
export function inputDepth(options = {}) {
|
|
22
|
+
const kind = options.kind ?? "sink";
|
|
23
|
+
return defineForm(ID, CSS, {
|
|
24
|
+
marksFocus: ringOff(ID),
|
|
25
|
+
vars: {
|
|
26
|
+
[varName(ID, "color")]: options.color ?? "var(--color-sx-ink)",
|
|
27
|
+
[varName(ID, "time")]: `${options.duration ?? 0.25}s`,
|
|
28
|
+
},
|
|
29
|
+
layers: [kind === "sink" ? { slot: "under", part: "sink" } : { slot: "behind", part: "lift" }],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_DEPTH_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_DEPTH_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputDepth",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputDepth",
|
|
6
|
+
fields: {
|
|
7
|
+
kind: { kind: "choice", label: "Kind", values: ["sink", "lift"], labels: { sink: "Sinks in", lift: "Lifts off a hard shadow" }, default: "sink" },
|
|
8
|
+
color: { kind: "color", label: "Shadow colour", default: "var(--color-sx-ink)" },
|
|
9
|
+
duration: { kind: "number", label: "Duration", min: 0.1, max: 0.6, step: 0.05, unit: "s", default: 0.25 },
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputDrawOptions {
|
|
3
|
+
/** The line's colour. Default `var(--color-sx-primary)`. */
|
|
4
|
+
readonly color?: string;
|
|
5
|
+
/** Its thickness, px. Default `2`. */
|
|
6
|
+
readonly thickness?: number;
|
|
7
|
+
/** The corner radius it follows. An SVG can't read the box's own. Default `var(--radius-sx-control)`. */
|
|
8
|
+
readonly radius?: string;
|
|
9
|
+
/** Seconds to draw it all the way round. Default `0.6`. */
|
|
10
|
+
readonly duration?: number;
|
|
11
|
+
}
|
|
12
|
+
/** The outline draws itself around the field on focus (Codrops' Madoka): an SVG rectangle's dash, so it follows the corners. */
|
|
13
|
+
export declare function inputDraw(options?: InputDrawOptions): FormEffect;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { at, defineForm, layerOf, timed, v, varName, whenFocused } from "../kit.js";
|
|
2
|
+
import { ringOff } from "../ring.js";
|
|
3
|
+
const ID = "inputDraw";
|
|
4
|
+
const LINE = `${layerOf(ID)} [data-sx-field-svg="line"]`;
|
|
5
|
+
const CSS = ` ${at(LINE)} {
|
|
6
|
+
fill: none;
|
|
7
|
+
stroke: ${v(ID, "color")};
|
|
8
|
+
stroke-width: calc(${v(ID, "thickness")} * 1px);
|
|
9
|
+
rx: ${v(ID, "radius")};
|
|
10
|
+
stroke-dasharray: 1 2;
|
|
11
|
+
stroke-dashoffset: 1.01;
|
|
12
|
+
${timed(ID, "stroke-dashoffset")}
|
|
13
|
+
}
|
|
14
|
+
${whenFocused(ID, LINE, "stroke-dashoffset: 0;")}`;
|
|
15
|
+
/** The outline draws itself around the field on focus (Codrops' Madoka): an SVG rectangle's dash, so it follows the corners. */
|
|
16
|
+
export function inputDraw(options = {}) {
|
|
17
|
+
return defineForm(ID, CSS, {
|
|
18
|
+
marksFocus: ringOff(ID),
|
|
19
|
+
vars: {
|
|
20
|
+
[varName(ID, "color")]: options.color ?? "var(--color-sx-primary)",
|
|
21
|
+
[varName(ID, "thickness")]: options.thickness ?? 2,
|
|
22
|
+
[varName(ID, "radius")]: options.radius ?? "var(--radius-sx-control)",
|
|
23
|
+
[varName(ID, "time")]: `${options.duration ?? 0.6}s`,
|
|
24
|
+
},
|
|
25
|
+
layers: [{ slot: "edge", svg: { children: [{ tag: "rect", part: "line", attrs: { width: "100%", height: "100%", pathLength: 1 } }] } }],
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_DRAW_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_DRAW_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputDraw",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputDraw",
|
|
6
|
+
fields: {
|
|
7
|
+
color: { kind: "color", label: "Colour", default: "var(--color-sx-primary)" },
|
|
8
|
+
thickness: { kind: "number", label: "Thickness", min: 1, max: 6, step: 0.5, unit: "px", default: 2 },
|
|
9
|
+
radius: { kind: "text", label: "Corner radius", help: "The field's own corners, as CSS (`0.75rem`, `9999px`).", default: "var(--radius-sx-control)" },
|
|
10
|
+
duration: { kind: "number", label: "Duration", min: 0.2, max: 2, step: 0.1, unit: "s", default: 0.6 },
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputFlapOptions {
|
|
3
|
+
/** The flap's colour. Keep it light: the text sits on it. Default the accent at 45%. */
|
|
4
|
+
readonly color?: string;
|
|
5
|
+
/** Seconds it takes. Default `0.4`. */
|
|
6
|
+
readonly duration?: number;
|
|
7
|
+
}
|
|
8
|
+
/** A coloured flap swings down from the top edge on focus (Codrops' Yoko). */
|
|
9
|
+
export declare function inputFlap(options?: InputFlapOptions): FormEffect;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { at, defineForm, layerOf, timed, v, varName, whenFocused } from "../kit.js";
|
|
2
|
+
import { ringOff } from "../ring.js";
|
|
3
|
+
const ID = "inputFlap";
|
|
4
|
+
const LAYER = layerOf(ID);
|
|
5
|
+
// A panel behind the text, folded flat along the top edge (turned 90° away from the reader), swings down on focus.
|
|
6
|
+
const CSS = ` ${at(LAYER)} {
|
|
7
|
+
background: ${v(ID, "color")};
|
|
8
|
+
transform-origin: 50% 0;
|
|
9
|
+
transform: perspective(30rem) rotateX(-90deg);
|
|
10
|
+
backface-visibility: hidden;
|
|
11
|
+
${timed(ID, "transform")}
|
|
12
|
+
}
|
|
13
|
+
${whenFocused(ID, LAYER, "transform: perspective(30rem) rotateX(0deg);")}`;
|
|
14
|
+
/** A coloured flap swings down from the top edge on focus (Codrops' Yoko). */
|
|
15
|
+
export function inputFlap(options = {}) {
|
|
16
|
+
return defineForm(ID, CSS, {
|
|
17
|
+
marksFocus: ringOff(ID),
|
|
18
|
+
vars: {
|
|
19
|
+
[varName(ID, "color")]: options.color ?? "color-mix(in oklab, var(--color-sx-accent) 45%, transparent)",
|
|
20
|
+
[varName(ID, "time")]: `${options.duration ?? 0.4}s`,
|
|
21
|
+
},
|
|
22
|
+
layers: [{ slot: "under" }],
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_FLAP_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_FLAP_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputFlap",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputFlap",
|
|
6
|
+
fields: {
|
|
7
|
+
color: { kind: "color", label: "Colour", default: "color-mix(in oklab, var(--color-sx-accent) 45%, transparent)" },
|
|
8
|
+
duration: { kind: "number", label: "Duration", min: 0.2, max: 1, step: 0.05, unit: "s", default: 0.4 },
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputFloatOptions {
|
|
3
|
+
/** How small the label gets once it moves up, 0.5 to 1. Default `0.75`. */
|
|
4
|
+
readonly scale?: number;
|
|
5
|
+
/** Seconds it takes. Default `0.2`. */
|
|
6
|
+
readonly duration?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The label sits in the field and moves up, smaller, on focus, once there is text, and when the browser autofills it,
|
|
10
|
+
* so it never covers the text. A placeholder shows only while the field has the focus.
|
|
11
|
+
*/
|
|
12
|
+
export declare function inputFloat(options?: InputFloatOptions): FormEffect;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DIR, PAD_Y, RAISED, START, at, controlOf, defineForm, fieldOf, inField, labelOf, timed, v, varName } from "../kit.js";
|
|
2
|
+
const ID = "inputFloat";
|
|
3
|
+
const LABEL = labelOf(ID);
|
|
4
|
+
const CONTROL = controlOf(ID);
|
|
5
|
+
// Where everything sits is a state, so it holds under reduced motion too: there the label just jumps. The label rests
|
|
6
|
+
// on the input's first line, at the input's size; the input makes room above its text for it.
|
|
7
|
+
const STATE = ` ${at(fieldOf(ID))} {
|
|
8
|
+
--sx-field-label-size: 1em;
|
|
9
|
+
}
|
|
10
|
+
${at(LABEL)} {
|
|
11
|
+
grid-area: box;
|
|
12
|
+
align-self: start;
|
|
13
|
+
z-index: 1;
|
|
14
|
+
margin: calc(${PAD_Y} + 0.5rem) 0 0;
|
|
15
|
+
margin-inline-start: ${START};
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
transform-origin: calc(50% - 50% * ${DIR}) 0;
|
|
19
|
+
}
|
|
20
|
+
${at(CONTROL)} {
|
|
21
|
+
padding-block: calc(${PAD_Y} + 0.5rem) calc(${PAD_Y} - 0.25rem);
|
|
22
|
+
}
|
|
23
|
+
${at(inField(ID, ":not(:focus-within)", CONTROL))} {
|
|
24
|
+
--sx-field-placeholder: transparent;
|
|
25
|
+
}
|
|
26
|
+
${at(inField(ID, RAISED, LABEL))} {
|
|
27
|
+
translate: 0 calc(0.3rem - ${PAD_Y} - 0.5rem);
|
|
28
|
+
scale: ${v(ID, "scale")};
|
|
29
|
+
}`;
|
|
30
|
+
const CSS = ` ${at(LABEL)} {
|
|
31
|
+
${timed(ID, "translate, scale")}
|
|
32
|
+
}`;
|
|
33
|
+
/**
|
|
34
|
+
* The label sits in the field and moves up, smaller, on focus, once there is text, and when the browser autofills it,
|
|
35
|
+
* so it never covers the text. A placeholder shows only while the field has the focus.
|
|
36
|
+
*/
|
|
37
|
+
export function inputFloat(options = {}) {
|
|
38
|
+
return defineForm(ID, CSS, {
|
|
39
|
+
state: STATE,
|
|
40
|
+
vars: {
|
|
41
|
+
[varName(ID, "scale")]: options.scale ?? 0.75,
|
|
42
|
+
[varName(ID, "time")]: `${options.duration ?? 0.2}s`,
|
|
43
|
+
},
|
|
44
|
+
claims: ["label"],
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_FLOAT_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_FLOAT_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputFloat",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputFloat",
|
|
6
|
+
fields: {
|
|
7
|
+
scale: { kind: "number", label: "Raised size", min: 0.5, max: 1, step: 0.05, default: 0.75 },
|
|
8
|
+
duration: { kind: "number", label: "Duration", min: 0.1, max: 0.6, step: 0.05, unit: "s", default: 0.2 },
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputFloodOptions {
|
|
3
|
+
/** The flood's colour. Keep it light: the text sits on it. Default the accent at 40%. */
|
|
4
|
+
readonly color?: string;
|
|
5
|
+
/** How far the circle grows: enough to cover a field this many times its own size. Default `40`. */
|
|
6
|
+
readonly scale?: number;
|
|
7
|
+
/** Seconds it takes. Default `0.5`. */
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
}
|
|
10
|
+
/** A circle grows out of the icon until it floods the field, on focus (Codrops' Makiko). Give the field an `icon`. */
|
|
11
|
+
export declare function inputFlood(options?: InputFloodOptions): FormEffect;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PAD_X, at, childOf, defineForm, timed, v, varName, whenFocused } from "../kit.js";
|
|
2
|
+
import { ringOff } from "../ring.js";
|
|
3
|
+
const ID = "inputFlood";
|
|
4
|
+
const DOT = childOf(ID, "dot");
|
|
5
|
+
// A circle sits behind the icon (2rem across, centred on it) and grows until it covers the whole field: one scale,
|
|
6
|
+
// inside the clip that follows the field's corners.
|
|
7
|
+
const CSS = ` ${at(DOT)} {
|
|
8
|
+
position: absolute;
|
|
9
|
+
inset-block-start: calc(50% - 1rem);
|
|
10
|
+
inset-inline-start: calc(${PAD_X} + 0.625em - 1rem);
|
|
11
|
+
inline-size: 2rem;
|
|
12
|
+
block-size: 2rem;
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
background: ${v(ID, "color")};
|
|
15
|
+
scale: 0;
|
|
16
|
+
${timed(ID, "scale")}
|
|
17
|
+
}
|
|
18
|
+
${whenFocused(ID, DOT, `scale: ${v(ID, "scale")};`)}`;
|
|
19
|
+
/** A circle grows out of the icon until it floods the field, on focus (Codrops' Makiko). Give the field an `icon`. */
|
|
20
|
+
export function inputFlood(options = {}) {
|
|
21
|
+
return defineForm(ID, CSS, {
|
|
22
|
+
marksFocus: ringOff(ID),
|
|
23
|
+
vars: {
|
|
24
|
+
[varName(ID, "color")]: options.color ?? "color-mix(in oklab, var(--color-sx-accent) 40%, transparent)",
|
|
25
|
+
[varName(ID, "scale")]: options.scale ?? 40,
|
|
26
|
+
[varName(ID, "time")]: `${options.duration ?? 0.5}s`,
|
|
27
|
+
},
|
|
28
|
+
layers: [{ slot: "fill", children: ["dot"] }],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_FLOOD_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_FLOOD_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputFlood",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputFlood",
|
|
6
|
+
fields: {
|
|
7
|
+
color: { kind: "color", label: "Colour", default: "color-mix(in oklab, var(--color-sx-accent) 40%, transparent)" },
|
|
8
|
+
scale: { kind: "number", label: "Grows to", min: 10, max: 80, step: 5, default: 40, help: "Times the circle's own size: raise it for very wide fields." },
|
|
9
|
+
duration: { kind: "number", label: "Duration", min: 0.2, max: 1.2, step: 0.05, unit: "s", default: 0.5 },
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputFrameOptions {
|
|
3
|
+
/**
|
|
4
|
+
* `"bars"`: two bars meet in the middle and slide apart to frame the field (Codrops' Haruki). `"brackets"`: the
|
|
5
|
+
* field's outline is two halves that pull apart (Codrops' Kuro). Default `"bars"`.
|
|
6
|
+
*/
|
|
7
|
+
readonly kind?: "bars" | "brackets";
|
|
8
|
+
/** The lines' colour. Default the look's line for the field's state (grey at rest, the primary on focus). */
|
|
9
|
+
readonly color?: string;
|
|
10
|
+
/** Their thickness, px. Default `2`. */
|
|
11
|
+
readonly thickness?: number;
|
|
12
|
+
/** How far the halves pull apart, rem (brackets). Default `0.375`. */
|
|
13
|
+
readonly spread?: number;
|
|
14
|
+
/** Seconds it takes. Default `0.35`. */
|
|
15
|
+
readonly duration?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Bars meet and slide apart to frame the field, or its outline's two halves pull apart, on focus. */
|
|
18
|
+
export declare function inputFrame(options?: InputFrameOptions): FormEffect;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DIR, at, childOf, defineForm, fieldOf, layerOf, timed, v, varName, whenFocused } from "../kit.js";
|
|
2
|
+
import { ringOff } from "../ring.js";
|
|
3
|
+
const ID = "inputFrame";
|
|
4
|
+
const BARS = layerOf(ID, "bars");
|
|
5
|
+
const BRACKETS = layerOf(ID, "brackets");
|
|
6
|
+
const BAR_A = childOf(ID, "a", "bars");
|
|
7
|
+
const BAR_B = childOf(ID, "b", "bars");
|
|
8
|
+
const HALF_A = childOf(ID, "a", "brackets");
|
|
9
|
+
const HALF_B = childOf(ID, "b", "brackets");
|
|
10
|
+
const LINE = `calc(${v(ID, "thickness")} * 1px) solid ${v(ID, "color")}`;
|
|
11
|
+
// Both kinds in one sheet, keyed on the layer's part, so fields with either share it. The brackets ARE the outline
|
|
12
|
+
// (the box's own border steps aside), so they are a state: they stay under reduced motion, only their pulling apart
|
|
13
|
+
// goes. The bars are pure motion: they meet at the middle (the layer is a size container, 50cqh is half the field)
|
|
14
|
+
// and slide out to the edges. Only translate and scale move.
|
|
15
|
+
const STATE = ` ${at(`${fieldOf(ID)}:has(${BRACKETS})`)} {
|
|
16
|
+
--sx-field-edge: transparent;
|
|
17
|
+
}
|
|
18
|
+
${at(`${HALF_A}, ${HALF_B}`)} {
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset-block: 0;
|
|
21
|
+
inline-size: 50%;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
border-block: ${LINE};
|
|
24
|
+
}
|
|
25
|
+
${at(HALF_A)} {
|
|
26
|
+
inset-inline-start: 0;
|
|
27
|
+
border-inline-start: ${LINE};
|
|
28
|
+
border-start-start-radius: inherit;
|
|
29
|
+
border-end-start-radius: inherit;
|
|
30
|
+
}
|
|
31
|
+
${at(HALF_B)} {
|
|
32
|
+
inset-inline-end: 0;
|
|
33
|
+
border-inline-end: ${LINE};
|
|
34
|
+
border-start-end-radius: inherit;
|
|
35
|
+
border-end-end-radius: inherit;
|
|
36
|
+
}`;
|
|
37
|
+
const CSS = ` ${at(BARS)} {
|
|
38
|
+
container-type: size;
|
|
39
|
+
}
|
|
40
|
+
${at(`${BAR_A}, ${BAR_B}`)} {
|
|
41
|
+
position: absolute;
|
|
42
|
+
inset-inline: 0;
|
|
43
|
+
block-size: calc(${v(ID, "thickness")} * 1px);
|
|
44
|
+
background: ${v(ID, "color")};
|
|
45
|
+
scale: 0 1;
|
|
46
|
+
${timed(ID, "translate, scale")}
|
|
47
|
+
}
|
|
48
|
+
${at(BAR_A)} {
|
|
49
|
+
inset-block-start: 0;
|
|
50
|
+
translate: 0 calc(50cqh - ${v(ID, "thickness")} * 1px);
|
|
51
|
+
}
|
|
52
|
+
${at(BAR_B)} {
|
|
53
|
+
inset-block-end: 0;
|
|
54
|
+
translate: 0 calc(${v(ID, "thickness")} * 1px - 50cqh);
|
|
55
|
+
}
|
|
56
|
+
${whenFocused(ID, BAR_A, "translate: 0 0; scale: 1 1;")}
|
|
57
|
+
${whenFocused(ID, BAR_B, "translate: 0 0; scale: 1 1;")}
|
|
58
|
+
${at(`${HALF_A}, ${HALF_B}`)} {
|
|
59
|
+
${timed(ID, "translate")}
|
|
60
|
+
}
|
|
61
|
+
${whenFocused(ID, HALF_A, `translate: calc(-1 * ${DIR} * ${v(ID, "spread")} * 1rem) 0;`)}
|
|
62
|
+
${whenFocused(ID, HALF_B, `translate: calc(${DIR} * ${v(ID, "spread")} * 1rem) 0;`)}`;
|
|
63
|
+
/** Bars meet and slide apart to frame the field, or its outline's two halves pull apart, on focus. */
|
|
64
|
+
export function inputFrame(options = {}) {
|
|
65
|
+
const kind = options.kind ?? "bars";
|
|
66
|
+
return defineForm(ID, CSS, {
|
|
67
|
+
marksFocus: ringOff(ID),
|
|
68
|
+
state: STATE,
|
|
69
|
+
vars: {
|
|
70
|
+
[varName(ID, "color")]: options.color ?? "var(--sx-field-line, var(--color-sx-primary))",
|
|
71
|
+
[varName(ID, "thickness")]: options.thickness ?? 2,
|
|
72
|
+
[varName(ID, "spread")]: options.spread ?? 0.375,
|
|
73
|
+
[varName(ID, "time")]: `${options.duration ?? 0.35}s`,
|
|
74
|
+
},
|
|
75
|
+
layers: [{ slot: "edge", part: kind, children: ["a", "b"], keep: kind === "brackets" }],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_FRAME_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_FRAME_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputFrame",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputFrame",
|
|
6
|
+
fields: {
|
|
7
|
+
kind: { kind: "choice", label: "Kind", values: ["bars", "brackets"], labels: { bars: "Bars split", brackets: "Brackets pull apart" }, default: "bars" },
|
|
8
|
+
color: { kind: "color", label: "Colour", default: "var(--sx-field-line, var(--color-sx-primary))" },
|
|
9
|
+
thickness: { kind: "number", label: "Thickness", min: 1, max: 8, step: 0.5, unit: "px", default: 2 },
|
|
10
|
+
spread: { kind: "number", label: "Pull apart", min: 0.125, max: 1, step: 0.125, unit: "rem", default: 0.375, help: "Brackets only." },
|
|
11
|
+
duration: { kind: "number", label: "Duration", min: 0.1, max: 1, step: 0.05, unit: "s", default: 0.35 },
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputIconOptions {
|
|
3
|
+
/** The icon's colour while the field has the focus. Default `var(--color-sx-primary)`. */
|
|
4
|
+
readonly color?: string;
|
|
5
|
+
/** How much it grows, 1 to 1.4. Default `1.15`. */
|
|
6
|
+
readonly scale?: number;
|
|
7
|
+
/** Seconds it takes. Default `0.2`. */
|
|
8
|
+
readonly duration?: number;
|
|
9
|
+
}
|
|
10
|
+
/** The field's icon (`icon` prop) takes the colour and grows a little on focus. */
|
|
11
|
+
export declare function inputIcon(options?: InputIconOptions): FormEffect;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { at, defineForm, iconOf, timed, v, varName, whenFocused } from "../kit.js";
|
|
2
|
+
const ID = "inputIcon";
|
|
3
|
+
const ICON = iconOf(ID);
|
|
4
|
+
const CSS = ` ${at(ICON)} {
|
|
5
|
+
${timed(ID, "color, scale")}
|
|
6
|
+
}
|
|
7
|
+
${whenFocused(ID, ICON, `color: ${v(ID, "color")}; scale: ${v(ID, "scale")};`)}`;
|
|
8
|
+
/** The field's icon (`icon` prop) takes the colour and grows a little on focus. */
|
|
9
|
+
export function inputIcon(options = {}) {
|
|
10
|
+
return defineForm(ID, CSS, {
|
|
11
|
+
vars: {
|
|
12
|
+
[varName(ID, "color")]: options.color ?? "var(--color-sx-primary)",
|
|
13
|
+
[varName(ID, "scale")]: options.scale ?? 1.15,
|
|
14
|
+
[varName(ID, "time")]: `${options.duration ?? 0.2}s`,
|
|
15
|
+
},
|
|
16
|
+
claims: ["icon"],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const INPUT_ICON_SCHEMA: import("../../../schema/types.js").Schema;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineSchema } from "../../../schema/define.js";
|
|
2
|
+
export const INPUT_ICON_SCHEMA = defineSchema()({
|
|
3
|
+
id: "inputIcon",
|
|
4
|
+
family: "form",
|
|
5
|
+
factory: "inputIcon",
|
|
6
|
+
fields: {
|
|
7
|
+
color: { kind: "color", label: "Colour on focus", default: "var(--color-sx-primary)" },
|
|
8
|
+
scale: { kind: "number", label: "Grows to", min: 1, max: 1.4, step: 0.05, default: 1.15 },
|
|
9
|
+
duration: { kind: "number", label: "Duration", min: 0.1, max: 0.6, step: 0.05, unit: "s", default: 0.2 },
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FormEffect } from "../../types.js";
|
|
2
|
+
export interface InputNotchOptions {
|
|
3
|
+
/** How small the label gets on the border, 0.6 to 0.9. Default `0.75`. */
|
|
4
|
+
readonly scale?: number;
|
|
5
|
+
/** Seconds it takes. Default `0.2`. */
|
|
6
|
+
readonly duration?: number;
|
|
7
|
+
}
|
|
8
|
+
/** The label floats onto the border, which opens a gap exactly its width (Material's outlined field). */
|
|
9
|
+
export declare function inputNotch(options?: InputNotchOptions): FormEffect;
|