fs-components.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /*
  2. fs-components.css
  3. Reusable UI pieces shared by the ArozOS File Manager and File Selector.
  4. Colours come from fs-theme.css - load that first.
  5. Only genuinely app-agnostic components belong here. Anything that positions a
  6. component inside a particular app's layout (widths, grid placement, which
  7. pane it sits in) stays in that app's own stylesheet.
  8. */
  9. /* ---------- Glyph containers emitted by shared/filethumb.js ---------- */
  10. /*
  11. FileThumb.smallGlyph() emits .fsSmallIcon and largeGlyph() emits .fsBigIcon,
  12. each wrapping a single inline <svg>. The base sizes below are what a list row
  13. and a tile want; apps override per context (a preview pane wants it larger).
  14. */
  15. .fsSmallIcon {
  16. width: 20px;
  17. height: 20px;
  18. min-width: 20px;
  19. }
  20. .fsBigIcon {
  21. width: 56px;
  22. height: 56px;
  23. }
  24. .fsSmallIcon svg,
  25. .fsBigIcon svg {
  26. display: block;
  27. width: 100%;
  28. height: 100%;
  29. }
  30. /* Lift the drawn white document sheet off a dark background */
  31. body.darkTheme .fsBigIcon svg path[fill="#ffffff"] { fill: #e4e6ea; }
  32. /* ---------- Icon buttons ---------- */
  33. .fsIconBtn {
  34. width: 30px;
  35. height: 30px;
  36. min-width: 30px;
  37. border: none;
  38. border-radius: 50%;
  39. background: var(--fs-fill);
  40. color: var(--fs-text);
  41. padding: 7px;
  42. cursor: pointer;
  43. transition: background 0.12s ease, color 0.12s ease, opacity 0.12s ease;
  44. }
  45. .fsIconBtn:hover:not(:disabled) { background: var(--fs-fill-hover); }
  46. .fsIconBtn:active:not(:disabled) { background: var(--fs-fill-active); }
  47. .fsIconBtn:disabled { opacity: 0.35; cursor: default; }
  48. /*
  49. Close button. Must be sized on its own class, not scoped to a title bar -
  50. without an explicit box the inner SVG stretches to fill its container.
  51. */
  52. .fsCloseBtn {
  53. width: 28px;
  54. height: 28px;
  55. min-width: 28px;
  56. flex-shrink: 0;
  57. border: none;
  58. background: transparent;
  59. border-radius: 7px;
  60. padding: 6px;
  61. color: var(--fs-text-dim);
  62. cursor: pointer;
  63. }
  64. .fsCloseBtn:hover { background: var(--fs-fill); color: var(--fs-text); }
  65. /* ---------- Pill container (path bar, search box, sort control) ---------- */
  66. .fsPill {
  67. height: 34px;
  68. border: 1px solid var(--fs-line);
  69. border-radius: 9px;
  70. background: var(--fs-pill-bg);
  71. display: flex;
  72. align-items: center;
  73. padding: 0 5px 0 10px;
  74. gap: 7px;
  75. min-width: 0;
  76. }
  77. /* ---------- Popup / context menu ---------- */
  78. .fsMenu {
  79. position: absolute;
  80. z-index: 500;
  81. min-width: 210px;
  82. background: var(--fs-surface);
  83. border: 1px solid var(--fs-line);
  84. border-radius: 10px;
  85. box-shadow: 0 8px 28px var(--fs-shadow);
  86. padding: 4px;
  87. display: none;
  88. }
  89. .fsMenu.open { display: block; }
  90. .fsMenuItem {
  91. display: flex;
  92. align-items: center;
  93. gap: 6px;
  94. padding: 4px 6px;
  95. border-radius: 6px;
  96. cursor: pointer;
  97. font-size: 13.5px;
  98. white-space: nowrap;
  99. }
  100. .fsMenuItem:hover { background: var(--fs-fill); }
  101. .fsMenuItem.disabled { opacity: 0.4; cursor: default; }
  102. .fsMenuItem.disabled:hover { background: transparent; }
  103. .fsMenuItem .fsMenuIcon {
  104. width: 17px;
  105. height: 17px;
  106. min-width: 17px;
  107. color: var(--fs-icon);
  108. }
  109. .fsMenuItem .fsMenuIcon svg {
  110. display: block;
  111. width: 100%;
  112. height: 100%;
  113. }
  114. .fsMenuItem .fsMenuCheck {
  115. width: 15px;
  116. height: 15px;
  117. min-width: 15px;
  118. margin-left: auto;
  119. color: var(--fs-accent);
  120. visibility: hidden;
  121. }
  122. .fsMenuItem.checked .fsMenuCheck { visibility: visible; }
  123. /* Right-aligned keyboard shortcut hint */
  124. .fsMenuShortcut {
  125. margin-left: auto;
  126. padding-left: 12px;
  127. color: var(--fs-text-faint);
  128. font-size: 12px;
  129. }
  130. .fsMenuSep {
  131. height: 1px;
  132. background: var(--fs-line-soft);
  133. margin: 3px;
  134. }
  135. /* A menu positioned against the viewport rather than an offset parent */
  136. .fsMenu.fsContextMenu {
  137. position: fixed;
  138. min-width: 200px;
  139. }
  140. /* ---------- Inline rename editor ---------- */
  141. .fsInlineEdit {
  142. font-size: 14px;
  143. font-family: inherit;
  144. color: var(--fs-text);
  145. background: var(--fs-surface);
  146. border: 1px solid var(--fs-accent);
  147. border-radius: 4px;
  148. padding: 2px 6px;
  149. outline: none;
  150. width: 100%;
  151. min-width: 60px;
  152. user-select: text;
  153. }
  154. /* ---------- Buttons ---------- */
  155. .fsBtn {
  156. height: 34px;
  157. min-width: 84px;
  158. border-radius: 8px;
  159. font-size: 14px;
  160. font-family: inherit;
  161. cursor: pointer;
  162. padding: 0 16px;
  163. border: 1px solid var(--fs-line);
  164. background: var(--fs-surface);
  165. color: var(--fs-text);
  166. }
  167. .fsBtn:hover { background: var(--fs-fill); }
  168. .fsBtn.primary {
  169. background: var(--fs-accent);
  170. border-color: var(--fs-accent);
  171. color: var(--fs-primary-fg);
  172. font-weight: 500;
  173. }
  174. .fsBtn.primary:hover {
  175. background: var(--fs-primary-hover);
  176. border-color: var(--fs-primary-hover);
  177. }
  178. /* ---------- Spinner ---------- */
  179. .fsSpinner {
  180. width: 26px;
  181. height: 26px;
  182. border: 3px solid var(--fs-line);
  183. border-top-color: var(--fs-accent);
  184. border-radius: 50%;
  185. animation: fsSpin 0.8s linear infinite;
  186. }
  187. @keyframes fsSpin { to { transform: rotate(360deg); } }