_sumoselect.scss 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. .SumoSelect {
  2. p {
  3. margin: 0;
  4. }
  5. width: 200px;
  6. }
  7. .SelectBox {
  8. padding: 5px 8px;
  9. }
  10. .sumoStopScroll {
  11. overflow: hidden;
  12. }
  13. /* Filtering style */
  14. .SumoSelect {
  15. .hidden {
  16. display: none;
  17. }
  18. .search-txt {
  19. display: none;
  20. outline: none;
  21. }
  22. .no-match {
  23. display: none;
  24. padding: 6px;
  25. }
  26. &.open {
  27. .search-txt {
  28. display: inline-block;
  29. position: absolute;
  30. inset-block-start: 0;
  31. inset-inline-start: 0;
  32. width: 100%;
  33. margin: 0;
  34. padding: 5px 15px;
  35. border: none;
  36. -webkit-box-sizing: border-box;
  37. -moz-box-sizing: border-box;
  38. box-sizing: border-box;
  39. border-radius: 5px;
  40. }
  41. > .search > {
  42. span,
  43. label {
  44. visibility: hidden;
  45. }
  46. }
  47. }
  48. }
  49. /*this is applied on that hidden select. DO NOT USE display:none; or visiblity:hidden; and Do not override any of these properties. */
  50. .SelectClass,
  51. .SumoUnder {
  52. position: absolute;
  53. inset-block-start: 0;
  54. inset-inline-start: 0;
  55. inset-inline-end: 0;
  56. height: 100%;
  57. width: 100%;
  58. border: none;
  59. -webkit-box-sizing: border-box;
  60. -moz-box-sizing: border-box;
  61. box-sizing: border-box;
  62. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
  63. filter: alpha(opacity = 0);
  64. -moz-opacity: 0;
  65. -khtml-opacity: 0;
  66. opacity: 0;
  67. }
  68. .SelectClass {
  69. z-index: 1;
  70. }
  71. .SumoSelect {
  72. > {
  73. .optWrapper > .options li.opt label,
  74. .CaptionCont {
  75. user-select: none;
  76. -o-user-select: none;
  77. -moz-user-select: none;
  78. -khtml-user-select: none;
  79. -webkit-user-select: none;
  80. }
  81. }
  82. .select-all > label {
  83. user-select: none;
  84. -o-user-select: none;
  85. -moz-user-select: none;
  86. -khtml-user-select: none;
  87. -webkit-user-select: none;
  88. }
  89. display: inline-block;
  90. position: relative;
  91. outline: none;
  92. width: 100%;
  93. > {
  94. .CaptionCont {
  95. position: relative;
  96. border: 1px solid $border;
  97. color: #424e79;
  98. min-height: 14px;
  99. background-color: #fff;
  100. border-radius: 0.25rem;
  101. margin: 0;
  102. width: 100%;
  103. height: 40px;
  104. line-height: 30px;
  105. padding: 6px 17px;
  106. border-radius: 7px;
  107. > {
  108. span {
  109. display: block;
  110. padding-inline-end: 30px;
  111. text-overflow: ellipsis;
  112. white-space: nowrap;
  113. overflow: hidden;
  114. cursor: default;
  115. &.placeholder {
  116. color: #9999b5;
  117. font-style: italic;
  118. }
  119. }
  120. label {
  121. position: absolute;
  122. inset-block-start: 0;
  123. inset-inline-end: 0;
  124. inset-block-end: 0;
  125. width: 30px;
  126. > i:before {
  127. display: inline-block;
  128. width: 0;
  129. height: 0;
  130. margin-inline-start: 0.255em;
  131. vertical-align: 0.255em;
  132. content: "";
  133. border-block-start: 0.3em solid;
  134. border-inline-end: 0.3em solid transparent;
  135. border-block-end: 0;
  136. border-inline-start: 0.3em solid transparent;
  137. margin-block-start: 18px;
  138. color: #bcccda;
  139. }
  140. }
  141. }
  142. }
  143. .optWrapper {
  144. display: none;
  145. z-index: 1;
  146. inset-block-start: 30px;
  147. width: 100%;
  148. position: absolute;
  149. inset-inline-start: 0;
  150. -webkit-box-sizing: border-box;
  151. -moz-box-sizing: border-box;
  152. box-sizing: border-box;
  153. background: #fff;
  154. border: 1px solid $border;
  155. border-radius: 3px;
  156. overflow: hidden;
  157. }
  158. }
  159. &.open > .optWrapper {
  160. inset-block-start: 35px;
  161. display: block;
  162. box-shadow: 0px 16px 18px rgba(104, 113, 123, 0.2);
  163. background: #fff;
  164. border-radius: 0 0 7px 7px;
  165. &.up {
  166. inset-block-start: auto;
  167. inset-block-end: 100%;
  168. margin-block-end: 5px;
  169. }
  170. }
  171. > .optWrapper {
  172. ul {
  173. list-style: none;
  174. display: block;
  175. padding: 0;
  176. margin: 0;
  177. overflow: auto;
  178. }
  179. > .options {
  180. border-radius: 2px;
  181. position: relative;
  182. /*Set the height of pop up here (only for desktop mode)*/
  183. max-height: 250px;
  184. /*height*/
  185. }
  186. &.okCancelInMulti > .options {
  187. border-radius: 2px 2px 0 0;
  188. }
  189. &.selall {
  190. > .options {
  191. border-radius: 0 0 2px 2px;
  192. }
  193. &.okCancelInMulti > .options {
  194. border-radius: 0;
  195. }
  196. }
  197. > .options li {
  198. &.group.disabled > label {
  199. opacity: 0.5;
  200. }
  201. ul li.opt {
  202. padding-inline-start: 22px;
  203. }
  204. }
  205. &.multiple > .options li ul li.opt {
  206. padding-inline-start: 50px;
  207. }
  208. &.isFloating > .options {
  209. max-height: 100%;
  210. }
  211. > .options {
  212. li.opt {
  213. padding: 0px 16px;
  214. position: relative;
  215. border-block-end: 1px solid #eff0f6;
  216. height: 40px;
  217. line-height: 40px;
  218. }
  219. > li.opt:first-child {
  220. border-radius: 2px 2px 0 0;
  221. }
  222. }
  223. &.selall > .options > li.opt:first-child {
  224. border-radius: 0;
  225. }
  226. > .options > li.opt:last-child {
  227. border-radius: 0 0 2px 2px;
  228. border-block-end: none;
  229. }
  230. &.okCancelInMulti > .options > li.opt:last-child {
  231. border-radius: 0;
  232. }
  233. > .options li.opt {
  234. &:hover {
  235. background-color: #f4f5fb;
  236. }
  237. &.sel {
  238. background-color: #a1c0e4;
  239. }
  240. }
  241. }
  242. .select-all {
  243. &.sel {
  244. background-color: #a1c0e4;
  245. }
  246. > span {
  247. position: absolute;
  248. display: block;
  249. width: 30px;
  250. inset-block-start: 0;
  251. inset-block-end: 0;
  252. margin-inline-start: -35px;
  253. }
  254. > span i {
  255. position: absolute;
  256. margin: auto;
  257. inset-inline-start: 0;
  258. inset-inline-end: 0;
  259. inset-block-start: 0;
  260. inset-block-end: 0;
  261. width: 14px;
  262. height: 14px;
  263. border: 1px solid #eff0f6;
  264. border-radius: 2px;
  265. background-color: #fff;
  266. }
  267. &.selected > span i,
  268. &.partial > span i {
  269. background-color: $primary-1;
  270. box-shadow: none;
  271. border-color: transparent;
  272. background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAABMSURBVAiZfc0xDkAAFIPhd2Kr1WRjcAExuIgzGUTIZ/AkImjSofnbNBAfHvzAHjOKNzhiQ42IDFXCDivaaxAJd0xYshT3QqBxqnxeHvhunpu23xnmAAAAAElFTkSuQmCC");
  273. background-repeat: no-repeat;
  274. background-position: center center;
  275. }
  276. }
  277. > .optWrapper {
  278. > .options li {
  279. label {
  280. text-overflow: ellipsis;
  281. white-space: nowrap;
  282. overflow: hidden;
  283. display: block;
  284. cursor: pointer;
  285. margin-block-end: 0 !important;
  286. }
  287. span {
  288. display: none;
  289. }
  290. &.group > label {
  291. cursor: default;
  292. padding: 8px 6px;
  293. font-weight: bold;
  294. }
  295. }
  296. &.isFloating {
  297. position: fixed;
  298. inset-block-start: 0;
  299. inset-inline-start: 0;
  300. inset-inline-end: 0;
  301. width: 90%;
  302. inset-block-end: 0;
  303. margin: auto;
  304. max-height: 90%;
  305. }
  306. > .options li.opt.disabled {
  307. background-color: inherit;
  308. pointer-events: none;
  309. * {
  310. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
  311. /* IE 5-7 */
  312. filter: alpha(opacity = 50);
  313. /* Netscape */
  314. -moz-opacity: 0.5;
  315. /* Safari 1.x */
  316. -khtml-opacity: 0.5;
  317. /* Good browsers */
  318. opacity: 0.5;
  319. }
  320. }
  321. &.multiple > .options li.opt {
  322. padding-inline-start: 35px;
  323. cursor: pointer;
  324. span {
  325. position: absolute;
  326. display: block;
  327. width: 30px;
  328. inset-block-start: 0;
  329. inset-block-end: 0;
  330. margin-inline-start: -35px;
  331. }
  332. }
  333. }
  334. > .optWrapper.multiple > .options li.opt span i {
  335. position: absolute;
  336. margin: auto;
  337. inset-inline-start: 0;
  338. inset-inline-end: 0;
  339. inset-block-start: 0;
  340. inset-block-end: 0;
  341. width: 14px;
  342. height: 14px;
  343. border: 1px solid #eff0f6;
  344. border-radius: 2px;
  345. background-color: #fff;
  346. }
  347. > .optWrapper {
  348. > .MultiControls {
  349. display: none;
  350. border-block-start: 1px solid $border;
  351. background-color: #fff;
  352. border-radius: 0 0 3px 3px;
  353. }
  354. &.multiple {
  355. &.isFloating > .MultiControls {
  356. display: block;
  357. margin-block-start: 5px;
  358. position: absolute;
  359. inset-block-end: 0;
  360. width: 100%;
  361. }
  362. &.okCancelInMulti > .MultiControls {
  363. display: block;
  364. > p {
  365. padding: 6px;
  366. &:focus {
  367. border-color: $primary-1;
  368. outline: none;
  369. background-color: $primary-1;
  370. }
  371. }
  372. }
  373. > .MultiControls > p {
  374. display: inline-block;
  375. cursor: pointer;
  376. padding: 12px;
  377. width: 50%;
  378. box-sizing: border-box;
  379. text-align: center;
  380. &:hover {
  381. background-color: #f4f5fb;
  382. }
  383. &.btnOk {
  384. border-inline-end: 1px solid $border;
  385. border-radius: 0 0 0 3px;
  386. }
  387. &.btnCancel {
  388. border-radius: 0 0 3px 0;
  389. }
  390. }
  391. }
  392. &.isFloating > .options li.opt {
  393. padding: 12px 6px;
  394. }
  395. &.multiple {
  396. &.isFloating {
  397. > .options li.opt {
  398. padding-inline-start: 35px;
  399. }
  400. padding-block-end: 43px;
  401. }
  402. > .options li.opt.selected span i {
  403. background-color: $primary-1;
  404. box-shadow: none;
  405. border-color: transparent;
  406. background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAABMSURBVAiZfc0xDkAAFIPhd2Kr1WRjcAExuIgzGUTIZ/AkImjSofnbNBAfHvzAHjOKNzhiQ42IDFXCDivaaxAJd0xYshT3QqBxqnxeHvhunpu23xnmAAAAAElFTkSuQmCC");
  407. background-repeat: no-repeat;
  408. background-position: center center;
  409. }
  410. }
  411. }
  412. &.disabled {
  413. opacity: 0.7;
  414. cursor: not-allowed;
  415. > .CaptionCont {
  416. border-color: #d3dfea;
  417. box-shadow: none;
  418. background: #f4f5f9;
  419. }
  420. }
  421. .select-all {
  422. border-radius: 3px 3px 0 0;
  423. position: relative;
  424. border-block-end: 1px solid $border;
  425. background-color: #fff;
  426. padding: 8px 0 3px 35px;
  427. height: 36px;
  428. cursor: pointer;
  429. > {
  430. label,
  431. span i {
  432. cursor: pointer;
  433. }
  434. }
  435. &.partial > span i {
  436. background-color: $border;
  437. }
  438. }
  439. > .optWrapper > .options li.optGroup {
  440. padding-inline-start: 5px;
  441. text-decoration: underline;
  442. }
  443. }