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
119 stars 14 forks source link

[component]: Text input #3270

Open Cian77 opened 1 month ago

Cian77 commented 1 month 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-168

Tokens

@use 'sass:map';
@use './../tokens/components' as tokens;

// to see the available component tokens
@each $key in map.keys(tokens.$post-text-input) {
  @debug $key;
}

input {
  {property}: map.get(tokens.$post-text-input, {token-name});
}

Tasks

### 💻 Tasks
- [x] Review figma design (states complete, ability to implement)
- [ ] HTML/CSS implementation
- [ ] Remove any references to bootstrap
- [ ] Remove any unused scss variables for this component
- [ ] Documentation in Storybook
- [ ] Visual regression tests
- [ ] Design review
gfellerph commented 1 month ago

After discussion with @sandrahohl-post, small variants and dark mode will be added in a later iteration.

gfellerph commented 1 month ago

Open point: validation message (create a component? is icon in validation message?) -> https://github.com/swisspost/design-system/discussions/3353

Component token names are under discussion as well -> https://github.com/swisspost/design-system/issues/3356

Cian77 commented 4 weeks ago

Integrated new Typography and Icons.

alizedebray commented 11 hours ago

Waiting for the tokens to be updated.