UNPKG

@antv/x6-react-components

Version:

React components for building x6 editors

126 lines (125 loc) 2.89 kB
.x6-menu { position: relative; display: inline-block; min-width: 160px; min-height: 32px; margin: 0; padding: 4px 0; background-color: #fff; outline: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); } .x6-menu-item { position: relative; } .x6-menu-item-active > .x6-menu-item-button, .x6-menu-item:hover > .x6-menu-item-button { color: #262626; background: #f5f5f5; } .x6-menu-item-divider { display: block; width: 100%; height: 1px; margin: 4px 0; background: rgba(150, 150, 150, 0.2); pointer-events: none; } .x6-menu-item-button { position: relative; display: flex; align-content: center; align-items: center; justify-content: space-between; width: 100%; height: 28px; padding: 0 12px; color: #595959; text-align: left; background: transparent; border: none; outline: none; box-shadow: none; cursor: pointer; } .x6-menu-item-hidden { display: none; } .x6-menu-item-disabled > .x6-menu-item-button, .x6-menu-item-disabled:hover > .x6-menu-item-button { color: #595959; background-color: transparent; cursor: not-allowed; opacity: 0.4; } .x6-menu-item-icon { position: absolute; top: 50%; left: 6px; display: none; width: 24px; height: 24px; margin-top: -12px; font-size: 13px; } .x6-menu-item-text { padding-right: 56px; overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; } .x6-menu-item-hotkey { font-size: 13px; opacity: 0.75; } .x6-menu-submenu-arrow, .x6-menu-submenu.x6-menu-item-disabled:hover > .x6-menu-item-button > .x6-menu-submenu-arrow { position: absolute; top: 10px; right: 12px; width: 0; height: 0; border-top: 4px solid rgba(0, 0, 0, 0); border-bottom: 4px solid rgba(0, 0, 0, 0); border-left: 5px solid #262626; opacity: 0.4; pointer-events: none; } .x6-menu-submenu-menu, .x6-menu-submenu.x6-menu-item-disabled:hover > .x6-menu-submenu-menu { position: absolute; top: -5px; left: 100%; z-index: 9999; min-width: 200px; margin-left: -4px; padding: 5px 0; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); transform: translateX(-10px); visibility: hidden; opacity: 0; transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1); } .x6-menu-submenu.x6-menu-item-active > .x6-menu-item-button > .x6-menu-submenu-arrow, .x6-menu-submenu:hover > .x6-menu-item-button > .x6-menu-submenu-arrow { opacity: 0.75; } .x6-menu-submenu.x6-menu-item-active > .x6-menu-submenu-menu, .x6-menu-submenu:hover > .x6-menu-submenu-menu { transform: translateX(0); visibility: visible; opacity: 1; } .x6-menu.x6-menu-has-icon .x6-menu-item-button { padding-left: 30px; } .x6-menu.x6-menu-has-icon .x6-menu-item-button .x6-menu-item-icon { display: flex; align-items: center; justify-content: center; } .x6-menu.x6-menu-has-icon .x6-menu-item-button .x6-menu-item-text { padding-left: 2px; }