You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

182 rivejä
3.7 KiB

  1. import {
  2. primaryColor,
  3. dangerColor,
  4. roseColor,
  5. grayColor,
  6. hexToRGBAlpha
  7. } from "assets/jss/nextjs-material-kit.js";
  8. const customCheckboxRadioSwitch = {
  9. checkRoot: {
  10. padding: "12px",
  11. "&:hover": {
  12. backgroundColor: hexToRGBAlpha(primaryColor, 0.04) + "!important"
  13. }
  14. },
  15. radioRoot: {
  16. padding: "12px",
  17. "&:hover": {
  18. backgroundColor: hexToRGBAlpha(primaryColor, 0.04) + "!important"
  19. }
  20. },
  21. labelRoot: {
  22. marginLeft: "-14px"
  23. },
  24. checkboxAndRadio: {
  25. position: "relative",
  26. display: "block",
  27. marginTop: "10px",
  28. marginBottom: "10px"
  29. },
  30. checkboxAndRadioHorizontal: {
  31. position: "relative",
  32. display: "block",
  33. "&:first-child": {
  34. marginTop: "10px"
  35. },
  36. "&:not(:first-child)": {
  37. marginTop: "-14px"
  38. },
  39. marginTop: "0",
  40. marginBottom: "0"
  41. },
  42. checked: {
  43. color: primaryColor + "!important"
  44. },
  45. checkedIcon: {
  46. width: "20px",
  47. height: "20px",
  48. border: "1px solid rgba(0, 0, 0, .54)",
  49. borderRadius: "3px"
  50. },
  51. uncheckedIcon: {
  52. width: "0px",
  53. height: "0px",
  54. padding: "9px",
  55. border: "1px solid rgba(0, 0, 0, .54)",
  56. borderRadius: "3px"
  57. },
  58. disabledCheckboxAndRadio: {
  59. opacity: "0.45"
  60. },
  61. label: {
  62. cursor: "pointer",
  63. paddingLeft: "0",
  64. color: "rgba(0, 0, 0, 0.26)",
  65. fontSize: "14px",
  66. lineHeight: "1.428571429",
  67. fontWeight: "400",
  68. display: "inline-flex",
  69. transition: "0.3s ease all",
  70. letterSpacing: "unset"
  71. },
  72. labelHorizontal: {
  73. color: "rgba(0, 0, 0, 0.26)",
  74. cursor: "pointer",
  75. display: "inline-flex",
  76. fontSize: "14px",
  77. lineHeight: "1.428571429",
  78. fontWeight: "400",
  79. paddingTop: "39px",
  80. marginRight: "0",
  81. "@media (min-width: 992px)": {
  82. float: "right"
  83. }
  84. },
  85. labelHorizontalRadioCheckbox: {
  86. paddingTop: "22px"
  87. },
  88. labelLeftHorizontal: {
  89. color: "rgba(0, 0, 0, 0.26)",
  90. cursor: "pointer",
  91. display: "inline-flex",
  92. fontSize: "14px",
  93. lineHeight: "1.428571429",
  94. fontWeight: "400",
  95. paddingTop: "22px",
  96. marginRight: "0"
  97. },
  98. labelError: {
  99. color: dangerColor
  100. },
  101. radio: {
  102. color: primaryColor + "!important"
  103. },
  104. radioChecked: {
  105. width: "16px",
  106. height: "16px",
  107. border: "1px solid " + primaryColor,
  108. borderRadius: "50%"
  109. },
  110. radioUnchecked: {
  111. width: "0px",
  112. height: "0px",
  113. padding: "7px",
  114. border: "1px solid rgba(0, 0, 0, .54)",
  115. borderRadius: "50%"
  116. },
  117. inlineChecks: {
  118. marginTop: "8px"
  119. },
  120. iconCheckbox: {
  121. height: "116px",
  122. width: "116px",
  123. color: grayColor,
  124. "& > span:first-child": {
  125. borderWidth: "4px",
  126. borderStyle: "solid",
  127. borderColor: "#CCCCCC",
  128. textAlign: "center",
  129. verticalAlign: "middle",
  130. borderRadius: "50%",
  131. color: "inherit",
  132. margin: "0 auto 20px",
  133. transition: "all 0.2s"
  134. },
  135. "&:hover": {
  136. color: roseColor,
  137. "& > span:first-child": {
  138. borderColor: roseColor
  139. }
  140. }
  141. },
  142. iconCheckboxChecked: {
  143. color: roseColor,
  144. "& > span:first-child": {
  145. borderColor: roseColor
  146. }
  147. },
  148. iconCheckboxIcon: {
  149. fontSize: "40px",
  150. lineHeight: "111px"
  151. },
  152. switchBase: {
  153. color: primaryColor + "!important"
  154. },
  155. switchIcon: {
  156. boxShadow: "0 1px 3px 1px rgba(0, 0, 0, 0.4)",
  157. color: "#FFFFFF !important",
  158. border: "1px solid rgba(0, 0, 0, .54)"
  159. },
  160. switchBar: {
  161. width: "30px",
  162. height: "15px",
  163. backgroundColor: "rgb(80, 80, 80)",
  164. borderRadius: "15px",
  165. opacity: "0.7!important"
  166. },
  167. switchChecked: {
  168. "& + $switchBar": {
  169. backgroundColor: "rgba(156, 39, 176, 1) !important"
  170. },
  171. "& $switchIcon": {
  172. borderColor: "#9c27b0"
  173. }
  174. },
  175. switchRoot: {
  176. height: "48px"
  177. }
  178. };
  179. export default customCheckboxRadioSwitch;