Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card - Design System #601

Closed
jgonza16 opened this issue Feb 23, 2024 · 1 comment
Closed

Card - Design System #601

jgonza16 opened this issue Feb 23, 2024 · 1 comment
Assignees
Milestone

Comments

@jgonza16
Copy link
Collaborator

jgonza16 commented Feb 23, 2024

Card - Design System

1 - Prerequisites

  • Host element will have the .dcx-card class name.
  • Host element will have the .dcx-card-vertical or .dcx-card-horizontal class name.
  • Host element will have the .dcx-card--selected class name when the selected property is true.
  • It will have sub-element with the .dcx-card-header class name.
  • It will have sub-element with the .dcx-card-content class name.
  • It will have sub-element with the .dcx-card-image class name.
  • It will have sub-element with the .dcx-card-actions class name.
  • It will have sub-element with the .dcx-card-footer class name.

2 - Overview

2.1 - Possible states

Name Description
Default Instance without specific properties defined
Focus Interact variant instance while receiving focus on main container
Hover Interact variant instance while receiving focus on main container
Selected Interact variant instance while receiving focus on main container

2.2 - Variants

Name Description
Default Default look & feel
interact Interactionable look & feel
vertical Vertical layout look & feel
horizontal Horizontal layout look & feel

2.3 - Structure

  • Card
Element Description  Token Name
Box The card container article itself card_box
  • CardHeader

    Element Description  Token Name
    Box The container item box card_header_box
    Text The header's item text itself [text-tokens]
  • CardContent

    Element Description  Token Name
    Box The container item card_content_box
    Text The content's item text itself [text-tokens]
  • CardImage

    Element Description  Token Name
    Box The imag container img itself card_image
  • CardActions

    Element Description  Token Name
    Box The container item card_actions_box
    Text The content's item text itself [text-tokens]
  • CardFooter

    Element Description  Token Name
    Box The container item card_footer_box
    Text The content's item text itself [text-tokens]

2.4 - Tokens definition

Considerations:

  • ❗ Take a close look to the FormSelect component. It is a form element as well, the tokens and styling approach should be similar.
  • Add the tokens to src/design-system/tokens.json
  • Define all styles in src/design-system/checkbox.css
  • Add import to the new CSS file in src/design-system/index.css

Possible tokens:

  • spacing-x-card_box
  • border-color-card_box-hover
  • spacing-y-card_content_box
  • spacing-x-card_header_box
  • border-width-card_box
  • etc.

Follow the naming pattern

3 - Storybook

Create the pages for:

  • Playground
  • Default
  • AccessibleTheme
  • DarkTheme
  • MaterialTheme

On each MDX page make examples for each possible variant

4 - Initial setup

Please follow these steps to create your branch:

git checkout release/1.1.0
git pull
git checkout -b 'feature/card-design-system'
@AlaaEddine20 AlaaEddine20 self-assigned this Feb 26, 2024
@daniele-zurico daniele-zurico added this to the 1.1.0 milestone Apr 3, 2024
@jgonza16 jgonza16 self-assigned this May 9, 2024
@daniele-zurico
Copy link
Contributor

closed by #562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants