swisspost / design-system

The Swiss Post Design System - for a consistent and accessible user experience across the web platform.
https://design-system.post.ch
Apache License 2.0
124 stars 14 forks source link

[component]: Validation #3630

Open schaertim opened 1 month ago

schaertim commented 1 month ago

It was decided that validation should be implemented separately and reused in all components requiring it. A dedicated token set has to be provided first.

Design

https://www.figma.com/design/JIT5AdGYqv6bDRpfBPV8XR/Foundations-%26-Components-Next-Level?node-id=577-14513&t=uKEtTo9BEaPpKSV5-1

Requirements

### Tasks
- [x] Add HTML/CSS component implementation
- [x] Create separate Documentation
- [x] Visual Regression Test
- [x] Accessibility Test
- [x] Add new token set for validation
- [ ] Design review
gfellerph commented 1 month ago

@gfellerph add more information

alizedebray commented 1 month ago
gfellerph commented 1 month ago

Tokens: post-validation-valid-fg post-validation-invalid-fg

Variant 1: <p class="validation invalid icon">Error</p>

Variant 2: [type="checkbox"] ~ .validation { // Show icon }

Resolution:

myrta2302 commented 2 weeks ago

Tokens

post.validation.error #B200000 post.validation.success #107800 post.validation.font-size 14px
post.validation.text.padding.block.text 6px post.validation.text.padding.inline.text 2px post.validation.list.gap.inline 8/6/4px post.validation.list.padding.block.text 1px post.validation.list.icon.size 24/22/20px post.validation.list.icon.padding 0/1/2px

Vandapanda commented 2 weeks ago

Added this one to the pattern discussion as its connected to the other issue I got

myrta2302 commented 1 week ago
oliverschuerch commented 1 week ago

Let's concentrate on the components needed for PPNL:

Vandapanda commented 1 week ago

Tokenised and implemented in some examples. Link for Input Link for Group