UNPKG

@atlassian/aui

Version:

Atlassian User Interface Framework

454 lines (452 loc) 14.5 kB
/** * Dropdown 2 */ /* Functional styles - these are always applied ---------------------------------------------------------------------- */ .aui-dropdown2 { box-sizing: border-box; max-width: 300px; min-width: 160px; position: absolute; } .aui-dropdown2[aria-hidden="true"] { top: -999em; left: -999em; } .aui-dropdown2:not([resolved]) { display: none; } .aui-dropdown2 [role="menuitem"], .aui-dropdown2 [role="menuitemcheckbox"], .aui-dropdown2 [role="menuitemradio"], .aui-dropdown2 [role="radio"], .aui-dropdown2 [role="checkbox"], .aui-dropdown2 a { -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; display: block; } .aui-dropdown2 .aui-list-truncate [role="menuitem"], .aui-dropdown2 .aui-list-truncate [role="menuitemcheckbox"], .aui-dropdown2 .aui-list-truncate [role="menuitemradio"], .aui-dropdown2 .aui-list-truncate [role="radio"], .aui-dropdown2 .aui-list-truncate [role="checkbox"], .aui-dropdown2 .aui-list-truncate a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Default style for Dropdown2, invoked with aui-style-default ---------------------------------------------------------------------- */ .aui-dropdown2.aui-style-default { box-shadow: 0 4px 8px -2px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31); background-color: #FFFFFF; border: 0 solid #DFE1E6; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; } .aui-dropdown2.aui-style-default.aui-layer { -webkit-height: auto; height: auto; } .aui-dropdown2.aui-style-default ul { list-style: none; margin: 2px 0; padding-left: 0; } .aui-style-default .aui-dropdown2-section + .aui-dropdown2-section { border-top: 1px solid #DFE1E6; } .aui-dropdown2.aui-style-default > strong, .aui-dropdown2.aui-style-default .aui-dropdown2-section > strong, .aui-dropdown2-heading { color: #6B778C; font-size: 11px; font-weight: 600; line-height: 1.45454545; letter-spacing: 0; text-transform: uppercase; display: block; padding: 7px 10px 6px; } .aui-dropdown2-heading > strong { font-size: inherit; font-weight: inherit; line-height: inherit; } .aui-dropdown2.aui-style-default strong + ul { margin-top: 0; } .aui-dropdown2.aui-style-default [role="menuitem"], .aui-dropdown2.aui-style-default [role="menuitemcheckbox"], .aui-dropdown2.aui-style-default [role="menuitemradio"], .aui-dropdown2.aui-style-default [role="radio"], .aui-dropdown2.aui-style-default [role="checkbox"], .aui-dropdown2.aui-style-default a { color: #172B4D; padding: 3px 10px; text-decoration: none; } .aui-dropdown2.aui-style-default [aria-disabled="true"], .aui-dropdown2.aui-style-default a.disabled { color: #97A0AF; cursor: default; } .aui-dropdown2.aui-style-default a:focus, .aui-dropdown2.aui-style-default a:hover { text-decoration: none; } .aui-dropdown2.aui-style-default a:focus { z-index: 1; } .aui-dropdown2.aui-style-default .aui-dropdown2-radio:not([aria-disabled="true"]), .aui-dropdown2.aui-style-default .aui-dropdown2-checkbox:not([aria-disabled="true"]) { cursor: pointer; } .aui-dropdown2.aui-style-default .aui-icon-container, .aui-dropdown2.aui-style-default .aui-dropdown2-radio, .aui-dropdown2.aui-style-default .aui-dropdown2-checkbox { padding-left: 31px; } .aui-dropdown2.aui-style-default .aui-icon-container, .aui-dropdown2.aui-style-default .aui-dropdown2-radio, .aui-dropdown2.aui-style-default .aui-dropdown2-checkbox { /* position of the background or icon (both 16x16) is: * - 10px from the left to match the item padding * - 7px from the top which is calculated: * - 5px for the top padding of the item * - 2px is half the difference between the line-height (20) and the icon height (16) so it's vertically spaced */ background-position: 10px 5px; background-repeat: no-repeat; position: relative; } .aui-dropdown2.aui-style-default .aui-icon-container > img, .aui-dropdown2.aui-style-default .aui-icon-container > .aui-icon, .aui-dropdown2.aui-style-default .aui-icon-container > .aui-avatar { border-width: 0; left: 10px; position: absolute; top: 5px; } .aui-dropdown2.aui-style-default .aui-icon-container > .aui-icon { display: block; overflow: hidden; text-indent: -99999px; } /* Checkbox items */ .aui-dropdown2.aui-style-default .aui-dropdown2-checkbox.aui-dropdown2-checked::before { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0; font-family: "Adgs Icons"; font-weight: normal; font-style: normal; speak: none; color: inherit; content: "\f194"; font-size: 16px; height: 16px; left: 0; line-height: 1; margin-top: -8px; position: absolute; text-indent: 0; top: 50%; width: 16px; margin-left: 8px; } /* Radio items */ .aui-dropdown2.aui-style-default .aui-dropdown2-radio.aui-dropdown2-checked::before { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0; font-family: "Adgs Icons"; font-weight: normal; font-style: normal; speak: none; color: inherit; content: "\f500"; font-size: 16px; height: 16px; left: 0; line-height: 1; margin-top: -8px; position: absolute; text-indent: 0; top: 50%; width: 16px; margin-left: 8px; } .aui-dropdown2.aui-dropdown2-tailed { border: 1px solid #DFE1E6; margin-top: 10px; } .aui-dropdown2.aui-dropdown2-tailed::before, .aui-dropdown2.aui-dropdown2-tailed::after { border-color: transparent; border-style: outset outset solid outset; border-width: 8px; bottom: 100%; content: ""; display: block; height: 0; position: absolute; width: 0; } .aui-dropdown2.aui-dropdown2-tailed::before { border-bottom-color: #DFE1E6; margin-bottom: 1px; } .aui-dropdown2.aui-dropdown2-tailed::after { border-bottom-color: #FFFFFF; } /* basic in-page dropdown trigger style DEPRECATED as of 4.2 */ .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1 { padding: 5px 8px; text-decoration: none; } .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1:hover, .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1:focus, .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1.active, .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1.aui-dropdown2-active { background-color: #326ca6; border-radius: 4px; color: #FFFFFF; text-decoration: none; } .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1.active, .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1.aui-dropdown2active { border-radius: 4px 4px 0 0; } .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1[aria-disabled="true"], .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1[aria-disabled="true"]:hover, .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1[aria-disabled="true"]:focus, .aui-dropdown2-trigger.aui-style-dropdown2triggerlegacy1[aria-disabled="true"]:active { background: inherit; color: #99b6d3; /* equivalent of opacity: 0.5 */ cursor: default; } /* Toolbar/Toolbar2-via-buttons integration. Avoid double border: */ .aui-dropdown2.aui-style-default.aui-dropdown2-in-toolbar, .aui-dropdown2.aui-style-default.aui-dropdown2-in-buttons { margin-top: -1px; border-top-color: #DFE1E6; } /* Header integration. */ .aui-dropdown2.aui-style-default.aui-dropdown2-in-header { margin-top: 1px; } .aui-dropdown2.aui-style-default.aui-dropdown2-in-header.aui-dropdown2-in-buttons { margin-top: 0; } .aui-dropdown2.aui-style-default.aui-dropdown2-in-header.aui-dropdown2-tailed { margin-top: 4px; } /* Arrow for sub menus */ .aui-dropdown2-sub-trigger { position: relative; } .aui-dropdown2-sub-trigger::after { border: 5px solid transparent; border-left-color: #172B4D; content: ""; height: 0; margin-left: -16px; margin-top: -5px; left: 100%; /* "left" + "margin-left" required because of webkit not working properly with "right" */ position: absolute; top: 50%; width: 0; } .aui-dropdown2-sub-trigger.active::after, .aui-dropdown2-sub-trigger.aui-dropdown2-active::after { border-left-color: #FFFFFF; } .aui-dropdown2-sub-trigger[disabled]::after, .aui-dropdown2-sub-trigger.disabled::after, .aui-dropdown2-sub-trigger.aui-dropdown2-disabled::after { border-left-color: #97A0AF; } .aui-dropdown2.aui-dropdown2-sub-menu, .aui-dropdown2.aui-dropdown2-in-header.aui-dropdown2-sub-menu { margin-top: -3px; } .aui-dropdown2.aui-style-default:hover .aui-dropdown2-checkbox, .aui-dropdown2.aui-style-default:hover .aui-dropdown2-radio, .aui-dropdown2.aui-style-default:hover a { color: #172B4D; } .aui-dropdown2.aui-style-default:hover .aui-dropdown2-checkbox.aui-dropdown2-disabled, .aui-dropdown2.aui-style-default:hover .aui-dropdown2-radio.aui-dropdown2-disabled, .aui-dropdown2.aui-style-default:hover a.aui-dropdown2-disabled { color: #97A0AF; } .aui-dropdown2.aui-style-default:hover .aui-dropdown2-checkbox:not(.aui-dropdown2-disabled):hover, .aui-dropdown2.aui-style-default:hover .aui-dropdown2-radio:not(.aui-dropdown2-disabled):hover, .aui-dropdown2.aui-style-default:hover a:not(.aui-dropdown2-disabled):hover { background-color: #0052CC; color: #FFFFFF; } .aui-dropdown2.aui-style-default .active, .aui-dropdown2.aui-style-default .aui-dropdown2-active { background-color: #0052CC; color: #FFFFFF; } .aui-dropdown2.aui-style-default .active.aui-dropdown2-disabled, .aui-dropdown2.aui-style-default .aui-dropdown2-active.aui-dropdown2-disabled { background-color: #F4F5F7; color: #97A0AF; } .aui-dropdown2-trigger:not(.aui-dropdown2-trigger-arrowless) { padding-right: 24px !important; position: relative; } /* Dropdown2 button integration ---------- */ .aui-button.aui-dropdown2-trigger.active:first-child, .aui-button.aui-dropdown2-trigger.active { /* square off bottom corners */ border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .aui-button-link.aui-dropdown2-trigger.active:first-child, .aui-button-link.aui-dropdown2-trigger.active, .aui-button-text.aui-dropdown2-trigger.active:first-child, .aui-button-text.aui-dropdown2-trigger.active { box-shadow: none; } .aui-buttons .aui-button.aui-button-subtle.aui-dropdown2-trigger.active, .aui-button.aui-button-subtle.aui-dropdown2-trigger.active { border-color: transparent; } .aui-button.aui-button-subtle.aui-dropdown2-trigger:hover { border-color: transparent; } /* Compact Dropdown2 Trigger */ .aui-button.aui-button-compact.aui-dropdown2-trigger:not(.aui-dropdown2-trigger-arrowless) { padding-right: 21px !important; /* 8px (arrow width) + 8px (right padding) + 5 (margin between arrow and logo) */ } .aui-button.aui-button-compact.aui-dropdown2-trigger::after { margin-left: -16px; /* Override the margin-left from below for to compensate for the smaller padding-right */ } /* adjust padding for smaller height */ .aui-button.aui-dropdown2-trigger.aui-button-compact.active:first-child:not(.aui-dropdown2-trigger-arrowless), .aui-button.aui-dropdown2-trigger.aui-button-compact.active:not(.aui-dropdown2-trigger-arrowless) { padding-bottom: 3px; /* increase the padding to cater for the lack of border so the button doesn't change size */ } /* End Compact Dropdown2 Trigger */ .aui-button.aui-dropdown2-trigger:not(.aui-dropdown2-trigger-arrowless)::after { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0; font-family: "Adgs Icons"; font-weight: normal; font-style: normal; speak: none; content: "\f15b"; font-size: 16px; height: 16px; line-height: 1; margin-top: -8px; position: absolute; right: 4px; top: 50%; text-indent: 0; width: 16px; } /* suppress old icon pattern for dropdown widget so we don't get double arrows */ .aui-button.aui-dropdown2-trigger > .icon-dropdown, .aui-button.aui-dropdown2-trigger > .aui-icon-dropdown { display: none; } /* INPUT does not play with ::after - dropdown2 does not support arrow styles for INPUT buttons */ /* We cannot position arrows on aui-button-text because we don't know what size they will be all the time */ input.aui-button.aui-dropdown2-trigger, .aui-button.aui-button-text.aui-dropdown2-trigger { padding-right: 10px !important; /* someone used important now we're all doomed */ } input.aui-button.aui-dropdown2-trigger::after, .aui-button.aui-button-text.aui-dropdown2-trigger::after { display: none; } /* Dropdown2-only / Split Button ---------- */ .aui-buttons .aui-button.aui-button-split-more.aui-dropdown2-trigger, .aui-buttons .aui-button.aui-button-split-more.aui-dropdown2-trigger.active { /* don't touch vertical padding or things jump around, jump around, jump up jump up and get down */ padding-left: 0; padding-right: 0; width: 24px; text-indent: -9999em; overflow: hidden; } .aui-buttons .aui-button.aui-button-split-more.aui-dropdown2-trigger::after, .aui-buttons .aui-button.aui-button-split-more.aui-dropdown2-trigger.active::after { content: "\f17f"; } /** * Dropdown2 triggers in header */ .aui-header .aui-dropdown2-trigger.active, .aui-header a:focus, .aui-header a:hover, .aui-header a:active { color: #DEEBFF; background-color: rgba(9, 30, 66, 0.48); } /* In case showIcon is not set to false for header dropdown triggers */ .aui-header .aui-dropdown2-trigger .aui-icon-dropdown { display: none; } /* Styling the dropdown2 triggers differently in the header to avoid inline-block spacing issues with other icons */ .aui-header .aui-dropdown2-trigger:not(.aui-dropdown2-trigger-arrowless)::after { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: 0; font-family: "Adgs Icons"; font-weight: normal; font-style: normal; speak: none; content: "\f15b"; font-size: 16px; height: 16px; line-height: 1; margin-top: -8px; position: absolute; right: 4px; top: 50%; text-indent: 0; width: 16px; } /** * Dropdown2 web components */ aui-dropdown-group, aui-section { display: block; } aui-dropdown-menu.aui-dropdown2 .aui-dropdown2-heading:empty, aui-dropdown-menu.aui-dropdown2 .aui-style-default .aui-dropdown2-section > strong:empty, aui-dropdown-menu.aui-dropdown2 .aui-dropdown2.aui-style-default > strong:empty { display: none; } aui-dropdown-menu:not([resolved]) { display: none; } aui-dropdown-menu .aui-dropdown-loading { padding: 5px; } aui-dropdown-menu .aui-dropdown-loading .spinner { display: inline-block; margin: 5px; } /*# sourceMappingURL=dropdown2.css.map */