You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to implement the sbb-chip-group component. It holds a list of sbb-chip that the user can add or remove.
It is mainly meant to be used inside an sbb-form-field, connected to an input.
The user can add new chips by typing and pressing the "enter" key;
Only one chip is focusable at any moment (generally the last one);
If the input is empty and the "delete" key is pressed, the last chip is focused;
Chips can be removed unless they are readonly or disabled
It should be possible to also connect an sbb-autocomplete to the same input element. When an option is selected, it should also add the corresponding sbb-chip (as if the user had pressed enter)
the sbb-chip-group is a flex container that wraps horizontally. The input should wrap with it which means that it needs to be the last child of the sbb-chip-container (ensure the consistency of the sbb-form-field logic and style)
Keyboard interaction
You can navigate chips through arrow keys;
Each chip has two navigation steps, one for the chip and the second for the delete button
If the input is focused (and empty), the 'detete' key moves the focus to the last chip;
If a chip is focused, the 'detete' key removes it;
Technical Specification
sbb-chip-container is a form-associated element
When the user adds a new chip, the sbb-chip-group creates a new sbb-chip and appends it to the Light DOM
the value is a get/set property that queries for non-disabled sbb-chip and returns an array of their values
sbb-chip-group optionally connects to an input through the for property. If possible, it connects automatically if in an sbb-form-field
Feature Description
We want to implement the
sbb-chip-group
component. It holds a list ofsbb-chip
that the user can add or remove.It is mainly meant to be used inside an
sbb-form-field
, connected to aninput
.Figma
Figma 2
Design Specification
readonly
ordisabled
sbb-autocomplete
to the sameinput
element. When an option is selected, it should also add the correspondingsbb-chip
(as if the user had pressedenter
)sbb-chip-group
is a flex container that wraps horizontally. Theinput
should wrap with it which means that it needs to be the last child of thesbb-chip-container
(ensure the consistency of thesbb-form-field
logic and style)Keyboard interaction
Technical Specification
sbb-chip-container
is a form-associated elementsbb-chip-group
creates a newsbb-chip
and appends it to the Light DOMvalue
is a get/set property that queries for non-disabledsbb-chip
and returns an array of their valuessbb-chip-group
optionally connects to an input through thefor
property. If possible, it connects automatically if in ansbb-form-field
A11y
Angular material uses
role="grid"
for the containerrole="row"
for the chiprole="gridcell"
, one for the label container and one for the delete buttonHTML Usage
The text was updated successfully, but these errors were encountered: