Rows.module.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /* Tree rows (figma Cell set 14:3080): project 54px two-line, session 34px
  2. single-line, radius 8, indent step 22px (16px slot + 6px gap). Hover swaps
  3. are pure CSS: project folder -> chevron + action buttons; session time ->
  4. ellipsis button. */
  5. .projectRow,
  6. .sessionRow {
  7. display: flex;
  8. align-items: center;
  9. gap: 6px;
  10. border-radius: 8px;
  11. padding: 0 8px;
  12. cursor: pointer;
  13. user-select: none;
  14. color: var(--dsw-alias-label-primary);
  15. }
  16. .projectRow:hover,
  17. .sessionRow:hover {
  18. background: var(--dsw-alias-interactive-bg-hover);
  19. }
  20. .sessionRow.selected {
  21. background: var(--dsw-alias-interactive-bg-active);
  22. }
  23. /* Two-line row: the leading slot (folder/chevron), title, and trailing
  24. actions all top-align on the 20px first text line (figma cell) — content
  25. is 42px (20 + 2 + 20), so 6px vertical padding centers the block. */
  26. .projectRow {
  27. height: 54px;
  28. align-items: flex-start;
  29. padding-top: 6px;
  30. padding-bottom: 6px;
  31. box-sizing: border-box;
  32. }
  33. .projectRow .rowActions {
  34. height: 20px;
  35. }
  36. /* Session cell (figma): pad 8, a 16px status slot, then a 4px title gap. */
  37. .sessionRow {
  38. height: 34px;
  39. gap: 0;
  40. /* Mount fade: session rows appear by unfolding a group (or the tree
  41. mounting). Stable row keys keep already-visible rows from replaying it. */
  42. animation: row-in 150ms var(--ds-ease-in-out);
  43. }
  44. .sessionRow .title {
  45. margin: 0 6px 0 4px;
  46. }
  47. @keyframes row-in {
  48. from { opacity: 0; }
  49. }
  50. .slot {
  51. flex: none;
  52. width: 16px;
  53. height: 20px;
  54. display: inline-flex;
  55. align-items: center;
  56. justify-content: center;
  57. color: var(--dsw-alias-label-tertiary);
  58. }
  59. .folderActive {
  60. color: var(--dsw-alias-state-business-primary);
  61. }
  62. /* Project leading slot: folder by default, expand arrow on row hover. */
  63. .projectRow .chevron { display: none; }
  64. .projectRow:hover .chevron { display: inline-flex; }
  65. .projectRow:hover .folder { display: none; }
  66. /* Expand arrow (filled triangle): points right closed, rotates to point down open. */
  67. .arrow {
  68. transition: transform 150ms var(--ds-ease-in-out);
  69. }
  70. .arrowOpen {
  71. transform: rotate(90deg);
  72. }
  73. .projectText {
  74. flex: 1;
  75. min-width: 0;
  76. display: flex;
  77. flex-direction: column;
  78. gap: 2px;
  79. }
  80. .title {
  81. min-width: 0;
  82. overflow: hidden;
  83. text-overflow: ellipsis;
  84. white-space: nowrap;
  85. font-size: 14px;
  86. line-height: 20px;
  87. }
  88. .renameInput {
  89. min-width: 0;
  90. font-size: 14px;
  91. line-height: 20px;
  92. padding: 0 2px;
  93. border: 1px solid var(--dsw-alias-border-l2);
  94. border-radius: 4px;
  95. background: var(--dsw-alias-button-elevated-fill);
  96. color: inherit;
  97. outline: none;
  98. }
  99. .sessionRow .title {
  100. flex: 1;
  101. }
  102. .meta {
  103. overflow: hidden;
  104. text-overflow: ellipsis;
  105. white-space: nowrap;
  106. font-size: 12px;
  107. line-height: 20px;
  108. color: var(--dsw-alias-label-tertiary);
  109. }
  110. .time {
  111. flex: none;
  112. font-size: 12px;
  113. line-height: 20px;
  114. color: var(--dsw-alias-label-tertiary);
  115. }
  116. .dot {
  117. flex: none;
  118. }
  119. /* Trailing action buttons surface on hover only (figma 27:4668 / 27:4656):
  120. bare 16px glyphs, gap 12, tertiary grey. */
  121. .rowActions {
  122. flex: none;
  123. display: none;
  124. align-items: center;
  125. gap: 12px;
  126. }
  127. .projectRow:hover .rowActions,
  128. .sessionRow:hover .rowActions,
  129. .projectRow.menuOpen .rowActions,
  130. .sessionRow.menuOpen .rowActions {
  131. display: inline-flex;
  132. }
  133. .sessionRow:hover .time,
  134. .sessionRow.menuOpen .time {
  135. display: none;
  136. }
  137. /* An open row menu pins the hover affordances (figma: the row keeps its
  138. hover fill while its dropdown is up). */
  139. .projectRow.menuOpen,
  140. .sessionRow.menuOpen {
  141. background: var(--dsw-alias-interactive-bg-hover);
  142. }
  143. /* Drag reorder insert line (workspace-group session rows): 2px accent above or
  144. below the hovered row, drawn with box-shadow so no layout shift. */
  145. .sessionRow.dropBefore {
  146. box-shadow: 0 -2px 0 0 var(--dsw-alias-state-business-primary);
  147. }
  148. .sessionRow.dropAfter {
  149. box-shadow: 0 2px 0 0 var(--dsw-alias-state-business-primary);
  150. }
  151. /* Hover-card body (figma 169:16903): dark surface, fixed colors both themes. */
  152. .hoverContent {
  153. display: flex;
  154. flex-direction: column;
  155. gap: 8px;
  156. }
  157. .hoverTitle {
  158. font-size: 14px;
  159. line-height: 20px;
  160. color: #FFFFFF;
  161. overflow-wrap: break-word;
  162. }
  163. .hoverPath {
  164. font-size: 12px;
  165. line-height: 16px;
  166. color: #CFD3D6;
  167. word-break: break-all;
  168. }
  169. .hoverTime {
  170. font-size: 12px;
  171. line-height: 16px;
  172. color: #CFD3D6;
  173. }
  174. .hoverStatus {
  175. display: flex;
  176. align-items: center;
  177. gap: 8px;
  178. font-size: 12px;
  179. line-height: 20px;
  180. color: #ADB2B8;
  181. }
  182. .iconButton {
  183. flex: none;
  184. display: inline-flex;
  185. align-items: center;
  186. justify-content: center;
  187. width: 16px;
  188. height: 16px;
  189. border: none;
  190. border-radius: 4px;
  191. padding: 0;
  192. background: transparent;
  193. cursor: pointer;
  194. color: var(--dsw-alias-label-tertiary);
  195. }
  196. .iconButton:hover {
  197. color: var(--dsw-alias-label-primary);
  198. }
  199. /* Chevrons ride the caption grey (#ADB2B8); the folder glyph stays one step
  200. darker (tertiary, #81858C) per the cell spec. */
  201. .chevron {
  202. color: var(--dsw-alias-label-caption);
  203. }
  204. @media (prefers-reduced-motion: reduce) {
  205. .sessionRow,
  206. .arrow {
  207. animation: none;
  208. transition: none;
  209. }
  210. }