UNPKG

chowa

Version:

UI component library based on React

226 lines (199 loc) 4.5 kB
/** * @license chowa v1.1.3 * * Copyright (c) Chowa Techonlogies Co.,Ltd.(http://www.chowa.cn). * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ .cw-cascader { position: relative; width: 100%; border: 1px solid #e6ecf5; border-radius: 3px; transition: all 0.2s ease-in; cursor: pointer; margin: 0; padding: 0; outline: none; min-height: 32px; box-sizing: border-box; background-color: #fff; } .cw-cascader:not(.cw-cascader-disabled):hover { border-color: #7774e7; } .cw-cascader.cw-cascader-focused, .cw-cascader:not(.cw-cascader-disabled):focus { box-shadow: 0 1px 2px 3px rgba(119, 116, 231, 0.15); border-color: #7774e7; } .cw-cascader.cw-has-error { border-color: #ed4014; } .cw-cascader-arrow { margin: 0; padding: 0; position: absolute; right: 0; top: 0; display: flex; align-items: center; justify-content: center; color: #888da8; width: 30px; height: 30px; line-height: 30px; font-size: 12px; transition: all 0.2s ease-in; } .cw-cascader-arrow-active { transform: rotate(-180deg); color: #7774e7; } .cw-cascader-selection { color: #616a6e; margin: 0 32px 0 12px; padding: 0; font-size: 14px; min-height: 30px; line-height: 30px; position: relative; } .cw-cascader-searching, .cw-cascader-placeholder { color: #888da8; } .cw-cascader-search-input { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; color: #616a6e; font-size: inherit; background: transparent; border: none; outline: none; box-sizing: border-box; margin: 0; padding: 0; caret-color: #7774e7; } .cw-cascader-disabled { background-color: #e9ecef; cursor: not-allowed; opacity: 0.6; } .cw-cascader-selector-wrapper { margin: 0; padding: 0; box-sizing: border-box; } .cw-cascader-card { display: flex; flex-direction: column; border-radius: 3px; margin: 0; padding: 0; min-width: 280px; max-width: 480px; max-height: 250px; font-size: 14px; outline: none; overflow-x: auto; overflow-y: auto; } .cw-cascader-card-tier-title { padding: 0; margin: 10px; display: flex; border-bottom: 1px solid #e6ecf5; list-style: none; } .cw-cascader-card-title { flex: none; margin: 0; color: #414a63; cursor: pointer; white-space: nowrap; transition: color 0.2s ease-in; padding: 6px 10px; } .cw-cascader-card-selector { display: flex; flex-direction: row; flex-wrap: wrap; padding: 0 10px 10px 10px; margin: 0; } .cw-cascader-card-option { margin: 0; padding: 4px 6px; white-space: nowrap; color: #616a6e; cursor: pointer; transition: color 0.2s ease-in; } .cw-cascader-card-active { color: #7774e7; } .cw-cascader-card-selected { color: #7774e7; font-weight: 500; } .cw-cascader-card-disabled { color: #888da8; cursor: not-allowed; } .cw-cascader-list { display: flex; width: auto; flex-direction: row; border-radius: 3px; align-items: top; margin: 0; padding: 0; box-sizing: border-box; justify-content: flex-start; outline: none; } .cw-cascader-list-selector { height: 250px; margin: 0; padding: 10px 0; min-width: 160px; list-style: none; font-size: 14px; overflow-x: hidden; overflow-y: auto; } .cw-cascader-list-selector + .cw-cascader-list-selector { border-left: 1px solid #e6ecf5; } .cw-cascader-list-option { margin: 0; padding: 0 10px; line-height: 30px; color: #616a6e; display: flex; justify-content: space-between; cursor: pointer; transition: all 0.2s ease-in; white-space: nowrap; } .cw-cascader-label { margin: 0; padding: 0; } .cw-cascader-list-arrow { font-size: 12px; padding-left: 10px; } .cw-cascader-not-found { margin: 0; padding: 12px 0; width: 160px; box-sizing: border-box; } .cw-cascader-filter-selector { height: 250px; margin: 0; padding: 10px 0; list-style: none; font-size: 14px; outline: 0; overflow-x: hidden; overflow-y: auto; } .cw-cascader-filter-option { margin: 0; padding: 0 10px; line-height: 30px; min-width: 140px; color: #616a6e; display: flex; justify-content: space-between; cursor: pointer; transition: all 0.2s ease-in; white-space: nowrap; } .cw-cascader-list-selected { background-color: #f8f8f8; color: #7774e7; } .cw-cascader-list-active { background-color: #f7f6fe; } .cw-cascader-list-disabled { color: #888da8; cursor: not-allowed; }