dialog-command-palette-v2.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. .command-palette-v2 {
  2. overflow: hidden;
  3. }
  4. /* Anchor to the top edge of where a centered 480px-tall dialog would sit, so the
  5. top stays put while the content-driven height grows and shrinks. */
  6. [data-component="dialog-v2"]:has(.command-palette-v2) {
  7. align-items: flex-start;
  8. }
  9. [data-component="dialog-v2"]:has(.command-palette-v2) [data-slot="dialog-container"] {
  10. width: min(calc(100vw - 24px), 640px);
  11. height: auto;
  12. min-height: 280px;
  13. max-height: min(calc(100vh - 96px), 480px);
  14. margin-top: max(48px, calc((100vh - 480px) / 2));
  15. border-radius: 12px;
  16. background: var(--v2-background-bg-base);
  17. box-shadow: var(--v2-elevation-floating);
  18. }
  19. .command-palette-v2-body {
  20. display: flex;
  21. min-height: 0;
  22. flex: 1;
  23. flex-direction: column;
  24. gap: 0;
  25. padding: 0;
  26. }
  27. .command-palette-v2-search {
  28. flex-shrink: 0;
  29. padding: 6px;
  30. }
  31. .command-palette-v2-search [data-component="text-input-v2"] {
  32. width: 100%;
  33. height: 36px;
  34. border-radius: 6px;
  35. outline: 0;
  36. background: color-mix(in srgb, var(--v2-background-bg-layer-02) 60%, transparent);
  37. box-shadow: none;
  38. transition:
  39. background-color 120ms ease-in-out,
  40. box-shadow 120ms ease-in-out;
  41. }
  42. .command-palette-v2-search [data-component="text-input-v2"]:where(:hover):not([data-disabled], [data-invalid]),
  43. .command-palette-v2-search [data-component="text-input-v2"]:where(:focus-within):not([data-disabled], [data-invalid]) {
  44. background: var(--v2-background-bg-layer-02);
  45. box-shadow: none;
  46. }
  47. .command-palette-v2-search [data-component="text-input-v2"] [data-slot="text-input-v2-value"] {
  48. border-radius: 6px;
  49. background: transparent;
  50. gap: 8px;
  51. }
  52. .command-palette-v2-search [data-component="text-input-v2"] [data-slot="text-input-v2-leading-icon"] {
  53. padding-left: 12px;
  54. }
  55. .command-palette-v2-search [data-component="text-input-v2"] [data-slot="text-input-v2-input"] {
  56. border-radius: 6px;
  57. background: transparent;
  58. }
  59. .command-palette-v2-scroll {
  60. min-height: 0;
  61. flex: 1;
  62. }
  63. .command-palette-v2-results {
  64. display: flex;
  65. flex-direction: column;
  66. gap: 16px;
  67. padding: 6px 6px 8px;
  68. }
  69. .command-palette-v2-group {
  70. display: flex;
  71. flex-direction: column;
  72. gap: 1px;
  73. }
  74. .command-palette-v2-group-title {
  75. margin: 6px 0;
  76. padding: 0 12px;
  77. color: var(--v2-text-text-muted);
  78. font-size: 13px;
  79. font-weight: 440;
  80. line-height: 16px;
  81. letter-spacing: -0.04px;
  82. user-select: none;
  83. }
  84. .command-palette-v2-row {
  85. display: flex;
  86. width: 100%;
  87. height: 36px;
  88. flex-shrink: 0;
  89. align-items: center;
  90. justify-content: space-between;
  91. gap: 8px;
  92. padding: 0 12px;
  93. border: 0;
  94. border-radius: 6px;
  95. background: transparent;
  96. color: var(--v2-text-text-base);
  97. text-align: left;
  98. cursor: default;
  99. scroll-margin: 6px 0;
  100. }
  101. .command-palette-v2-row[data-active] {
  102. background: var(--v2-overlay-simple-overlay-hover);
  103. }
  104. .command-palette-v2-row:focus-visible {
  105. background: var(--v2-overlay-simple-overlay-hover);
  106. outline: none;
  107. }
  108. .command-palette-v2-row-main {
  109. display: flex;
  110. min-width: 0;
  111. flex: 1;
  112. align-items: center;
  113. gap: 8px;
  114. }
  115. .command-palette-v2-row-icon {
  116. flex-shrink: 0;
  117. color: var(--v2-icon-icon-muted);
  118. }
  119. .command-palette-v2-row-text {
  120. display: flex;
  121. min-width: 0;
  122. align-items: center;
  123. gap: 6px;
  124. }
  125. .command-palette-v2-title {
  126. min-width: 0;
  127. overflow: hidden;
  128. color: var(--v2-text-text-base);
  129. font-size: 13px;
  130. font-weight: 530;
  131. line-height: 16px;
  132. letter-spacing: -0.04px;
  133. text-overflow: ellipsis;
  134. white-space: nowrap;
  135. }
  136. .command-palette-v2-description,
  137. .command-palette-v2-meta {
  138. min-width: 0;
  139. overflow: hidden;
  140. color: var(--v2-text-text-muted);
  141. font-size: 13px;
  142. font-weight: 440;
  143. line-height: 16px;
  144. letter-spacing: -0.04px;
  145. text-overflow: ellipsis;
  146. white-space: nowrap;
  147. }
  148. .command-palette-v2-meta {
  149. flex-shrink: 0;
  150. }
  151. .command-palette-v2-file-path {
  152. display: flex;
  153. min-width: 0;
  154. align-items: baseline;
  155. font-size: 13px;
  156. line-height: 16px;
  157. letter-spacing: -0.04px;
  158. }
  159. .command-palette-v2-file-dir {
  160. min-width: 0;
  161. overflow: hidden;
  162. color: var(--v2-text-text-muted);
  163. font-weight: 440;
  164. text-overflow: ellipsis;
  165. white-space: nowrap;
  166. }
  167. .command-palette-v2-file-name {
  168. flex-shrink: 0;
  169. color: var(--v2-text-text-base);
  170. font-weight: 530;
  171. white-space: nowrap;
  172. }
  173. .command-palette-v2-state {
  174. display: grid;
  175. min-height: 120px;
  176. place-items: center;
  177. color: var(--v2-text-text-muted);
  178. font-size: 13px;
  179. font-weight: 440;
  180. line-height: 16px;
  181. letter-spacing: -0.04px;
  182. }
  183. @media (max-width: 640px) {
  184. .command-palette-v2-row-text {
  185. flex-direction: column;
  186. align-items: flex-start;
  187. gap: 1px;
  188. }
  189. .command-palette-v2-description {
  190. max-width: 100%;
  191. }
  192. }