UNPKG

opal-components

Version:

[Rionite](https://github.com/Riim/Rionite) component set.

137 lines (127 loc) 2.61 kB
@component OpalMultiselect : OpalSelect { @el menu { padding: 0; width: 600px; } @el menu-header { box-sizing: border-box; padding: 0 10px; border-bottom: 1px solid hsl(0,0%,80%); font-size: 0; line-height: 60px; } @el query-input { width: 279px; } @el menu-selected { float: right; overflow: auto; box-sizing: border-box; width: 299px; height: 304px; border-left: 1px solid hsl(0,0%,80%); } @el selected-item { position: relative; overflow: hidden; padding: 7px 38px 7px 22px; background: #fff; color: #000; text-align: left; text-overflow: ellipsis; text-shadow: none; white-space: nowrap; font: 16px/24px Verdana, Geneva, sans-serif; font-weight: normal; user-select: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; &:hover { @el btn-deselect-item { display: block; } } } @el btn-deselect-item { position: absolute; top: 0; right: 9px; bottom: 0; display: none; margin: auto; padding: 0; width: 24px; height: 24px; border: 0; background: transparent; color: hsl(0,0%,50%); cursor: pointer; transition: color .1s linear; &:hover { color: #000; } &:focus { outline: none; } &:active { transform: translateY(1px); } } @el btn-deselect-item-icon { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; margin: auto; width: 16px; height: 16px; stroke-width: 3px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; fill: none; } @el nothing-selected { display: none; box-sizing: border-box; padding: 10px; height: 100%; text-align: center; white-space: nowrap; &::before { display: inline-block; width: 0; height: 100%; content: ''; vertical-align: middle; } @mod shown { display: block; } } @el nothing-selected-message { display: inline-block; vertical-align: middle; opacity: .6; } @el menu-list { width: 299px; height: 304px; } @el menu-footer { box-sizing: border-box; padding: 0 10px; width: 100%; border-top: 1px solid hsl(0,0%,80%); text-align: right; font-size: 0; line-height: 60px; } @el btn-close { } }