Styles.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. import { Theme } from '@mui/material';
  2. import { makeStyles } from '@mui/styles';
  3. export const getQueryStyles = makeStyles((theme: Theme) => ({
  4. root: {
  5. display: 'flex',
  6. flexDirection: 'column',
  7. height: '100%',
  8. },
  9. inputArea: {
  10. display: 'flex',
  11. flexDirection: 'row',
  12. width: '100%',
  13. height: 'max-content',
  14. padding: 0,
  15. },
  16. accordions: {
  17. display: 'flex',
  18. width: '220px',
  19. flexDirection: 'column',
  20. flexShrink: 0,
  21. padding: '0 8px 8px 0',
  22. borderRadius: '0',
  23. minHeight: 'calc(100vh - 164px)',
  24. height: 'calc(100vh - 164px)',
  25. overflow: 'auto',
  26. borderRight: `1px solid ${theme.palette.divider}`,
  27. '& .MuiAccordion-root.Mui-expanded': {
  28. margin: 0,
  29. },
  30. '& .MuiAccordion-root.Mui-expanded:before': {
  31. opacity: 1,
  32. },
  33. },
  34. accordion: {
  35. borderRadius: 0,
  36. boxShadow: 'none',
  37. padding: '0',
  38. border: '1px solid transparent',
  39. '&:first-child': {
  40. borderTopLeftRadius: 0,
  41. borderTopRightRadius: 0,
  42. },
  43. '&.highlight': {
  44. border: `1px solid ${theme.palette.secondary.main}`,
  45. },
  46. // borderBottom: `1px solid ${theme.palette.divider}`,
  47. '& .MuiAccordionSummary-root': {
  48. minHeight: '48px',
  49. padding: '0 12px 0 0',
  50. '& .MuiAccordionSummary-expandIcon': {
  51. padding: 4,
  52. },
  53. },
  54. '& .MuiAccordionSummary-content': {
  55. margin: 0,
  56. padding: '8px 0',
  57. },
  58. '& .MuiAccordionSummary-expandIcon': {
  59. alignSelf: 'flex-start',
  60. position: 'relative',
  61. top: '4px',
  62. },
  63. },
  64. accordionDetail: {
  65. display: 'flex',
  66. flexDirection: 'column',
  67. padding: '0',
  68. '& .textarea': {
  69. height: '100px',
  70. marginBottom: '8px',
  71. },
  72. '& .paramsWrapper': {
  73. '& .MuiFormControl-root': {
  74. width: '100%',
  75. },
  76. },
  77. },
  78. heading: {
  79. flexShrink: 0,
  80. },
  81. checkbox: {
  82. display: 'flex',
  83. flexDirection: 'row',
  84. '& .MuiCheckbox-root': {
  85. padding: 0,
  86. marginRight: 4,
  87. alignSelf: 'flex-start',
  88. postion: 'relative',
  89. top: '2px',
  90. },
  91. '& .field-name': {
  92. fontSize: '13px',
  93. fontWeight: 400,
  94. lineHeight: '20px',
  95. wordBreak: 'break-all',
  96. },
  97. '& .bold': {
  98. fontWeight: 600,
  99. },
  100. '& .vector-type': {
  101. color: theme.palette.text.secondary,
  102. fontSize: '12px',
  103. lineHeight: '20px',
  104. '& i': {
  105. marginLeft: '4px',
  106. fontSize: '10px',
  107. fontWeight: 600,
  108. color: theme.palette.primary.light,
  109. },
  110. },
  111. },
  112. vectorInputBox: {
  113. height: '124px',
  114. margin: '0 0 8px 0',
  115. overflow: 'auto',
  116. backgroundColor: '#f4f4f4',
  117. cursor: 'text',
  118. boxShadow: '0 1px 0 transparent',
  119. transition: `box-shadow 0.3s ease`,
  120. '&:hover': {
  121. boxShadow: '0 1px 0 #000',
  122. },
  123. '&:active': {
  124. boxShadow: `0 1px 0 ${theme.palette.primary.main}`,
  125. },
  126. '&.focused': {
  127. boxShadow: `0 2px 0 ${theme.palette.primary.main}`,
  128. },
  129. },
  130. searchControls: {
  131. display: 'flex',
  132. flexDirection: 'column',
  133. width: 120,
  134. minWidth: 120,
  135. padding: '0 8px',
  136. borderRight: `1px solid ${theme.palette.divider}`,
  137. '& .selector': {
  138. marginBottom: '8px',
  139. },
  140. '& span button': {
  141. width: '100%',
  142. height: '100%',
  143. },
  144. },
  145. searchResults: {
  146. display: 'flex',
  147. flexDirection: 'column',
  148. flexGrow: 1,
  149. padding: '0 8px',
  150. overflow: 'auto',
  151. },
  152. toolbar: {
  153. display: 'flex',
  154. justifyContent: 'space-between',
  155. alignItems: 'center',
  156. backgroundColor: 'white',
  157. padding: theme.spacing(0, 0, 1),
  158. gap: theme.spacing(1),
  159. '& .left': {
  160. display: 'flex',
  161. justifyContent: 'space-between',
  162. alignItems: 'center',
  163. gap: theme.spacing(1),
  164. flex: 1,
  165. '& .textarea': {
  166. width: '100%',
  167. '& .MuiFormHelperText-root': {
  168. display: 'none',
  169. },
  170. },
  171. },
  172. '& .right': {
  173. display: 'flex',
  174. justifyContent: 'space-between',
  175. alignItems: 'center',
  176. gap: theme.spacing(1),
  177. },
  178. },
  179. btn: {
  180. height: 56,
  181. width: 80,
  182. },
  183. }));