@activecollab/components 2.0.566 → 2.0.567

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/dist/cjs/components/Chip/Chip.js +4 -2
  2. package/dist/cjs/components/Chip/Chip.js.map +1 -1
  3. package/dist/cjs/components/Chip/Styles.js +12 -5
  4. package/dist/cjs/components/Chip/Styles.js.map +1 -1
  5. package/dist/cjs/components/Divider/Divider.js.map +1 -1
  6. package/dist/cjs/components/Divider/Styles.js +2 -1
  7. package/dist/cjs/components/Divider/Styles.js.map +1 -1
  8. package/dist/cjs/components/Filter/Styles.js +1 -1
  9. package/dist/cjs/components/Filter/Styles.js.map +1 -1
  10. package/dist/cjs/components/GlobalStyle.js +2 -1
  11. package/dist/cjs/components/GlobalStyle.js.map +1 -1
  12. package/dist/cjs/components/Icons/collection/CalendarDate.js +63 -0
  13. package/dist/cjs/components/Icons/collection/CalendarDate.js.map +1 -0
  14. package/dist/cjs/components/Icons/collection/Project.js +3 -9
  15. package/dist/cjs/components/Icons/collection/Project.js.map +1 -1
  16. package/dist/cjs/components/Icons/collection/index.js +7 -0
  17. package/dist/cjs/components/Icons/collection/index.js.map +1 -1
  18. package/dist/cjs/components/MainMenu/MainMenu.js +38 -28
  19. package/dist/cjs/components/MainMenu/MainMenu.js.map +1 -1
  20. package/dist/cjs/components/MainMenu/MainMenuDrawer.js +3 -2
  21. package/dist/cjs/components/MainMenu/MainMenuDrawer.js.map +1 -1
  22. package/dist/cjs/components/MainMenu/hooks.js +46 -8
  23. package/dist/cjs/components/MainMenu/hooks.js.map +1 -1
  24. package/dist/cjs/components/MainMenu/types.js.map +1 -1
  25. package/dist/cjs/components/Nav/Nav.js +3 -2
  26. package/dist/cjs/components/Nav/Nav.js.map +1 -1
  27. package/dist/cjs/components/Nav/Styles.js +9 -4
  28. package/dist/cjs/components/Nav/Styles.js.map +1 -1
  29. package/dist/cjs/components/PillButton/PillButton.js.map +1 -1
  30. package/dist/cjs/components/PillButton/Styles.js +2 -0
  31. package/dist/cjs/components/PillButton/Styles.js.map +1 -1
  32. package/dist/cjs/components/PillGroup/Styles.js +1 -1
  33. package/dist/cjs/components/PillGroup/Styles.js.map +1 -1
  34. package/dist/cjs/components/RaisedAddButton/RaisedAddButton.js +44 -0
  35. package/dist/cjs/components/RaisedAddButton/RaisedAddButton.js.map +1 -0
  36. package/dist/cjs/components/RaisedAddButton/Styles.js +19 -0
  37. package/dist/cjs/components/RaisedAddButton/Styles.js.map +1 -0
  38. package/dist/cjs/components/RaisedAddButton/index.js +17 -0
  39. package/dist/cjs/components/RaisedAddButton/index.js.map +1 -0
  40. package/dist/cjs/components/SwatchPalette/index.js +17 -0
  41. package/dist/cjs/components/SwatchPalette/index.js.map +1 -0
  42. package/dist/cjs/components/SwatchPalette/swatchPalette.js +210 -0
  43. package/dist/cjs/components/SwatchPalette/swatchPalette.js.map +1 -0
  44. package/dist/cjs/components/SwatchPalette/swatchPalette.test.js +35 -0
  45. package/dist/cjs/components/SwatchPalette/swatchPalette.test.js.map +1 -0
  46. package/dist/cjs/components/SwatchPicker/SwatchPicker.js +23 -6
  47. package/dist/cjs/components/SwatchPicker/SwatchPicker.js.map +1 -1
  48. package/dist/cjs/components/Timesheet/Styles.js +6 -2
  49. package/dist/cjs/components/Timesheet/Styles.js.map +1 -1
  50. package/dist/cjs/components/Timesheet/TimesheetCell.js.map +1 -1
  51. package/dist/cjs/components/Timesheet/TimesheetTotalRow.js +5 -2
  52. package/dist/cjs/components/Timesheet/TimesheetTotalRow.js.map +1 -1
  53. package/dist/cjs/components/ViewSwitcher/Styles.js +25 -4
  54. package/dist/cjs/components/ViewSwitcher/Styles.js.map +1 -1
  55. package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js +113 -0
  56. package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js.map +1 -0
  57. package/dist/cjs/components/ViewSwitcher/index.js +11 -0
  58. package/dist/cjs/components/ViewSwitcher/index.js.map +1 -1
  59. package/dist/cjs/components/index.js +24 -0
  60. package/dist/cjs/components/index.js.map +1 -1
  61. package/dist/cjs/presentation/myWork/MyWorkTasks.js +8 -4
  62. package/dist/cjs/presentation/myWork/MyWorkTasks.js.map +1 -1
  63. package/dist/cjs/presentation/people/teamTasks.js +1 -2
  64. package/dist/cjs/presentation/people/teamTasks.js.map +1 -1
  65. package/dist/cjs/presentation/shared/ObjectSheetFrame.js +226 -92
  66. package/dist/cjs/presentation/shared/ObjectSheetFrame.js.map +1 -1
  67. package/dist/cjs/presentation/shared/ProjectIdentityPalette.js +17 -31
  68. package/dist/cjs/presentation/shared/ProjectIdentityPalette.js.map +1 -1
  69. package/dist/cjs/presentation/shared/ProjectsBatchBar.js +4 -4
  70. package/dist/cjs/presentation/shared/ProjectsBatchBar.js.map +1 -1
  71. package/dist/cjs/presentation/shared/ProjectsCompletedParts.js +1 -2
  72. package/dist/cjs/presentation/shared/ProjectsCompletedParts.js.map +1 -1
  73. package/dist/cjs/presentation/shared/ProjectsListCards.js +1 -2
  74. package/dist/cjs/presentation/shared/ProjectsListCards.js.map +1 -1
  75. package/dist/cjs/presentation/shared/ProjectsListRows.js +1 -2
  76. package/dist/cjs/presentation/shared/ProjectsListRows.js.map +1 -1
  77. package/dist/cjs/presentation/shared/ProjectsListToolbar.js +5 -14
  78. package/dist/cjs/presentation/shared/ProjectsListToolbar.js.map +1 -1
  79. package/dist/cjs/presentation/shared/ProjectsPortfoliosList.js +5 -17
  80. package/dist/cjs/presentation/shared/ProjectsPortfoliosList.js.map +1 -1
  81. package/dist/cjs/presentation/shared/ProjectsTemplatesParts.js +4 -16
  82. package/dist/cjs/presentation/shared/ProjectsTemplatesParts.js.map +1 -1
  83. package/dist/cjs/presentation/shared/ShellMainMenu.js +1 -1
  84. package/dist/cjs/presentation/shared/ShellMainMenu.js.map +1 -1
  85. package/dist/cjs/presentation/shared/TaskContentDialogs.js +13 -65
  86. package/dist/cjs/presentation/shared/TaskContentDialogs.js.map +1 -1
  87. package/dist/cjs/presentation/shared/TaskContentThread.js +2 -1
  88. package/dist/cjs/presentation/shared/TaskContentThread.js.map +1 -1
  89. package/dist/cjs/presentation/shared/TaskContentThreadLive.js +2 -10
  90. package/dist/cjs/presentation/shared/TaskContentThreadLive.js.map +1 -1
  91. package/dist/cjs/presentation/shared/TaskListRows.js +64 -48
  92. package/dist/cjs/presentation/shared/TaskListRows.js.map +1 -1
  93. package/dist/cjs/presentation/shared/TimesheetAddButtons.js +34 -0
  94. package/dist/cjs/presentation/shared/TimesheetAddButtons.js.map +1 -0
  95. package/dist/cjs/presentation/shared/TrackingList.js +159 -57
  96. package/dist/cjs/presentation/shared/TrackingList.js.map +1 -1
  97. package/dist/cjs/presentation/shared/UserMenu.js +3 -0
  98. package/dist/cjs/presentation/shared/UserMenu.js.map +1 -1
  99. package/dist/cjs/presentation/shared/headers.js +15 -10
  100. package/dist/cjs/presentation/shared/headers.js.map +1 -1
  101. package/dist/esm/components/Chip/Chip.d.ts +2 -0
  102. package/dist/esm/components/Chip/Chip.d.ts.map +1 -1
  103. package/dist/esm/components/Chip/Chip.js +4 -2
  104. package/dist/esm/components/Chip/Chip.js.map +1 -1
  105. package/dist/esm/components/Chip/Styles.d.ts +1 -0
  106. package/dist/esm/components/Chip/Styles.d.ts.map +1 -1
  107. package/dist/esm/components/Chip/Styles.js +10 -5
  108. package/dist/esm/components/Chip/Styles.js.map +1 -1
  109. package/dist/esm/components/Divider/Divider.d.ts +1 -1
  110. package/dist/esm/components/Divider/Divider.d.ts.map +1 -1
  111. package/dist/esm/components/Divider/Divider.js.map +1 -1
  112. package/dist/esm/components/Divider/Styles.d.ts +1 -1
  113. package/dist/esm/components/Divider/Styles.d.ts.map +1 -1
  114. package/dist/esm/components/Divider/Styles.js +2 -1
  115. package/dist/esm/components/Divider/Styles.js.map +1 -1
  116. package/dist/esm/components/Filter/Styles.d.ts.map +1 -1
  117. package/dist/esm/components/Filter/Styles.js +1 -1
  118. package/dist/esm/components/Filter/Styles.js.map +1 -1
  119. package/dist/esm/components/GlobalStyle.d.ts.map +1 -1
  120. package/dist/esm/components/GlobalStyle.js +2 -1
  121. package/dist/esm/components/GlobalStyle.js.map +1 -1
  122. package/dist/esm/components/Icons/collection/CalendarDate.d.ts +32 -0
  123. package/dist/esm/components/Icons/collection/CalendarDate.d.ts.map +1 -0
  124. package/dist/esm/components/Icons/collection/CalendarDate.js +56 -0
  125. package/dist/esm/components/Icons/collection/CalendarDate.js.map +1 -0
  126. package/dist/esm/components/Icons/collection/Project.d.ts.map +1 -1
  127. package/dist/esm/components/Icons/collection/Project.js +3 -9
  128. package/dist/esm/components/Icons/collection/Project.js.map +1 -1
  129. package/dist/esm/components/Icons/collection/index.d.ts +1 -0
  130. package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
  131. package/dist/esm/components/Icons/collection/index.js +1 -0
  132. package/dist/esm/components/Icons/collection/index.js.map +1 -1
  133. package/dist/esm/components/MainMenu/MainMenu.d.ts +1 -1
  134. package/dist/esm/components/MainMenu/MainMenu.d.ts.map +1 -1
  135. package/dist/esm/components/MainMenu/MainMenu.js +37 -22
  136. package/dist/esm/components/MainMenu/MainMenu.js.map +1 -1
  137. package/dist/esm/components/MainMenu/MainMenuDrawer.d.ts +1 -1
  138. package/dist/esm/components/MainMenu/MainMenuDrawer.d.ts.map +1 -1
  139. package/dist/esm/components/MainMenu/MainMenuDrawer.js +3 -2
  140. package/dist/esm/components/MainMenu/MainMenuDrawer.js.map +1 -1
  141. package/dist/esm/components/MainMenu/hooks.d.ts +2 -1
  142. package/dist/esm/components/MainMenu/hooks.d.ts.map +1 -1
  143. package/dist/esm/components/MainMenu/hooks.js +43 -9
  144. package/dist/esm/components/MainMenu/hooks.js.map +1 -1
  145. package/dist/esm/components/MainMenu/types.d.ts +2 -0
  146. package/dist/esm/components/MainMenu/types.d.ts.map +1 -1
  147. package/dist/esm/components/MainMenu/types.js.map +1 -1
  148. package/dist/esm/components/Nav/Nav.d.ts +3 -1
  149. package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
  150. package/dist/esm/components/Nav/Nav.js +4 -3
  151. package/dist/esm/components/Nav/Nav.js.map +1 -1
  152. package/dist/esm/components/Nav/Styles.d.ts +1 -0
  153. package/dist/esm/components/Nav/Styles.d.ts.map +1 -1
  154. package/dist/esm/components/Nav/Styles.js +8 -3
  155. package/dist/esm/components/Nav/Styles.js.map +1 -1
  156. package/dist/esm/components/PillButton/PillButton.d.ts +2 -2
  157. package/dist/esm/components/PillButton/PillButton.d.ts.map +1 -1
  158. package/dist/esm/components/PillButton/PillButton.js.map +1 -1
  159. package/dist/esm/components/PillButton/Styles.d.ts.map +1 -1
  160. package/dist/esm/components/PillButton/Styles.js +2 -0
  161. package/dist/esm/components/PillButton/Styles.js.map +1 -1
  162. package/dist/esm/components/PillGroup/Styles.d.ts.map +1 -1
  163. package/dist/esm/components/PillGroup/Styles.js +1 -1
  164. package/dist/esm/components/PillGroup/Styles.js.map +1 -1
  165. package/dist/esm/components/RaisedAddButton/RaisedAddButton.d.ts +19 -0
  166. package/dist/esm/components/RaisedAddButton/RaisedAddButton.d.ts.map +1 -0
  167. package/dist/esm/components/RaisedAddButton/RaisedAddButton.js +35 -0
  168. package/dist/esm/components/RaisedAddButton/RaisedAddButton.js.map +1 -0
  169. package/dist/esm/components/RaisedAddButton/Styles.d.ts +4 -0
  170. package/dist/esm/components/RaisedAddButton/Styles.d.ts.map +1 -0
  171. package/dist/esm/components/RaisedAddButton/Styles.js +11 -0
  172. package/dist/esm/components/RaisedAddButton/Styles.js.map +1 -0
  173. package/dist/esm/components/RaisedAddButton/index.d.ts +2 -0
  174. package/dist/esm/components/RaisedAddButton/index.d.ts.map +1 -0
  175. package/dist/esm/components/RaisedAddButton/index.js +2 -0
  176. package/dist/esm/components/RaisedAddButton/index.js.map +1 -0
  177. package/dist/esm/components/SwatchPalette/index.d.ts +2 -0
  178. package/dist/esm/components/SwatchPalette/index.d.ts.map +1 -0
  179. package/dist/esm/components/SwatchPalette/index.js +2 -0
  180. package/dist/esm/components/SwatchPalette/index.js.map +1 -0
  181. package/dist/esm/components/SwatchPalette/swatchPalette.d.ts +39 -0
  182. package/dist/esm/components/SwatchPalette/swatchPalette.d.ts.map +1 -0
  183. package/dist/esm/components/SwatchPalette/swatchPalette.js +185 -0
  184. package/dist/esm/components/SwatchPalette/swatchPalette.js.map +1 -0
  185. package/dist/esm/components/SwatchPalette/swatchPalette.test.d.ts +2 -0
  186. package/dist/esm/components/SwatchPalette/swatchPalette.test.d.ts.map +1 -0
  187. package/dist/esm/components/SwatchPalette/swatchPalette.test.js +33 -0
  188. package/dist/esm/components/SwatchPalette/swatchPalette.test.js.map +1 -0
  189. package/dist/esm/components/SwatchPicker/SwatchPicker.d.ts +6 -2
  190. package/dist/esm/components/SwatchPicker/SwatchPicker.d.ts.map +1 -1
  191. package/dist/esm/components/SwatchPicker/SwatchPicker.js +17 -6
  192. package/dist/esm/components/SwatchPicker/SwatchPicker.js.map +1 -1
  193. package/dist/esm/components/Timesheet/Styles.d.ts.map +1 -1
  194. package/dist/esm/components/Timesheet/Styles.js +6 -2
  195. package/dist/esm/components/Timesheet/Styles.js.map +1 -1
  196. package/dist/esm/components/Timesheet/TimesheetCell.d.ts +4 -1
  197. package/dist/esm/components/Timesheet/TimesheetCell.d.ts.map +1 -1
  198. package/dist/esm/components/Timesheet/TimesheetCell.js.map +1 -1
  199. package/dist/esm/components/Timesheet/TimesheetTotalRow.d.ts +2 -0
  200. package/dist/esm/components/Timesheet/TimesheetTotalRow.d.ts.map +1 -1
  201. package/dist/esm/components/Timesheet/TimesheetTotalRow.js +5 -2
  202. package/dist/esm/components/Timesheet/TimesheetTotalRow.js.map +1 -1
  203. package/dist/esm/components/ViewSwitcher/Styles.d.ts +14 -0
  204. package/dist/esm/components/ViewSwitcher/Styles.d.ts.map +1 -1
  205. package/dist/esm/components/ViewSwitcher/Styles.js +24 -3
  206. package/dist/esm/components/ViewSwitcher/Styles.js.map +1 -1
  207. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts +35 -0
  208. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts.map +1 -0
  209. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js +93 -0
  210. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js.map +1 -0
  211. package/dist/esm/components/ViewSwitcher/index.d.ts +1 -0
  212. package/dist/esm/components/ViewSwitcher/index.d.ts.map +1 -1
  213. package/dist/esm/components/ViewSwitcher/index.js +1 -0
  214. package/dist/esm/components/ViewSwitcher/index.js.map +1 -1
  215. package/dist/esm/components/index.d.ts +2 -0
  216. package/dist/esm/components/index.d.ts.map +1 -1
  217. package/dist/esm/components/index.js +2 -0
  218. package/dist/esm/components/index.js.map +1 -1
  219. package/dist/esm/presentation/myWork/MyWorkTasks.d.ts.map +1 -1
  220. package/dist/esm/presentation/myWork/MyWorkTasks.js +8 -4
  221. package/dist/esm/presentation/myWork/MyWorkTasks.js.map +1 -1
  222. package/dist/esm/presentation/people/teamTasks.d.ts.map +1 -1
  223. package/dist/esm/presentation/people/teamTasks.js +1 -2
  224. package/dist/esm/presentation/people/teamTasks.js.map +1 -1
  225. package/dist/esm/presentation/shared/ObjectSheetFrame.d.ts +12 -5
  226. package/dist/esm/presentation/shared/ObjectSheetFrame.d.ts.map +1 -1
  227. package/dist/esm/presentation/shared/ObjectSheetFrame.js +219 -94
  228. package/dist/esm/presentation/shared/ObjectSheetFrame.js.map +1 -1
  229. package/dist/esm/presentation/shared/ProjectIdentityPalette.d.ts +1 -1
  230. package/dist/esm/presentation/shared/ProjectIdentityPalette.d.ts.map +1 -1
  231. package/dist/esm/presentation/shared/ProjectIdentityPalette.js +14 -23
  232. package/dist/esm/presentation/shared/ProjectIdentityPalette.js.map +1 -1
  233. package/dist/esm/presentation/shared/ProjectsBatchBar.js +4 -4
  234. package/dist/esm/presentation/shared/ProjectsBatchBar.js.map +1 -1
  235. package/dist/esm/presentation/shared/ProjectsCompletedParts.d.ts.map +1 -1
  236. package/dist/esm/presentation/shared/ProjectsCompletedParts.js +1 -2
  237. package/dist/esm/presentation/shared/ProjectsCompletedParts.js.map +1 -1
  238. package/dist/esm/presentation/shared/ProjectsListCards.d.ts.map +1 -1
  239. package/dist/esm/presentation/shared/ProjectsListCards.js +1 -2
  240. package/dist/esm/presentation/shared/ProjectsListCards.js.map +1 -1
  241. package/dist/esm/presentation/shared/ProjectsListRows.d.ts.map +1 -1
  242. package/dist/esm/presentation/shared/ProjectsListRows.js +1 -2
  243. package/dist/esm/presentation/shared/ProjectsListRows.js.map +1 -1
  244. package/dist/esm/presentation/shared/ProjectsListToolbar.d.ts +1 -2
  245. package/dist/esm/presentation/shared/ProjectsListToolbar.d.ts.map +1 -1
  246. package/dist/esm/presentation/shared/ProjectsListToolbar.js +6 -15
  247. package/dist/esm/presentation/shared/ProjectsListToolbar.js.map +1 -1
  248. package/dist/esm/presentation/shared/ProjectsPortfoliosList.d.ts +1 -2
  249. package/dist/esm/presentation/shared/ProjectsPortfoliosList.d.ts.map +1 -1
  250. package/dist/esm/presentation/shared/ProjectsPortfoliosList.js +6 -18
  251. package/dist/esm/presentation/shared/ProjectsPortfoliosList.js.map +1 -1
  252. package/dist/esm/presentation/shared/ProjectsTemplatesParts.d.ts +2 -2
  253. package/dist/esm/presentation/shared/ProjectsTemplatesParts.d.ts.map +1 -1
  254. package/dist/esm/presentation/shared/ProjectsTemplatesParts.js +5 -17
  255. package/dist/esm/presentation/shared/ProjectsTemplatesParts.js.map +1 -1
  256. package/dist/esm/presentation/shared/ShellMainMenu.d.ts.map +1 -1
  257. package/dist/esm/presentation/shared/ShellMainMenu.js +2 -2
  258. package/dist/esm/presentation/shared/ShellMainMenu.js.map +1 -1
  259. package/dist/esm/presentation/shared/TaskContentDialogs.d.ts +0 -3
  260. package/dist/esm/presentation/shared/TaskContentDialogs.d.ts.map +1 -1
  261. package/dist/esm/presentation/shared/TaskContentDialogs.js +12 -64
  262. package/dist/esm/presentation/shared/TaskContentDialogs.js.map +1 -1
  263. package/dist/esm/presentation/shared/TaskContentThread.d.ts.map +1 -1
  264. package/dist/esm/presentation/shared/TaskContentThread.js +2 -1
  265. package/dist/esm/presentation/shared/TaskContentThread.js.map +1 -1
  266. package/dist/esm/presentation/shared/TaskContentThreadLive.d.ts.map +1 -1
  267. package/dist/esm/presentation/shared/TaskContentThreadLive.js +3 -9
  268. package/dist/esm/presentation/shared/TaskContentThreadLive.js.map +1 -1
  269. package/dist/esm/presentation/shared/TaskListRows.d.ts.map +1 -1
  270. package/dist/esm/presentation/shared/TaskListRows.js +65 -49
  271. package/dist/esm/presentation/shared/TaskListRows.js.map +1 -1
  272. package/dist/esm/presentation/shared/TimesheetAddButtons.d.ts +6 -0
  273. package/dist/esm/presentation/shared/TimesheetAddButtons.d.ts.map +1 -0
  274. package/dist/esm/presentation/shared/TimesheetAddButtons.js +25 -0
  275. package/dist/esm/presentation/shared/TimesheetAddButtons.js.map +1 -0
  276. package/dist/esm/presentation/shared/TrackingList.d.ts +13 -0
  277. package/dist/esm/presentation/shared/TrackingList.d.ts.map +1 -1
  278. package/dist/esm/presentation/shared/TrackingList.js +135 -55
  279. package/dist/esm/presentation/shared/TrackingList.js.map +1 -1
  280. package/dist/esm/presentation/shared/UserMenu.d.ts +1 -1
  281. package/dist/esm/presentation/shared/UserMenu.d.ts.map +1 -1
  282. package/dist/esm/presentation/shared/UserMenu.js +3 -0
  283. package/dist/esm/presentation/shared/UserMenu.js.map +1 -1
  284. package/dist/esm/presentation/shared/headers.d.ts.map +1 -1
  285. package/dist/esm/presentation/shared/headers.js +15 -10
  286. package/dist/esm/presentation/shared/headers.js.map +1 -1
  287. package/dist/index.js +1381 -889
  288. package/dist/index.js.map +1 -1
  289. package/dist/index.min.js +1 -1
  290. package/dist/index.min.js.map +1 -1
  291. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SwatchPicker.js","names":["React","useCallback","useId","useMemo","useRef","useState","classnames","StyledSwatchCell","StyledSwatchFooter","StyledSwatchFooterDetail","StyledSwatchFooterName","StyledSwatchGrid","StyledSwatchMark","StyledSwatchName","StyledSwatchNameDetail","StyledSwatchNameText","StyledSwatchOption","StyledSwatchOptionBody","StyledSwatchOptions","StyledSwatchPickerTrigger","StyledSwatchRow","StyledSwatchRowLabel","StyledSwatchSection","StyledSwatchSeparator","StyledSwatchTitle","CheckIcon","Menu","TRIGGER_SWATCH_SIZE","DEFAULT_EDGE","HEX_COLOR","DEFAULT_TONE_LABELS","pastel","soft","sameColor","a","b","toUpperCase","uniqueInOrder","values","filter","value","index","indexOf","toSwatch","entry","_entry$ink","id","color","name","ink","undefined","buildPaletteRows","palette","_temp","_ref","_ref$toneLabels","toneLabels","_ref$currentLabel","currentLabel","hasDetails","length","every","hue","tone","tones","grid","hues","map","find","columns","Math","ceil","slice","min","_","row","Array","from","__","column","rows","_toneLabels$tone","label","charAt","swatches","Boolean","isOutside","test","some","NO_COLOR_SLASH","edgeOf","backgroundOf","_ref2","icon","automatic","shadowOf","_ref3","SwatchMark","_ref4","_ref4$size","size","mark","_objectWithoutPropertiesLoose","_excluded","createElement","className","$large","style","width","height","background","boxShadow","SwatchName","_ref5","detail","_excluded2","_extends","nextCell","_ref6","key","lastColumn","max","next","keyOf","NO_OPTIONS","SwatchPicker","_ref7","_ref8","rowsProp","valueProp","onChange","_ref7$options","options","optionsProp","title","_ref7$width","_ref7$footer","footer","_ref7$defaultOpen","defaultOpen","disabled","invalid","testId","_useState","open","setOpen","_useState2","pointed","setPointed","_useState3","active","setActive","cells","labelId","_palette$find$color","_palette$find","option","_palette$find$ink","_palette$find2","filled","selectedOption","selectedPosition","findIndex","swatch","selectedSwatch","tabStop","close","select","handleGridKeyDown","event","_cells$current$keyOf","preventDefault","_filled$tabStop$row","current","focus","footerEntry","_swatch$detail","selected","trigger","target","onOpen","onClose","position","Fragment","role","$selected","onClick","onKeyDown","fill","marginLeft","flexShrink","onMouseLeave","rowIndex","_row$label","_swatch$color","isSelected","ref","node","type","tabIndex","backgroundColor","onMouseEnter","onFocus","weight","displayName"],"sources":["../../../../src/components/SwatchPicker/SwatchPicker.tsx"],"sourcesContent":["import React, {\n KeyboardEvent,\n ReactNode,\n useCallback,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledSwatchCell,\n StyledSwatchFooter,\n StyledSwatchFooterDetail,\n StyledSwatchFooterName,\n StyledSwatchGrid,\n StyledSwatchMark,\n StyledSwatchName,\n StyledSwatchNameDetail,\n StyledSwatchNameText,\n StyledSwatchOption,\n StyledSwatchOptionBody,\n StyledSwatchOptions,\n StyledSwatchPickerTrigger,\n StyledSwatchRow,\n StyledSwatchRowLabel,\n StyledSwatchSection,\n StyledSwatchSeparator,\n StyledSwatchTitle,\n} from \"./Styles\";\nimport { CheckIcon } from \"../Icons\";\nimport { Menu } from \"../Menu\";\n\nconst TRIGGER_SWATCH_SIZE = 20;\nconst DEFAULT_EDGE = \"rgba(0, 0, 0, 0.1)\";\nconst HEX_COLOR = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\nexport interface ISwatch {\n /** The value that `onChange` gets. */\n id: string;\n /** The name in the trigger, in the footer and in the label of the swatch. */\n name: string;\n /** The fill of the swatch. */\n color?: string;\n /** The color of the check mark and, with 66 alpha, of the edge of the fill. */\n ink?: string;\n /** An icon in the swatch, on its fill when it has one. */\n icon?: ReactNode;\n /** A second text after the name in the footer. The default is the color, when it differs from the name. */\n detail?: string;\n}\n\nexport interface ISwatchRow {\n /** The label before the row, such as a tone. */\n label?: string;\n /** The swatches of the row. */\n swatches: ISwatch[];\n}\n\nexport interface ISwatchOption {\n /** The value that `onChange` gets. */\n id: string;\n /** The name in the list and in the trigger. */\n name: string;\n /** The fill of the swatch. Without it, the swatch shows a red slash. */\n color?: string;\n /** The color of the edge of the fill, with 66 alpha. */\n ink?: string;\n /** A second text after the name in the list and in the footer. */\n detail?: string;\n /** An empty swatch with an edge, for a color that the app picks. */\n automatic?: boolean;\n}\n\nexport interface ISwatchPaletteEntry {\n /** The hex color. It is also the value that `onChange` gets. */\n color: string;\n /** The name in the footer and in the label of the swatch. */\n name: string;\n /** The color of the check mark and, with 66 alpha, of the edge of the fill. */\n ink?: string | null;\n /** The hue of the entry. The grid puts one hue in each column. */\n hue?: string | null;\n /** The tone of the entry, such as \"pastel\" or \"soft\". The grid puts one tone in each row. */\n tone?: string | null;\n}\n\nexport interface IPaletteRowsOptions {\n /** The selected value. A hex color outside the palette gets a row of its own. */\n value?: string;\n /** The row labels per tone. A tone without a label shows with a capital first letter. */\n toneLabels?: Record<string, string>;\n /** The label and the name of the row for a color outside the palette. */\n currentLabel?: string;\n}\n\nconst DEFAULT_TONE_LABELS: Record<string, string> = {\n pastel: \"Pastel\",\n soft: \"Soft\",\n};\n\nconst sameColor = (a?: string | null, b?: string | null) =>\n typeof a === \"string\" &&\n typeof b === \"string\" &&\n a.toUpperCase() === b.toUpperCase();\n\nconst uniqueInOrder = (values: string[]) =>\n values.filter((value, index) => values.indexOf(value) === index);\n\nconst toSwatch = (entry: ISwatchPaletteEntry): ISwatch => ({\n id: entry.color,\n name: entry.name,\n color: entry.color,\n ink: entry.ink ?? undefined,\n});\n\n/** Builds the grid rows of a palette: hues in columns, tones in rows, as the project color picker does. */\nexport const buildPaletteRows = (\n palette: ISwatchPaletteEntry[],\n {\n value,\n toneLabels = DEFAULT_TONE_LABELS,\n currentLabel = \"Current\",\n }: IPaletteRowsOptions = {}\n): ISwatchRow[] => {\n const hasDetails =\n palette.length > 0 && palette.every((entry) => entry.hue && entry.tone);\n let tones: string[];\n let grid: (ISwatchPaletteEntry | undefined)[][];\n\n if (hasDetails) {\n const hues = uniqueInOrder(palette.map((entry) => `${entry.hue}`));\n\n tones = uniqueInOrder(palette.map((entry) => `${entry.tone}`));\n grid = tones.map((tone) =>\n hues.map((hue) =>\n palette.find((entry) => entry.hue === hue && entry.tone === tone)\n )\n );\n } else {\n // A palette without details pairs the colors per hue, pastel first.\n const columns = Math.ceil(palette.length / 2);\n\n tones = [\"pastel\", \"soft\"].slice(0, Math.min(palette.length, 2));\n grid = tones.map((_, row) =>\n Array.from({ length: columns }, (__, column) => palette[column * 2 + row])\n );\n }\n\n const rows: ISwatchRow[] = tones.map((tone, index) => ({\n label: toneLabels[tone] ?? tone.charAt(0).toUpperCase() + tone.slice(1),\n swatches: grid[index]\n .filter((entry): entry is ISwatchPaletteEntry => Boolean(entry))\n .map(toSwatch),\n }));\n\n const isOutside =\n typeof value === \"string\" &&\n HEX_COLOR.test(value) &&\n !palette.some((entry) => sameColor(entry.color, value));\n\n return isOutside\n ? [\n ...rows,\n {\n label: currentLabel,\n swatches: [\n {\n id: value,\n name: currentLabel,\n color: value.toUpperCase(),\n },\n ],\n },\n ]\n : rows;\n};\n\nexport interface ISwatchPickerProps {\n /** The rows of the grid. Leave it out to build the rows from `palette`. */\n rows?: ISwatchRow[];\n /** Palette entries with hue and tone. The grid puts hues in columns and tones in rows. */\n palette?: ISwatchPaletteEntry[];\n /** The row labels per tone of `palette`. */\n toneLabels?: Record<string, string>;\n /** The label of the row for a selected color outside `palette`. */\n currentLabel?: string;\n /** The id of the selected swatch or option. */\n value?: string;\n /** Called with the id of the swatch or option that the reader picks. */\n onChange: (id: string) => void;\n /** A list of options above the grid, such as \"Same as client\". */\n options?: ISwatchOption[];\n /** The caption above the grid, and the name of the grid. */\n title?: string;\n /** The width of the menu in pixels. */\n width?: number;\n /** Shows the pointed or the selected swatch under the grid. */\n footer?: boolean;\n /** Opens the menu when it mounts. */\n defaultOpen?: boolean;\n /** Disables the trigger. */\n disabled?: boolean;\n /** Shows the trigger as invalid. */\n invalid?: boolean;\n className?: string;\n \"data-testid\"?: string;\n}\n\ntype Mark = {\n color?: string;\n ink?: string;\n icon?: ReactNode;\n automatic?: boolean;\n};\n\ntype Entry = Mark & { name: string; detail?: string };\n\ntype Position = { row: number; column: number };\n\nconst NO_COLOR_SLASH =\n \"linear-gradient(to top right, transparent calc(50% - 0.75px), var(--red-alert) calc(50% - 0.75px), var(--red-alert) calc(50% + 0.75px), transparent calc(50% + 0.75px))\";\n\nconst edgeOf = (ink?: string) =>\n ink && HEX_COLOR.test(ink) && ink.length === 7 ? `${ink}66` : DEFAULT_EDGE;\n\nconst backgroundOf = ({ color, icon, automatic }: Mark) => {\n if (color) {\n return color;\n }\n\n return icon || automatic ? \"transparent\" : NO_COLOR_SLASH;\n};\n\nconst shadowOf = ({ color, ink, icon }: Mark) => {\n if (color) {\n return `inset 0 0 0 1px ${edgeOf(ink)}`;\n }\n\n return icon ? undefined : \"inset 0 0 0 1px var(--color-theme-500)\";\n};\n\nconst SwatchMark = ({ size = 16, ...mark }: Mark & { size?: number }) => (\n <StyledSwatchMark\n aria-hidden=\"true\"\n className=\"c-swatch-picker__mark\"\n $large={size >= TRIGGER_SWATCH_SIZE}\n style={{\n width: size,\n height: size,\n background: backgroundOf(mark),\n boxShadow: shadowOf(mark),\n }}\n >\n {mark.icon}\n </StyledSwatchMark>\n);\n\nconst SwatchName = ({\n name,\n detail,\n size,\n ...mark\n}: Mark & { name: string; detail?: string; size?: number }) => (\n <StyledSwatchName>\n <SwatchMark size={size} {...mark} />\n <StyledSwatchNameText>{name}</StyledSwatchNameText>\n {detail ? (\n <StyledSwatchNameDetail color=\"tertiary\">{detail}</StyledSwatchNameDetail>\n ) : null}\n </StyledSwatchName>\n);\n\nconst nextCell = (\n rows: ISwatchRow[],\n { row, column }: Position,\n key: string\n): Position | null => {\n const lastColumn = (index: number) => rows[index].swatches.length - 1;\n\n switch (key) {\n case \"ArrowRight\":\n return { row, column: Math.min(column + 1, lastColumn(row)) };\n case \"ArrowLeft\":\n return { row, column: Math.max(column - 1, 0) };\n case \"ArrowDown\": {\n const next = Math.min(row + 1, rows.length - 1);\n\n return { row: next, column: Math.min(column, lastColumn(next)) };\n }\n case \"ArrowUp\": {\n const next = Math.max(row - 1, 0);\n\n return { row: next, column: Math.min(column, lastColumn(next)) };\n }\n case \"Home\":\n return { row, column: 0 };\n case \"End\":\n return { row, column: lastColumn(row) };\n default:\n return null;\n }\n};\n\nconst keyOf = (row: number, column: number) => `${row}:${column}`;\n\nconst NO_OPTIONS: ISwatchOption[] = [];\n\nexport const SwatchPicker = ({\n rows: rowsProp,\n palette,\n toneLabels,\n currentLabel,\n value: valueProp,\n onChange,\n options: optionsProp = NO_OPTIONS,\n title,\n width = 520,\n footer = true,\n defaultOpen = false,\n disabled,\n invalid,\n className,\n \"data-testid\": testId,\n}: ISwatchPickerProps) => {\n const [open, setOpen] = useState(defaultOpen);\n const [pointed, setPointed] = useState<ISwatch | null>(null);\n const [active, setActive] = useState<Position | null>(null);\n const cells = useRef<Record<string, HTMLButtonElement | null>>({});\n const labelId = useId();\n\n const value = useMemo(\n () =>\n palette?.find((entry) => sameColor(entry.color, valueProp))?.color ??\n valueProp,\n [palette, valueProp]\n );\n\n const options = useMemo(\n () =>\n palette\n ? optionsProp.map((option) =>\n option.ink || !option.color\n ? option\n : {\n ...option,\n ink:\n palette.find((entry) =>\n sameColor(entry.color, option.color)\n )?.ink ?? undefined,\n }\n )\n : optionsProp,\n [optionsProp, palette]\n );\n\n const rows = useMemo(\n () =>\n rowsProp ??\n buildPaletteRows(palette ?? [], { value, toneLabels, currentLabel }),\n [currentLabel, palette, rowsProp, toneLabels, value]\n );\n\n const filled = useMemo(\n () => rows.filter((row) => row.swatches.length > 0),\n [rows]\n );\n\n const selectedOption = options.find((option) => option.id === value);\n\n const selectedPosition = useMemo(() => {\n for (let row = 0; !selectedOption && row < filled.length; row += 1) {\n const column = filled[row].swatches.findIndex(\n (swatch) => swatch.id === value\n );\n\n if (column !== -1) {\n return { row, column };\n }\n }\n\n return null;\n }, [filled, selectedOption, value]);\n\n const selectedSwatch = selectedPosition\n ? filled[selectedPosition.row].swatches[selectedPosition.column]\n : null;\n\n const tabStop = active ?? selectedPosition ?? { row: 0, column: 0 };\n\n const close = useCallback(() => {\n setOpen(false);\n setPointed(null);\n setActive(null);\n }, []);\n\n const select = useCallback(\n (id: string) => {\n onChange(id);\n close();\n },\n [close, onChange]\n );\n\n const handleGridKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n close();\n return;\n }\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n const swatch = filled[tabStop.row]?.swatches[tabStop.column];\n\n if (swatch) {\n select(swatch.id);\n }\n return;\n }\n\n const next = nextCell(filled, tabStop, event.key);\n\n if (!next) {\n return;\n }\n\n event.preventDefault();\n setActive(next);\n cells.current[keyOf(next.row, next.column)]?.focus();\n };\n\n const footerEntry = useMemo<Entry | null>(() => {\n const swatch = pointed ?? selectedSwatch;\n\n if (swatch) {\n return {\n ...swatch,\n detail:\n swatch.detail ??\n (swatch.color && swatch.color !== swatch.name\n ? swatch.color\n : undefined),\n };\n }\n\n return selectedOption ?? null;\n }, [pointed, selectedOption, selectedSwatch]);\n\n const selected: Entry | null = selectedOption ?? selectedSwatch;\n\n const trigger = (\n <StyledSwatchPickerTrigger\n className={classnames(\"c-swatch-picker\", className)}\n data-testid={testId}\n disabled={disabled}\n invalid={invalid}\n >\n {selected ? (\n <SwatchName\n color={selected.color}\n ink={selected.ink}\n icon={selected.icon}\n automatic={selected.automatic}\n name={selected.name}\n size={TRIGGER_SWATCH_SIZE}\n />\n ) : null}\n </StyledSwatchPickerTrigger>\n );\n\n return (\n <Menu\n target={trigger}\n open={open}\n onOpen={() => setOpen(true)}\n onClose={close}\n width={width}\n position=\"bottom-start\"\n >\n {options.length ? (\n <>\n <StyledSwatchOptions role=\"listbox\">\n {options.map((option) => (\n <StyledSwatchOption\n key={option.id}\n role=\"option\"\n aria-selected={option.id === value}\n $selected={option.id === value}\n onClick={() => select(option.id)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n select(option.id);\n }\n }}\n >\n <StyledSwatchOptionBody>\n <SwatchName\n color={option.color}\n ink={option.ink}\n automatic={option.automatic}\n name={option.name}\n detail={option.detail}\n />\n </StyledSwatchOptionBody>\n {option.id === value ? (\n <CheckIcon\n width={16}\n height={16}\n fill=\"var(--color-primary)\"\n style={{ marginLeft: 8, flexShrink: 0 }}\n />\n ) : null}\n </StyledSwatchOption>\n ))}\n </StyledSwatchOptions>\n <StyledSwatchSeparator />\n </>\n ) : null}\n\n <StyledSwatchSection>\n {title ? (\n <StyledSwatchTitle color=\"tertiary\">{title}</StyledSwatchTitle>\n ) : null}\n <StyledSwatchGrid\n role=\"radiogroup\"\n aria-label={title}\n onKeyDown={handleGridKeyDown}\n onMouseLeave={() => setPointed(null)}\n >\n {filled.map((row, rowIndex) => (\n <StyledSwatchRow\n key={row.label ?? rowIndex}\n role=\"group\"\n aria-labelledby={row.label ? `${labelId}-${rowIndex}` : undefined}\n >\n {row.label ? (\n <StyledSwatchRowLabel\n id={`${labelId}-${rowIndex}`}\n color=\"tertiary\"\n >\n {row.label}\n </StyledSwatchRowLabel>\n ) : null}\n {row.swatches.map((swatch, column) => {\n const isSelected = swatch.id === selectedSwatch?.id;\n\n return (\n <StyledSwatchCell\n key={swatch.id}\n ref={(node) => {\n cells.current[keyOf(rowIndex, column)] = node;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={isSelected}\n aria-label={swatch.name}\n title={swatch.name}\n tabIndex={\n tabStop.row === rowIndex && tabStop.column === column\n ? 0\n : -1\n }\n data-swatch={swatch.id}\n $selected={isSelected}\n style={{\n backgroundColor: swatch.color ?? \"transparent\",\n boxShadow: swatch.color\n ? `inset 0 0 0 1px ${edgeOf(swatch.ink)}`\n : undefined,\n }}\n onClick={() => select(swatch.id)}\n onMouseEnter={() => {\n setPointed(swatch);\n setActive({ row: rowIndex, column });\n }}\n onFocus={() => {\n setPointed(swatch);\n setActive({ row: rowIndex, column });\n }}\n >\n {swatch.icon}\n {isSelected && !swatch.icon ? (\n <CheckIcon\n width={16}\n height={16}\n fill={swatch.ink || \"var(--color-theme-900)\"}\n />\n ) : null}\n </StyledSwatchCell>\n );\n })}\n </StyledSwatchRow>\n ))}\n </StyledSwatchGrid>\n </StyledSwatchSection>\n\n {footer && footerEntry ? (\n <>\n <StyledSwatchSeparator />\n <StyledSwatchFooter className=\"c-swatch-picker__footer\">\n <SwatchMark\n color={footerEntry.color}\n ink={footerEntry.ink}\n icon={footerEntry.icon}\n automatic={footerEntry.automatic}\n />\n <StyledSwatchFooterName weight=\"medium\">\n {footerEntry.name}\n </StyledSwatchFooterName>\n {footerEntry.detail ? (\n <StyledSwatchFooterDetail color=\"tertiary\">\n {footerEntry.detail}\n </StyledSwatchFooterDetail>\n ) : null}\n </StyledSwatchFooter>\n </>\n ) : null}\n </Menu>\n );\n};\n\nSwatchPicker.displayName = \"SwatchPicker\";\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,KAAK,EACLC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,gBAAgB,EAChBC,kBAAkB,EAClBC,wBAAwB,EACxBC,sBAAsB,EACtBC,gBAAgB,EAChBC,gBAAgB,EAChBC,gBAAgB,EAChBC,sBAAsB,EACtBC,oBAAoB,EACpBC,kBAAkB,EAClBC,sBAAsB,EACtBC,mBAAmB,EACnBC,yBAAyB,EACzBC,eAAe,EACfC,oBAAoB,EACpBC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,QACZ,UAAU;AACjB,SAASC,SAAS,QAAQ,UAAU;AACpC,SAASC,IAAI,QAAQ,SAAS;AAE9B,MAAMC,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,YAAY,GAAG,oBAAoB;AACzC,MAAMC,SAAS,GAAG,+BAA+B;AA6DjD,MAAMC,mBAA2C,GAAG;EAClDC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE;AACR,CAAC;AAED,MAAMC,SAAS,GAAGA,CAACC,CAAiB,EAAEC,CAAiB,KACrD,OAAOD,CAAC,KAAK,QAAQ,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AAY,CAAC+E,WAAW,GAAG,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"SwatchPicker.js","names":["React","useCallback","useId","useMemo","useRef","useState","classnames","StyledSwatchCell","StyledSwatchFooter","StyledSwatchFooterDetail","StyledSwatchFooterName","StyledSwatchGrid","StyledSwatchMark","StyledSwatchName","StyledSwatchNameDetail","StyledSwatchNameText","StyledSwatchOption","StyledSwatchOptionBody","StyledSwatchOptions","StyledSwatchPickerTrigger","StyledSwatchRow","StyledSwatchRowLabel","StyledSwatchSection","StyledSwatchSeparator","StyledSwatchTitle","CheckIcon","Menu","TRIGGER_SWATCH_SIZE","SWATCH_SIZE","SWATCH_GAP","GRID_INLINE_PADDING","DEFAULT_EDGE","HEX_COLOR","DEFAULT_TONE_LABELS","pastel","soft","sameColor","a","b","toUpperCase","uniqueInOrder","values","filter","value","index","indexOf","toSwatch","entry","_entry$ink","id","color","name","ink","undefined","chunk","items","size","Array","from","length","Math","ceil","_","slice","buildPaletteRows","palette","_temp","_ref","_ref$toneLabels","toneLabels","_ref$currentLabel","currentLabel","swatchesPerRow","hasDetails","every","hue","tone","tones","grid","hues","map","find","columns","min","row","__","column","rows","entries","swatches","_toneLabels$tone","label","charAt","Boolean","isOutside","test","some","NO_COLOR_SLASH","edgeOf","backgroundOf","_ref2","icon","automatic","shadowOf","_ref3","SwatchMark","_ref4","_ref4$size","mark","_objectWithoutPropertiesLoose","_excluded","createElement","className","$large","style","width","height","background","boxShadow","SwatchName","_ref5","detail","_excluded2","_extends","nextCell","_ref6","key","lastColumn","max","next","keyOf","NO_OPTIONS","SwatchPicker","_ref7","_ref8","rowsProp","valueProp","onChange","_ref7$options","options","optionsProp","title","widthProp","_ref7$footer","footer","_ref7$defaultOpen","defaultOpen","disabled","invalid","testId","_useState","open","setOpen","_useState2","pointed","setPointed","_useState3","active","setActive","cells","labelId","_palette$find$color","_palette$find","option","_palette$find$ink","_palette$find2","filled","selectedOption","selectedPosition","findIndex","swatch","selectedSwatch","tabStop","close","select","handleGridKeyDown","event","_cells$current$keyOf","preventDefault","_filled$tabStop$row","current","focus","footerEntry","_swatch$detail","selected","trigger","target","onOpen","onClose","position","Fragment","role","$selected","onClick","onKeyDown","fill","marginLeft","flexShrink","onMouseLeave","rowIndex","_row$label","_swatch$color","isSelected","ref","node","type","tabIndex","backgroundColor","onMouseEnter","onFocus","weight","displayName"],"sources":["../../../../src/components/SwatchPicker/SwatchPicker.tsx"],"sourcesContent":["import React, {\n KeyboardEvent,\n ReactNode,\n useCallback,\n useId,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledSwatchCell,\n StyledSwatchFooter,\n StyledSwatchFooterDetail,\n StyledSwatchFooterName,\n StyledSwatchGrid,\n StyledSwatchMark,\n StyledSwatchName,\n StyledSwatchNameDetail,\n StyledSwatchNameText,\n StyledSwatchOption,\n StyledSwatchOptionBody,\n StyledSwatchOptions,\n StyledSwatchPickerTrigger,\n StyledSwatchRow,\n StyledSwatchRowLabel,\n StyledSwatchSection,\n StyledSwatchSeparator,\n StyledSwatchTitle,\n} from \"./Styles\";\nimport { CheckIcon } from \"../Icons\";\nimport { Menu } from \"../Menu\";\n\nconst TRIGGER_SWATCH_SIZE = 20;\nconst SWATCH_SIZE = 22;\nconst SWATCH_GAP = 6;\nconst GRID_INLINE_PADDING = 34;\nconst DEFAULT_EDGE = \"rgba(0, 0, 0, 0.1)\";\nconst HEX_COLOR = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\nexport interface ISwatch {\n /** The value that `onChange` gets. */\n id: string;\n /** The name in the trigger, in the footer and in the label of the swatch. */\n name: string;\n /** The fill of the swatch. */\n color?: string;\n /** The color of the check mark and, with 66 alpha, of the edge of the fill. */\n ink?: string;\n /** An icon in the swatch, on its fill when it has one. */\n icon?: ReactNode;\n /** A second text after the name in the footer. The default is the color, when it differs from the name. */\n detail?: string;\n}\n\nexport interface ISwatchRow {\n /** The label before the row, such as a tone. */\n label?: string;\n /** The swatches of the row. */\n swatches: ISwatch[];\n}\n\nexport interface ISwatchOption {\n /** The value that `onChange` gets. */\n id: string;\n /** The name in the list and in the trigger. */\n name: string;\n /** The fill of the swatch. Without it, the swatch shows a red slash. */\n color?: string;\n /** The color of the edge of the fill, with 66 alpha. */\n ink?: string;\n /** A second text after the name in the list and in the footer. */\n detail?: string;\n /** An empty swatch with an edge, for a color that the app picks. */\n automatic?: boolean;\n}\n\nexport interface ISwatchPaletteEntry {\n /** The hex color. It is also the value that `onChange` gets. */\n color: string;\n /** The name in the footer and in the label of the swatch. */\n name: string;\n /** The color of the check mark and, with 66 alpha, of the edge of the fill. */\n ink?: string | null;\n /** The hue of the entry. The grid puts one hue in each column. */\n hue?: string | null;\n /** The tone of the entry, such as \"pastel\" or \"soft\". The grid puts one tone in each row. */\n tone?: string | null;\n}\n\nexport interface IPaletteRowsOptions {\n /** The selected value. A hex color outside the palette gets a row of its own. */\n value?: string;\n /** The row labels per tone. A tone without a label shows with a capital first letter. */\n toneLabels?: Record<string, string>;\n /** Breaks the palette into rows of this many swatches, with no tone labels. */\n swatchesPerRow?: number;\n /** The label and the name of the row for a color outside the palette. */\n currentLabel?: string;\n}\n\nconst DEFAULT_TONE_LABELS: Record<string, string> = {\n pastel: \"Pastel\",\n soft: \"Soft\",\n};\n\nconst sameColor = (a?: string | null, b?: string | null) =>\n typeof a === \"string\" &&\n typeof b === \"string\" &&\n a.toUpperCase() === b.toUpperCase();\n\nconst uniqueInOrder = (values: string[]) =>\n values.filter((value, index) => values.indexOf(value) === index);\n\nconst toSwatch = (entry: ISwatchPaletteEntry): ISwatch => ({\n id: entry.color,\n name: entry.name,\n color: entry.color,\n ink: entry.ink ?? undefined,\n});\n\nconst chunk = <T,>(items: T[], size: number): T[][] =>\n Array.from({ length: Math.ceil(items.length / size) }, (_, index) =>\n items.slice(index * size, (index + 1) * size)\n );\n\n/** Builds the grid rows of a palette: hues in columns, tones in rows, as the project color picker does. */\nexport const buildPaletteRows = (\n palette: ISwatchPaletteEntry[],\n {\n value,\n toneLabels = DEFAULT_TONE_LABELS,\n currentLabel = \"Current\",\n swatchesPerRow,\n }: IPaletteRowsOptions = {}\n): ISwatchRow[] => {\n const hasDetails =\n palette.length > 0 && palette.every((entry) => entry.hue && entry.tone);\n let tones: string[];\n let grid: (ISwatchPaletteEntry | undefined)[][];\n\n if (hasDetails) {\n const hues = uniqueInOrder(palette.map((entry) => `${entry.hue}`));\n\n tones = uniqueInOrder(palette.map((entry) => `${entry.tone}`));\n grid = tones.map((tone) =>\n hues.map((hue) =>\n palette.find((entry) => entry.hue === hue && entry.tone === tone)\n )\n );\n } else {\n // A palette without details pairs the colors per hue, pastel first.\n const columns = Math.ceil(palette.length / 2);\n\n tones = [\"pastel\", \"soft\"].slice(0, Math.min(palette.length, 2));\n grid = tones.map((_, row) =>\n Array.from({ length: columns }, (__, column) => palette[column * 2 + row])\n );\n }\n\n const rows: ISwatchRow[] = swatchesPerRow\n ? chunk(palette, swatchesPerRow).map((entries) => ({\n swatches: entries.map(toSwatch),\n }))\n : tones.map((tone, index) => ({\n label: toneLabels[tone] ?? tone.charAt(0).toUpperCase() + tone.slice(1),\n swatches: grid[index]\n .filter((entry): entry is ISwatchPaletteEntry => Boolean(entry))\n .map(toSwatch),\n }));\n\n const isOutside =\n typeof value === \"string\" &&\n HEX_COLOR.test(value) &&\n !palette.some((entry) => sameColor(entry.color, value));\n\n return isOutside\n ? [\n ...rows,\n {\n label: currentLabel,\n swatches: [\n {\n id: value,\n name: currentLabel,\n color: value.toUpperCase(),\n },\n ],\n },\n ]\n : rows;\n};\n\nexport interface ISwatchPickerProps {\n /** The rows of the grid. Leave it out to build the rows from `palette`. */\n rows?: ISwatchRow[];\n /** Palette entries with hue and tone. The grid puts hues in columns and tones in rows. */\n palette?: ISwatchPaletteEntry[];\n /** The row labels per tone of `palette`. */\n toneLabels?: Record<string, string>;\n /** Breaks `palette` into rows of this many swatches, with no tone labels. */\n swatchesPerRow?: number;\n /** The label of the row for a selected color outside `palette`. */\n currentLabel?: string;\n /** The id of the selected swatch or option. */\n value?: string;\n /** Called with the id of the swatch or option that the reader picks. */\n onChange: (id: string) => void;\n /** A list of options above the grid, such as \"Same as client\". */\n options?: ISwatchOption[];\n /** The caption above the grid, and the name of the grid. */\n title?: string;\n /** The width of the menu in pixels. */\n width?: number;\n /** Shows the pointed or the selected swatch under the grid. */\n footer?: boolean;\n /** Opens the menu when it mounts. */\n defaultOpen?: boolean;\n /** Disables the trigger. */\n disabled?: boolean;\n /** Shows the trigger as invalid. */\n invalid?: boolean;\n className?: string;\n \"data-testid\"?: string;\n}\n\ntype Mark = {\n color?: string;\n ink?: string;\n icon?: ReactNode;\n automatic?: boolean;\n};\n\ntype Entry = Mark & { name: string; detail?: string };\n\ntype Position = { row: number; column: number };\n\nconst NO_COLOR_SLASH =\n \"linear-gradient(to top right, transparent calc(50% - 0.75px), var(--red-alert) calc(50% - 0.75px), var(--red-alert) calc(50% + 0.75px), transparent calc(50% + 0.75px))\";\n\nconst edgeOf = (ink?: string) =>\n ink && HEX_COLOR.test(ink) && ink.length === 7 ? `${ink}66` : DEFAULT_EDGE;\n\nconst backgroundOf = ({ color, icon, automatic }: Mark) => {\n if (color) {\n return color;\n }\n\n return icon || automatic ? \"transparent\" : NO_COLOR_SLASH;\n};\n\nconst shadowOf = ({ color, ink, icon }: Mark) => {\n if (color) {\n return `inset 0 0 0 1px ${edgeOf(ink)}`;\n }\n\n return icon ? undefined : \"inset 0 0 0 1px var(--color-theme-500)\";\n};\n\nconst SwatchMark = ({ size = 16, ...mark }: Mark & { size?: number }) => (\n <StyledSwatchMark\n aria-hidden=\"true\"\n className=\"c-swatch-picker__mark\"\n $large={size >= TRIGGER_SWATCH_SIZE}\n style={{\n width: size,\n height: size,\n background: backgroundOf(mark),\n boxShadow: shadowOf(mark),\n }}\n >\n {mark.icon}\n </StyledSwatchMark>\n);\n\nconst SwatchName = ({\n name,\n detail,\n size,\n ...mark\n}: Mark & { name: string; detail?: string; size?: number }) => (\n <StyledSwatchName>\n <SwatchMark size={size} {...mark} />\n <StyledSwatchNameText>{name}</StyledSwatchNameText>\n {detail ? (\n <StyledSwatchNameDetail color=\"tertiary\">{detail}</StyledSwatchNameDetail>\n ) : null}\n </StyledSwatchName>\n);\n\nconst nextCell = (\n rows: ISwatchRow[],\n { row, column }: Position,\n key: string\n): Position | null => {\n const lastColumn = (index: number) => rows[index].swatches.length - 1;\n\n switch (key) {\n case \"ArrowRight\":\n return { row, column: Math.min(column + 1, lastColumn(row)) };\n case \"ArrowLeft\":\n return { row, column: Math.max(column - 1, 0) };\n case \"ArrowDown\": {\n const next = Math.min(row + 1, rows.length - 1);\n\n return { row: next, column: Math.min(column, lastColumn(next)) };\n }\n case \"ArrowUp\": {\n const next = Math.max(row - 1, 0);\n\n return { row: next, column: Math.min(column, lastColumn(next)) };\n }\n case \"Home\":\n return { row, column: 0 };\n case \"End\":\n return { row, column: lastColumn(row) };\n default:\n return null;\n }\n};\n\nconst keyOf = (row: number, column: number) => `${row}:${column}`;\n\nconst NO_OPTIONS: ISwatchOption[] = [];\n\nexport const SwatchPicker = ({\n rows: rowsProp,\n palette,\n toneLabels,\n swatchesPerRow,\n currentLabel,\n value: valueProp,\n onChange,\n options: optionsProp = NO_OPTIONS,\n title,\n width: widthProp,\n footer = true,\n defaultOpen = false,\n disabled,\n invalid,\n className,\n \"data-testid\": testId,\n}: ISwatchPickerProps) => {\n const width =\n widthProp ??\n (swatchesPerRow\n ? swatchesPerRow * SWATCH_SIZE +\n (swatchesPerRow - 1) * SWATCH_GAP +\n GRID_INLINE_PADDING\n : 520);\n const [open, setOpen] = useState(defaultOpen);\n const [pointed, setPointed] = useState<ISwatch | null>(null);\n const [active, setActive] = useState<Position | null>(null);\n const cells = useRef<Record<string, HTMLButtonElement | null>>({});\n const labelId = useId();\n\n const value = useMemo(\n () =>\n palette?.find((entry) => sameColor(entry.color, valueProp))?.color ??\n valueProp,\n [palette, valueProp]\n );\n\n const options = useMemo(\n () =>\n palette\n ? optionsProp.map((option) =>\n option.ink || !option.color\n ? option\n : {\n ...option,\n ink:\n palette.find((entry) =>\n sameColor(entry.color, option.color)\n )?.ink ?? undefined,\n }\n )\n : optionsProp,\n [optionsProp, palette]\n );\n\n const rows = useMemo(\n () =>\n rowsProp ??\n buildPaletteRows(palette ?? [], {\n value,\n toneLabels,\n currentLabel,\n swatchesPerRow,\n }),\n [currentLabel, palette, rowsProp, toneLabels, value, swatchesPerRow]\n );\n\n const filled = useMemo(\n () => rows.filter((row) => row.swatches.length > 0),\n [rows]\n );\n\n const selectedOption = options.find((option) => option.id === value);\n\n const selectedPosition = useMemo(() => {\n for (let row = 0; !selectedOption && row < filled.length; row += 1) {\n const column = filled[row].swatches.findIndex(\n (swatch) => swatch.id === value\n );\n\n if (column !== -1) {\n return { row, column };\n }\n }\n\n return null;\n }, [filled, selectedOption, value]);\n\n const selectedSwatch = selectedPosition\n ? filled[selectedPosition.row].swatches[selectedPosition.column]\n : null;\n\n const tabStop = active ?? selectedPosition ?? { row: 0, column: 0 };\n\n const close = useCallback(() => {\n setOpen(false);\n setPointed(null);\n setActive(null);\n }, []);\n\n const select = useCallback(\n (id: string) => {\n onChange(id);\n close();\n },\n [close, onChange]\n );\n\n const handleGridKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n close();\n return;\n }\n\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n const swatch = filled[tabStop.row]?.swatches[tabStop.column];\n\n if (swatch) {\n select(swatch.id);\n }\n return;\n }\n\n const next = nextCell(filled, tabStop, event.key);\n\n if (!next) {\n return;\n }\n\n event.preventDefault();\n setActive(next);\n cells.current[keyOf(next.row, next.column)]?.focus();\n };\n\n const footerEntry = useMemo<Entry | null>(() => {\n const swatch = pointed ?? selectedSwatch;\n\n if (swatch) {\n return {\n ...swatch,\n detail:\n swatch.detail ??\n (swatch.color && swatch.color !== swatch.name\n ? swatch.color\n : undefined),\n };\n }\n\n return selectedOption ?? null;\n }, [pointed, selectedOption, selectedSwatch]);\n\n const selected: Entry | null = selectedOption ?? selectedSwatch;\n\n const trigger = (\n <StyledSwatchPickerTrigger\n className={classnames(\"c-swatch-picker\", className)}\n data-testid={testId}\n disabled={disabled}\n invalid={invalid}\n >\n {selected ? (\n <SwatchName\n color={selected.color}\n ink={selected.ink}\n icon={selected.icon}\n automatic={selected.automatic}\n name={selected.name}\n size={TRIGGER_SWATCH_SIZE}\n />\n ) : null}\n </StyledSwatchPickerTrigger>\n );\n\n return (\n <Menu\n target={trigger}\n open={open}\n onOpen={() => setOpen(true)}\n onClose={close}\n width={width}\n position=\"bottom-start\"\n >\n {options.length ? (\n <>\n <StyledSwatchOptions role=\"listbox\">\n {options.map((option) => (\n <StyledSwatchOption\n key={option.id}\n role=\"option\"\n aria-selected={option.id === value}\n $selected={option.id === value}\n onClick={() => select(option.id)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n select(option.id);\n }\n }}\n >\n <StyledSwatchOptionBody>\n <SwatchName\n color={option.color}\n ink={option.ink}\n automatic={option.automatic}\n name={option.name}\n detail={option.detail}\n />\n </StyledSwatchOptionBody>\n {option.id === value ? (\n <CheckIcon\n width={16}\n height={16}\n fill=\"var(--color-primary)\"\n style={{ marginLeft: 8, flexShrink: 0 }}\n />\n ) : null}\n </StyledSwatchOption>\n ))}\n </StyledSwatchOptions>\n <StyledSwatchSeparator />\n </>\n ) : null}\n\n <StyledSwatchSection>\n {title ? (\n <StyledSwatchTitle color=\"tertiary\">{title}</StyledSwatchTitle>\n ) : null}\n <StyledSwatchGrid\n role=\"radiogroup\"\n aria-label={title}\n onKeyDown={handleGridKeyDown}\n onMouseLeave={() => setPointed(null)}\n >\n {filled.map((row, rowIndex) => (\n <StyledSwatchRow\n key={row.label ?? rowIndex}\n role=\"group\"\n aria-labelledby={row.label ? `${labelId}-${rowIndex}` : undefined}\n >\n {row.label ? (\n <StyledSwatchRowLabel\n id={`${labelId}-${rowIndex}`}\n color=\"tertiary\"\n >\n {row.label}\n </StyledSwatchRowLabel>\n ) : null}\n {row.swatches.map((swatch, column) => {\n const isSelected = swatch.id === selectedSwatch?.id;\n\n return (\n <StyledSwatchCell\n key={swatch.id}\n ref={(node) => {\n cells.current[keyOf(rowIndex, column)] = node;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={isSelected}\n aria-label={swatch.name}\n title={swatch.name}\n tabIndex={\n tabStop.row === rowIndex && tabStop.column === column\n ? 0\n : -1\n }\n data-swatch={swatch.id}\n $selected={isSelected}\n style={{\n backgroundColor: swatch.color ?? \"transparent\",\n boxShadow: swatch.color\n ? `inset 0 0 0 1px ${edgeOf(swatch.ink)}`\n : undefined,\n }}\n onClick={() => select(swatch.id)}\n onMouseEnter={() => {\n setPointed(swatch);\n setActive({ row: rowIndex, column });\n }}\n onFocus={() => {\n setPointed(swatch);\n setActive({ row: rowIndex, column });\n }}\n >\n {swatch.icon}\n {isSelected && !swatch.icon ? (\n <CheckIcon\n width={16}\n height={16}\n fill={swatch.ink || \"var(--color-theme-900)\"}\n />\n ) : null}\n </StyledSwatchCell>\n );\n })}\n </StyledSwatchRow>\n ))}\n </StyledSwatchGrid>\n </StyledSwatchSection>\n\n {footer && footerEntry ? (\n <>\n <StyledSwatchSeparator />\n <StyledSwatchFooter className=\"c-swatch-picker__footer\">\n <SwatchMark\n color={footerEntry.color}\n ink={footerEntry.ink}\n icon={footerEntry.icon}\n automatic={footerEntry.automatic}\n />\n <StyledSwatchFooterName weight=\"medium\">\n {footerEntry.name}\n </StyledSwatchFooterName>\n {footerEntry.detail ? (\n <StyledSwatchFooterDetail color=\"tertiary\">\n {footerEntry.detail}\n </StyledSwatchFooterDetail>\n ) : null}\n </StyledSwatchFooter>\n </>\n ) : null}\n </Menu>\n );\n};\n\nSwatchPicker.displayName = \"SwatchPicker\";\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,KAAK,EACLC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;AAIF,eAAO,MAAM,uBAAuB,oEAgBnC,CAAC;AAIF,eAAO,MAAM,0BAA0B,oEAUtC,CAAC"}
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Timesheet/Styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAyBvC,eAAO,MAAM,eAAe,oEAG3B,CAAC;AAIF,eAAO,MAAM,qBAAqB;gBAA4B,MAAM;SAQnE,CAAC;AAIF,eAAO,MAAM,mBAAmB,oEAE/B,CAAC;AAIF,eAAO,MAAM,mBAAmB;YAAwB,OAAO;SAe9D,CAAC;AAkDF,eAAO,MAAM,mBAAmB,oEAwD/B,CAAC;AAIF,eAAO,MAAM,qBAAqB;cAA6B,OAAO;SAyBrE,CAAC;AAIF,eAAO,MAAM,yBAAyB;eAA4B,OAAO;SAQxE,CAAC;AAIF,eAAO,MAAM,uBAAuB;aACzB,MAAM;mBACA,MAAM;gBACT,OAAO;SAmCpB,CAAC;AAKF,eAAO,MAAM,mBAAmB,qEAS/B,CAAC;AAIF,eAAO,MAAM,qBAAqB,qEAKjC,CAAC;AAIF,eAAO,MAAM,mBAAmB,oEAK/B,CAAC;AAIF,eAAO,MAAM,oBAAoB,oEAqBhC,CAAC;AAYF,eAAO,MAAM,kBAAkB;YACrB,CAAC,GAAG,CAAC,GAAG,CAAC;WACV,OAAO;SAgEf,CAAC;AAIF,eAAO,MAAM,sBAAsB,oEAsClC,CAAC;AAIF,eAAO,MAAM,0BAA0B,oEAQtC,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEAuBnC,CAAC;AAIF,eAAO,MAAM,0BAA0B,oEAUtC,CAAC"}
@@ -30,10 +30,14 @@ export const StyledTimesheetGrid = styled.div.withConfig({
30
30
  return $body && css(["display:flex;flex-direction:column;"]);
31
31
  });
32
32
  StyledTimesheetGrid.displayName = "StyledTimesheetGrid";
33
+ const PLUS_COLOR = "var(--color-primary)";
34
+
35
+ // A round inner frame and a glow mark the cell, and the plus stays right of the centered hours.
36
+ const addHover = css(["&:is(:hover,:focus-visible){position:relative;z-index:3;border-radius:8px;outline:1px solid color-mix(in oklab,var(--color-primary) 60%,transparent);outline-offset:-3px;background-color:color-mix( in oklab,var(--color-primary) 10%,transparent );box-shadow:0 0 10px 1px color-mix(in oklab,var(--color-primary) 55%,transparent);}&:is(:hover,:focus-visible)::after{display:none;}&:is(:hover,:focus-visible)::before{content:\"\";position:absolute;top:50%;right:5px;z-index:2;display:block;box-sizing:border-box;width:16px;height:16px;margin:0;border:1px solid color-mix(in oklab,var(--color-primary) 25%,transparent);border-radius:50%;background:linear-gradient(", ",", ") center / 8px 2px no-repeat,linear-gradient(", ",", ") center / 2px 8px no-repeat,color-mix(in oklab,var(--color-primary) 20%,var(--surface-raised));pointer-events:none;transform:translateY(-50%);}"], PLUS_COLOR, PLUS_COLOR, PLUS_COLOR, PLUS_COLOR);
33
37
  export const StyledTimesheetCell = styled.div.withConfig({
34
38
  displayName: "Styles__StyledTimesheetCell",
35
39
  componentId: "sc-1c4trax-4"
36
- })(["box-sizing:border-box;display:flex;position:relative;flex-shrink:0;align-items:center;justify-content:center;width:", "px;height:100%;margin:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:center;&.c-timesheet-cell--stacked{flex-direction:column;line-height:calc(1rem * var(--text-scale,1));}&.c-timesheet-cell--weekend{background-image:repeating-linear-gradient( -45deg,transparent,transparent 5.31px,color-mix(in srgb,var(--color-theme-500) 60%,transparent) 5.31px,color-mix(in srgb,var(--color-theme-500) 60%,transparent) 6.01px );}&.c-timesheet-cell--over{color:var(--capacity-over);}&.c-timesheet-cell--under{color:var(--capacity-under);}&.c-timesheet-cell--clickable{cursor:pointer;&:hover::after{", "}&:focus-visible{outline:2px solid var(--color-secondary);outline-offset:-2px;}}&:empty:not(.c-timesheet-cell--weekend)::before{", "}"], TIMESHEET_CELL_WIDTH, hoverLayer("var(--clickable-field-hover)"), emptyMark);
40
+ })(["box-sizing:border-box;display:flex;position:relative;flex-shrink:0;align-items:center;justify-content:center;width:", "px;height:100%;margin:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:center;&.c-timesheet-cell--stacked{flex-direction:column;line-height:calc(1rem * var(--text-scale,1));}&.c-timesheet-cell--weekend{background-image:repeating-linear-gradient( -45deg,transparent,transparent 5.31px,color-mix(in srgb,var(--color-theme-500) 60%,transparent) 5.31px,color-mix(in srgb,var(--color-theme-500) 60%,transparent) 6.01px );}&.c-timesheet-cell--over{color:var(--capacity-over);}&.c-timesheet-cell--under{color:var(--capacity-under);}&.c-timesheet-cell--clickable{cursor:pointer;}&:empty:not(.c-timesheet-cell--weekend)::before{", "}&&.c-timesheet-cell--clickable{", " &:focus-visible{outline:2px solid var(--color-secondary);outline-offset:-2px;}}"], TIMESHEET_CELL_WIDTH, emptyMark, addHover);
37
41
  StyledTimesheetCell.displayName = "StyledTimesheetCell";
38
42
  export const StyledTimesheetToggle = styled.button.withConfig({
39
43
  displayName: "Styles__StyledTimesheetToggle",
@@ -115,7 +119,7 @@ StyledTimesheetMembersCell.displayName = "StyledTimesheetMembersCell";
115
119
  export const StyledTimesheetTotalRow = styled.div.withConfig({
116
120
  displayName: "Styles__StyledTimesheetTotalRow",
117
121
  componentId: "sc-1c4trax-15"
118
- })(["", " height:40px;margin:0 -24px 8px;padding:0 24px;border-bottom:1px solid var(--new-list-header-line);border-radius:0;background-color:transparent;color:var(--color-theme-900);font-size:calc(14px * var(--text-scale,1));font-weight:700;& .c-timesheet-total-row__label{padding:0 32px;line-height:calc(1.25rem * var(--text-scale,1));}"], rowBase);
122
+ })(["", " height:40px;margin:0 -24px 8px;padding:0 24px;border-bottom:1px solid var(--new-list-header-line);border-radius:0;background-color:transparent;color:var(--color-theme-900);font-size:calc(14px * var(--text-scale,1));font-weight:700;& .c-timesheet-total-row__action{display:inline-flex;flex-shrink:0;margin-left:auto;margin-right:-24px;}& .c-timesheet-total-row__label{padding:0 32px;line-height:calc(1.25rem * var(--text-scale,1));}"], rowBase);
119
123
  StyledTimesheetTotalRow.displayName = "StyledTimesheetTotalRow";
120
124
  export const StyledTimesheetDurationBar = styled.div.withConfig({
121
125
  displayName: "Styles__StyledTimesheetDurationBar",
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["styled","css","FontStyle","TIMESHEET_CELL_WIDTH","ROW_HOVER_BAR","emptyMark","hoverLayer","color","StyledTimesheet","div","withConfig","displayName","componentId","StyledTimesheetHeader","_ref","$stickyTop","StyledTimesheetBody","StyledTimesheetGrid","_ref2","$body","StyledTimesheetCell","StyledTimesheetToggle","button","_ref3","$hidden","StyledTimesheetExpandIcon","span","_ref4","$expanded","StyledTimesheetNameCell","_ref5","$paddingRight","_ref6","$indent","_ref7","$clickable","StyledTimesheetName","StyledTimesheetAction","StyledTimesheetDays","StyledTimesheetTotal","rowBase","StyledTimesheetRow","_ref8","$bold","_ref9","$level","_ref0","StyledTimesheetDaysRow","StyledTimesheetMembersCell","StyledTimesheetTotalRow","StyledTimesheetDurationBar"],"sources":["../../../../src/components/Timesheet/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { FontStyle } from \"../FontStyle\";\n\nexport const TIMESHEET_CELL_WIDTH = 80;\n\nconst ROW_HOVER_BAR = css`color-mix(in srgb, var(--color-theme-300) 50%, var(--color-theme-200))`;\n\nconst emptyMark = css`\n content: \"\\\\2013\";\n display: inline-block;\n transform: scaleX(2.31);\n color: var(--color-theme-400);\n font-size: calc(14px * var(--text-scale, 1));\n font-weight: 400;\n`;\n\nconst hoverLayer = (color: string) => css`\n content: \"\";\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 0;\n background-color: ${color};\n`;\n\nexport const StyledTimesheet = styled.div`\n ${FontStyle}\n display: contents;\n`;\n\nStyledTimesheet.displayName = \"StyledTimesheet\";\n\nexport const StyledTimesheetHeader = styled.div<{ $stickyTop: string }>`\n position: sticky;\n top: ${({ $stickyTop }) => $stickyTop};\n z-index: 20;\n overflow-x: hidden;\n border-top-left-radius: var(--ac-br-8);\n border-top-right-radius: var(--ac-br-8);\n background-color: var(--page-paper-main);\n`;\n\nStyledTimesheetHeader.displayName = \"StyledTimesheetHeader\";\n\nexport const StyledTimesheetBody = styled.div`\n overflow-x: auto;\n`;\n\nStyledTimesheetBody.displayName = \"StyledTimesheetBody\";\n\nexport const StyledTimesheetGrid = styled.div<{ $body?: boolean }>`\n box-sizing: border-box;\n min-width: 850px;\n padding: 0 24px;\n\n ${({ $body }) =>\n $body &&\n css`\n display: flex;\n flex-direction: column;\n `}\n\n &:not(:has(.c-timesheet-days-row)):not(:has(.c-timesheet-total-row)) {\n padding-top: 16px;\n }\n`;\n\nStyledTimesheetGrid.displayName = \"StyledTimesheetGrid\";\n\nexport const StyledTimesheetCell = styled.div`\n box-sizing: border-box;\n display: flex;\n position: relative;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: ${TIMESHEET_CELL_WIDTH}px;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: center;\n\n &.c-timesheet-cell--stacked {\n flex-direction: column;\n line-height: calc(1rem * var(--text-scale, 1));\n }\n\n &.c-timesheet-cell--weekend {\n background-image: repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 5.31px,\n color-mix(in srgb, var(--color-theme-500) 60%, transparent) 5.31px,\n color-mix(in srgb, var(--color-theme-500) 60%, transparent) 6.01px\n );\n }\n\n &.c-timesheet-cell--over {\n color: var(--capacity-over);\n }\n\n &.c-timesheet-cell--under {\n color: var(--capacity-under);\n }\n\n &.c-timesheet-cell--clickable {\n cursor: pointer;\n\n &:hover::after {\n ${hoverLayer(\"var(--clickable-field-hover)\")}\n }\n\n &:focus-visible {\n outline: 2px solid var(--color-secondary);\n outline-offset: -2px;\n }\n }\n\n &:empty:not(.c-timesheet-cell--weekend)::before {\n ${emptyMark}\n }\n`;\n\nStyledTimesheetCell.displayName = \"StyledTimesheetCell\";\n\nexport const StyledTimesheetToggle = styled.button<{ $hidden?: boolean }>`\n display: flex;\n visibility: ${({ $hidden }) => ($hidden ? \"hidden\" : \"visible\")};\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n margin: 0 4px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n\n & svg {\n display: block;\n width: 24px;\n height: 24px;\n }\n\n &:focus-visible {\n outline: 2px solid var(--color-secondary);\n outline-offset: 0;\n }\n`;\n\nStyledTimesheetToggle.displayName = \"StyledTimesheetToggle\";\n\nexport const StyledTimesheetExpandIcon = styled.span<{ $expanded: boolean }>`\n display: flex;\n transition: rotate 200ms cubic-bezier(0.4, 0, 0.2, 1);\n rotate: ${({ $expanded }) => ($expanded ? \"0deg\" : \"180deg\")};\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n`;\n\nStyledTimesheetExpandIcon.displayName = \"StyledTimesheetExpandIcon\";\n\nexport const StyledTimesheetNameCell = styled.div<{\n $indent: number;\n $paddingRight: number;\n $clickable: boolean;\n}>`\n box-sizing: border-box;\n display: flex;\n position: relative;\n z-index: 1;\n flex: 1 1 0%;\n align-items: center;\n justify-content: space-between;\n min-width: 160px;\n height: 100%;\n padding-right: ${({ $paddingRight }) => $paddingRight}px;\n padding-left: ${({ $indent }) => $indent}px;\n\n & a {\n z-index: 2;\n color: inherit;\n text-decoration: none;\n transition: all 0.2s;\n cursor: pointer;\n }\n\n & a:hover {\n color: var(--color-secondary);\n }\n\n ${({ $clickable }) =>\n $clickable &&\n css`\n cursor: pointer;\n\n &:hover::before {\n ${hoverLayer(\"var(--highlight-dark)\")}\n }\n `}\n`;\n\nStyledTimesheetNameCell.displayName = \"StyledTimesheetNameCell\";\n\n// the name takes the free width, so a skeleton bar can size by percent\nexport const StyledTimesheetName = styled.span`\n display: flex;\n position: relative;\n flex-grow: 1;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nStyledTimesheetName.displayName = \"StyledTimesheetName\";\n\nexport const StyledTimesheetAction = styled.span`\n display: flex;\n position: relative;\n flex-shrink: 0;\n align-items: center;\n`;\n\nStyledTimesheetAction.displayName = \"StyledTimesheetAction\";\n\nexport const StyledTimesheetDays = styled.div`\n display: flex;\n position: relative;\n flex-direction: row;\n overflow: hidden;\n`;\n\nStyledTimesheetDays.displayName = \"StyledTimesheetDays\";\n\nexport const StyledTimesheetTotal = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 96px;\n height: 100%;\n padding-left: 4px;\n\n &.c-timesheet-cell--over {\n color: var(--capacity-over);\n }\n\n &.c-timesheet-cell--under {\n color: var(--capacity-under);\n }\n\n &:empty::before {\n ${emptyMark}\n }\n`;\n\nStyledTimesheetTotal.displayName = \"StyledTimesheetTotal\";\n\nconst rowBase = css`\n box-sizing: border-box;\n display: flex;\n flex-shrink: 0;\n margin-bottom: 2px;\n border: 0;\n`;\n\nexport const StyledTimesheetRow = styled.div<{\n $level: 1 | 2 | 3;\n $bold: boolean;\n}>`\n ${rowBase}\n --timesheet-bar: var(--color-theme-200);\n\n position: relative;\n isolation: isolate;\n height: 32px;\n border-radius: 6px;\n background-color: transparent;\n color: var(--color-theme-900);\n font-size: calc(13px * var(--text-scale, 1));\n font-weight: ${({ $bold }) => ($bold ? 700 : 400)};\n\n & .c-timesheet-row__name-cell {\n font-weight: ${({ $level }) => ($level < 3 ? 700 : 400)};\n }\n\n ${({ $level }) =>\n $level === 3 &&\n css`\n --timesheet-bar: color-mix(\n in srgb,\n var(--color-theme-200) 55%,\n transparent\n );\n\n color: var(--color-theme-700);\n `}\n\n &:hover {\n --timesheet-bar: ${ROW_HOVER_BAR};\n\n color: var(--color-theme-900);\n }\n\n &::before,\n &::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: -1;\n border-radius: 6px;\n background-color: var(--timesheet-bar);\n transition: background-color 0.15s;\n }\n\n &::before {\n right: 96px;\n left: 0;\n }\n\n &::after {\n right: 0;\n width: 92px;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &::before,\n &::after {\n transition: none;\n }\n }\n`;\n\nStyledTimesheetRow.displayName = \"StyledTimesheetRow\";\n\nexport const StyledTimesheetDaysRow = styled.div`\n ${rowBase}\n height: 37px;\n margin: 0 -24px;\n padding: 0 24px;\n border-bottom: 1px solid var(--new-list-header-line);\n border-radius: 0;\n background-color: transparent;\n color: var(--color-theme-600);\n font-size: calc(12px * var(--text-scale, 1));\n font-weight: 500;\n\n & .c-timesheet-cell--today::after {\n content: \"\";\n position: absolute;\n right: 12px;\n bottom: -1px;\n left: 12px;\n height: 2px;\n background-color: var(--color-primary);\n }\n\n && .c-timesheet-cell:empty::before {\n content: none;\n }\n\n & .c-timesheet-days-row__label {\n font-size: calc(11px * var(--text-scale, 1));\n font-weight: 700;\n }\n\n & .c-timesheet-days-row__label--inset {\n margin-left: 32px;\n }\n\n & .c-timesheet-days-row__total {\n line-height: calc(1.5rem * var(--text-scale, 1));\n }\n`;\n\nStyledTimesheetDaysRow.displayName = \"StyledTimesheetDaysRow\";\n\nexport const StyledTimesheetMembersCell = styled.div`\n box-sizing: border-box;\n display: flex;\n flex: 1 1 0%;\n align-items: center;\n justify-content: flex-start;\n min-width: 160px;\n height: 100%;\n`;\n\nStyledTimesheetMembersCell.displayName = \"StyledTimesheetMembersCell\";\n\nexport const StyledTimesheetTotalRow = styled.div`\n ${rowBase}\n height: 40px;\n margin: 0 -24px 8px;\n padding: 0 24px;\n border-bottom: 1px solid var(--new-list-header-line);\n border-radius: 0;\n background-color: transparent;\n color: var(--color-theme-900);\n font-size: calc(14px * var(--text-scale, 1));\n font-weight: 700;\n\n & .c-timesheet-total-row__label {\n padding: 0 32px;\n line-height: calc(1.25rem * var(--text-scale, 1));\n }\n`;\n\nStyledTimesheetTotalRow.displayName = \"StyledTimesheetTotalRow\";\n\nexport const StyledTimesheetDurationBar = styled.div`\n position: absolute;\n top: 4px;\n height: 2px;\n border-radius: 2px;\n background-color: var(--color-theme-600);\n\n &:hover {\n opacity: 0.5;\n }\n`;\n\nStyledTimesheetDurationBar.displayName = \"StyledTimesheetDurationBar\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,oBAAoB,GAAG,EAAE;AAEtC,MAAMC,aAAa,GAAGH,GAAG,0EAAwE;AAEjG,MAAMI,SAAS,GAAGJ,GAAG,6JAOpB;AAED,MAAMK,UAAU,GAAIC,KAAa,IAAKN,GAAG,kHASnBM,KAAK,CAC1B;AAED,OAAO,MAAMC,eAAe,GAAGR,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+BACrCV,SAAS,CAEZ;AAEDM,eAAe,CAACG,WAAW,GAAG,iBAAiB;AAE/C,OAAO,MAAME,qBAAqB,GAAGb,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oLAEtCE,IAAA;EAAA,IAAGC,UAAU,GAAAD,IAAA,CAAVC,UAAU;EAAA,OAAOA,UAAU;AAAA,EAMtC;AAEDF,qBAAqB,CAACF,WAAW,GAAG,uBAAuB;AAE3D,OAAO,MAAMK,mBAAmB,GAAGhB,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wBAE5C;AAEDI,mBAAmB,CAACL,WAAW,GAAG,qBAAqB;AAEvD,OAAO,MAAMM,mBAAmB,GAAGjB,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0JAKzCM,KAAA;EAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;EAAA,OACRA,KAAK,IACLlB,GAAG,yCAGF;AAAA,EAKJ;AAEDgB,mBAAmB,CAACN,WAAW,GAAG,qBAAqB;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OAAO,MAAMoC,sBAAsB,GAAG/C,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wpBAC5C4B,OAAO,CAqCV;AAEDO,sBAAsB,CAACpC,WAAW,GAAG,wBAAwB;AAE7D,OAAO,MAAMqC,0BAA0B,GAAGhD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iIAQnD;AAEDoC,0BAA0B,CAACrC,WAAW,GAAG,4BAA4B;AAErE,OAAO,MAAMsC,uBAAuB,GAAGjD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qVAC7C4B,OAAO,CAeV;AAEDS,uBAAuB,CAACtC,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAMuC,0BAA0B,GAAGlD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4HAUnD;AAEDsC,0BAA0B,CAACvC,WAAW,GAAG,4BAA4B","ignoreList":[]}
1
+ {"version":3,"file":"Styles.js","names":["styled","css","FontStyle","TIMESHEET_CELL_WIDTH","ROW_HOVER_BAR","emptyMark","hoverLayer","color","StyledTimesheet","div","withConfig","displayName","componentId","StyledTimesheetHeader","_ref","$stickyTop","StyledTimesheetBody","StyledTimesheetGrid","_ref2","$body","PLUS_COLOR","addHover","StyledTimesheetCell","StyledTimesheetToggle","button","_ref3","$hidden","StyledTimesheetExpandIcon","span","_ref4","$expanded","StyledTimesheetNameCell","_ref5","$paddingRight","_ref6","$indent","_ref7","$clickable","StyledTimesheetName","StyledTimesheetAction","StyledTimesheetDays","StyledTimesheetTotal","rowBase","StyledTimesheetRow","_ref8","$bold","_ref9","$level","_ref0","StyledTimesheetDaysRow","StyledTimesheetMembersCell","StyledTimesheetTotalRow","StyledTimesheetDurationBar"],"sources":["../../../../src/components/Timesheet/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { FontStyle } from \"../FontStyle\";\n\nexport const TIMESHEET_CELL_WIDTH = 80;\n\nconst ROW_HOVER_BAR = css`color-mix(in srgb, var(--color-theme-300) 50%, var(--color-theme-200))`;\n\nconst emptyMark = css`\n content: \"\\\\2013\";\n display: inline-block;\n transform: scaleX(2.31);\n color: var(--color-theme-400);\n font-size: calc(14px * var(--text-scale, 1));\n font-weight: 400;\n`;\n\nconst hoverLayer = (color: string) => css`\n content: \"\";\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 0;\n background-color: ${color};\n`;\n\nexport const StyledTimesheet = styled.div`\n ${FontStyle}\n display: contents;\n`;\n\nStyledTimesheet.displayName = \"StyledTimesheet\";\n\nexport const StyledTimesheetHeader = styled.div<{ $stickyTop: string }>`\n position: sticky;\n top: ${({ $stickyTop }) => $stickyTop};\n z-index: 20;\n overflow-x: hidden;\n border-top-left-radius: var(--ac-br-8);\n border-top-right-radius: var(--ac-br-8);\n background-color: var(--page-paper-main);\n`;\n\nStyledTimesheetHeader.displayName = \"StyledTimesheetHeader\";\n\nexport const StyledTimesheetBody = styled.div`\n overflow-x: auto;\n`;\n\nStyledTimesheetBody.displayName = \"StyledTimesheetBody\";\n\nexport const StyledTimesheetGrid = styled.div<{ $body?: boolean }>`\n box-sizing: border-box;\n min-width: 850px;\n padding: 0 24px;\n\n ${({ $body }) =>\n $body &&\n css`\n display: flex;\n flex-direction: column;\n `}\n\n &:not(:has(.c-timesheet-days-row)):not(:has(.c-timesheet-total-row)) {\n padding-top: 16px;\n }\n`;\n\nStyledTimesheetGrid.displayName = \"StyledTimesheetGrid\";\n\nconst PLUS_COLOR = \"var(--color-primary)\";\n\n// A round inner frame and a glow mark the cell, and the plus stays right of the centered hours.\nconst addHover = css`\n &:is(:hover, :focus-visible) {\n position: relative;\n z-index: 3;\n border-radius: 8px;\n outline: 1px solid\n color-mix(in oklab, var(--color-primary) 60%, transparent);\n outline-offset: -3px;\n background-color: color-mix(\n in oklab,\n var(--color-primary) 10%,\n transparent\n );\n box-shadow: 0 0 10px 1px\n color-mix(in oklab, var(--color-primary) 55%, transparent);\n }\n\n &:is(:hover, :focus-visible)::after {\n display: none;\n }\n\n &:is(:hover, :focus-visible)::before {\n content: \"\";\n position: absolute;\n top: 50%;\n right: 5px;\n z-index: 2;\n display: block;\n box-sizing: border-box;\n width: 16px;\n height: 16px;\n margin: 0;\n border: 1px solid color-mix(in oklab, var(--color-primary) 25%, transparent);\n border-radius: 50%;\n background: linear-gradient(${PLUS_COLOR}, ${PLUS_COLOR}) center / 8px 2px\n no-repeat,\n linear-gradient(${PLUS_COLOR}, ${PLUS_COLOR}) center / 2px 8px no-repeat,\n color-mix(in oklab, var(--color-primary) 20%, var(--surface-raised));\n pointer-events: none;\n transform: translateY(-50%);\n }\n`;\n\nexport const StyledTimesheetCell = styled.div`\n box-sizing: border-box;\n display: flex;\n position: relative;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: ${TIMESHEET_CELL_WIDTH}px;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: center;\n\n &.c-timesheet-cell--stacked {\n flex-direction: column;\n line-height: calc(1rem * var(--text-scale, 1));\n }\n\n &.c-timesheet-cell--weekend {\n background-image: repeating-linear-gradient(\n -45deg,\n transparent,\n transparent 5.31px,\n color-mix(in srgb, var(--color-theme-500) 60%, transparent) 5.31px,\n color-mix(in srgb, var(--color-theme-500) 60%, transparent) 6.01px\n );\n }\n\n &.c-timesheet-cell--over {\n color: var(--capacity-over);\n }\n\n &.c-timesheet-cell--under {\n color: var(--capacity-under);\n }\n\n &.c-timesheet-cell--clickable {\n cursor: pointer;\n }\n\n &:empty:not(.c-timesheet-cell--weekend)::before {\n ${emptyMark}\n }\n\n &&.c-timesheet-cell--clickable {\n ${addHover}\n\n &:focus-visible {\n outline: 2px solid var(--color-secondary);\n outline-offset: -2px;\n }\n }\n`;\n\nStyledTimesheetCell.displayName = \"StyledTimesheetCell\";\n\nexport const StyledTimesheetToggle = styled.button<{ $hidden?: boolean }>`\n display: flex;\n visibility: ${({ $hidden }) => ($hidden ? \"hidden\" : \"visible\")};\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n margin: 0 4px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n\n & svg {\n display: block;\n width: 24px;\n height: 24px;\n }\n\n &:focus-visible {\n outline: 2px solid var(--color-secondary);\n outline-offset: 0;\n }\n`;\n\nStyledTimesheetToggle.displayName = \"StyledTimesheetToggle\";\n\nexport const StyledTimesheetExpandIcon = styled.span<{ $expanded: boolean }>`\n display: flex;\n transition: rotate 200ms cubic-bezier(0.4, 0, 0.2, 1);\n rotate: ${({ $expanded }) => ($expanded ? \"0deg\" : \"180deg\")};\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n`;\n\nStyledTimesheetExpandIcon.displayName = \"StyledTimesheetExpandIcon\";\n\nexport const StyledTimesheetNameCell = styled.div<{\n $indent: number;\n $paddingRight: number;\n $clickable: boolean;\n}>`\n box-sizing: border-box;\n display: flex;\n position: relative;\n z-index: 1;\n flex: 1 1 0%;\n align-items: center;\n justify-content: space-between;\n min-width: 160px;\n height: 100%;\n padding-right: ${({ $paddingRight }) => $paddingRight}px;\n padding-left: ${({ $indent }) => $indent}px;\n\n & a {\n z-index: 2;\n color: inherit;\n text-decoration: none;\n transition: all 0.2s;\n cursor: pointer;\n }\n\n & a:hover {\n color: var(--color-secondary);\n }\n\n ${({ $clickable }) =>\n $clickable &&\n css`\n cursor: pointer;\n\n &:hover::before {\n ${hoverLayer(\"var(--highlight-dark)\")}\n }\n `}\n`;\n\nStyledTimesheetNameCell.displayName = \"StyledTimesheetNameCell\";\n\n// the name takes the free width, so a skeleton bar can size by percent\nexport const StyledTimesheetName = styled.span`\n display: flex;\n position: relative;\n flex-grow: 1;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nStyledTimesheetName.displayName = \"StyledTimesheetName\";\n\nexport const StyledTimesheetAction = styled.span`\n display: flex;\n position: relative;\n flex-shrink: 0;\n align-items: center;\n`;\n\nStyledTimesheetAction.displayName = \"StyledTimesheetAction\";\n\nexport const StyledTimesheetDays = styled.div`\n display: flex;\n position: relative;\n flex-direction: row;\n overflow: hidden;\n`;\n\nStyledTimesheetDays.displayName = \"StyledTimesheetDays\";\n\nexport const StyledTimesheetTotal = styled.div`\n box-sizing: border-box;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 96px;\n height: 100%;\n padding-left: 4px;\n\n &.c-timesheet-cell--over {\n color: var(--capacity-over);\n }\n\n &.c-timesheet-cell--under {\n color: var(--capacity-under);\n }\n\n &:empty::before {\n ${emptyMark}\n }\n`;\n\nStyledTimesheetTotal.displayName = \"StyledTimesheetTotal\";\n\nconst rowBase = css`\n box-sizing: border-box;\n display: flex;\n flex-shrink: 0;\n margin-bottom: 2px;\n border: 0;\n`;\n\nexport const StyledTimesheetRow = styled.div<{\n $level: 1 | 2 | 3;\n $bold: boolean;\n}>`\n ${rowBase}\n --timesheet-bar: var(--color-theme-200);\n\n position: relative;\n isolation: isolate;\n height: 32px;\n border-radius: 6px;\n background-color: transparent;\n color: var(--color-theme-900);\n font-size: calc(13px * var(--text-scale, 1));\n font-weight: ${({ $bold }) => ($bold ? 700 : 400)};\n\n & .c-timesheet-row__name-cell {\n font-weight: ${({ $level }) => ($level < 3 ? 700 : 400)};\n }\n\n ${({ $level }) =>\n $level === 3 &&\n css`\n --timesheet-bar: color-mix(\n in srgb,\n var(--color-theme-200) 55%,\n transparent\n );\n\n color: var(--color-theme-700);\n `}\n\n &:hover {\n --timesheet-bar: ${ROW_HOVER_BAR};\n\n color: var(--color-theme-900);\n }\n\n &::before,\n &::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: -1;\n border-radius: 6px;\n background-color: var(--timesheet-bar);\n transition: background-color 0.15s;\n }\n\n &::before {\n right: 96px;\n left: 0;\n }\n\n &::after {\n right: 0;\n width: 92px;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &::before,\n &::after {\n transition: none;\n }\n }\n`;\n\nStyledTimesheetRow.displayName = \"StyledTimesheetRow\";\n\nexport const StyledTimesheetDaysRow = styled.div`\n ${rowBase}\n height: 37px;\n margin: 0 -24px;\n padding: 0 24px;\n border-bottom: 1px solid var(--new-list-header-line);\n border-radius: 0;\n background-color: transparent;\n color: var(--color-theme-600);\n font-size: calc(12px * var(--text-scale, 1));\n font-weight: 500;\n\n & .c-timesheet-cell--today::after {\n content: \"\";\n position: absolute;\n right: 12px;\n bottom: -1px;\n left: 12px;\n height: 2px;\n background-color: var(--color-primary);\n }\n\n && .c-timesheet-cell:empty::before {\n content: none;\n }\n\n & .c-timesheet-days-row__label {\n font-size: calc(11px * var(--text-scale, 1));\n font-weight: 700;\n }\n\n & .c-timesheet-days-row__label--inset {\n margin-left: 32px;\n }\n\n & .c-timesheet-days-row__total {\n line-height: calc(1.5rem * var(--text-scale, 1));\n }\n`;\n\nStyledTimesheetDaysRow.displayName = \"StyledTimesheetDaysRow\";\n\nexport const StyledTimesheetMembersCell = styled.div`\n box-sizing: border-box;\n display: flex;\n flex: 1 1 0%;\n align-items: center;\n justify-content: flex-start;\n min-width: 160px;\n height: 100%;\n`;\n\nStyledTimesheetMembersCell.displayName = \"StyledTimesheetMembersCell\";\n\nexport const StyledTimesheetTotalRow = styled.div`\n ${rowBase}\n height: 40px;\n margin: 0 -24px 8px;\n padding: 0 24px;\n border-bottom: 1px solid var(--new-list-header-line);\n border-radius: 0;\n background-color: transparent;\n color: var(--color-theme-900);\n font-size: calc(14px * var(--text-scale, 1));\n font-weight: 700;\n\n & .c-timesheet-total-row__action {\n display: inline-flex;\n flex-shrink: 0;\n margin-left: auto;\n margin-right: -24px;\n }\n\n & .c-timesheet-total-row__label {\n padding: 0 32px;\n line-height: calc(1.25rem * var(--text-scale, 1));\n }\n`;\n\nStyledTimesheetTotalRow.displayName = \"StyledTimesheetTotalRow\";\n\nexport const StyledTimesheetDurationBar = styled.div`\n position: absolute;\n top: 4px;\n height: 2px;\n border-radius: 2px;\n background-color: var(--color-theme-600);\n\n &:hover {\n opacity: 0.5;\n }\n`;\n\nStyledTimesheetDurationBar.displayName = \"StyledTimesheetDurationBar\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,oBAAoB,GAAG,EAAE;AAEtC,MAAMC,aAAa,GAAGH,GAAG,0EAAwE;AAEjG,MAAMI,SAAS,GAAGJ,GAAG,6JAOpB;AAED,MAAMK,UAAU,GAAIC,KAAa,IAAKN,GAAG,kHASnBM,KAAK,CAC1B;AAED,OAAO,MAAMC,eAAe,GAAGR,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+BACrCV,SAAS,CAEZ;AAEDM,eAAe,CAACG,WAAW,GAAG,iBAAiB;AAE/C,OAAO,MAAME,qBAAqB,GAAGb,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oLAEtCE,IAAA;EAAA,IAAGC,UAAU,GAAAD,IAAA,CAAVC,UAAU;EAAA,OAAOA,UAAU;AAAA,EAMtC;AAEDF,qBAAqB,CAACF,WAAW,GAAG,uBAAuB;AAE3D,OAAO,MAAMK,mBAAmB,GAAGhB,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wBAE5C;AAEDI,mBAAmB,CAACL,WAAW,GAAG,qBAAqB;AAEvD,OAAO,MAAMM,mBAAmB,GAAGjB,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0JAKzCM,KAAA;EAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;EAAA,OACRA,K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AAAA,CAAC,EAGvDC,KAAA;EAAA,IAAGD,MAAM,GAAAC,KAAA,CAAND,MAAM;EAAA,OACTA,MAAM,KAAK,CAAC,IACZ9C,GAAG,+GAQF;AAAA,GAGkBG,aAAa,CAiCnC;AAEDuC,kBAAkB,CAAChC,WAAW,GAAG,oBAAoB;AAErD,OAAO,MAAMsC,sBAAsB,GAAGjD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wpBAC5C8B,OAAO,CAqCV;AAEDO,sBAAsB,CAACtC,WAAW,GAAG,wBAAwB;AAE7D,OAAO,MAAMuC,0BAA0B,GAAGlD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iIAQnD;AAEDsC,0BAA0B,CAACvC,WAAW,GAAG,4BAA4B;AAErE,OAAO,MAAMwC,uBAAuB,GAAGnD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,6bAC7C8B,OAAO,CAsBV;AAEDS,uBAAuB,CAACxC,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAMyC,0BAA0B,GAAGpD,MAAM,CAACS,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4HAUnD;AAEDwC,0BAA0B,CAACzC,WAAW,GAAG,4BAA4B","ignoreList":[]}
@@ -9,7 +9,10 @@ export interface ITimesheetCellProps extends Omit<HTMLAttributes<HTMLElement>, "
9
9
  tone?: TimesheetTone;
10
10
  /** Puts two lines on top of each other, for example OFF over the hours. */
11
11
  stacked?: boolean;
12
- /** Makes the cell a button, for example to add a time record on the day. */
12
+ /**
13
+ * Makes the cell a button, for example to add a time record on the day. Hover then marks the cell
14
+ * and shows a plus beside its content. A cell without it is read only and has no hover.
15
+ */
13
16
  onClick?: (event: MouseEvent<HTMLElement>) => void;
14
17
  }
15
18
  export declare const TimesheetCell: React.ForwardRefExoticComponent<ITimesheetCellProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"TimesheetCell.d.ts","sourceRoot":"","sources":["../../../../src/components/Timesheet/TimesheetCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,UAAU,EAAc,MAAM,OAAO,CAAC;AAMtE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7C,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACpD,mFAAmF;IACnF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,aAAa,yFA8BzB,CAAC"}
1
+ {"version":3,"file":"TimesheetCell.d.ts","sourceRoot":"","sources":["../../../../src/components/Timesheet/TimesheetCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,UAAU,EAAc,MAAM,OAAO,CAAC;AAMtE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7C,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACpD,mFAAmF;IACnF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,aAAa,yFA8BzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TimesheetCell.js","names":["React","forwardRef","classnames","StyledTimesheetCell","TimesheetCell","_ref","ref","today","weekend","tone","stacked","onClick","className","children","rest","_objectWithoutPropertiesLoose","_excluded","clickable","createElement","_extends","as","type","undefined","displayName"],"sources":["../../../../src/components/Timesheet/TimesheetCell.tsx"],"sourcesContent":["import React, { HTMLAttributes, MouseEvent, forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { StyledTimesheetCell } from \"./Styles\";\n\nexport type TimesheetTone = \"over\" | \"under\";\n\nexport interface ITimesheetCellProps\n extends Omit<HTMLAttributes<HTMLElement>, \"onClick\"> {\n /** Marks the column of today. In the days row it draws the line under the date. */\n today?: boolean;\n /** Hatches the cell of a day that is not a workday. */\n weekend?: boolean;\n /** Colors the text against the daily capacity: orange over it, red under it. */\n tone?: TimesheetTone;\n /** Puts two lines on top of each other, for example OFF over the hours. */\n stacked?: boolean;\n /** Makes the cell a button, for example to add a time record on the day. */\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n}\n\nexport const TimesheetCell = forwardRef<HTMLElement, ITimesheetCellProps>(\n (\n { today, weekend, tone, stacked, onClick, className, children, ...rest },\n ref\n ) => {\n const clickable = typeof onClick === \"function\";\n\n return (\n <StyledTimesheetCell\n {...rest}\n ref={ref as React.Ref<HTMLDivElement>}\n as={clickable ? \"button\" : \"div\"}\n type={clickable ? \"button\" : undefined}\n onClick={onClick}\n className={classnames(\n \"c-timesheet-cell\",\n {\n \"c-timesheet-cell--today\": today,\n \"c-timesheet-cell--weekend\": weekend,\n \"c-timesheet-cell--stacked\": stacked,\n \"c-timesheet-cell--clickable\": clickable,\n [`c-timesheet-cell--${tone}`]: tone,\n },\n className\n )}\n >\n {children}\n </StyledTimesheetCell>\n );\n }\n);\n\nTimesheetCell.displayName = \"TimesheetCell\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAgCC,UAAU,QAAQ,OAAO;AAErE,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,mBAAmB,QAAQ,UAAU;AAkB9C,OAAO,MAAMC,aAAa,gBAAGH,UAAU,CACrC,CAAAI,IAAA,EAEEC,GAAG,KACA;EAAA,IAFDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IAAEC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IAAEC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IAAEC,OAAO,GAAAN,IAAA,CAAPM,OAAO;IAAEC,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAEC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IAAKC,IAAI,GAAAC,6BAAA,CAAAV,IAAA,EAAAW,SAAA;EAGtE,MAAMC,SAAS,GAAG,OAAON,OAAO,KAAK,UAAU;EAE/C,oBACEX,KAAA,CAAAkB,aAAA,CAACf,mBAAmB,EAAAgB,QAAA,KACdL,IAAI;IACRR,GAAG,EAAEA,GAAiC;IACtCc,EAAE,EAAEH,SAAS,GAAG,QAAQ,GAAG,KAAM;IACjCI,IAAI,EAAEJ,SAAS,GAAG,QAAQ,GAAGK,SAAU;IACvCX,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEV,UAAU,CACnB,kBAAkB,EAClB;MACE,yBAAyB,EAAEK,KAAK;MAChC,2BAA2B,EAAEC,OAAO;MACpC,2BAA2B,EAAEE,OAAO;MACpC,6BAA6B,EAAEO,SAAS;MACxC,wBAAsBR,IAAI,GAAKA;IACjC,CAAC,EACDG,SACF;EAAE,IAEDC,QACkB,CAAC;AAE1B,CACF,CAAC;AAEDT,aAAa,CAACmB,WAAW,GAAG,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"TimesheetCell.js","names":["React","forwardRef","classnames","StyledTimesheetCell","TimesheetCell","_ref","ref","today","weekend","tone","stacked","onClick","className","children","rest","_objectWithoutPropertiesLoose","_excluded","clickable","createElement","_extends","as","type","undefined","displayName"],"sources":["../../../../src/components/Timesheet/TimesheetCell.tsx"],"sourcesContent":["import React, { HTMLAttributes, MouseEvent, forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { StyledTimesheetCell } from \"./Styles\";\n\nexport type TimesheetTone = \"over\" | \"under\";\n\nexport interface ITimesheetCellProps\n extends Omit<HTMLAttributes<HTMLElement>, \"onClick\"> {\n /** Marks the column of today. In the days row it draws the line under the date. */\n today?: boolean;\n /** Hatches the cell of a day that is not a workday. */\n weekend?: boolean;\n /** Colors the text against the daily capacity: orange over it, red under it. */\n tone?: TimesheetTone;\n /** Puts two lines on top of each other, for example OFF over the hours. */\n stacked?: boolean;\n /**\n * Makes the cell a button, for example to add a time record on the day. Hover then marks the cell\n * and shows a plus beside its content. A cell without it is read only and has no hover.\n */\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n}\n\nexport const TimesheetCell = forwardRef<HTMLElement, ITimesheetCellProps>(\n (\n { today, weekend, tone, stacked, onClick, className, children, ...rest },\n ref\n ) => {\n const clickable = typeof onClick === \"function\";\n\n return (\n <StyledTimesheetCell\n {...rest}\n ref={ref as React.Ref<HTMLDivElement>}\n as={clickable ? \"button\" : \"div\"}\n type={clickable ? \"button\" : undefined}\n onClick={onClick}\n className={classnames(\n \"c-timesheet-cell\",\n {\n \"c-timesheet-cell--today\": today,\n \"c-timesheet-cell--weekend\": weekend,\n \"c-timesheet-cell--stacked\": stacked,\n \"c-timesheet-cell--clickable\": clickable,\n [`c-timesheet-cell--${tone}`]: tone,\n },\n className\n )}\n >\n {children}\n </StyledTimesheetCell>\n );\n }\n);\n\nTimesheetCell.displayName = \"TimesheetCell\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAgCC,UAAU,QAAQ,OAAO;AAErE,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,mBAAmB,QAAQ,UAAU;AAqB9C,OAAO,MAAMC,aAAa,gBAAGH,UAAU,CACrC,CAAAI,IAAA,EAEEC,GAAG,KACA;EAAA,IAFDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IAAEC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IAAEC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IAAEC,OAAO,GAAAN,IAAA,CAAPM,OAAO;IAAEC,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAEC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IAAKC,IAAI,GAAAC,6BAAA,CAAAV,IAAA,EAAAW,SAAA;EAGtE,MAAMC,SAAS,GAAG,OAAON,OAAO,KAAK,UAAU;EAE/C,oBACEX,KAAA,CAAAkB,aAAA,CAACf,mBAAmB,EAAAgB,QAAA,KACdL,IAAI;IACRR,GAAG,EAAEA,GAAiC;IACtCc,EAAE,EAAEH,SAAS,GAAG,QAAQ,GAAG,KAAM;IACjCI,IAAI,EAAEJ,SAAS,GAAG,QAAQ,GAAGK,SAAU;IACvCX,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEV,UAAU,CACnB,kBAAkB,EAClB;MACE,yBAAyB,EAAEK,KAAK;MAChC,2BAA2B,EAAEC,OAAO;MACpC,2BAA2B,EAAEE,OAAO;MACpC,6BAA6B,EAAEO,SAAS;MACxC,wBAAsBR,IAAI,GAAKA;IACjC,CAAC,EACDG,SACF;EAAE,IAEDC,QACkB,CAAC;AAE1B,CACF,CAAC;AAEDT,aAAa,CAACmB,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -2,6 +2,8 @@ import React, { HTMLAttributes, ReactNode } from "react";
2
2
  export interface ITimesheetTotalRowProps extends HTMLAttributes<HTMLDivElement> {
3
3
  /** Text of the name cell, for example Total. */
4
4
  label?: ReactNode;
5
+ /** A control in the right corner of the label cell, for example an add button. */
6
+ action?: ReactNode;
5
7
  /** The total of the week. Leave it empty for a zero total. */
6
8
  total?: ReactNode;
7
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TimesheetTotalRow.d.ts","sourceRoot":"","sources":["../../../../src/components/Timesheet/TimesheetTotalRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAUrE,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtC,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,gGAiB5B,CAAC"}
1
+ {"version":3,"file":"TimesheetTotalRow.d.ts","sourceRoot":"","sources":["../../../../src/components/Timesheet/TimesheetTotalRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAUrE,MAAM,WAAW,uBACf,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtC,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kFAAkF;IAClF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,gGAoB5B,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["label", "total", "className", "children"];
3
+ const _excluded = ["label", "action", "total", "className", "children"];
4
4
  import React, { forwardRef } from "react";
5
5
  import classnames from "classnames";
6
6
  import { StyledTimesheetMembersCell, StyledTimesheetTotal, StyledTimesheetTotalRow } from "./Styles";
7
7
  export const TimesheetTotalRow = /*#__PURE__*/forwardRef((_ref, ref) => {
8
8
  let label = _ref.label,
9
+ action = _ref.action,
9
10
  total = _ref.total,
10
11
  className = _ref.className,
11
12
  children = _ref.children,
@@ -15,7 +16,9 @@ export const TimesheetTotalRow = /*#__PURE__*/forwardRef((_ref, ref) => {
15
16
  className: classnames("c-timesheet-total-row", className)
16
17
  }), /*#__PURE__*/React.createElement(StyledTimesheetMembersCell, {
17
18
  className: "c-timesheet-total-row__label"
18
- }, /*#__PURE__*/React.createElement("span", null, label)), children, /*#__PURE__*/React.createElement(StyledTimesheetTotal, {
19
+ }, /*#__PURE__*/React.createElement("span", null, label), action ? /*#__PURE__*/React.createElement("span", {
20
+ className: "c-timesheet-total-row__action"
21
+ }, action) : null), children, /*#__PURE__*/React.createElement(StyledTimesheetTotal, {
19
22
  className: "c-timesheet-total-row__total"
20
23
  }, total));
21
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TimesheetTotalRow.js","names":["React","forwardRef","classnames","StyledTimesheetMembersCell","StyledTimesheetTotal","StyledTimesheetTotalRow","TimesheetTotalRow","_ref","ref","label","total","className","children","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","displayName"],"sources":["../../../../src/components/Timesheet/TimesheetTotalRow.tsx"],"sourcesContent":["import React, { HTMLAttributes, ReactNode, forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledTimesheetMembersCell,\n StyledTimesheetTotal,\n StyledTimesheetTotalRow,\n} from \"./Styles\";\n\nexport interface ITimesheetTotalRowProps\n extends HTMLAttributes<HTMLDivElement> {\n /** Text of the name cell, for example Total. */\n label?: ReactNode;\n /** The total of the week. Leave it empty for a zero total. */\n total?: ReactNode;\n}\n\nexport const TimesheetTotalRow = forwardRef<\n HTMLDivElement,\n ITimesheetTotalRowProps\n>(({ label, total, className, children, ...rest }, ref) => (\n <StyledTimesheetTotalRow\n {...rest}\n ref={ref}\n className={classnames(\"c-timesheet-total-row\", className)}\n >\n <StyledTimesheetMembersCell className=\"c-timesheet-total-row__label\">\n <span>{label}</span>\n </StyledTimesheetMembersCell>\n {children}\n <StyledTimesheetTotal className=\"c-timesheet-total-row__total\">\n {total}\n </StyledTimesheetTotal>\n </StyledTimesheetTotalRow>\n));\n\nTimesheetTotalRow.displayName = \"TimesheetTotalRow\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAA+BC,UAAU,QAAQ,OAAO;AAEpE,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,0BAA0B,EAC1BC,oBAAoB,EACpBC,uBAAuB,QAClB,UAAU;AAUjB,OAAO,MAAMC,iBAAiB,gBAAGL,UAAU,CAGzC,CAAAM,IAAA,EAAiDC,GAAG;EAAA,IAAjDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAKC,IAAI,GAAAC,6BAAA,CAAAP,IAAA,EAAAQ,SAAA;EAAA,oBAC7Cf,KAAA,CAAAgB,aAAA,CAACX,uBAAuB,EAAAY,QAAA,KAClBJ,IAAI;IACRL,GAAG,EAAEA,GAAI;IACTG,SAAS,EAAET,UAAU,CAAC,uBAAuB,EAAES,SAAS;EAAE,iBAE1DX,KAAA,CAAAgB,aAAA,CAACb,0BAA0B;IAACQ,SAAS,EAAC;EAA8B,gBAClEX,KAAA,CAAAgB,aAAA,eAAOP,KAAY,CACO,CAAC,EAC5BG,QAAQ,eACTZ,KAAA,CAAAgB,aAAA,CAACZ,oBAAoB;IAACO,SAAS,EAAC;EAA8B,GAC3DD,KACmB,CACC,CAAC;AAAA,CAC3B,CAAC;AAEFJ,iBAAiB,CAACY,WAAW,GAAG,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"TimesheetTotalRow.js","names":["React","forwardRef","classnames","StyledTimesheetMembersCell","StyledTimesheetTotal","StyledTimesheetTotalRow","TimesheetTotalRow","_ref","ref","label","action","total","className","children","rest","_objectWithoutPropertiesLoose","_excluded","createElement","_extends","displayName"],"sources":["../../../../src/components/Timesheet/TimesheetTotalRow.tsx"],"sourcesContent":["import React, { HTMLAttributes, ReactNode, forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledTimesheetMembersCell,\n StyledTimesheetTotal,\n StyledTimesheetTotalRow,\n} from \"./Styles\";\n\nexport interface ITimesheetTotalRowProps\n extends HTMLAttributes<HTMLDivElement> {\n /** Text of the name cell, for example Total. */\n label?: ReactNode;\n /** A control in the right corner of the label cell, for example an add button. */\n action?: ReactNode;\n /** The total of the week. Leave it empty for a zero total. */\n total?: ReactNode;\n}\n\nexport const TimesheetTotalRow = forwardRef<\n HTMLDivElement,\n ITimesheetTotalRowProps\n>(({ label, action, total, className, children, ...rest }, ref) => (\n <StyledTimesheetTotalRow\n {...rest}\n ref={ref}\n className={classnames(\"c-timesheet-total-row\", className)}\n >\n <StyledTimesheetMembersCell className=\"c-timesheet-total-row__label\">\n <span>{label}</span>\n {action ? (\n <span className=\"c-timesheet-total-row__action\">{action}</span>\n ) : null}\n </StyledTimesheetMembersCell>\n {children}\n <StyledTimesheetTotal className=\"c-timesheet-total-row__total\">\n {total}\n </StyledTimesheetTotal>\n </StyledTimesheetTotalRow>\n));\n\nTimesheetTotalRow.displayName = \"TimesheetTotalRow\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAA+BC,UAAU,QAAQ,OAAO;AAEpE,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,0BAA0B,EAC1BC,oBAAoB,EACpBC,uBAAuB,QAClB,UAAU;AAYjB,OAAO,MAAMC,iBAAiB,gBAAGL,UAAU,CAGzC,CAAAM,IAAA,EAAyDC,GAAG;EAAA,IAAzDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAEC,MAAM,GAAAH,IAAA,CAANG,MAAM;IAAEC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAEC,SAAS,GAAAL,IAAA,CAATK,SAAS;IAAEC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IAAKC,IAAI,GAAAC,6BAAA,CAAAR,IAAA,EAAAS,SAAA;EAAA,oBACrDhB,KAAA,CAAAiB,aAAA,CAACZ,uBAAuB,EAAAa,QAAA,KAClBJ,IAAI;IACRN,GAAG,EAAEA,GAAI;IACTI,SAAS,EAAEV,UAAU,CAAC,uBAAuB,EAAEU,SAAS;EAAE,iBAE1DZ,KAAA,CAAAiB,aAAA,CAACd,0BAA0B;IAACS,SAAS,EAAC;EAA8B,gBAClEZ,KAAA,CAAAiB,aAAA,eAAOR,KAAY,CAAC,EACnBC,MAAM,gBACLV,KAAA,CAAAiB,aAAA;IAAML,SAAS,EAAC;EAA+B,GAAEF,MAAa,CAAC,GAC7D,IACsB,CAAC,EAC5BG,QAAQ,eACTb,KAAA,CAAAiB,aAAA,CAACb,oBAAoB;IAACQ,SAAS,EAAC;EAA8B,GAC3DD,KACmB,CACC,CAAC;AAAA,CAC3B,CAAC;AAEFL,iBAAiB,CAACa,WAAW,GAAG,mBAAmB","ignoreList":[]}
@@ -1,6 +1,20 @@
1
1
  export declare const StyledViewSwitcher: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export declare const StyledViewSwitcherTrack: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const StyledViewSwitcherOption: import("styled-components").StyledComponent<"button", any, {}, never>;
4
+ export declare const StyledViewSwitcherMenuOption: import("styled-components").StyledComponent<"button", any, {}, never>;
5
+ export declare const StyledViewSwitcherMenuIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
6
+ export declare const StyledViewSwitcherMenuList: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").ListProps & {
7
+ children?: import("react").ReactNode | undefined;
8
+ } & import("react").HTMLAttributes<HTMLUListElement> & import("react").RefAttributes<HTMLUListElement>> & {
9
+ Item: import("react").ForwardRefExoticComponent<import("..").ListItemProps & {
10
+ children?: import("react").ReactNode | undefined;
11
+ } & import("react").HTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
12
+ Separator: {
13
+ ({ className, ...props }: import("react").HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ }, any, {}, never>;
17
+ export declare const StyledViewSwitcherMenuLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
4
18
  export declare const StyledViewSwitcherPreview: import("styled-components").StyledComponent<"div", any, {}, never>;
5
19
  export declare const StyledViewSwitcherThumbnail: import("styled-components").StyledComponent<"div", any, {}, never>;
6
20
  export declare const StyledViewSwitcherOffer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,oEAI9B,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEAQnC,CAAC;AAIF,eAAO,MAAM,wBAAwB,uEA2CpC,CAAC;AAIF,eAAO,MAAM,yBAAyB,oEAYrC,CAAC;AAIF,eAAO,MAAM,2BAA2B,oEAQvC,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEAiCnC,CAAC"}
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,oEAI9B,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEAQnC,CAAC;AAIF,eAAO,MAAM,wBAAwB,uEA2CpC,CAAC;AAIF,eAAO,MAAM,4BAA4B,uEAwDxC,CAAC;AAIF,eAAO,MAAM,0BAA0B,qEAKtC,CAAC;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;kBAEtC,CAAC;AAIF,eAAO,MAAM,2BAA2B,qEAOvC,CAAC;AAIF,eAAO,MAAM,yBAAyB,oEAYrC,CAAC;AAIF,eAAO,MAAM,2BAA2B,oEAQvC,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEAiCnC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import styled from "styled-components";
2
2
  import { BoxSizingStyle } from "../BoxSizingStyle";
3
+ import { List } from "../List";
3
4
  export const StyledViewSwitcher = styled.div.withConfig({
4
5
  displayName: "Styles__StyledViewSwitcher",
5
6
  componentId: "sc-1cg2mte-0"
@@ -15,19 +16,39 @@ export const StyledViewSwitcherOption = styled.button.withConfig({
15
16
  componentId: "sc-1cg2mte-2"
16
17
  })(["", " display:inline-flex;align-items:center;justify-content:center;width:34px;height:26px;margin:0;padding:0;border:0;border-radius:var(--ac-br-rounded);background-color:transparent;cursor:pointer;outline:none;transition:background-color 150ms ease,box-shadow 150ms ease;svg{width:20px;height:20px;fill:var(--color-theme-700);}&:hover{background-color:color-mix( in srgb,var(--color-theme-900) 16%,transparent );}&[aria-checked=\"true\"]{background-color:var(--page-paper-main);box-shadow:var(--shadow-float);cursor:default;svg{fill:var(--color-theme-900);}}&:focus-visible{box-shadow:0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
17
18
  StyledViewSwitcherOption.displayName = "StyledViewSwitcherOption";
19
+ export const StyledViewSwitcherMenuOption = styled.button.withConfig({
20
+ displayName: "Styles__StyledViewSwitcherMenuOption",
21
+ componentId: "sc-1cg2mte-3"
22
+ })(["", " display:inline-flex;align-items:center;gap:4px;height:26px;margin:0;padding:0 8px 0 12px;border:0;border-radius:var(--ac-br-rounded);background-color:var(--page-paper-main);box-shadow:var(--shadow-float);color:var(--color-theme-900);font-size:calc(13px * var(--text-scale,1));white-space:nowrap;cursor:pointer;outline:none;svg{flex-shrink:0;fill:var(--color-theme-900);}&:has(.c-view-switcher-menu__icon){padding-left:8px;}.c-view-switcher-menu__values{display:inline-grid;}.c-view-switcher-menu__value{display:inline-flex;grid-area:1 / 1;align-items:center;gap:4px;visibility:hidden;}.c-view-switcher-menu__value[data-selected=\"true\"]{visibility:visible;}.c-view-switcher-menu__icon{display:inline-flex;flex-shrink:0;}.c-view-switcher-menu__icon svg{width:20px;height:20px;}&:focus-visible{box-shadow:0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
23
+ StyledViewSwitcherMenuOption.displayName = "StyledViewSwitcherMenuOption";
24
+ export const StyledViewSwitcherMenuIcon = styled.span.withConfig({
25
+ displayName: "Styles__StyledViewSwitcherMenuIcon",
26
+ componentId: "sc-1cg2mte-4"
27
+ })(["display:inline-flex;flex-shrink:0;margin-right:8px;fill:var(--color-theme-900);"]);
28
+ StyledViewSwitcherMenuIcon.displayName = "StyledViewSwitcherMenuIcon";
29
+ export const StyledViewSwitcherMenuList = styled(List).withConfig({
30
+ displayName: "Styles__StyledViewSwitcherMenuList",
31
+ componentId: "sc-1cg2mte-5"
32
+ })(["padding:8px 0;"]);
33
+ StyledViewSwitcherMenuList.displayName = "StyledViewSwitcherMenuList";
34
+ export const StyledViewSwitcherMenuLabel = styled.span.withConfig({
35
+ displayName: "Styles__StyledViewSwitcherMenuLabel",
36
+ componentId: "sc-1cg2mte-6"
37
+ })(["flex:1;&[data-selected=\"true\"]{font-weight:bold;color:var(--color-primary);}"]);
38
+ StyledViewSwitcherMenuLabel.displayName = "StyledViewSwitcherMenuLabel";
18
39
  export const StyledViewSwitcherPreview = styled.div.withConfig({
19
40
  displayName: "Styles__StyledViewSwitcherPreview",
20
- componentId: "sc-1cg2mte-3"
41
+ componentId: "sc-1cg2mte-7"
21
42
  })(["", " display:flex;flex-direction:column;gap:8px;width:180px;padding:10px;border:1px solid var(--border-raised);border-radius:var(--ac-br-8);background-color:var(--input-background-color);box-shadow:var(--shadow-popover);pointer-events:none;"], BoxSizingStyle);
22
43
  StyledViewSwitcherPreview.displayName = "StyledViewSwitcherPreview";
23
44
  export const StyledViewSwitcherThumbnail = styled.div.withConfig({
24
45
  displayName: "Styles__StyledViewSwitcherThumbnail",
25
- componentId: "sc-1cg2mte-4"
46
+ componentId: "sc-1cg2mte-8"
26
47
  })(["", " position:relative;width:100%;height:64px;overflow:hidden;border-radius:var(--ac-br-4);background-color:var(--surface-sheet);"], BoxSizingStyle);
27
48
  StyledViewSwitcherThumbnail.displayName = "StyledViewSwitcherThumbnail";
28
49
  export const StyledViewSwitcherOffer = styled.div.withConfig({
29
50
  displayName: "Styles__StyledViewSwitcherOffer",
30
- componentId: "sc-1cg2mte-5"
51
+ componentId: "sc-1cg2mte-9"
31
52
  })(["", " display:flex;flex-direction:column;gap:8px;width:260px;padding:10px 14px;border:1px solid var(--border-raised);border-radius:var(--ac-br-8);background-color:var(--page-paper-main);box-shadow:var(--shadow-popover);.c-view-switcher__offer-title{display:flex;align-items:center;gap:8px;}.c-view-switcher__offer-title svg{width:18px;height:18px;flex-shrink:0;fill:var(--color-primary);}.c-view-switcher__offer-action{align-self:flex-start;height:28px;padding:0 10px;border-color:var(--border-raised);border-radius:var(--ac-br-6);color:var(--color-theme-700);}"], BoxSizingStyle);
32
53
  StyledViewSwitcherOffer.displayName = "StyledViewSwitcherOffer";
33
54
  //# sourceMappingURL=Styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["styled","BoxSizingStyle","StyledViewSwitcher","div","withConfig","displayName","componentId","StyledViewSwitcherTrack","StyledViewSwitcherOption","button","StyledViewSwitcherPreview","StyledViewSwitcherThumbnail","StyledViewSwitcherOffer"],"sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\n\nexport const StyledViewSwitcher = styled.div`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n`;\n\nStyledViewSwitcher.displayName = \"StyledViewSwitcher\";\n\nexport const StyledViewSwitcherTrack = styled.div`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n height: 32px;\n padding: 3px;\n border-radius: var(--ac-br-rounded);\n background-color: var(--color-theme-300);\n`;\n\nStyledViewSwitcherTrack.displayName = \"StyledViewSwitcherTrack\";\n\nexport const StyledViewSwitcherOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 26px;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: transparent;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n\n svg {\n width: 20px;\n height: 20px;\n fill: var(--color-theme-700);\n }\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-theme-900) 16%,\n transparent\n );\n }\n\n &[aria-checked=\"true\"] {\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n cursor: default;\n\n svg {\n fill: var(--color-theme-900);\n }\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherOption.displayName = \"StyledViewSwitcherOption\";\n\nexport const StyledViewSwitcherPreview = styled.div`\n ${BoxSizingStyle}\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 180px;\n padding: 10px;\n border: 1px solid var(--border-raised);\n border-radius: var(--ac-br-8);\n background-color: var(--input-background-color);\n box-shadow: var(--shadow-popover);\n pointer-events: none;\n`;\n\nStyledViewSwitcherPreview.displayName = \"StyledViewSwitcherPreview\";\n\nexport const StyledViewSwitcherThumbnail = styled.div`\n ${BoxSizingStyle}\n position: relative;\n width: 100%;\n height: 64px;\n overflow: hidden;\n border-radius: var(--ac-br-4);\n background-color: var(--surface-sheet);\n`;\n\nStyledViewSwitcherThumbnail.displayName = \"StyledViewSwitcherThumbnail\";\n\nexport const StyledViewSwitcherOffer = styled.div`\n ${BoxSizingStyle}\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 260px;\n padding: 10px 14px;\n border: 1px solid var(--border-raised);\n border-radius: var(--ac-br-8);\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-popover);\n\n .c-view-switcher__offer-title {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .c-view-switcher__offer-title svg {\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n fill: var(--color-primary);\n }\n\n .c-view-switcher__offer-action {\n align-self: flex-start;\n height: 28px;\n padding: 0 10px;\n border-color: var(--border-raised);\n border-radius: var(--ac-br-6);\n color: var(--color-theme-700);\n }\n`;\n\nStyledViewSwitcherOffer.displayName = \"StyledViewSwitcherOffer\";\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,OAAO,MAAMC,kBAAkB,GAAGF,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gDACxCL,cAAc,CAGjB;AAEDC,kBAAkB,CAACG,WAAW,GAAG,oBAAoB;AAErD,OAAO,MAAME,uBAAuB,GAAGP,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wJAC7CL,cAAc,CAOjB;AAEDM,uBAAuB,CAACF,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAMG,wBAAwB,GAAGR,MAAM,CAACS,MAAM,CAAAL,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,knBACjDL,cAAc,CA0CjB;AAEDO,wBAAwB,CAACH,WAAW,GAAG,0BAA0B;AAEjE,OAAO,MAAMK,yBAAyB,GAAGV,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yPAC/CL,cAAc,CAWjB;AAEDS,yBAAyB,CAACL,WAAW,GAAG,2BAA2B;AAEnE,OAAO,MAAMM,2BAA2B,GAAGX,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0IACjDL,cAAc,CAOjB;AAEDU,2BAA2B,CAACN,WAAW,GAAG,6BAA6B;AAEvE,OAAO,MAAMO,uBAAuB,GAAGZ,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yjBAC7CL,cAAc,CAgCjB;AAEDW,uBAAuB,CAACP,WAAW,GAAG,yBAAyB","ignoreList":[]}
1
+ {"version":3,"file":"Styles.js","names":["styled","BoxSizingStyle","List","StyledViewSwitcher","div","withConfig","displayName","componentId","StyledViewSwitcherTrack","StyledViewSwitcherOption","button","StyledViewSwitcherMenuOption","StyledViewSwitcherMenuIcon","span","StyledViewSwitcherMenuList","StyledViewSwitcherMenuLabel","StyledViewSwitcherPreview","StyledViewSwitcherThumbnail","StyledViewSwitcherOffer"],"sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { List } from \"../List\";\n\nexport const StyledViewSwitcher = styled.div`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n`;\n\nStyledViewSwitcher.displayName = \"StyledViewSwitcher\";\n\nexport const StyledViewSwitcherTrack = styled.div`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n height: 32px;\n padding: 3px;\n border-radius: var(--ac-br-rounded);\n background-color: var(--color-theme-300);\n`;\n\nStyledViewSwitcherTrack.displayName = \"StyledViewSwitcherTrack\";\n\nexport const StyledViewSwitcherOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 26px;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: transparent;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n\n svg {\n width: 20px;\n height: 20px;\n fill: var(--color-theme-700);\n }\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-theme-900) 16%,\n transparent\n );\n }\n\n &[aria-checked=\"true\"] {\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n cursor: default;\n\n svg {\n fill: var(--color-theme-900);\n }\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherOption.displayName = \"StyledViewSwitcherOption\";\n\nexport const StyledViewSwitcherMenuOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 26px;\n margin: 0;\n padding: 0 8px 0 12px;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n color: var(--color-theme-900);\n font-size: calc(13px * var(--text-scale, 1));\n white-space: nowrap;\n cursor: pointer;\n outline: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-900);\n }\n\n &:has(.c-view-switcher-menu__icon) {\n padding-left: 8px;\n }\n\n .c-view-switcher-menu__values {\n display: inline-grid;\n }\n\n .c-view-switcher-menu__value {\n display: inline-flex;\n grid-area: 1 / 1;\n align-items: center;\n gap: 4px;\n visibility: hidden;\n }\n\n .c-view-switcher-menu__value[data-selected=\"true\"] {\n visibility: visible;\n }\n\n .c-view-switcher-menu__icon {\n display: inline-flex;\n flex-shrink: 0;\n }\n\n .c-view-switcher-menu__icon svg {\n width: 20px;\n height: 20px;\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherMenuOption.displayName = \"StyledViewSwitcherMenuOption\";\n\nexport const StyledViewSwitcherMenuIcon = styled.span`\n display: inline-flex;\n flex-shrink: 0;\n margin-right: 8px;\n fill: var(--color-theme-900);\n`;\n\nStyledViewSwitcherMenuIcon.displayName = \"StyledViewSwitcherMenuIcon\";\n\nexport const StyledViewSwitcherMenuList = styled(List)`\n padding: 8px 0;\n`;\n\nStyledViewSwitcherMenuList.displayName = \"StyledViewSwitcherMenuList\";\n\nexport const StyledViewSwitcherMenuLabel = styled.span`\n flex: 1;\n\n &[data-selected=\"true\"] {\n font-weight: bold;\n color: var(--color-primary);\n }\n`;\n\nStyledViewSwitcherMenuLabel.displayName = \"StyledViewSwitcherMenuLabel\";\n\nexport const StyledViewSwitcherPreview = styled.div`\n ${BoxSizingStyle}\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 180px;\n padding: 10px;\n border: 1px solid var(--border-raised);\n border-radius: var(--ac-br-8);\n background-color: var(--input-background-color);\n box-shadow: var(--shadow-popover);\n pointer-events: none;\n`;\n\nStyledViewSwitcherPreview.displayName = \"StyledViewSwitcherPreview\";\n\nexport const StyledViewSwitcherThumbnail = styled.div`\n ${BoxSizingStyle}\n position: relative;\n width: 100%;\n height: 64px;\n overflow: hidden;\n border-radius: var(--ac-br-4);\n background-color: var(--surface-sheet);\n`;\n\nStyledViewSwitcherThumbnail.displayName = \"StyledViewSwitcherThumbnail\";\n\nexport const StyledViewSwitcherOffer = styled.div`\n ${BoxSizingStyle}\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 260px;\n padding: 10px 14px;\n border: 1px solid var(--border-raised);\n border-radius: var(--ac-br-8);\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-popover);\n\n .c-view-switcher__offer-title {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .c-view-switcher__offer-title svg {\n width: 18px;\n height: 18px;\n flex-shrink: 0;\n fill: var(--color-primary);\n }\n\n .c-view-switcher__offer-action {\n align-self: flex-start;\n height: 28px;\n padding: 0 10px;\n border-color: var(--border-raised);\n border-radius: var(--ac-br-6);\n color: var(--color-theme-700);\n }\n`;\n\nStyledViewSwitcherOffer.displayName = \"StyledViewSwitcherOffer\";\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,IAAI,QAAQ,SAAS;AAE9B,OAAO,MAAMC,kBAAkB,GAAGH,MAAM,CAACI,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gDACxCN,cAAc,CAGjB;AAEDE,kBAAkB,CAACG,WAAW,GAAG,oBAAoB;AAErD,OAAO,MAAME,uBAAuB,GAAGR,MAAM,CAACI,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wJAC7CN,cAAc,CAOjB;AAEDO,uBAAuB,CAACF,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAMG,wBAAwB,GA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,CAACZ,WAAW,GAAG,yBAAyB","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ import React, { HTMLAttributes, ReactNode } from "react";
2
+ export interface ViewSwitcherMenuOption {
3
+ id: string;
4
+ label: string;
5
+ /** DS icon element. */
6
+ icon?: ReactNode;
7
+ }
8
+ export interface ViewSwitcherMenuProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
9
+ options: ViewSwitcherMenuOption[];
10
+ /** Id of the selected option. */
11
+ value?: string;
12
+ onChange: (id: string) => void;
13
+ /** Accessible name of the trigger. The selected option follows it. */
14
+ "aria-label"?: string;
15
+ }
16
+ /**
17
+ * @component ViewSwitcherMenu
18
+ * @description
19
+ * Second level of a ViewSwitcher: a dropdown with the look of the checked ViewSwitcher option. It
20
+ * shows the icon and the name of the selected option and lists all options with their icons. Its width
21
+ * fits the widest option, so a new selection does not move the controls around it.
22
+ *
23
+ * @example
24
+ * <ViewSwitcherMenu
25
+ * aria-label="Group by"
26
+ * options={[
27
+ * { id: "start_date", label: "Start Date", icon: <ClockIcon /> },
28
+ * { id: "date", label: "Due Date", icon: <CalendarIcon /> },
29
+ * ]}
30
+ * value={view}
31
+ * onChange={setView}
32
+ * />
33
+ */
34
+ export declare const ViewSwitcherMenu: React.ForwardRefExoticComponent<ViewSwitcherMenuProps & React.RefAttributes<HTMLDivElement>>;
35
+ //# sourceMappingURL=ViewSwitcherMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewSwitcherMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/ViewSwitcherMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,cAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAgB/E,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxD,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,8FAuF5B,CAAC"}