GithubHelp home page GithubHelp logo

sui-components / sui-components Goto Github PK

View Code? Open in Web Editor NEW
137.0 42.0 56.0 16.78 MB

SUI Components

Home Page: https://sui-components.vercel.app/

License: MIT License

JavaScript 89.23% SCSS 10.37% TypeScript 0.39%
reactjs web-components react-components site--es-platform team--es-pt-web-platform tier--2 vert--es-platform vert--es-platforms

sui-components's Introduction

SUI React Components CI

SUI Logo

SUI Components is an Open-Source, high quality library of React components that empowers teams to craft any product with ease.

⚙️ Minimum requirements

node npm

🖥 Environment Support

  • Modern browsers and Internet Explorer 11+ (with polyfills)
  • Server-Side Rendering

🧪 Test Coverage

statements branches functions lines

✨ Features

  • Well-tested, production ready presentational React components.
  • Isolated components. Each component is a package.
  • Customizable components using variables.

sui-components's People

Contributors

a-ferrante avatar adriadoz avatar aitorrodriguez990 avatar alverd04 avatar andresin87 avatar andresz1 avatar arnau-rius avatar carlosvillu avatar codingwithdani avatar danivm avatar davecarter avatar davidbarna avatar davidmartin84 avatar javiauso avatar jcger avatar joanclaret avatar jordevo avatar juanmaguitar avatar kikoruiz avatar klaufel avatar midudev avatar nucliweb avatar oegea avatar oriolpuig avatar pablitogs avatar rmoralp avatar ronaldo-mh avatar sui-bot avatar xaviermariaconejo avatar zecafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sui-components's Issues

Can't specify rel tag to Button of type link

I need to specify a rel different to noopener for a link with a href=mailto , this is because target=_blank in combination with rel=noopener and href=mailto doesn't work on Android browsers, it opens an empty tab instead of the email app
I found that the rel is hardcoded here

rel={target === '_blank' ? 'noopener' : undefined}

Is it possible to update the button to set a custom rel?

atom/input - inconsistency between types

This component is huge and only hasa few Sass variables to fit too many scenarios.

The main issue I'm having is implementing the type='checkbox' - Is tightly coupled to its other input types: 'radio', 'whatever..' regarding layout position, paddings, line-height, etc.. so it doesn't play well with its sibling SuiAtomLabel component.

Proposal:
Should we consider splitting this component into at least 3 others:

  • Sui-AtomInput
  • Sui-AtomInput-checkbox
  • Sui-AtomInput-radio
  • Sui-AtomInput- ...

If we do so well be able to create a better and more consistent Molecules to compose Labels and Inputs

Looking forward to get your feedback!

atom/tag class naming convention issue

AtomTag could has two icons:

image

The icon on the left has "sui-AtomTag-icon" class
The icon on the right has "sui-AtomTag-secondary-icon" class

This class names are wrong. It should be something similar to "sui-AtomTag-iconLeft" and "sui-AtomTag-iconRight"

atom/input: Non focusable elements

Issue summary

As stated in Accesibility and inclusion guidelines, in its first rule: Every interactive element should be focusable.

The Problem:

  • Currenty sui-atom-input component has the pseudoClass :focus with all visuals disabled:
.sui-AtomInput-input[type='radio']:focus,
.sui-AtomInput-input[type='checkbox']:focus {
    border: 0;
    box-shadow: none;
    outline: 0 none;
}

Users are unable no navigate through form elements using tabIndex due to this lack of visual feedback (functionality is not affected)

  • Example of selected checkbox:

Screenshot 2019-06-19 at 16 20 43

The solution:

  • Define a similar styling as it already has its type=text form:

Screenshot 2019-06-19 at 16 32 53

.sui-AtomInput-input:focus {
    border: 1px solid #30832f;
    box-shadow: 0 0 3px 0 #2b91c1;
    outline: 0 none;
}

Thanks

atom/card Add responsive functionality

AtomCard could be horizontal or vertical but it can't be responsive (vertical in mobile and horizontal in desktop).

In coches.net we need this functionality to create or vehicle component in order to decouple our core page "ads list"

It could be a "responsive" prop that adds a modifier class with a media query. Not compatible with "vertical" prop.

Is it possible to iterate AtomCard to add this functionality?

Errors when `npm start` related to motor theme

I'm getting these errors when starting sui-components w/ npm start

It look likes it has something to do w/ motos & coches theme

/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/spinner/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/rating/icons/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/modal/gallery/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/modal/gallery/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/card/profile/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/card/profile/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/tag/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/tag/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/rating/icons/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/spinner/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/panel/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/panel/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/button/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/button/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/badge/themes/motos.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js
/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo/atom/badge/themes/coches.scss
Module build failed: 
@function image-url($image, $url: $url-statics + 'images/') {
                                 ^
      Undefined variable: "$url-statics".
      in /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/@schibstedspain/sui-theme/lib/utils/_url.scss (line 4, column 35)
 @ /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/demo /Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-content-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/css-loader!/Users/juanmanuelgarrido/PROJECTS/SCHIBSTED/sui-components/node_modules/sass-loader/lib/loader.js ^.*\/themes\/.*\.scss
 @ ./src/components/demo/fetch-styles.js
 @ ./src/components/demo/index.js
 @ ./src/routes.js
 @ ./src/components/root/index.js
 @ ./src/app.js
 @ multi react-hot-loader/patch webpack-hot-middleware/client?reload=true ./app.js

molecule/collapsible: Align button & text

We need the alignment of the button to be independent of the alignment of the text.

Screenshot 2019-04-24 at 11 09 10

It may be a good time to define 2 props to align both the text and the button in the component and not by inheritance.

<div style={{backgroundColor: '#fff', fontSize: 14, padding: 16, textAlign: 'right'}}>
  <MoleculeCollapsible icon={icon} showText={showText} hideText={hideText} >
    <Text/>
  </MoleculeCollapsible>
</div>

atom/spinner: Is showing literal by default

When we use AtomSpinner component it shows a literal "Loading..." by default. Is it necessary?

AtomSpinner.defaultProps = {
  delayed: false,
  type: TYPES.SECTION,
  loader: <SUILoader text="Loading..." />
}

Source

If we want to remove this literal we must import AtomSpinner with a loader prop value without literal:

<AtomSpinner loader={<SUILoader />} />

Instead of this, it is not better remove this defaultProp and let developer choose?

molecule/photoUploader: file upload button fires onSubmit action form

Describe the bug

When we use the molecule/photoUploader component inside a form and click on File Upload button, this fire a onSubmit form action.

Steps to reproduce

  1. Create a form with a submit action.
  2. Use the molecule/photoUploader component inside form
  3. Click on "Upload foto" button.
  4. See how onSubmit form event has been fired

Expected behaviour

When we click on File Upload button, We expect to not fire the onSubmit form action.

Screenshots
Grabaciondepantalla2020-04-22alas8 54 50

Environment / Context

  • Desktop & Mobile
  • Operating System: macOS Catalina 10.15.4
  • Browser and version: Chrome 80 & Firefox 80
  • Device: Mac Book Pro

molecule/select doesn't close its dropdown on blur when another molecule/select is clicked

Describe the bug
When multiple Molecule/Select components exist on the same page, and the user clicks on one of them to open its dropdown, and the user clicks on a different Molecule/Select component to open a different dropdown, and clicks again on the former component, the last opened dropdown is not closed by its Molecule/Select.

Steps to reproduce

  1. Go to https://sui-components.now.sh/workbench/molecule/select/demo
  2. Click on Single Selection / with Placeholder dropdown component
  3. Click on With different value and displayed text dropdown component
  4. Click again on Single Selection / with Placeholder dropdown component
  5. See error

Expected behaviour
The user would expect the dropdown to be closed on blur ie when the dropdown component has lost its focus.

Screenshots
image

Environment / Context

  • Desktop or Mobile? Both
  • Operating System: All
  • Browser and version All
  • Device: All

Additional info
Add any other context about the problem here.

AtomPopover & AtomTooltip components not compatible with the new React Context API

Description

AtomPopover & AtomTooltip are not working when any other component using the new React Context API inside is being rendered in the content prop.

For example, if you use an AtomPopover and you also set the content prop (https://github.com/SUI-Components/sui-components/blob/master/components/atom/popover/src/index.js#L63) using a component that's wrapped by the SUIContext (https://github.com/SUI-Components/sui/blob/master/packages/sui-react-context/src/index.js), your context props will be undefined.

Posible solution

It seems that the 3rd party library (reactstrap at version 6.3.0) we use for tooltips and popovers makes our components context is lost when used as its children prop. However the same library at 8.2.0 version works fine.

atom/input: readonly prop is not set

When the readOnly prop is sent the atom/input doesn't set a readOnly prop instead it set the disabled one. Is this the expected behavior?

disabled={disabled || readOnly}

atom/label: Only display blocked labels are available

The motivation of this Issue is allow rendering inline labels specially useful when input element is a checkbox. Currently we're creating lots of layout containers to avoid this behaviour.

The solution might be implementing a new prop as inline containing 2 possible string values: left or right. If not present defaulted behaviour will be rendered so current component API won't be affected.

molecule/inputTags Padding left issue

MoleculeInputTags has padding left and right as other inputs
image

Inside, it has an input with a padding-left, so we are adding an extra unnecessary space.

image

Molecule/select when selecting a second option when clicking the checkbox, the dropdown is closed

Describe the bug
In multi-selection mode, when a user selects a second option by clicking into the checkbox, the dropdown is closed

Steps to reproduce
1- open the demo of any component using Molecule/Select
2. Click on the dropdown to open the options list
3. Select the first option by clicking into the checkbox not any other part of the rectangle
4. Select a second option by clicking into the checkbox not any other part of the rectangle

Expected behavior
The option should just be selected and the list should remain still open.

Screenshots
ezgif com-video-to-gif

Environment / Context

  • Mobile and Desktop
  • Mac OS
  • Chrome and Firefox

Additional info
This bug doesn't happen in the sui-components studio, but we have this bug in our demo and in production`

molecule/modal - back button does not close modal

Describe the bug
Tapping the system back button or clicking back button in desktop browsers and safari mobile are not closing opened modal. It just navigate back to previous url.

Expected behaviour
As a standard, it back button should close modal if it is open, if not navigate to previous history url.
See Material Design dialog behaviour specs: https://material.io/components/dialogs/#behavior

Environment / Context

  • Desktop and Mobile

Molecule/Select doesn't open the dropdown when clicking in the box in Firefox

Describe the bug
The expected behavior of the Molecule/Select component is to open the options when clicking the box. It doesn't happen in Firefox, it only opens the options when clicking the down arrow ⬇️ .

Steps to reproduce

  1. Using Firefox go to https://sui-components.now.sh/workbench/molecule/select/demo
  2. Click on any box
  3. See the bug

Expected behaviour
When clicking the box, the dropdown should be opened as it happens in Chrome

Environment / Context

  • Desktop or Mobile? Both
  • Browser and version Firefox

The headings and Wrappers of all demos are different

Describe the issue
The headings and Wrappers of all demos are different, not only on styles, but sometimes the demos even don't have any Title at all (check buttons for instance)

Steps to reproduce

  1. Visit https://sui-components.now.sh/workbench/atom/button/demo
  2. Navigate all the demos

Expected behaviour

  • There should always be a title
  • The Headings should always have the same format
  • The wrapper of the demos should have the same spacing and style

Environment / Context

  • Desktop and Mobile
  • Operating System: All
  • Browser and version: all
  • Device: All

card/product is broken

Current version in surge throws error:

Uncaught (in promise) TypeError: Cannot read property 'contextTypes' of undefined

molecule/select dropdown list scrollbar closes the list

Click on dropdown list scrollbar closes the list and it shouldn't.

Given this screenshot:
image

If user clicks on scroll bar, drop down list is going to close. It happens always because we are checking "!isSomeOptionFocused && isOpen" to close and it is wrong

atom/button: Unnecessary justify-content property for full width styles.

Right now we're applying a justify-content property (https://github.com/SUI-Components/sui-components/blob/master/components/atom/button/src/index.scss#L177) to a Atom Button modifier (full width) because it was inherited from the "legacy" mixin that was also using a display: flex property: https://github.com/SUI-Components/sui-theme/blob/master/src/components/_button.scss#L20. However at this moment the Atom Button styles define the component display behaviour as inline-block, so the justify-content I'm pretty sure it's not needed anymore, it's used text-align instead.

Fort sure, it should be properly tested before doing this change.

MoleculeSelect arrow key navigation bug

Describe the bug
Navigating with the arrow keys through the items of a select, when we reach the second item, the select closes unexpectedly

Steps to reproduce

  1. Go to https://sui-components.now.sh/workbench/molecule/selectField/demo
  2. Click on a SelectField
  3. Scroll down with arrow keys
  4. See error

Expected behaviour
We need to be able to navigate through the select items using the arrow keys on the keyboard

Screenshots
Kapture 2020-01-23 at 9 43 25

Environment / Context

  • Desktop

Additional info
The error can be identified in the next line of code, by seeing how from the second time we click on the down arrow key, the reference refsMoleculeSelectOptions.current includes the items correctly, but when mapped, it returns a null for each item

const options = refsMoleculeSelectOptions.current.map(getTarget)

atom/tooltip: doesn't allow theme colors

Is your iteration request related to a problem?
Nowadays, the AtomTooltip displays only in black color and as a developer I can't use the theme colors.

Describe the solution you'd like
Following the same as AtomButton is developed, I'll create a new property color to use one of the theme colors (primary, accent, neutral, success, alert and error).

Additional context
captured

atom/button Error fullWidth on using atom buttons with fullWidth

We have seen an error on using sui-atom-button in link mode with fullWidth enabled. The error is only show on build version (not linking) and once we use prop link and fullWidth together.

The error is that react says that we are passing a fullWidth property to a DOM element . In fact, we are passing it as we have a default linkFactory on our Button.js file that does a {...rest} passing the whole props to the tag.

linkFactory: ({children, ...rest} = {}) => <a {...rest}>{children}</a>

molecule/modal: prevents children scroll

The component molecule/modal is preventing scroll when the content is smaller than the viewport, but in the scenario where the content in fact is smaller than viewport and a subcomponent needs scrolling it prevents it too. For example de districts from Barcelona in the next screenshot:
image
Could we disable preventing scrolling with a prop? 👍

(molecule/photoUploader): Is not retrieving the fileName

Is your iteration request related to a problem?

As a developer, I would like that MoleculePhotoUploader could return the fileName when a new file is added.

Describe the solution you'd like

Currently, the MoleculePhotoUploader is building an object without the fileName and could be usefull to have it outside the component.

My solution is to expose outside the entire file to allow developers read file data (i.e. fileName, file size...).

Additional context

// Current object
[
  {
    blob: object,
    url: string,
    isNew: boolean, 
    isModified: boolean, 
    hasErrors: boolean
  },
  // ...
]

// New object
[
  {
    blob: object,
    url: string,
    isNew: boolean, 
    isModified: boolean, 
    hasErrors: boolean,
    file: object
  },
  // ...
]

Sass throws error: EISDIR: File is a directory

Describe the bug

To try out the SUI components, I've set up a little demo with create-react-app on Codesandbox.io:

https://codesandbox.io/s/adevinta-sui-0z6qj

So far, it is only supposed to show a couple of action buttons from the package @s-ui/react-atom-action-button.

I'm having trouble integrating the Sass theme in my main stylesheet. I did it like this:

styles.scss

@import '~@s-ui/theme/lib/index';
@import '~@s-ui/react-atom-action-button/lib/index';

.App {
  font-family: sans-serif;
  text-align: center;
}

When create-react-app tries to compile the stylesheet, it throws this error:

image

I've checked the code in node_modules, lib/utils is indeed a directory.

Steps to reproduce

  1. Go to https://codesandbox.io/s/adevinta-sui-0z6qj
  2. See error on the “Problems” tab of the browser preview window

Expected behaviour

I expect the import of the Sass theme and the ActionButton atom to work properly, so that the browser preview window shows the buttons.

Screenshots

See above

Environment / Context

  • Desktop
  • Google Chrome 84

Additional info

Using latest version of node-sass, 4.14.1. My first guess was this may be a compatibility issue with Sass, but version 3 throws the same error.

Sui-Title dinamic classNames

The Sui-Title component has a fixed class declaration and IMHO it should be composed via its className props value. Like:

<h1 className={`${className}-title`}>{title}</h1>

If we do so we'll be able to re-use the same component multiple times in the same page without affecting one each other.

FormTextInput component needs KeyBoard events

Hi guys, terrific job 👍

I think It would be awesome if FormTextInput provides some keyBoard Events like onKeyPress. The only event provided so far is onChange.

Or maybe a way to support all possible events supported by the native input.

molecule/modal Bug in mobile full screen

Given paper "In the modal mobile version you can use a full screen version to take advantage of the screen space."

If the modal has a little of content, it is not full screen. See screenschot:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.