Skip to content

Commit

Permalink
Merge branch 'main' into deprecate-controlled-password-input
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored May 4, 2021
2 parents 1cdd2e4 + 001b6d5 commit 280c47a
Show file tree
Hide file tree
Showing 44 changed files with 247 additions and 228 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/puka-npm-1.0.1-e8350b8346-bccd754bf3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ssri-npm-8.0.0-276fb838a8-50085886f4.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/carbon-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"react": "^16.8.6",
"react-dom": "^16.8.6",
"rimraf": "^3.0.2",
"rollup": "^2.44.0",
"rollup": "^2.46.0",
"rollup-plugin-strip-banner": "^2.0.0"
},
"sideEffects": [
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"@octokit/plugin-retry": "^3.0.7",
"@octokit/plugin-throttling": "^2.6.0",
"@octokit/rest": "^16.28.1",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.1.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"chalk": "^2.4.2",
"change-case": "^4.1.2",
"child-process-promise": "^2.2.1",
Expand All @@ -47,7 +47,7 @@
"progress-estimator": "^0.2.2",
"remark": "^10.0.1",
"replace-in-file": "^6.1.0",
"rollup": "^2.38.0",
"rollup": "^2.46.0",
"sass": "^1.32.4",
"sassdoc": "^2.7.3",
"yargs": "^15.1.0"
Expand Down
12 changes: 6 additions & 6 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
"@carbon/icons-react": "^10.31.0",
"@carbon/test-utils": "^10.15.0",
"@frctl/fractal": "^1.1.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.1.0",
"@rollup/plugin-replace": "^2.3.4",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.4.2",
"@rollup/plugin-virtual": "^2.0.3",
"adaro": "1.0.4",
"autoprefixer": "^9.7.4",
Expand Down Expand Up @@ -163,8 +163,8 @@
"react-copy-to-clipboard": "^5.0.0",
"react-dom": "^16.8.6",
"react-ga": "^3.3.0",
"rollup": "^2.38.0",
"rollup-plugin-filesize": "^9.1.0",
"rollup": "^2.46.0",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.24.5",
"sass-loader": "^8.0.2",
Expand Down
14 changes: 12 additions & 2 deletions packages/components/src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,24 @@
left: 0;
width: 100%;
height: rem(32px);
// Safari interprets `transparent` differently, so make color token value transparent instead:
background-image: linear-gradient(to bottom, rgba($layer, 0), $layer);
background-image: linear-gradient(to bottom, transparent, $layer);
content: '';
grid-column: 1/-1;
grid-row: 2/-2;
pointer-events: none;
}

// Safari-only media query
// won't appear correctly with CSS custom properties
// see: code snippet and tabs overflow indicators
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
.#{$prefix}--modal-content--overflow-indicator {
background-image: linear-gradient(to bottom, rgba($layer, 0), $layer);
}
}
}

.#{$prefix}--modal-content:focus
~ .#{$prefix}--modal-content--overflow-indicator {
width: calc(100% - 4px);
Expand Down
145 changes: 73 additions & 72 deletions packages/components/src/components/text-input/_text-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,89 +75,91 @@
position: relative;
display: flex;
width: 100%;
align-items: center;
}

.#{$prefix}--text-input__invalid-icon {
position: absolute;
// top/transform used to center invalid icon in IE11
top: 50%;
right: $carbon--spacing-05;
fill: $support-error;
transform: translateY(-50%);
}
.#{$prefix}--text-input__invalid-icon {
position: absolute;
// top/transform used to center invalid icon in IE11
top: 50%;
right: $carbon--spacing-05;
fill: $support-error;
transform: translateY(-50%);
}

.#{$prefix}--text-input__invalid-icon--warning {
fill: $support-warning;
.#{$prefix}--text-input__invalid-icon--warning {
fill: $support-warning;
}

path:first-of-type {
fill: $carbon__black-100;
opacity: 1;
}
}
.#{$prefix}--text-input__invalid-icon--warning path:first-of-type {
fill: $carbon__black-100;
opacity: 1;
}

// TODO: deprecate this style block
.#{$prefix}--text-input--password__visibility {
@include tooltip--trigger('icon', 'bottom');
@include tooltip--placement('icon', 'bottom', 'center');
}
// TODO: deprecate this style block
.#{$prefix}--text-input--password__visibility {
@include tooltip--trigger('icon', 'bottom');
@include tooltip--placement('icon', 'bottom', 'center');
}

.#{$prefix}--text-input--password__visibility,
// TODO: remove selector above
.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger {
@include focus-outline('reset');

position: absolute;
right: 0;
display: flex;
width: rem(40px);
height: rem(40px);
min-height: auto;
align-items: center;
justify-content: center;
padding: 0;
border: 0;
background: none;
cursor: pointer;
transition: outline $duration--fast-01 motion(standard, productive);

svg {
fill: $icon-secondary;
transition: fill $duration--fast-01 motion(standard, productive);
}
}
.#{$prefix}--text-input--password__visibility,
// TODO: remove selector above
.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger {
@include focus-outline('reset');

.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger:focus {
@include focus-outline('outline');
}
position: absolute;
right: 0;
display: flex;
width: rem(40px);
height: rem(40px);
min-height: auto;
align-items: center;
justify-content: center;
padding: 0;
border: 0;
background: none;
cursor: pointer;
transition: outline $duration--fast-01 motion(standard, productive);
}

.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger:hover
svg,
.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger:focus
svg {
fill: $icon-primary;
.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger
svg {
fill: $icon-secondary;
transition: fill $duration--fast-01 motion(standard, productive);

// Windows, Firefox HCM Fix
@media screen and (-ms-high-contrast: active),
screen and (prefers-contrast) {
// `ButtonText` is a CSS2 system color to help improve colors in HCM
fill: ButtonText;
}
}

.#{$prefix}--text-input--invalid,
.#{$prefix}--text-input--warning {
padding-right: $carbon--spacing-08;
}
.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger:focus {
@include focus-outline('outline');
}

.#{$prefix}--text-input--invalid.#{$prefix}--password-input {
padding-right: rem(64px);
}
.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger:hover
svg,
.#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger:focus
svg {
fill: $icon-primary;
}

.#{$prefix}--text-input--invalid
+ .#{$prefix}--text-input--password__visibility,
// TODO: remove selector above
.#{$prefix}--text-input--invalid
+ .#{$prefix}--text-input--password__visibility__toggle {
right: $carbon--spacing-05;
}
.#{$prefix}--text-input--invalid,
.#{$prefix}--text-input--warning {
padding-right: $carbon--spacing-08;
}

.#{$prefix}--text-input__field-wrapper.#{$prefix}--password-input__field-wrapper
.#{$prefix}--text-input__invalid-icon {
right: $carbon--spacing-07;
.#{$prefix}--text-input--invalid.#{$prefix}--password-input {
padding-right: rem(64px);
}

.#{$prefix}--text-input--invalid +
.#{$prefix}--text-input--password__visibility,
// TODO: remove selector above
.#{$prefix}--text-input--invalid +
.#{$prefix}--text-input--password__visibility__toggle {
right: $carbon--spacing-05;
}

.#{$prefix}--password-input-wrapper .#{$prefix}--text-input__invalid-icon {
Expand All @@ -169,8 +171,7 @@
svg,
// TODO: remove selector above
.#{$prefix}--text-input:disabled
+ .#{$prefix}--text-input--password__visibility__toggle
svg {
+ .#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger svg {
cursor: not-allowed;
fill: $icon-disabled;

Expand Down
1 change: 1 addition & 0 deletions packages/components/tests/pure-modules-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ describe('ES modules', () => {
nodeResolve(),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
terser.terser(),
],
Expand Down
2 changes: 1 addition & 1 deletion packages/feature-flags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"fs-extra": "^9.0.1",
"js-yaml": "^3.14.0",
"rimraf": "^3.0.2",
"rollup": "^2.38.0",
"rollup": "^2.46.0",
"rollup-plugin-strip-banner": "^2.0.0"
},
"sideEffects": false
Expand Down
6 changes: 3 additions & 3 deletions packages/icon-build-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"@babel/types": "^7.14.0",
"@carbon/cli-reporter": "^10.4.0",
"@carbon/icon-helpers": "^10.16.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-replace": "^2.3.4",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-replace": "^2.4.2",
"browserslist-config-carbon": "^10.6.1",
"change-case": "^4.1.1",
"core-js": "^3.6.5",
Expand All @@ -45,7 +45,7 @@
"react": "^16.6.0",
"react-dom": "^16.6.0",
"rimraf": "^3.0.0",
"rollup": "^2.38.0",
"rollup": "^2.46.0",
"rollup-plugin-strip-banner": "^2.0.0",
"svg-parser": "^2.0.4",
"svgo": "^1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/icons-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"fs-extra": "^8.1.0",
"prettier": "^2.2.1",
"rimraf": "^3.0.0",
"rollup": "^2.38.0",
"rollup": "^2.46.0",
"vue": "^2.6.8"
},
"sideEffects": false
Expand Down
12 changes: 6 additions & 6 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
"@babel/preset-react": "^7.13.13",
"@carbon/test-utils": "^10.15.0",
"@percy/storybook": "^3.3.1",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.1.0",
"@rollup/plugin-replace": "^2.3.4",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.4.2",
"@storybook/addon-storysource": "^5.3.19",
"@storybook/addons": "^5.3.19",
"@storybook/react": "^5.3.19",
Expand Down Expand Up @@ -110,8 +110,8 @@
"react-test-renderer": "^16.8.6",
"requestanimationframe": "^0.0.23",
"rimraf": "^3.0.0",
"rollup": "^2.38.0",
"rollup-plugin-sizes": "^1.0.3",
"rollup": "^2.46.0",
"rollup-plugin-sizes": "^1.0.4",
"rollup-plugin-strip-banner": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"rtlcss": "^2.4.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ module.exports = [
plugins: [
...baseConfig.plugins,
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify('development'),
}),
],
Expand All @@ -120,6 +121,7 @@ module.exports = [
plugins: [
...baseConfig.plugins,
replace({
preventAssignment: true,
'process.env.NODE_ENV': JSON.stringify('production'),
}),
terser(),
Expand Down
Loading

0 comments on commit 280c47a

Please sign in to comment.