_inputs.scss 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /* Form */
  2. .form-control {
  3. font-size: 14px;
  4. border-color: #ebedf2;
  5. padding: .6rem 1rem;
  6. height: inherit !important;
  7. &:focus {
  8. border-color: #3e93ff;
  9. }
  10. }
  11. /* Form Control Sizes */
  12. %form-control-lg-style {
  13. padding: .5rem 1rem !important;
  14. font-size: 1.25rem !important;
  15. }
  16. .form-control-lg {
  17. @extend %form-control-lg-style;
  18. }
  19. .input-group-lg > {
  20. .form-control {
  21. @extend %form-control-lg-style;
  22. }
  23. .input-group-append > {
  24. .btn, .input-group-text {
  25. @extend %form-control-lg-style;
  26. }
  27. }
  28. .input-group-prepend > {
  29. .btn, .input-group-text {
  30. @extend %form-control-lg-style;
  31. }
  32. }
  33. }
  34. %form-control-sm-style {
  35. padding: .25rem .5rem !important;
  36. font-size: .875rem !important;
  37. line-height: 1.5;
  38. }
  39. .form-control-sm {
  40. @extend %form-control-sm-style;
  41. }
  42. .input-group-sm > {
  43. .form-control {
  44. @extend %form-control-sm-style;
  45. }
  46. .input-group-append > {
  47. .btn, .input-group-text {
  48. @extend %form-control-sm-style;
  49. }
  50. }
  51. .input-group-prepend > {
  52. .btn, .input-group-text {
  53. @extend %form-control-sm-style;
  54. }
  55. }
  56. }
  57. .form-control::-webkit-input-placeholder { color:inherit;opacity:.7 }
  58. .form-control:-moz-placeholder { color:inherit;opacity:.7 }
  59. .form-control::-moz-placeholder { color:inherit;opacity:.7 }
  60. .form-control:-ms-input-placeholder { color:inherit;opacity:.7 }
  61. .form-control::-ms-input-placeholder { color:inherit;opacity:.7 }
  62. .input-group-text {
  63. border-color : #ebedf2 !important;
  64. }
  65. .form-button-action {
  66. display: inline-flex;
  67. }
  68. .form-check-label, .form-radio-label {
  69. margin-right: 15px;
  70. }
  71. /* CheckBox Input */
  72. .select-all-checkbox + .form-check-sign:before {
  73. background: #ccc !important;
  74. border-color: #ccc !important;
  75. }
  76. .form-check{
  77. [type="checkbox"] {
  78. &:not(:checked), &:checked {
  79. position: absolute;
  80. left: -9999px;
  81. }
  82. &:not(:checked) + .form-check-sign, &:checked + .form-check-sign, + .form-check-sign {
  83. position: relative;
  84. padding-left: 2em;
  85. color: $body-text-color;
  86. cursor: pointer;
  87. }
  88. &:not(:checked) + .form-check-sign:before, &:checked + .form-check-sign:before, + .form-check-sign:before {
  89. content: '';
  90. position: absolute;
  91. left: 0;
  92. top: 1px;
  93. width: 16px;
  94. height: 16px;
  95. border: 1px solid #ccc;
  96. background: $transparent-bg;
  97. border-radius: 4px;
  98. }
  99. &:not(:checked) + .form-check-sign:after, &:checked + .form-check-sign:after, + .form-check-sign:after {
  100. content: "\f00c";
  101. display: inline-block;
  102. position: absolute;
  103. top: -1px;
  104. left: 2px;
  105. width: 18px;
  106. height: 18px;
  107. text-align: center;
  108. font-size: 1.3em;
  109. line-height: 0.8;
  110. color: $primary-color;
  111. transition: all .2s;
  112. font-family: 'Font Awesome 5 Solid';
  113. }
  114. &:not(:checked) + .form-check-sign:after {
  115. opacity: 0;
  116. transform: scale(0);
  117. }
  118. &:checked + .form-check-sign {
  119. &:after {
  120. opacity: 1;
  121. transform: scale(1);
  122. }
  123. font-weight: $font-weight-normal;
  124. }
  125. &:disabled {
  126. &:not(:checked) + .form-check-sign:before {
  127. box-shadow: none;
  128. border-color: #bbb;
  129. background-color: #ddd;
  130. }
  131. &:checked + .form-check-sign {
  132. &:before {
  133. box-shadow: none;
  134. border-color: #bbb;
  135. background-color: #ddd;
  136. }
  137. &:after {
  138. color: #999;
  139. }
  140. }
  141. + .form-check-sign {
  142. color: #aaa;
  143. }
  144. }
  145. &:checked:focus + .form-check-sign:before, &:not(:checked):focus + .form-check-sign:before {
  146. border: 1px solid #ccc;
  147. }
  148. }
  149. }
  150. .form-check-sign:hover:before {
  151. border: 1px solid #ccc !important;
  152. }
  153. .form-check {
  154. padding-left: 0.75rem;
  155. }
  156. .form-check-input {
  157. position: relative;
  158. margin-top: .3rem;
  159. }
  160. /* Radio Input */
  161. .form-radio {
  162. [type="radio"] {
  163. &:not(:checked), &:checked {
  164. position: absolute;
  165. left: -9999px;
  166. }
  167. &:not(:checked) + .form-radio-sign, &:checked + .form-radio-sign {
  168. color: $body-text-color;
  169. position: relative;
  170. padding-left: 2em;
  171. cursor: pointer;
  172. line-height: 22px;
  173. font-weight: $font-weight-normal;
  174. }
  175. &:not(:checked) + .form-radio-sign:before {
  176. content: "\f18a";
  177. font-size: 22px;
  178. font-family: LineAwesome;
  179. position: absolute;
  180. left: 0;
  181. top: auto;
  182. background: $transparent-bg;
  183. line-height: 1;
  184. color: #bbb;
  185. }
  186. &:checked + .form-radio-sign:before {
  187. content: "\f18a";
  188. font-size: 22px;
  189. font-family: LineAwesome;
  190. position: absolute;
  191. left: 0;
  192. top: auto;
  193. background: $transparent-bg;
  194. line-height: 1;
  195. display: none;
  196. }
  197. &:not(:checked) + .form-radio-sign:after, &:checked + .form-radio-sign:after {
  198. content: "\f1bc";
  199. position: absolute;
  200. left: 0px;
  201. top: auto;
  202. text-align: center;
  203. font-size: 22px;
  204. color: #4D7CFE;
  205. transition: all .2s;
  206. line-height: 1;
  207. font-family: LineAwesome;
  208. }
  209. &:not(:checked) + .form-radio-sign:after {
  210. opacity: 0;
  211. transform: scale(0);
  212. }
  213. &:checked + .form-radio-sign {
  214. &:after {
  215. opacity: 1;
  216. transform: scale(1);
  217. }
  218. font-weight: $font-weight-normal;
  219. }
  220. &:disabled {
  221. &:not(:checked) + .form-radio-sign:before {
  222. box-shadow: none;
  223. opacity: 0.65;
  224. }
  225. &:checked + .form-radio-sign {
  226. &:before {
  227. box-shadow: none;
  228. opacity: 0.65;
  229. }
  230. &:after {
  231. opacity: 0.65;
  232. }
  233. }
  234. + .form-radio-sign {
  235. color: #aaa;
  236. opacity: 0.65;
  237. }
  238. }
  239. &:checked:focus + .form-radio-sign:before, &:not(:checked):focus + .form-radio-sign:before {
  240. border: 1px solid #ccc;
  241. }
  242. }
  243. }
  244. .form-radio {
  245. padding-left: 0.75rem;
  246. }
  247. .form-radio-input {
  248. position: relative;
  249. margin-top: .3rem;
  250. }
  251. /* Custom Checkbox */
  252. .custom-checkbox {
  253. .custom-control-input:checked~.custom-control-label::before{
  254. background-color: $primary-color;
  255. }
  256. &.checkbox-default{
  257. .custom-control-input:checked~.custom-control-label::before{
  258. background-color: $dark-color;
  259. }
  260. }
  261. &.checkbox-primary{
  262. .custom-control-input:checked~.custom-control-label::before{
  263. background-color: $primary-color;
  264. }
  265. }
  266. &.checkbox-secondary{
  267. .custom-control-input:checked~.custom-control-label::before{
  268. background-color: $secondary-color;
  269. }
  270. }
  271. &.checkbox-info{
  272. .custom-control-input:checked~.custom-control-label::before{
  273. background-color: $info-color;
  274. }
  275. }
  276. &.checkbox-success{
  277. .custom-control-input:checked~.custom-control-label::before{
  278. background-color: $success-color;
  279. }
  280. }
  281. &.checkbox-warning{
  282. .custom-control-input:checked~.custom-control-label::before{
  283. background-color: $warning-color;
  284. }
  285. }
  286. &.checkbox-danger{
  287. .custom-control-input:checked~.custom-control-label::before{
  288. background-color: $danger-color;
  289. }
  290. }
  291. }
  292. /* Label */
  293. .col-form-label {
  294. line-height: 1.8;
  295. }
  296. .required-label{
  297. color: red;
  298. }
  299. .label-align-left{
  300. text-align: left;
  301. }
  302. .label-align-right{
  303. text-align: right;
  304. }
  305. .label-align-center{
  306. text-align: center;
  307. }
  308. /* Input */
  309. .form-group, .form-check {
  310. margin-bottom: 0;
  311. padding: 10px;
  312. }
  313. .form-group label, .form-check label {
  314. margin-bottom: .5rem;
  315. color: #495057;
  316. font-weight: $font-weight-bold;
  317. font-size: 1rem;
  318. white-space: nowrap;
  319. }
  320. .form-group-default {
  321. background-color: $white-color;
  322. border: 1px solid rgba(0,0,0,.07);
  323. border-radius: 4px;
  324. padding-top: 7px;
  325. padding-left: 12px;
  326. padding-right: 12px;
  327. padding-bottom: 4px;
  328. overflow: hidden;
  329. width: 100%;
  330. -webkit-transition: background-color .2s ease;
  331. transition: background-color .2s ease;
  332. margin-bottom: 15px;
  333. label {
  334. opacity: 1;
  335. -webkit-backface-visibility: hidden;
  336. -moz-backface-visibility: hidden;
  337. backface-visibility: hidden;
  338. margin: 0;
  339. display: block;
  340. -webkit-transition: opacity .2s ease;
  341. transition: opacity .2s ease;
  342. }
  343. label:not(.error){
  344. font-size: 10.5px !important;
  345. letter-spacing: .06em;
  346. text-transform: uppercase;
  347. font-weight: $font-weight-normal;
  348. }
  349. .form-control{
  350. border: 0;
  351. min-height: 25px;
  352. padding: 0;
  353. margin-top: 6px;
  354. background: 0 0;
  355. font-size: 14px;
  356. }
  357. select.form-control:not([size]):not([multiple]){
  358. height: unset !important;
  359. }
  360. &.active {
  361. border-color: rgba(0,0,0,.1)!important;
  362. background-color: #f0f0f0;
  363. label {
  364. opacity: 0.5;
  365. }
  366. }
  367. }
  368. .form-floating-label{
  369. position: relative;
  370. .placeholder {
  371. position: absolute;
  372. padding: .375rem .75rem;
  373. transition: all .2s;
  374. opacity: 0.8;
  375. margin-bottom: 0 !important;
  376. font-size: 14px !important;
  377. font-weight: $font-weight-normal;
  378. top: 12px;
  379. }
  380. .form-control:focus + .placeholder, .form-control:valid + .placeholder, .form-control.filled + .placeholder {
  381. font-size: 85% !important;
  382. transform: translate3d(0, -10px, 0);
  383. top: 0;
  384. opacity: 1;
  385. padding: .375rem 0 .75rem;
  386. font-weight: $font-weight-bold;
  387. }
  388. .form-control.filled + .placeholder{
  389. color: $primary-color !important;
  390. }
  391. .form-control ::-webkit-input-placeholder { color: $transparent-bg; }
  392. .form-control :-moz-placeholder { color: $transparent-bg; }
  393. .form-control ::-moz-placeholder { color: $transparent-bg; }
  394. .form-control :-ms-input-placeholder { color: $transparent-bg; }
  395. .input-border-bottom + .placeholder{
  396. padding: .375rem 0 .75rem;
  397. }
  398. }
  399. .form-inline label {
  400. margin-bottom: 0 !important;
  401. }
  402. .input-fixed {
  403. width: 200px;
  404. }
  405. .form-control.input-full {
  406. width: 100% !important;
  407. }
  408. .has-success {
  409. label {
  410. color: $success-color !important;
  411. }
  412. .form-control {
  413. border-color: $success-color !important;
  414. color: $success-color !important;
  415. }
  416. .input-group-text{
  417. border-color: $success-color !important;
  418. background: $success-color !important;
  419. color: $white-color !important;
  420. }
  421. }
  422. .has-error{
  423. label {
  424. color: $danger-color !important;
  425. }
  426. .form-control {
  427. border-color: $danger-color !important;
  428. color: $danger-color !important;
  429. }
  430. .input-group-text{
  431. border-color: $danger-color !important;
  432. background: $danger-color !important;
  433. color: $white-color !important;
  434. }
  435. }
  436. .input-group{
  437. label{
  438. &.error, &.success{
  439. width: 100%;
  440. order: 100;
  441. }
  442. }
  443. }
  444. .custom-control{
  445. position: relative;
  446. &.custom-radio, &.custom-checkbox{
  447. margin-bottom: 0;
  448. padding-left: 2em;
  449. cursor: pointer;
  450. line-height: 24px;
  451. margin-right: 25px;
  452. display: inline-block;
  453. label{
  454. &.error, &.success{
  455. position: absolute;
  456. width: 100vh;
  457. top: 23px;
  458. left: 0;
  459. }
  460. }
  461. }
  462. }
  463. .has-feedback {
  464. position: relative;
  465. }
  466. .form-control-feedback {
  467. position: absolute;
  468. top: 50%;
  469. transform: translateY(-50%);
  470. right: 20px;
  471. }
  472. .has-success .form-control-feedback {
  473. color: $success-color;
  474. }
  475. .has-error .form-control-feedback {
  476. color: $danger-color;
  477. }
  478. .input-group {
  479. &.has-icon {
  480. border-radius: .25rem;
  481. border: 1px solid #ced4da;
  482. }
  483. &.has-success, &.has-icon.has-success {
  484. border: 1px solid $success-color !important;
  485. color: $success-color;
  486. }
  487. &.has-error {
  488. border: 1px solid $danger-color !important;
  489. color: $danger-color;
  490. }
  491. &.has-icon {
  492. &.has-error {
  493. border: 1px solid $danger-color !important;
  494. color: $danger-color;
  495. }
  496. .form-control {
  497. border-radius: .25rem;
  498. border: 0px;
  499. position: relative;
  500. }
  501. .input-group-icon {
  502. background: $transparent-bg;
  503. border: 0px;
  504. }
  505. }
  506. }
  507. .input-square {
  508. border-radius: 0px !important;
  509. }
  510. .input-pill {
  511. border-radius: 1.3rem !important;
  512. }
  513. .input-solid {
  514. background: #e8e8e8 !important;
  515. border-color: #e8e8e8 !important;
  516. }
  517. .input-border-bottom{
  518. border-width: 0 0 1px 0;
  519. border-radius: 0px;
  520. padding: .75rem 0;
  521. background: transparent !important;
  522. }
  523. /* Input File */
  524. .input-file {
  525. input[type="file"], .form-control, .form-control-file{
  526. width: 0.1px;
  527. height: 0.1px;
  528. opacity: 0;
  529. overflow: hidden;
  530. position: absolute;
  531. z-index: -1;
  532. }
  533. label{
  534. &.error, &.success{
  535. display: block;
  536. }
  537. }
  538. input[type="file"] + label:not(.error), .form-control + label:not(.error), .form-control-file + label:not(.error), .label-input-file {
  539. font-weight: $font-weight-bold;
  540. letter-spacing: 0.02em;
  541. color: white !important;
  542. display: inline-block;
  543. }
  544. &.input-file-image{
  545. img.img-upload-preview{
  546. max-width: 100%;
  547. display: block;
  548. margin-bottom: 15px;
  549. box-shadow: 0 1px 15px 1px rgba(39,39,39,.1);
  550. &.img-circle{
  551. border-radius: 2000px;
  552. }
  553. }
  554. }
  555. }
  556. .form-control {
  557. &:disabled, &[readonly] {
  558. background: #e8e8e8 !important;
  559. border-color: #e8e8e8 !important;
  560. }
  561. &:disabled, &[readonly] {
  562. opacity: 0.6 !important;
  563. }
  564. }
  565. /* Input Group */
  566. .input-group-text{
  567. font-size: 14px;
  568. i.la{
  569. font-size: 21px;
  570. }
  571. i[class*="flaticon"]{
  572. font-size: 17px;
  573. }
  574. }
  575. /* Input Icon */
  576. .input-icon {
  577. position: relative;
  578. .form-control {
  579. &:not(:first-child) {
  580. padding-left: 2.5rem;
  581. }
  582. &:not(:last-child) {
  583. padding-right: 2.5rem;
  584. }
  585. }
  586. .input-icon-addon {
  587. position: absolute;
  588. left: 1rem;
  589. top: 0;
  590. height: 100%;
  591. display: flex;
  592. align-items: center;
  593. &:last-child {
  594. left: auto;
  595. right: 1rem;
  596. }
  597. }
  598. }
  599. /* Label States */
  600. label {
  601. &.error {
  602. color: $danger-color !important;
  603. font-size: 80% !important;
  604. margin-top: .5rem;
  605. }
  606. }
  607. /* Label states for select2 */
  608. .select2-input {
  609. position: relative;
  610. label{
  611. &.error, &.success {
  612. position: absolute;
  613. bottom: -30px;
  614. }
  615. }
  616. .select2{
  617. margin-bottom: 15px;
  618. }
  619. }
  620. /* Custom Dropzone */
  621. .dropzone{
  622. padding: 70px 60px 80px !important;
  623. border: 2px dashed rgba(0, 0, 0, 0.13) !important;
  624. background: $transparent-bg !important;
  625. &:hover {
  626. background: #fafafa !important;
  627. transition: all .5s !important;
  628. }
  629. .dz-message {
  630. .icon{
  631. margin-bottom: 15px;
  632. font-size: 39px;
  633. }
  634. .message{
  635. font-size: 34px;
  636. font-weight: 200;
  637. }
  638. .note{
  639. font-size: 16px;
  640. margin-top: 18px;
  641. font-weight: $font-weight-light;
  642. }
  643. }
  644. }
  645. /* Custom Summernote */
  646. .note-editor.note-frame {
  647. border: 0px !important;
  648. box-shadow: none !important;
  649. .note-toolbar {
  650. padding: 0 !important;
  651. border-bottom: 0px !important;
  652. }
  653. .note-btn{
  654. border: 1px solid #eee !important;
  655. background: #fafafa !important;
  656. }
  657. .note-placeholder{
  658. margin-top: 15px !important;
  659. }
  660. .note-codable{
  661. margin-top: 15px !important;
  662. }
  663. .note-editing-area{
  664. .note-editable{
  665. margin-top: 15px !important;
  666. border: 1px solid #eee !important;
  667. }
  668. }
  669. }