Open
Conversation
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: new
cosmoz-email-listinputA new tag-based email list input component for collecting multiple email addresses. FE-343
New files
src/cosmoz-email-list.ts— Component definition (<cosmoz-email-list>). Renders email tags viacosmoz-tagwith a text input. Reuses the sharedrender()wrapper for label, placeholder, error, prefix/suffix slots. Invalid emails getcolor="error"on their tag.src/use-email-list.ts— Core hook (useEmailList) with all state and interaction logic:invalidattribute on hostvalidate()imperative API exposed on the elementvalue-changedandfocused-changedevents vianotifyPropertystories/cosmoz-email-list.stories.ts— Demo stories: Basic, WithValues, Disabled, WithError, WithSuffix, Contourstories/cosmoz-email-list.test.stories.ts— 16 interaction test stories covering: Focus, AddEmailViaEnter, AddEmailViaComma, AddEmailViaBlur, InvalidEmail, DuplicateEmail, RemoveEmailViaTag, RemoveEmailViaBackspace, Validate, ValidateInvalid, ValueChanged, DelegatesFocus, Mousedown, Placeholder, PlaceholderHidesWithValues, MultipleEmailsViaComma, EmailNormalizationModified files
src/styles.ts— AddedemailListStyleswith flex-wrap layout for tags, floating label when tags present, and avatar-style prefix circlesrc/index.ts— Exports the new componentpackage.json— Added./email-listexport map entry and@neovici/cosmoz-tag,@neovici/cosmoz-tokensdependencies.storybook/preview.js— Updated storybook preview configKey design decisions
getPlaceholder()util fromcosmoz-input— placeholder hides (becomes' ') when emails are presentchangeevent — follows thevalue-changedpattern used across the cosmoz-* ecosystemcolor="error"for emails that don't pass regex validation (e.g., set externally via.value)