-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 8017-convert-console-error-warning
- Loading branch information
Showing
99 changed files
with
2,270 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: CI | |
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
dedupe: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
build: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@main | ||
- name: Use Node.js 14.x | ||
uses: actions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
build: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@main | ||
- name: Use Node.js 14.x | ||
uses: actions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
release: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@main | ||
- name: Use Node.js 14.x | ||
uses: actions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Sync generated files | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
jobs: | ||
release: | ||
runs-on: macOS-latest | ||
|
@@ -31,7 +31,7 @@ jobs: | |
git config --global user.name "carbon-bot" | ||
git remote set-url origin "https://x-access-token:[email protected]/carbon-design-system/carbon.git" | ||
git checkout master | ||
git checkout main | ||
git add -A | ||
git commit -m "chore(project): sync generated files" | ||
git push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
packages/components/src/components/context-menu/_context-menu.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
// | ||
// Copyright IBM Corp. 2020 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@import '../../globals/scss/vars'; | ||
@import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once'; | ||
@import '../../globals/scss/helper-mixins'; | ||
|
||
/// Context Menu styles | ||
/// @access private | ||
/// @group context-menu | ||
@mixin context-menu { | ||
.#{$prefix}--context-menu { | ||
@include box-shadow; | ||
|
||
position: fixed; | ||
z-index: z('modal'); | ||
min-width: 13rem; | ||
max-width: 18rem; | ||
padding: $spacing-02 0; | ||
background-color: $ui-01; | ||
visibility: hidden; | ||
} | ||
|
||
.#{$prefix}--context-menu--open { | ||
visibility: visible; | ||
|
||
&:focus { | ||
@include focus-outline('border'); | ||
} | ||
} | ||
|
||
.#{$prefix}--context-menu--invisible { | ||
opacity: 0; | ||
} | ||
|
||
.#{$prefix}--context-menu-option { | ||
position: relative; | ||
height: $spacing-07; | ||
background-color: $ui-01; | ||
cursor: pointer; | ||
transition: background-color $duration--fast-01 motion(standard, productive); | ||
|
||
&:focus { | ||
@include focus-outline('outline'); | ||
} | ||
} | ||
|
||
.#{$prefix}--context-menu-option--active, | ||
.#{$prefix}--context-menu-option:hover { | ||
background-color: $hover-ui; | ||
} | ||
|
||
.#{$prefix}--context-menu-option > .#{$prefix}--context-menu { | ||
margin-top: calc(#{$spacing-02} * -1); | ||
} | ||
|
||
.#{$prefix}--context-menu-option__content { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: 100%; | ||
padding: 0 $spacing-05; | ||
} | ||
|
||
.#{$prefix}--context-menu-option__content--disabled { | ||
background-color: $ui-01; | ||
cursor: not-allowed; | ||
} | ||
|
||
.#{$prefix}--context-menu-option__content--disabled | ||
.#{$prefix}--context-menu-option__label, | ||
.#{$prefix}--context-menu-option__content--disabled | ||
.#{$prefix}--context-menu-option__info, | ||
.#{$prefix}--context-menu-option__content--disabled | ||
.#{$prefix}--context-menu-option__icon { | ||
color: $disabled-02; | ||
} | ||
|
||
.#{$prefix}--context-menu-option__content--indented | ||
.#{$prefix}--context-menu-option__label { | ||
margin-left: $spacing-05; | ||
} | ||
|
||
.#{$prefix}--context-menu-option__label { | ||
@include type-style('body-short-01'); | ||
|
||
flex-grow: 1; | ||
// add top/bottom padding to make sure letters are not cut off by hidden overflow | ||
padding: $spacing-02 0; | ||
overflow: hidden; | ||
color: $text-01; | ||
white-space: nowrap; | ||
text-align: start; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
.#{$prefix}--context-menu-option__info { | ||
display: inline-flex; | ||
margin-left: $spacing-05; | ||
color: $icon-01; | ||
} | ||
|
||
.#{$prefix}--context-menu-option__icon { | ||
display: flex; | ||
align-items: center; | ||
width: 1rem; | ||
height: 1rem; | ||
margin-right: $spacing-03; | ||
color: $icon-01; | ||
} | ||
|
||
.#{$prefix}--context-menu-divider { | ||
width: 100%; | ||
height: 1px; | ||
margin: $spacing-02 0; | ||
background-color: $ui-03; | ||
} | ||
} | ||
|
||
@include exports('context-menu') { | ||
@include context-menu; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.