Skip to content

Commit

Permalink
Merge branch 'v3-dev' of github.com:ec-europa/europa-component-librar…
Browse files Browse the repository at this point in the history
…y into v3.8.0-dev
  • Loading branch information
planctus committed Mar 29, 2023
2 parents 1ce25fa + 223e5bf commit 603a965
Show file tree
Hide file tree
Showing 68 changed files with 2,369 additions and 842 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"@size-limit/preset-big-lib": "8.2.4",
"babel-jest": "29.5.0",
"classnames": "2.3.2",
"eslint": "8.36.0",
"eslint": "8.37.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "8.7.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.1",
"eslint-plugin-jsx-a11y": "6.7.1",
Expand All @@ -54,26 +54,26 @@
"jest": "29.5.0",
"jest-axe": "6.0.0",
"jest-environment-jsdom": "29.5.0",
"lerna": "6.5.1",
"lerna": "6.6.1",
"lerna-changelog": "2.2.0",
"lint-staged": "13.2.0",
"npm-run-all": "4.1.5",
"patch-package": "6.5.1",
"postinstall-postinstall": "2.1.0",
"prettier": "2.8.4",
"prettier": "2.8.7",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"rimraf": "4.4.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "4.4.1",
"size-limit": "8.2.4",
"ssri": "10.0.1",
"stylelint": "14.15.0",
"stylelint": "15.3.0",
"stylelint-config-css-modules": "4.2.0",
"stylelint-config-prettier": "9.0.5",
"stylelint-config-standard": "29.0.0",
"stylelint-config-standard-scss": "6.1.0",
"stylelint-config-standard": "31.0.0",
"stylelint-config-standard-scss": "7.0.1",
"stylelint-order": "6.0.3",
"stylelint-scss": "4.5.0",
"stylelint-scss": "4.6.0",
"svg4everybody": "2.1.9"
},
"resolutions": {
Expand All @@ -84,7 +84,7 @@
"ansi-html": ">=0.0.8",
"follow-redirects": ">=1.14.7",
"node-fetch": "2.6.7",
"immer": ">=9.0.6",
"immer": ">=9.0.21",
"merge": ">=2.1.1",
"browserslist": ">=4.16.5",
"node-forge": ">=1.0.0",
Expand All @@ -99,7 +99,7 @@
"json5": ">=2.2.2",
"ua-parser-js": ">=1.0.33",
"http-cache-semantics": ">=4.1.1",
"webpack": ">=5.76.0"
"webpack": ">=5.76.3"
},
"engines": {
"node": ">=12.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const getArgs = (data) => {

if (data.login_box) {
defaultArgs.show_login = true;
defaultArgs.logged = false;
}
if (data.site_name) {
defaultArgs.show_site_name = true;
Expand Down Expand Up @@ -75,6 +76,14 @@ const getArgTypes = (data) => {
category: 'Optional',
},
};
argTypes.logged = {
name: 'logged in',
type: { name: 'boolean' },
description: 'Show the login box for a logged in user',
table: {
category: 'Optional',
},
};
}
argTypes.show_language_selector = {
name: 'language selector',
Expand Down Expand Up @@ -205,6 +214,8 @@ const prepareData = (data, args) => {
data.menu = enMenu;
}

data.logged = args.logged;

if (!args.show_language_selector) {
delete data.language_selector;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const getArgs = (data) => {

if (data.login_box) {
defaultArgs.show_login = true;
defaultArgs.logged = false;
}
if (data.site_name) {
defaultArgs.show_site_name = true;
Expand Down Expand Up @@ -69,6 +70,14 @@ const getArgTypes = (data) => {
category: 'Optional',
},
};
argTypes.logged = {
name: 'logged in',
type: { name: 'boolean' },
description: 'Show the login box for a logged in user',
table: {
category: 'Optional',
},
};
}
argTypes.show_language_selector = {
name: 'language selector',
Expand Down Expand Up @@ -234,6 +243,8 @@ const prepareData = (data, args) => {
data.message = clonedDataFull.message;
}

data.logged = args.logged;

correctPaths(data);

data.logo.src_desktop = enLogoDesktopEU;
Expand Down
16 changes: 8 additions & 8 deletions src/implementations/vanilla/components/checkbox/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,29 +104,29 @@ $_label-color: null !default;
// Checked and indeterminate
// stylelint-disable no-descending-specificity
.ecl-checkbox__input:checked {
+ .ecl-checkbox__label .ecl-checkbox__box {
~ .ecl-checkbox__label .ecl-checkbox__box {
background: $_box-background-checked;
border-color: $_box-border-color-checked;
}

+ .ecl-checkbox__label:hover .ecl-checkbox__box {
~ .ecl-checkbox__label:hover .ecl-checkbox__box {
background: $_box-background-checked-hover;
border-color: $_box-background-checked-hover;
}

+ .ecl-checkbox__label .ecl-checkbox__box--invalid {
~ .ecl-checkbox__label .ecl-checkbox__box--invalid {
background: $_invalid-border-color;
border-color: $_invalid-border-color;
}

+ .ecl-checkbox__label .ecl-checkbox__icon {
~ .ecl-checkbox__label .ecl-checkbox__icon {
visibility: visible;
}
}

// Invalid
.ecl-checkbox--invalid {
@at-root .ecl-form-group & + .ecl-feedback-message {
@at-root .ecl-form-group & ~ .ecl-feedback-message {
margin-top: map.get(theme.$spacing, 'xs');
}

Expand All @@ -149,7 +149,7 @@ $_label-color: null !default;
/* stylelint-disable-next-line plugin/selector-bem-pattern, selector-max-compound-selectors */
.ecl-checkbox--invalid
input:checked
+ .ecl-checkbox__label:hover
~ .ecl-checkbox__label:hover
.ecl-checkbox__box:not(.ecl-checkbox__box--disabled) {
background: map.get(theme.$color, 'red-130');
}
Expand All @@ -161,15 +161,15 @@ $_label-color: null !default;

// Hover and default focus state
.ecl-checkbox__input:focus-visible {
+ .ecl-checkbox__label {
~ .ecl-checkbox__label {
.ecl-checkbox__box:not(.ecl-checkbox__box--disabled) {
outline: 2px solid map.get(theme.$color, 'blue-100');
outline-offset: 2px;
}
}

&:checked {
+ .ecl-checkbox__label {
~ .ecl-checkbox__label {
.ecl-checkbox__box:not(.ecl-checkbox__box--disabled) {
outline: 2px solid map.get(theme.$color, 'blue-100');
outline-offset: 2px;
Expand Down
10 changes: 5 additions & 5 deletions src/implementations/vanilla/components/radio/_radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ $_label-color: null !default;
}

// Focus
.ecl-radio__input:focus-visible + .ecl-radio__label,
.ecl-radio__input:active + .ecl-radio__label {
.ecl-radio__input:focus-visible ~ .ecl-radio__label,
.ecl-radio__input:active ~ .ecl-radio__label {
.ecl-radio__box {
outline: 2px solid map.get(theme.$color, 'blue-100');
outline-offset: 2px;
}
}

// Checked
.ecl-radio__input:checked + .ecl-radio__label {
.ecl-radio__input:checked ~ .ecl-radio__label {
.ecl-radio__box {
border-color: $_box-border-color-checked;
border-width: $_box-border-width-checked;
Expand Down Expand Up @@ -131,7 +131,7 @@ $_label-color: null !default;
}

// stylelint-disable no-descending-specificity
.ecl-radio__input:checked + .ecl-radio__label .ecl-radio__box--invalid {
.ecl-radio__input:checked ~ .ecl-radio__label .ecl-radio__box--invalid {
border-color: $_invalid-border-color;

.ecl-radio__box-inner {
Expand All @@ -140,7 +140,7 @@ $_label-color: null !default;
}

.ecl-radio__label:hover .ecl-radio__box--invalid,
.ecl-radio__input:checked + .ecl-radio__label:hover .ecl-radio__box--invalid {
.ecl-radio__input:checked ~ .ecl-radio__label:hover .ecl-radio__box--invalid {
border-color: $_invalid-border-color-hover;

.ecl-radio__box-inner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
.ecl-rating-field__input:focus,
.ecl-rating-field:not(.ecl-rating-field--disabled)
.ecl-rating-field__input:active {
+ .ecl-rating-field__label {
~ .ecl-rating-field__label {
outline: 2px solid map.get(theme.$color, 'blue-100');
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/implementations/vanilla/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ $_multiple_counter_background: null !default;
z-index: 0;
}

.ecl-select:hover + .ecl-select__icon {
.ecl-select:hover ~ .ecl-select__icon {
background-color: $_arrow-background-color-hover;
}

Expand All @@ -181,8 +181,8 @@ $_multiple_counter_background: null !default;

/* stylelint-disable-next-line no-descending-specificity */
.ecl-select__icon,
.ecl-select:hover + .ecl-select__icon,
.ecl-select:focus + .ecl-select__icon {
.ecl-select:hover ~ .ecl-select__icon,
.ecl-select:focus ~ .ecl-select__icon {
background-color: rgba($_arrow-background-color, 0.5);
}

Expand Down Expand Up @@ -215,11 +215,11 @@ $_multiple_counter_background: null !default;
background-color: $_arrow-background-color-invalid;
}

.ecl-select:hover + .ecl-select__icon {
.ecl-select:hover ~ .ecl-select__icon {
background-color: $_arrow-background-color-invalid-hover;
}

.ecl-select:focus-visible + .ecl-select__icon {
.ecl-select:focus-visible ~ .ecl-select__icon {
background-color: $_arrow-background-invalid-focus;
}

Expand All @@ -241,7 +241,7 @@ $_multiple_counter_background: null !default;
* Multiple
*/
// stylelint-disable-next-line no-descending-specificity
.ecl-select[multiple] + .ecl-select__icon {
.ecl-select[multiple] ~ .ecl-select__icon {
display: none;
}

Expand Down
4 changes: 2 additions & 2 deletions src/playground/addons/storybook-addon-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@storybook/theming": "6.5.16",
"js-beautify": "1.14.7",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
6 changes: 3 additions & 3 deletions src/playground/addons/storybook-addon-notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"@emotion/styled": "11.10.6",
"@storybook/addons": "6.5.16",
"he": "1.2.0",
"marked": "4.2.12",
"marked": "4.3.0",
"prismjs": "1.29.0",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@storybook/addons": "6.5.16",
"@storybook/api": "6.5.16",
"@storybook/components": "6.5.16",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
4 changes: 2 additions & 2 deletions src/playground/ec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"browser-update": "3.3.44",
"buffer": "6.0.3",
"core-js": "3.29.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"twing": "2.3.7",
"twing-loader": "2.0.2"
}
Expand Down
4 changes: 2 additions & 2 deletions src/playground/eu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"browser-update": "3.3.44",
"buffer": "6.0.3",
"core-js": "3.29.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"twing": "2.3.7",
"twing-loader": "2.0.2"
}
Expand Down
2 changes: 1 addition & 1 deletion src/presets/ec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@ecl/theme-ec": "3.7.1",
"cross-env": "7.0.3",
"npm-run-all": "4.1.5",
"rimraf": "4.4.0"
"rimraf": "4.4.1"
},
"keywords": [
"ecl",
Expand Down
2 changes: 1 addition & 1 deletion src/presets/eu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@ecl/theme-eu": "3.7.1",
"cross-env": "7.0.3",
"npm-run-all": "4.1.5",
"rimraf": "4.4.0"
"rimraf": "4.4.1"
},
"keywords": [
"ecl",
Expand Down
2 changes: 1 addition & 1 deletion src/presets/reset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"cross-env": "7.0.3",
"normalize.css": "8.0.1",
"npm-run-all": "4.1.5",
"rimraf": "4.4.0"
"rimraf": "4.4.1"
},
"keywords": [
"ecl",
Expand Down
2 changes: 1 addition & 1 deletion src/presets/rtl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@ecl/theme-dev": "3.7.1",
"cross-env": "7.0.3",
"npm-run-all": "4.1.5",
"rimraf": "4.4.0"
"rimraf": "4.4.1"
},
"keywords": [
"ecl",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/icons-ec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"prepublish": "npm run dist"
},
"devDependencies": {
"rimraf": "4.4.0",
"rimraf": "4.4.1",
"svg-sprite": "2.0.2",
"svgo": "3.0.2",
"xml2js": "0.4.23"
Expand Down
2 changes: 1 addition & 1 deletion src/resources/icons-eu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"prepublish": "npm run dist"
},
"devDependencies": {
"rimraf": "4.4.0",
"rimraf": "4.4.1",
"svg-sprite": "2.0.2",
"svgo": "3.0.2",
"xml2js": "0.4.23"
Expand Down
Loading

1 comment on commit 603a965

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.