swisspost / design-system

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

[component]: Switch #3275

Open Cian77 opened 3 months ago

Cian77 commented 3 months ago

Description

Create a HTML/CSS component using the current markup that implements as many features as possible from the new Design. Remove any dependencies on bootstrap for this component. This is done for backwards compatibility reasons. The current structure will eventually be deprecated. These styles will give us the necessary time to come up with a solid input component strategy.

Open issues:

Design:

Tokens:

Design

https://www.figma.com/design/JIT5AdGYqv6bDRpfBPV8XR/Foundations-%26-Components-Next-Level?node-id=21-178

Tokens

Tasks

### 💻 Tasks
- [ ] Review Design (All states present? Possible to implement?)
- [ ] https://github.com/swisspost/design-system/issues/3496
- [ ] HTML/CSS implementation
- [ ] Remove all unused scss variables for this element
- [ ] Documentation in Storybook
- [ ] Visual regression tests
- [ ] Design review
Cian77 commented 2 months ago

Deleted Switch Group. In this component, we do not have an Error to show.

oliverschuerch commented 1 month ago

@schaertim please assign this ticket to me or @gfellerph, as soon as you have implemented the component (as far as possible). There are several tasks we need to do before we can finish this component:

Vandapanda commented 1 month ago

@schaertim Overworked the switch component so that it has a (sometimes invisible) border in every state. Implemented the new focus style, added tokens for Focus border and changed some token names for better understanding. Please let me know if you need something else

oliverschuerch commented 2 weeks ago

@schaertim do you need anything from my side other than merging the newest tokens to main?