UNPKG

angular-multi-select-tree

Version:

A hierarchical (or tree) selection control for AngularJS

244 lines (224 loc) 5.66 kB
.tree-control .tree-input { position: relative; display: inline-block; text-align: center; cursor: pointer; border: 1px solid #c6c6c6; padding: 1px 8px 1px 8px; font-size: 14px; min-height : 38px !important; border-radius: 4px; color: #555; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; white-space:normal; background-color: #fff; background-image: linear-gradient(#fff, #f7f7f7); } .tree-control .tree-input:hover { background-image: linear-gradient(#fff, #e9e9e9); } /* downward pointing arrow */ .tree-control .caret { display: inline-block; width: 0; height: 0; margin: 0px 0px 1px 12px !important; vertical-align: middle; border-top: 4px solid #333; border-right: 4px solid transparent; border-left: 4px solid transparent; border-bottom: 0 dotted; } .tree-control .tree-input span.selected-items .selected-item { background: #f2f2f2; border: 1px solid darkgray; border-radius: 3px; padding: 3px; cursor: text; } .tree-control .tree-input span.selected-items .selected-item-close { width: 20px; cursor: pointer; font-weight: bold; display: inline-block; padding: 2px; text-align: center; } .tree-control .tree-input span.selected-items .selected-item-close:hover { background-color: #f2f2f2 } .tree-control .tree-input span.selected-items .selected-item-close:before { content: 'x'; } .tree-control .tree-view { background-color: #fff; position: absolute; z-index: 999; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); min-width:348px; margin-right: 30px; max-height: 300px; overflow: auto; padding: 10px 5px; } .tree-control .tree-view ul { padding: 0; margin: 0; } .tree-control .tree-view ul .item-details { display: inline-block; margin-left: 5px; } .tree-control .tree-view ul .tree-checkbox { margin-right: 3px; margin-top: 0; color: #ddd !important; cursor: pointer; } .tree-control .tree-view .active { background-color: #f2f2f2; border-radius: 3px; } .tree-control .tree-view .selected.active { background-color: #46b8da; } /* container of helper elements */ .tree-control .tree-view .helper-container { border-bottom: 1px solid #ddd; padding: 8px 8px 0px 8px; } /* container of multi select items */ .tree-control .tree-view .tree-container { padding: 8px; } .tree-control .tree-view .item-container { padding: 3px; color: #444; white-space: nowrap; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; border: 1px solid transparent; position: relative; } /* item labels focus on mouse hover */ .tree-control .tree-view .item-container:hover { background-image: linear-gradient( #c1c1c1, #999 ) !important; color: #fff !important; cursor: pointer; border: 1px solid #ccc !important; } .tree-control .tree-view .selected { background-image: linear-gradient( #e9e9e9, #f1f1f1 ); color: #555; cursor: pointer; border-top: 1px solid #e4e4e4; border-left: 1px solid #e4e4e4; border-right: 1px solid #d9d9d9; } /* helper buttons (select all, none, reset); */ .tree-control .tree-view .helper-button { display: inline; text-align: center; cursor: pointer; border: 1px solid #ccc; height: 26px; font-size: 13px; border-radius: 2px; color: #666; background-color: #f1f1f1; line-height: 1.6; margin: 0px 0px 8px 0px; } /* clear button */ .tree-control .tree-view .clear-button { position: absolute; display: inline; text-align: center; cursor: pointer; border: 1px solid #ccc; height: 22px; width: 22px; font-size: 13px; border-radius: 2px; color: #666; background-color: #f1f1f1; line-height: 1.4; right : 2px; top: 2px; } /* filter */ .tree-control .tree-view .input-filter { border-radius: 2px; border: 1px solid #ccc; height: 26px; font-size: 14px; width:100%; padding-left:7px; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */ color: #888; margin: 0px 0px 8px 0px; } /* helper elements on hover & focus */ .tree-control .tree-view .clear-button:hover, .tree-control .tree-view .helper-button:hover { border: 1px solid #ccc; color: #999; background-color: #f4f4f4; } .tree-control .tree-view .clear-button:focus, .tree-control .tree-view .helper-button:focus, .tree-control .tree-view .input-filter:focus { border: 1px solid #66AFE9 !important; box-shadow: inset 0 0px 1px rgba(0,0,0,.035), 0 0 5px rgba(82,168,236,.7) !important; } /* ! create a "row" */ .tree-control .tree-view .line { max-height: 34px; overflow: hidden; position: relative; } .tree-control .tree-view .item-close { width: 20px; cursor: pointer; font-weight: bold; padding: 5px; } .tree-control .tree-view .item-close:hover { background-color: #f2f2f2 } .tree-control .tree-view .item-close:before { content: 'x'; } .tree-control .tree-view li { list-style-type: none; margin-left: 15px; } .tree-control .tree-view li .expand { display: inline-block; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid #525252; } .tree-control .tree-view li .expand-opened { border: none; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 10px solid #525252; } .tree-control .tree-view li.top-level { margin: 0; }