solid-design-system / solid

Monorepo for Union Investment's Solid Design System.
https://solid-design-system.fe.union-investment.de/x.x.x/storybook/
Other
20 stars 3 forks source link

feat: ✨ add `sd-range` / `sd-range-knob` #306

Open karlbaumhauer opened 1 year ago

karlbaumhauer commented 1 year ago

User Story

As a user of the Solid Design System, I would like to utilize a range component in order to provide a possibility to select a range between two values, as well as have additional information about the scale and steps on these values displayed in a brand conform and accessible way.

Documentation / Hand-off

Figma Branch

The sd-range contains a parent and a child component. In case the user needs only one single knob, the child component sd-range-knob is not needed. The sd-range will add a single knob by itself. In case the user needs multiple knobs (currently only 2 knobs are communicated), the knobs slot is supposed to be used and 2 knobs need to be added.

sd-range

Components detailed requirements

Props

Status Name Type Default Description
  • [ ]
label string Label Simple text to define the label.
  • [ ]
help-text string Help-text Simple text to define an optinal helper text underneath the component.
  • [ ]
offset number none Defines the offest value of the range starting point.
  • [ ]
min number 0 Defines the sart value of the range.
  • [ ]
max number 100 Defindes the end value of the range.
  • [ ]
step number 1 Defines the step granularity of the knobs.
  • [ ]
value number none Defines/describes the value of the input field itself.
  • [ ]
no-tooltip boolean false Hides the tooltip on the knobs.
  • [ ]
disabled boolean false Disables the range component.

CSS-Properties

Open Questions towards design

sd-range-knob

Components detailed requirements

Props

Status Name Type Default Description
  • [ ]
value type default Defines/describes the value of the input field itself.
  • [ ]
label type default Describes the technical HTML label of the input field itself.

Parts

Slots

Open Questions towards design

Technincal Information

Adobe Spectrum uses the same approach with multiple knobs in a slot. This functionality could be copied. As Adobe published unter Apache 2.0 license and we would have to add additional license information to the file, copy-paste might be more effort rather than rewriting everything => TBD.

We definitely should start with the Shoelace solution because of it's form handling and maybe can adapt thigns than to the Adobe one.

Subtasks

DoR

DoD

karlbaumhauer commented 6 months ago

@coraliefeil and @mariohamann pls fill in the missing infos / answer the open questions. After that, you can move the ticket into the refinement column.

mariohamann commented 6 months ago

Removed myself, moved to be refined and removed pre-refinement label.

yoezlem commented 4 months ago

FYI: Because the component will be very complex with the multi-range function, I have decided, just like with the datepicker component, to label this as a new feature and remove the CL-Migration label. If you have any questions, feel free to reach out to me.