search-dialog.module.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @use "@pythnetwork/component-library/theme";
  2. .modalOverlay {
  3. position: fixed;
  4. inset: 0;
  5. background: rgba(from black r g b / 30%);
  6. z-index: 1;
  7. .searchMenu {
  8. position: relative;
  9. top: theme.spacing(32);
  10. margin: 0 auto;
  11. outline: none;
  12. background: theme.color("background", "secondary");
  13. border-radius: theme.border-radius("2xl");
  14. padding: theme.spacing(1);
  15. max-height: theme.spacing(120);
  16. display: flex;
  17. flex-flow: column nowrap;
  18. flex-grow: 1;
  19. gap: theme.spacing(1);
  20. width: fit-content;
  21. .searchBar {
  22. flex: none;
  23. display: flex;
  24. flex-flow: row nowrap;
  25. gap: theme.spacing(2);
  26. align-items: center;
  27. padding: theme.spacing(1);
  28. .closeButton {
  29. margin-left: theme.spacing(8);
  30. }
  31. }
  32. .body {
  33. background: theme.color("background", "primary");
  34. border-radius: theme.border-radius("xl");
  35. flex-grow: 1;
  36. overflow: hidden;
  37. display: flex;
  38. .listbox {
  39. outline: none;
  40. overflow: auto;
  41. flex-grow: 1;
  42. .item {
  43. padding: theme.spacing(3) theme.spacing(4);
  44. display: flex;
  45. flex-flow: row nowrap;
  46. align-items: center;
  47. width: 100%;
  48. cursor: pointer;
  49. transition: background-color 100ms linear;
  50. outline: none;
  51. text-decoration: none;
  52. border-top: 1px solid theme.color("background", "secondary");
  53. &[data-is-first] {
  54. border-top: none;
  55. }
  56. & > *:last-child {
  57. flex-shrink: 0;
  58. }
  59. &[data-focused] {
  60. background-color: theme.color(
  61. "button",
  62. "outline",
  63. "background",
  64. "hover"
  65. );
  66. }
  67. &[data-pressed] {
  68. background-color: theme.color(
  69. "button",
  70. "outline",
  71. "background",
  72. "active"
  73. );
  74. }
  75. .itemType {
  76. width: theme.spacing(21);
  77. flex-shrink: 0;
  78. margin-right: theme.spacing(6);
  79. }
  80. .itemTag {
  81. flex-grow: 1;
  82. }
  83. }
  84. }
  85. }
  86. }
  87. }