-
Notifications
You must be signed in to change notification settings - Fork 1
Phase 2.4: Dropdown System Migration #2837
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7cc42e0
Phase 2.4: Dropdown System Migration
OpenStaxClaude ddd61ee
Snapshots
RoyEJohnson a7296cf
Address code review comments for Phase 2.4: Dropdown System Migration
OpenStaxClaude 400c5a1
Address Review 12: Add menuClassName prop to Dropdown for custom styling
OpenStaxClaude c37ea19
Review 13 Addressed: Move ContextMenu styling to dropdown-menu
OpenStaxClaude a7da458
Snapshots
RoyEJohnson dc274b2
Review 14 Addressed: Apply menuClassName pattern to DotMenu
OpenStaxClaude a6dabec
Review 15 Addressed: DisplayNote Menu Positioning Fix
OpenStaxClaude e1efe3f
Snaps
RoyEJohnson 383dc66
Use :where on default settings
RoyEJohnson 5342d05
Lint
RoyEJohnson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,163 @@ | ||
| /* Dropdown component styles */ | ||
|
|
||
| /* Keyframe animation for dropdown fade-in */ | ||
| @keyframes dropdown-fade-in { | ||
| 0% { | ||
| opacity: 0; | ||
| } | ||
| 100% { | ||
| opacity: 1; | ||
| } | ||
| } | ||
|
|
||
| /* DropdownToggle styles */ | ||
| .dropdown-toggle { | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| /* TabHiddenDropDown menu styles - applies to children that are not the toggle */ | ||
| .dropdown-menu { | ||
| animation: 100ms dropdown-fade-in ease-out; | ||
| position: absolute; | ||
| box-shadow: 0 0.5rem 0.5rem 0 rgba(0, 0, 0, 0.1); | ||
| border: 1px solid var(--dropdown-form-border, #d5d5d5); /* theme.color.neutral.formBorder */ | ||
| top: calc(100% + 0.4rem); | ||
| left: 0; | ||
| } | ||
|
|
||
| /* DropdownFocusWrapper styles */ | ||
| .dropdown-focus-wrapper { | ||
| overflow: visible; | ||
| } | ||
|
|
||
| /* DropdownList styles */ | ||
| .dropdown-list { | ||
| list-style: none; | ||
| margin: 0; | ||
| padding: 0.6rem 0; | ||
| background: var(--dropdown-form-background, #f5f5f5); /* theme.color.neutral.formBackground */ | ||
| z-index: 1; | ||
| } | ||
|
|
||
| .dropdown-list li { | ||
| padding: 0.2rem; | ||
| } | ||
|
|
||
| .dropdown-list li button, | ||
| .dropdown-list li a { | ||
| white-space: nowrap; | ||
| text-decoration: none; | ||
| display: flex; | ||
| align-items: center; | ||
| text-align: left; | ||
| cursor: pointer; | ||
| outline: none; | ||
| border: none; | ||
| padding-left: 0.8rem; | ||
| margin: 0; | ||
| height: 3rem; | ||
| background: none; | ||
| min-width: 7rem; | ||
| /* textStyle from Typography - using CSS variables */ | ||
| font-family: var(--text-font-family, Helvetica, Arial, sans-serif); | ||
| font-weight: var(--text-font-weight, normal); | ||
| color: var(--dropdown-text-color, #424242); /* theme.color.text.default */ | ||
| font-size: 1.4rem; | ||
| line-height: 2rem; | ||
| } | ||
|
|
||
| .dropdown-list li button:focus, | ||
| .dropdown-list li a:focus { | ||
| background: var(--dropdown-form-border, #d5d5d5); /* theme.color.neutral.formBorder */ | ||
| outline: 0.2rem auto Highlight; | ||
| outline: 0.2rem auto -webkit-focus-ring-color; | ||
| } | ||
|
|
||
| /* TabTransparentDropdown focus-within behavior */ | ||
| /* Hide the second toggle by default */ | ||
| .dropdown-transparent .dropdown-toggle-second { | ||
| height: 0; | ||
| width: 0; | ||
| overflow: hidden; | ||
| clip: rect(1px, 1px, 1px, 1px); | ||
| } | ||
|
|
||
| /* Show the second toggle when focus is within the wrapper */ | ||
| .dropdown-transparent .dropdown-focus-wrapper.focus-within + .dropdown-toggle-second, | ||
| .dropdown-transparent .dropdown-focus-wrapper:focus-within + .dropdown-toggle-second { | ||
| height: unset; | ||
| width: unset; | ||
| clip: unset; | ||
| overflow: visible; | ||
| } | ||
|
|
||
| /* Show the first toggle by default */ | ||
| .dropdown-transparent .dropdown-focus-wrapper > .dropdown-toggle { | ||
| height: unset; | ||
| width: unset; | ||
| clip: unset; | ||
| overflow: visible; | ||
| } | ||
|
|
||
| /* Hide the first toggle when focus is within the wrapper */ | ||
| .dropdown-transparent .dropdown-focus-wrapper.focus-within > .dropdown-toggle, | ||
| .dropdown-transparent .dropdown-focus-wrapper:focus-within > .dropdown-toggle { | ||
| height: 0; | ||
| width: 0; | ||
| overflow: hidden; | ||
| clip: rect(1px, 1px, 1px, 1px); | ||
| } | ||
|
|
||
| /* Menu positioning and animation for TabTransparentDropdown */ | ||
| .dropdown-transparent .dropdown-focus-wrapper > .dropdown-menu { | ||
| animation: 100ms dropdown-fade-in ease-out; | ||
| position: absolute; | ||
| box-shadow: 0 0.5rem 0.5rem 0 rgba(0, 0, 0, 0.1); | ||
| border: 1px solid var(--dropdown-form-border, #d5d5d5); /* theme.color.neutral.formBorder */ | ||
| top: calc(100% + 0.4rem); | ||
| left: 0; | ||
| } | ||
|
|
||
| /* Hide the menu by default */ | ||
| .dropdown-transparent .dropdown-focus-wrapper > .dropdown-menu { | ||
| height: 0; | ||
| width: 0; | ||
| overflow: hidden; | ||
| clip: rect(1px, 1px, 1px, 1px); | ||
| } | ||
|
|
||
| /* Show the menu when focus is within the wrapper */ | ||
| .dropdown-transparent .dropdown-focus-wrapper.focus-within > .dropdown-menu, | ||
| .dropdown-transparent .dropdown-focus-wrapper:focus-within > .dropdown-menu { | ||
| height: unset; | ||
| width: unset; | ||
| clip: unset; | ||
| overflow: visible; | ||
| } | ||
|
|
||
| /* TextResizerMenu customization for dropdown-menu */ | ||
| .dropdown-menu.text-resizer-menu { | ||
| background: #fff; | ||
| right: 0; | ||
| left: auto; | ||
| top: calc(100% - 1px); | ||
| } | ||
|
|
||
| /* ContextMenu customization for dropdown-menu */ | ||
| .dropdown-menu.context-menu { | ||
| z-index: 2; | ||
| border: 1px solid var(--dropdown-form-border, #d5d5d5); /* theme.color.neutral.formBorder */ | ||
| background-color: var(--dropdown-form-background, #f5f5f5); /* theme.color.neutral.formBackground */ | ||
| margin-bottom: 1rem; /* for last context menu to show with more space */ | ||
| } | ||
|
|
||
| .dropdown-menu.context-menu { | ||
| menu { | ||
| padding: 0; | ||
| } | ||
| } | ||
|
|
||
| /* DisplayNote menu customization for dropdown-menu */ | ||
| .dropdown-menu.display-note-menu { | ||
| left: -4rem; | ||
| } | ||
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.