@12-apps/ui 6.93.0 → 6.93.1

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 (243) hide show
  1. package/components-catalog.md +9 -2
  2. package/components-guidelines.md +30 -0
  3. package/dist/_internal/components/data-display/AlertDialog/AlertDialog.js +2 -2
  4. package/dist/_internal/components/data-display/AlertDialog/AlertDialog.parts.js +9 -3
  5. package/dist/_internal/components/data-display/Avatar/Avatar.js +2 -2
  6. package/dist/_internal/components/data-display/Badge/Badge.js +2 -2
  7. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +7 -7
  8. package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +7 -7
  9. package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
  10. package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
  11. package/dist/_internal/components/data-display/Chart/SpecChart.js +7 -7
  12. package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
  13. package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
  14. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +31 -31
  15. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +42 -42
  16. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +7 -7
  17. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +2 -2
  18. package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +2 -2
  19. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +2 -2
  20. package/dist/_internal/components/data-display/DataViews/base-list-card.js +5 -5
  21. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +3 -3
  22. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +6 -6
  23. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +5 -5
  24. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +26 -26
  25. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +8 -8
  26. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +6 -6
  27. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +7 -7
  28. package/dist/_internal/components/data-display/DataViews/data-views-range-bounds.js +3 -3
  29. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +5 -5
  30. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +2 -2
  31. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +7 -7
  32. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +8 -8
  33. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +6 -6
  34. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +2 -2
  35. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
  36. package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.js +25 -0
  37. package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.js.map +1 -0
  38. package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.styles.js +23 -0
  39. package/dist/_internal/components/data-display/DayRuler/DayRuler.footer.styles.js.map +1 -0
  40. package/dist/_internal/components/data-display/DayRuler/DayRuler.js +14 -12
  41. package/dist/_internal/components/data-display/DayRuler/DayRuler.keyboard.js +3 -3
  42. package/dist/_internal/components/data-display/DayRuler/DayRuler.metrics.js +1 -1
  43. package/dist/_internal/components/data-display/DayRuler/DayRuler.parts.js +12 -15
  44. package/dist/_internal/components/data-display/DayRuler/DayRuler.styles.js +3 -11
  45. package/dist/_internal/components/data-display/DayRuler/day-ruler-model.js +5 -1
  46. package/dist/_internal/components/data-display/DayRuler/useRulerDrag.js +3 -3
  47. package/dist/_internal/components/data-display/DayRuler/useTextFits.js +4 -3
  48. package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.js +6 -6
  49. package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.parts.js +5 -5
  50. package/dist/_internal/components/data-display/ScheduleGrid/ScheduleGrid.styles.js +2 -2
  51. package/dist/_internal/components/data-display/ScheduleGrid/ScheduleNameCell.js +3 -3
  52. package/dist/_internal/components/data-display/ScheduleGrid/schedule-name.styles.js +2 -2
  53. package/dist/_internal/components/data-display/ScheduleGrid/schedule-tones.js +3 -1
  54. package/dist/_internal/components/data-display/index.js +38 -36
  55. package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +4 -4
  56. package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.parts.js +3 -3
  57. package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
  58. package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +4 -4
  59. package/dist/_internal/components/feedback/index.js +6 -6
  60. package/dist/_internal/components/index.js +49 -47
  61. package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +6 -6
  62. package/dist/_internal/components/navigation/SectionNav/SectionNav.js +9 -9
  63. package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
  64. package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +4 -4
  65. package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +5 -5
  66. package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +4 -4
  67. package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +4 -4
  68. package/dist/_internal/components/navigation/index.js +9 -9
  69. package/dist/_internal/user-avatar/user-avatar.js +3 -3
  70. package/dist/charts.js +13 -13
  71. package/dist/{chunk-LDCZPZPD.js → chunk-24HHUCWB.js} +2 -2
  72. package/dist/{chunk-7ZQ3KQ7J.js → chunk-273OLFJD.js} +16 -6
  73. package/dist/chunk-273OLFJD.js.map +1 -0
  74. package/dist/{chunk-FAUNQ3FS.js → chunk-2M3W6ACW.js} +3 -3
  75. package/dist/{chunk-ALOEOGQV.js → chunk-3TZUZXY5.js} +2 -2
  76. package/dist/{chunk-4HK4FVMV.js → chunk-3UAHDLKH.js} +7 -1
  77. package/dist/{chunk-4HK4FVMV.js.map → chunk-3UAHDLKH.js.map} +1 -1
  78. package/dist/{chunk-F5H3WDG7.js → chunk-4E2RQOSQ.js} +2 -2
  79. package/dist/{chunk-JIEVKHOH.js → chunk-4J62V5OE.js} +6 -6
  80. package/dist/{chunk-OJZLFFG4.js → chunk-5AZEDQXX.js} +59 -70
  81. package/dist/chunk-5AZEDQXX.js.map +1 -0
  82. package/dist/{chunk-CZVAVX5L.js → chunk-6ATXOJVQ.js} +2 -2
  83. package/dist/{chunk-E2UOEI7N.js → chunk-6LGKJVOA.js} +2 -2
  84. package/dist/{chunk-XBWW3QSI.js → chunk-7WE432RQ.js} +9 -9
  85. package/dist/{chunk-5357QUVE.js → chunk-AMLHEKSV.js} +5 -5
  86. package/dist/{chunk-HSVSU7I2.js → chunk-ASEHJIIV.js} +3 -3
  87. package/dist/{chunk-FYUNROLW.js → chunk-BZYLTGOE.js} +2 -2
  88. package/dist/{chunk-TZ44F6W7.js → chunk-CGS2LQE5.js} +2 -2
  89. package/dist/{chunk-KPUUHAK6.js → chunk-CWXX5JR3.js} +11 -9
  90. package/dist/chunk-CWXX5JR3.js.map +1 -0
  91. package/dist/{chunk-6HXNFNOB.js → chunk-EE6DJPB7.js} +4 -4
  92. package/dist/{chunk-OM6ZT64U.js → chunk-F2UP5ZF4.js} +3 -3
  93. package/dist/{chunk-P53ANKZV.js → chunk-F7LBTMCA.js} +4 -4
  94. package/dist/{chunk-6HPVCDVU.js → chunk-FGZIEZEP.js} +69 -112
  95. package/dist/chunk-FGZIEZEP.js.map +1 -0
  96. package/dist/{chunk-IWSTMVCA.js → chunk-FKS2PNJF.js} +8 -8
  97. package/dist/{chunk-3WYEENUH.js → chunk-FPNVOB52.js} +7 -7
  98. package/dist/{chunk-E73C73UD.js → chunk-FYSS2PYA.js} +3 -3
  99. package/dist/{chunk-N557OEZR.js → chunk-G6NMSBSQ.js} +2 -2
  100. package/dist/{chunk-A5OERY43.js → chunk-GARM5SX6.js} +2 -2
  101. package/dist/{chunk-WJMSND5Q.js → chunk-GXGHEOWC.js} +2 -2
  102. package/dist/{chunk-U2SAW6DH.js → chunk-GY53SDVL.js} +4 -4
  103. package/dist/{chunk-MFX4ASX5.js → chunk-HWZETMO4.js} +3 -3
  104. package/dist/{chunk-MM3QESLI.js → chunk-ILJ3FXIC.js} +2 -2
  105. package/dist/{chunk-K6VEN5VN.js → chunk-K3PMMW23.js} +4 -4
  106. package/dist/{chunk-T5RFH2T5.js → chunk-KOGJBAFI.js} +2 -2
  107. package/dist/{chunk-COK65GX2.js → chunk-KURE5R7Z.js} +12 -2
  108. package/dist/chunk-KURE5R7Z.js.map +1 -0
  109. package/dist/{chunk-MAYAJXO6.js → chunk-KXDLLS62.js} +5 -5
  110. package/dist/{chunk-LE5JYNR7.js → chunk-L5CAHQIN.js} +23 -2
  111. package/dist/chunk-L5CAHQIN.js.map +1 -0
  112. package/dist/{chunk-DBI6AMNY.js → chunk-LKWXU6NH.js} +4 -4
  113. package/dist/chunk-MPVH2GM5.js +83 -0
  114. package/dist/chunk-MPVH2GM5.js.map +1 -0
  115. package/dist/{chunk-6DO672AG.js → chunk-N5PVD4J5.js} +7 -7
  116. package/dist/{chunk-ZYZPSBNQ.js → chunk-OGSTMHT6.js} +22 -7
  117. package/dist/chunk-OGSTMHT6.js.map +1 -0
  118. package/dist/{chunk-R52N5UCS.js → chunk-SB2SEGR6.js} +2 -2
  119. package/dist/{chunk-Z2WZDVGG.js → chunk-SI5SKX52.js} +2 -2
  120. package/dist/{chunk-RYJ6XGFA.js → chunk-SJAOQGQI.js} +2 -2
  121. package/dist/{chunk-D7R6SRJB.js → chunk-SKQPUAMK.js} +3 -3
  122. package/dist/{chunk-AMIUZRDQ.js → chunk-SNWCT6JN.js} +3 -3
  123. package/dist/{chunk-7W5X3KQ2.js → chunk-SW7JCF4Z.js} +2 -2
  124. package/dist/{chunk-BNBWUXT3.js → chunk-TE6HAWDM.js} +2 -2
  125. package/dist/{chunk-JG733RMP.js → chunk-TZC6KIK2.js} +5 -5
  126. package/dist/{chunk-4QGKR65P.js → chunk-U4Z6GZDW.js} +5 -5
  127. package/dist/{chunk-XFZDO2KB.js → chunk-UIIHUWOV.js} +13 -13
  128. package/dist/{chunk-L4V7FZJI.js → chunk-UKUGSU3Y.js} +2 -2
  129. package/dist/{chunk-VJIJCLUX.js → chunk-UOKXYV3U.js} +2 -2
  130. package/dist/{chunk-K7IDOTSU.js → chunk-VNMD6BA4.js} +2 -2
  131. package/dist/chunk-WG7CAT5D.js +65 -0
  132. package/dist/chunk-WG7CAT5D.js.map +1 -0
  133. package/dist/chunk-WSSD7H5E.js +52 -0
  134. package/dist/chunk-WSSD7H5E.js.map +1 -0
  135. package/dist/{chunk-DTZOP4ZR.js → chunk-XCUHGPPZ.js} +2 -2
  136. package/dist/{chunk-3YFDGFEK.js → chunk-Y7BOP7VZ.js} +2 -2
  137. package/dist/{chunk-XNAI7QGU.js → chunk-ZM6FJCWS.js} +4 -4
  138. package/dist/{chunk-FC7UCFFA.js → chunk-ZPWPA6FR.js} +8 -8
  139. package/dist/data-display/AlertDialog.js +2 -2
  140. package/dist/data-display/Avatar.js +2 -2
  141. package/dist/data-display/Badge.js +2 -2
  142. package/dist/data-display/CardKit.js +10 -10
  143. package/dist/data-display/Carousel.js +3 -3
  144. package/dist/data-display/Chart.js +13 -13
  145. package/dist/data-display/DataViews.js +56 -56
  146. package/dist/data-display/DayRuler.js +14 -12
  147. package/dist/data-display/ScheduleGrid.js +6 -6
  148. package/dist/feedback/ConfirmAction.js +6 -6
  149. package/dist/navigation/SectionNav.js +9 -9
  150. package/dist/types/components/data-display/AlertDialog/AlertDialog.d.ts.map +1 -1
  151. package/dist/types/components/data-display/AlertDialog/AlertDialog.parts.d.ts +11 -0
  152. package/dist/types/components/data-display/AlertDialog/AlertDialog.parts.d.ts.map +1 -1
  153. package/dist/types/components/data-display/DayRuler/DayRuler.d.ts.map +1 -1
  154. package/dist/types/components/data-display/DayRuler/DayRuler.footer.d.ts +16 -0
  155. package/dist/types/components/data-display/DayRuler/DayRuler.footer.d.ts.map +1 -0
  156. package/dist/types/components/data-display/DayRuler/DayRuler.footer.styles.d.ts +18 -0
  157. package/dist/types/components/data-display/DayRuler/DayRuler.footer.styles.d.ts.map +1 -0
  158. package/dist/types/components/data-display/DayRuler/DayRuler.metrics.d.ts +15 -5
  159. package/dist/types/components/data-display/DayRuler/DayRuler.metrics.d.ts.map +1 -1
  160. package/dist/types/components/data-display/DayRuler/DayRuler.parts.d.ts +13 -14
  161. package/dist/types/components/data-display/DayRuler/DayRuler.parts.d.ts.map +1 -1
  162. package/dist/types/components/data-display/DayRuler/DayRuler.styles.d.ts +20 -23
  163. package/dist/types/components/data-display/DayRuler/DayRuler.styles.d.ts.map +1 -1
  164. package/dist/types/components/data-display/DayRuler/DayRuler.types.d.ts +13 -3
  165. package/dist/types/components/data-display/DayRuler/DayRuler.types.d.ts.map +1 -1
  166. package/dist/types/components/data-display/DayRuler/day-ruler-model.d.ts +27 -0
  167. package/dist/types/components/data-display/DayRuler/day-ruler-model.d.ts.map +1 -1
  168. package/dist/types/components/data-display/DayRuler/useTextFits.d.ts +11 -9
  169. package/dist/types/components/data-display/DayRuler/useTextFits.d.ts.map +1 -1
  170. package/dist/types/components/data-display/ScheduleGrid/schedule-tones.d.ts +8 -0
  171. package/dist/types/components/data-display/ScheduleGrid/schedule-tones.d.ts.map +1 -1
  172. package/dist/user-avatar.js +3 -3
  173. package/package.json +1 -1
  174. package/src/components/data-display/AlertDialog/AlertDialog.md +25 -1
  175. package/src/components/data-display/AlertDialog/AlertDialog.parts.tsx +28 -0
  176. package/src/components/data-display/AlertDialog/AlertDialog.tsx +34 -5
  177. package/src/components/data-display/DayRuler/DayRuler.footer.styles.ts +54 -0
  178. package/src/components/data-display/DayRuler/DayRuler.footer.tsx +123 -0
  179. package/src/components/data-display/DayRuler/DayRuler.md +37 -13
  180. package/src/components/data-display/DayRuler/DayRuler.metrics.ts +15 -5
  181. package/src/components/data-display/DayRuler/DayRuler.parts.tsx +86 -155
  182. package/src/components/data-display/DayRuler/DayRuler.styles.ts +89 -83
  183. package/src/components/data-display/DayRuler/DayRuler.tsx +3 -2
  184. package/src/components/data-display/DayRuler/DayRuler.types.ts +13 -3
  185. package/src/components/data-display/DayRuler/day-ruler-model.ts +45 -0
  186. package/src/components/data-display/DayRuler/useTextFits.ts +68 -25
  187. package/src/components/data-display/ScheduleGrid/schedule-tones.ts +13 -0
  188. package/src/components/feedback/ConfirmAction/ConfirmAction.md +10 -0
  189. package/dist/chunk-6HPVCDVU.js.map +0 -1
  190. package/dist/chunk-7ZQ3KQ7J.js.map +0 -1
  191. package/dist/chunk-COK65GX2.js.map +0 -1
  192. package/dist/chunk-KPUUHAK6.js.map +0 -1
  193. package/dist/chunk-LE5JYNR7.js.map +0 -1
  194. package/dist/chunk-OJZLFFG4.js.map +0 -1
  195. package/dist/chunk-YMYJO2CZ.js +0 -32
  196. package/dist/chunk-YMYJO2CZ.js.map +0 -1
  197. package/dist/chunk-ZYZPSBNQ.js.map +0 -1
  198. /package/dist/{chunk-LDCZPZPD.js.map → chunk-24HHUCWB.js.map} +0 -0
  199. /package/dist/{chunk-FAUNQ3FS.js.map → chunk-2M3W6ACW.js.map} +0 -0
  200. /package/dist/{chunk-ALOEOGQV.js.map → chunk-3TZUZXY5.js.map} +0 -0
  201. /package/dist/{chunk-F5H3WDG7.js.map → chunk-4E2RQOSQ.js.map} +0 -0
  202. /package/dist/{chunk-JIEVKHOH.js.map → chunk-4J62V5OE.js.map} +0 -0
  203. /package/dist/{chunk-CZVAVX5L.js.map → chunk-6ATXOJVQ.js.map} +0 -0
  204. /package/dist/{chunk-E2UOEI7N.js.map → chunk-6LGKJVOA.js.map} +0 -0
  205. /package/dist/{chunk-XBWW3QSI.js.map → chunk-7WE432RQ.js.map} +0 -0
  206. /package/dist/{chunk-5357QUVE.js.map → chunk-AMLHEKSV.js.map} +0 -0
  207. /package/dist/{chunk-HSVSU7I2.js.map → chunk-ASEHJIIV.js.map} +0 -0
  208. /package/dist/{chunk-FYUNROLW.js.map → chunk-BZYLTGOE.js.map} +0 -0
  209. /package/dist/{chunk-TZ44F6W7.js.map → chunk-CGS2LQE5.js.map} +0 -0
  210. /package/dist/{chunk-6HXNFNOB.js.map → chunk-EE6DJPB7.js.map} +0 -0
  211. /package/dist/{chunk-OM6ZT64U.js.map → chunk-F2UP5ZF4.js.map} +0 -0
  212. /package/dist/{chunk-P53ANKZV.js.map → chunk-F7LBTMCA.js.map} +0 -0
  213. /package/dist/{chunk-IWSTMVCA.js.map → chunk-FKS2PNJF.js.map} +0 -0
  214. /package/dist/{chunk-3WYEENUH.js.map → chunk-FPNVOB52.js.map} +0 -0
  215. /package/dist/{chunk-E73C73UD.js.map → chunk-FYSS2PYA.js.map} +0 -0
  216. /package/dist/{chunk-N557OEZR.js.map → chunk-G6NMSBSQ.js.map} +0 -0
  217. /package/dist/{chunk-A5OERY43.js.map → chunk-GARM5SX6.js.map} +0 -0
  218. /package/dist/{chunk-WJMSND5Q.js.map → chunk-GXGHEOWC.js.map} +0 -0
  219. /package/dist/{chunk-U2SAW6DH.js.map → chunk-GY53SDVL.js.map} +0 -0
  220. /package/dist/{chunk-MFX4ASX5.js.map → chunk-HWZETMO4.js.map} +0 -0
  221. /package/dist/{chunk-MM3QESLI.js.map → chunk-ILJ3FXIC.js.map} +0 -0
  222. /package/dist/{chunk-K6VEN5VN.js.map → chunk-K3PMMW23.js.map} +0 -0
  223. /package/dist/{chunk-T5RFH2T5.js.map → chunk-KOGJBAFI.js.map} +0 -0
  224. /package/dist/{chunk-MAYAJXO6.js.map → chunk-KXDLLS62.js.map} +0 -0
  225. /package/dist/{chunk-DBI6AMNY.js.map → chunk-LKWXU6NH.js.map} +0 -0
  226. /package/dist/{chunk-6DO672AG.js.map → chunk-N5PVD4J5.js.map} +0 -0
  227. /package/dist/{chunk-R52N5UCS.js.map → chunk-SB2SEGR6.js.map} +0 -0
  228. /package/dist/{chunk-Z2WZDVGG.js.map → chunk-SI5SKX52.js.map} +0 -0
  229. /package/dist/{chunk-RYJ6XGFA.js.map → chunk-SJAOQGQI.js.map} +0 -0
  230. /package/dist/{chunk-D7R6SRJB.js.map → chunk-SKQPUAMK.js.map} +0 -0
  231. /package/dist/{chunk-AMIUZRDQ.js.map → chunk-SNWCT6JN.js.map} +0 -0
  232. /package/dist/{chunk-7W5X3KQ2.js.map → chunk-SW7JCF4Z.js.map} +0 -0
  233. /package/dist/{chunk-BNBWUXT3.js.map → chunk-TE6HAWDM.js.map} +0 -0
  234. /package/dist/{chunk-JG733RMP.js.map → chunk-TZC6KIK2.js.map} +0 -0
  235. /package/dist/{chunk-4QGKR65P.js.map → chunk-U4Z6GZDW.js.map} +0 -0
  236. /package/dist/{chunk-XFZDO2KB.js.map → chunk-UIIHUWOV.js.map} +0 -0
  237. /package/dist/{chunk-L4V7FZJI.js.map → chunk-UKUGSU3Y.js.map} +0 -0
  238. /package/dist/{chunk-VJIJCLUX.js.map → chunk-UOKXYV3U.js.map} +0 -0
  239. /package/dist/{chunk-K7IDOTSU.js.map → chunk-VNMD6BA4.js.map} +0 -0
  240. /package/dist/{chunk-DTZOP4ZR.js.map → chunk-XCUHGPPZ.js.map} +0 -0
  241. /package/dist/{chunk-3YFDGFEK.js.map → chunk-Y7BOP7VZ.js.map} +0 -0
  242. /package/dist/{chunk-XNAI7QGU.js.map → chunk-ZM6FJCWS.js.map} +0 -0
  243. /package/dist/{chunk-FC7UCFFA.js.map → chunk-ZPWPA6FR.js.map} +0 -0
@@ -8,39 +8,34 @@ import {
8
8
  coverageCellSx,
9
9
  coverageLabelSx,
10
10
  coverageSx,
11
- footerCellSx,
12
- footerNoteSx,
13
11
  handleSx,
14
12
  lineSx,
15
13
  nowSx,
16
14
  rowSx,
17
15
  trackSx,
18
- trendSx,
19
16
  whoSx
20
- } from "./chunk-OJZLFFG4.js";
17
+ } from "./chunk-5AZEDQXX.js";
21
18
  import {
22
- useTextFits
23
- } from "./chunk-YMYJO2CZ.js";
19
+ useTextFit
20
+ } from "./chunk-WG7CAT5D.js";
21
+ import {
22
+ DAY_RULER_METRICS
23
+ } from "./chunk-273OLFJD.js";
24
24
  import {
25
25
  formatHour,
26
26
  formatRange,
27
+ hitBoundsOf,
27
28
  percentOf,
28
29
  ticksOf
29
- } from "./chunk-LE5JYNR7.js";
30
- import {
31
- DAY_RULER_METRICS
32
- } from "./chunk-7ZQ3KQ7J.js";
33
- import {
34
- SR_ONLY_SX
35
- } from "./chunk-RYJ6XGFA.js";
30
+ } from "./chunk-L5CAHQIN.js";
36
31
  import {
37
32
  ScheduleNameCell
38
- } from "./chunk-TZ44F6W7.js";
33
+ } from "./chunk-CGS2LQE5.js";
39
34
 
40
35
  // src/components/data-display/DayRuler/DayRuler.parts.tsx
41
36
  import Box from "@mui/material/Box/index.js";
42
- import { useRef } from "react";
43
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
37
+ import { Fragment, isValidElement, useRef } from "react";
38
+ import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
44
39
  var spanOf = (start, end, scale) => {
45
40
  const at = percentOf(start, scale.from, scale.to);
46
41
  return { at, share: Math.max(0, percentOf(end, scale.from, scale.to) - at) };
@@ -70,24 +65,31 @@ function BreakBand({ block, at, testId }) {
70
65
  if (!gap) return null;
71
66
  return /* @__PURE__ */ jsx(Box, { component: "span", "aria-hidden": true, sx: breakSx(gap), "data-dr-break": "", "data-testid": testId });
72
67
  }
73
- function RulerBlock({ row, block, span, at, text, ctx, testId }) {
68
+ function fallbackFit(block, scale) {
69
+ return (block.end - block.start) / (scale.to - scale.from) >= DAY_RULER_METRICS.narrowShare ? "full" : "short";
70
+ }
71
+ function fitProps(fit, text) {
72
+ return fit === "full" ? {} : { "aria-label": text, "data-fit": fit };
73
+ }
74
+ function RulerBlock({ row, block, span, at, hit, text, ctx, testId }) {
74
75
  const { can, dragApi, scale } = ctx;
75
76
  const movable = can.move && Boolean(block.movable);
76
77
  const resizable = can.resize && Boolean(block.resizable);
77
78
  const ref = useRef(null);
78
- const fits = useTextFits(ref, text, (block.end - block.start) / (scale.to - scale.from) >= DAY_RULER_METRICS.narrowShare);
79
+ const short = block.shortLabel ?? text;
80
+ const fit = useTextFit(ref, text, short, fallbackFit(block, scale));
79
81
  const press = (mode) => (event) => dragApi.startBlock(event, row.id, block, mode);
80
82
  return /* @__PURE__ */ jsxs(
81
83
  Box,
82
84
  {
83
85
  component: "button",
84
86
  type: "button",
85
- sx: blockSx(block.tone, span, { selected: Boolean(block.selected), movable }),
87
+ sx: blockSx(block.tone, span, { selected: Boolean(block.selected), movable, hit }),
86
88
  title: block.title ?? block.label,
89
+ ...fitProps(fit, text),
87
90
  "aria-keyshortcuts": shortcutsOf(movable, resizable),
88
91
  "aria-current": block.selected ? "true" : void 0,
89
92
  ref,
90
- "data-narrow": fits ? void 0 : "",
91
93
  "data-tone": block.tone,
92
94
  "data-testid": testId,
93
95
  onPointerDown: movable ? press("move") : void 0,
@@ -99,7 +101,7 @@ function RulerBlock({ row, block, span, at, text, ctx, testId }) {
99
101
  /* @__PURE__ */ jsx(BreakBand, { block, at, testId: `${ctx.testId}-break-${block.id}` }),
100
102
  resizable ? /* @__PURE__ */ jsx(Handle, { side: "l", onPointerDown: press("start"), testId: `${ctx.testId}-handle-l-${block.id}` }) : null,
101
103
  /* @__PURE__ */ jsx("span", { "data-dr-text": "full", title: text, children: text }),
102
- /* @__PURE__ */ jsx("span", { "data-dr-text": "short", title: text, children: block.shortLabel ?? text }),
104
+ /* @__PURE__ */ jsx("span", { "data-dr-text": "short", title: text, children: short }),
103
105
  resizable ? /* @__PURE__ */ jsx(Handle, { side: "r", onPointerDown: press("end"), testId: `${ctx.testId}-handle-r-${block.id}` }) : null
104
106
  ]
105
107
  }
@@ -107,37 +109,46 @@ function RulerBlock({ row, block, span, at, text, ctx, testId }) {
107
109
  }
108
110
  function Blocks({ row, ctx }) {
109
111
  const mine = ctx.drag && ctx.drag.rowId === row.id ? ctx.drag : null;
110
- return /* @__PURE__ */ jsxs(Fragment, { children: [
111
- row.blocks.map((block) => {
112
- const live = mine?.blockId === block.id ? mine : null;
113
- const start = live ? live.start : block.start;
114
- const end = live ? live.end : block.end;
115
- return /* @__PURE__ */ jsx(
116
- RulerBlock,
117
- {
118
- row,
119
- block,
120
- span: spanOf(start, end, ctx.scale),
121
- at: { start, end },
122
- text: live?.moved ? formatRange(start, end) : block.label,
123
- ctx,
124
- testId: `${ctx.testId}-block-${block.id}`
125
- },
126
- block.id
127
- );
128
- }),
129
- mine && mine.mode === "create" ? /* @__PURE__ */ jsx(CreatePreview, { row, drag: mine, ctx }) : null
112
+ const drawn = row.blocks.map((block) => {
113
+ const live = mine?.blockId === block.id ? mine : null;
114
+ const start = live ? live.start : block.start;
115
+ const end = live ? live.end : block.end;
116
+ return { block, live, start, end, span: spanOf(start, end, ctx.scale) };
117
+ });
118
+ const preview = mine && mine.mode === "create" ? previewSpan(mine, ctx.scale) : null;
119
+ const hits = hitBoundsOf([...drawn.map((d) => d.span), ...preview ? [preview] : []]);
120
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
121
+ drawn.map(({ block, live, start, end, span }, index) => /* @__PURE__ */ jsx(
122
+ RulerBlock,
123
+ {
124
+ row,
125
+ block,
126
+ span,
127
+ at: { start, end },
128
+ hit: hits[index],
129
+ text: live?.moved ? formatRange(start, end) : block.label,
130
+ ctx,
131
+ testId: `${ctx.testId}-block-${block.id}`
132
+ },
133
+ block.id
134
+ )),
135
+ mine && preview ? /* @__PURE__ */ jsx(CreatePreview, { row, drag: mine, span: preview, hit: hits[drawn.length], ctx }) : null
130
136
  ] });
131
137
  }
132
- function CreatePreview({ row, drag, ctx }) {
138
+ function previewSpan(drag, scale) {
139
+ return spanOf(drag.start, Math.max(drag.end, drag.start + scale.snap), scale);
140
+ }
141
+ function CreatePreview(props) {
142
+ const { row, drag, span, hit, ctx } = props;
133
143
  const range = formatRange(drag.start, drag.end);
134
144
  return /* @__PURE__ */ jsx(
135
145
  RulerBlock,
136
146
  {
137
147
  row,
138
148
  block: { id: "\0new", start: drag.start, end: drag.end, label: range, tone: "plan" },
139
- span: spanOf(drag.start, Math.max(drag.end, drag.start + ctx.scale.snap), ctx.scale),
149
+ span,
140
150
  at: { start: drag.start, end: drag.end },
151
+ hit,
141
152
  text: range,
142
153
  ctx,
143
154
  testId: `${ctx.testId}-preview`
@@ -147,7 +158,7 @@ function CreatePreview({ row, drag, ctx }) {
147
158
  function Actual({ row, ctx }) {
148
159
  const { actual } = row;
149
160
  if (!actual) return null;
150
- return /* @__PURE__ */ jsxs(Fragment, { children: [
161
+ return /* @__PURE__ */ jsxs(Fragment2, { children: [
151
162
  /* @__PURE__ */ jsx(Box, { sx: actualSx(spanOf(actual.start, actual.end, ctx.scale)), "data-testid": `${ctx.testId}-actual-${row.id}` }),
152
163
  row.actualLabel ? /* @__PURE__ */ jsx(Box, { component: "span", sx: actualLabelSx(percentOf(actual.start, ctx.scale.from, ctx.scale.to)), children: row.actualLabel }) : null
153
164
  ] });
@@ -172,17 +183,24 @@ function Track({ row, ctx }) {
172
183
  },
173
184
  children: [
174
185
  /* @__PURE__ */ jsx(Actual, { row, ctx }),
175
- /* @__PURE__ */ jsx(Blocks, { row, ctx }),
176
- showNow ? /* @__PURE__ */ jsx(Box, { sx: nowSx(percentOf(now, scale.from, scale.to)), "data-testid": `${ctx.testId}-now` }) : null
186
+ showNow ? /* @__PURE__ */ jsx(Box, { sx: nowSx(percentOf(now, scale.from, scale.to)), "data-testid": `${ctx.testId}-now` }) : null,
187
+ /* @__PURE__ */ jsx(Blocks, { row, ctx })
177
188
  ]
178
189
  }
179
190
  );
180
191
  }
192
+ function hasContent(node) {
193
+ if (node === null || node === void 0 || typeof node === "boolean" || node === "") return false;
194
+ if (Array.isArray(node)) return node.some((child) => hasContent(child));
195
+ if (isValidElement(node) && node.type === Fragment) return hasContent(node.props.children);
196
+ return true;
197
+ }
181
198
  function RulerRow({ row, ctx }) {
199
+ const hasActions = hasContent(row.actions);
182
200
  return /* @__PURE__ */ jsxs(Box, { sx: rowSx, "data-testid": `${ctx.testId}-row-${row.id}`, role: "listitem", children: [
183
201
  /* @__PURE__ */ jsx(ScheduleNameCell, { row, sx: whoSx, sizes: { name: DAY_RULER_METRICS.name, meta: DAY_RULER_METRICS.meta, chipsTop: 0.75 } }),
184
202
  /* @__PURE__ */ jsx(Track, { row, ctx }),
185
- /* @__PURE__ */ jsx(Box, { sx: actionsSx, children: row.actions })
203
+ hasActions ? /* @__PURE__ */ jsx(Box, { sx: actionsSx, "data-testid": `${ctx.testId}-actions-${row.id}`, children: row.actions }) : null
186
204
  ] });
187
205
  }
188
206
  function Coverage(props) {
@@ -193,82 +211,21 @@ function Coverage(props) {
193
211
  /* @__PURE__ */ jsx(Box, { sx: coverageSx(hours), children: Array.from({ length: hours }, (_, index) => {
194
212
  const count = coverage[index] ?? 0;
195
213
  return /* @__PURE__ */ jsx(Box, { component: "span", sx: coverageCellSx(count), title: `${formatHour(scale.from + index)} \xB7 ${count}`, children: count > 0 ? count : "" }, index);
196
- }) }),
197
- /* @__PURE__ */ jsx("span", {})
214
+ }) })
198
215
  ] });
199
216
  }
200
- function trendPoints(values, hours) {
201
- const present = values.slice(0, hours).filter((value) => value !== null);
202
- const max = Math.max(0, ...present);
203
- return values.slice(0, hours).flatMap((value, index) => {
204
- if (value === null) return [];
205
- const x = (index + 0.5) * 100 / hours;
206
- const y = max > 0 ? 38 - value / max * 34 : 38;
207
- return [`${x.toFixed(2)},${y.toFixed(2)}`];
208
- }).join(" ");
209
- }
210
- var hourWords = (hour, text) => text ? `${formatHour(hour)} \xB7 ${text}` : formatHour(hour);
211
- function markedWords(cell, hour, marked) {
212
- return cell.title ?? `${hourWords(hour, cell.text)} \xB7 ${marked}`;
213
- }
214
- function FooterCells({ cells, ctx }) {
215
- return /* @__PURE__ */ jsx(Box, { sx: coverageSx(ctx.hours), children: Array.from({ length: ctx.hours }, (_, index) => {
216
- const cell = cells[index] ?? { text: "" };
217
- const hour = ctx.from + index;
218
- return /* @__PURE__ */ jsx(
219
- Box,
220
- {
221
- component: "span",
222
- sx: footerCellSx(Boolean(cell.marked)),
223
- title: cell.marked ? markedWords(cell, hour, ctx.marked) : cell.title ?? hourWords(hour, cell.text),
224
- "data-marked": cell.marked ? "" : void 0,
225
- children: cell.marked ? /* @__PURE__ */ jsxs(Fragment, { children: [
226
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: cell.text }),
227
- /* @__PURE__ */ jsx(Box, { component: "span", sx: SR_ONLY_SX, children: markedWords(cell, hour, ctx.marked) })
228
- ] }) : cell.text
229
- },
230
- index
231
- );
232
- }) });
233
- }
234
- function trendWords(values, ctx) {
235
- return values.slice(0, ctx.hours).flatMap((value, index) => value === null ? [] : [`${formatHour(ctx.from + index)} ${Math.round(value * 10) / 10}`]).join(" \xB7 ");
236
- }
237
- function FooterFigures({ row, ctx }) {
238
- if (row.trend) {
239
- return /* @__PURE__ */ jsxs(Box, { component: "span", sx: { display: "block", minWidth: 0 }, children: [
240
- /* @__PURE__ */ jsx(Box, { component: "svg", viewBox: "0 0 100 40", preserveAspectRatio: "none", sx: trendSx, "aria-hidden": true, children: /* @__PURE__ */ jsx("polyline", { fill: "none", stroke: "currentColor", strokeWidth: 1.5, vectorEffect: "non-scaling-stroke", points: trendPoints(row.trend, ctx.hours) }) }),
241
- /* @__PURE__ */ jsx(Box, { component: "span", sx: SR_ONLY_SX, children: trendWords(row.trend, ctx) })
242
- ] });
243
- }
244
- if (row.note !== void 0) {
245
- return /* @__PURE__ */ jsx(Box, { component: "span", sx: footerNoteSx(Boolean(row.marked)), "data-marked": row.marked ? "" : void 0, children: row.note });
246
- }
247
- return /* @__PURE__ */ jsx(FooterCells, { cells: row.cells ?? [], ctx });
248
- }
249
- function GroupFooter(props) {
250
- const { rows, scale, testId } = props;
251
- const ctx = { hours: scale.to - scale.from, from: scale.from, marked: props.marked };
252
- return /* @__PURE__ */ jsx(Fragment, { children: rows.map((row) => /* @__PURE__ */ jsxs(Box, { sx: lineSx, "data-testid": `${testId}-footer-${row.id}`, children: [
253
- /* @__PURE__ */ jsx(Box, { component: "span", sx: coverageLabelSx, children: row.label }),
254
- /* @__PURE__ */ jsx(FooterFigures, { row, ctx }),
255
- /* @__PURE__ */ jsx("span", {})
256
- ] }, row.id)) });
257
- }
258
217
  function Axis({ scale, testId }) {
259
218
  return /* @__PURE__ */ jsxs(Box, { sx: lineSx, "data-testid": `${testId}-axis`, "aria-hidden": true, children: [
260
219
  /* @__PURE__ */ jsx("span", {}),
261
- /* @__PURE__ */ jsx(Box, { sx: axisSx, children: ticksOf(scale.from, scale.to, scale.tickHours).map((h) => /* @__PURE__ */ jsx("span", { style: { left: `${percentOf(h, scale.from, scale.to)}%` }, children: formatHour(h) }, h)) }),
262
- /* @__PURE__ */ jsx("span", {})
220
+ /* @__PURE__ */ jsx(Box, { sx: axisSx, children: ticksOf(scale.from, scale.to, scale.tickHours).map((h) => /* @__PURE__ */ jsx("span", { style: { left: `${percentOf(h, scale.from, scale.to)}%` }, children: formatHour(h) }, h)) })
263
221
  ] });
264
222
  }
265
223
 
266
224
  export {
267
225
  spanOf,
226
+ hasContent,
268
227
  RulerRow,
269
228
  Coverage,
270
- trendPoints,
271
- GroupFooter,
272
229
  Axis
273
230
  };
274
- //# sourceMappingURL=chunk-6HPVCDVU.js.map
231
+ //# sourceMappingURL=chunk-FGZIEZEP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DayRuler/DayRuler.parts.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport type * as React from 'react';\nimport { Fragment, isValidElement, useRef } from 'react';\n\nimport { ScheduleNameCell } from '../ScheduleGrid/ScheduleNameCell';\nimport type { RulerAbilities, RulerScale } from './DayRuler.keyboard';\nimport { DAY_RULER_METRICS as M } from './DayRuler.metrics';\nimport { useTextFit } from './useTextFits';\nimport { formatHour, formatRange, hitBoundsOf, percentOf, ticksOf, type BlockTextFit } from './day-ruler-model';\nimport {\n actionsSx,\n actualLabelSx,\n actualSx,\n axisSx,\n blockSx,\n breakSx,\n coverageCellSx,\n coverageLabelSx,\n coverageSx,\n handleSx,\n lineSx,\n nowSx,\n rowSx,\n trackSx,\n whoSx,\n type HitBounds,\n type Span,\n} from './DayRuler.styles';\nimport type { DayRulerBlock, DayRulerRow, RulerHour } from './DayRuler.types';\nimport type { RulerDrag, RulerDragApi } from './useRulerDrag';\n\nexport const spanOf = (start: RulerHour, end: RulerHour, scale: RulerScale): Span => {\n const at = percentOf(start, scale.from, scale.to);\n return { at, share: Math.max(0, percentOf(end, scale.from, scale.to) - at) };\n};\n\n/** What every row of one ruler shares. */\nexport interface RowContext {\n scale: RulerScale;\n now?: RulerHour;\n can: RulerAbilities;\n drag: RulerDrag | null;\n dragApi: RulerDragApi;\n onBlockClick?: (blockId: string) => void;\n onKeyCreate: (row: DayRulerRow) => void;\n onBlockKey: (event: React.KeyboardEvent, block: DayRulerBlock) => void;\n createLabel: (row: string) => string;\n testId: string;\n}\n\n/** The keys a block answers to, for `aria-keyshortcuts`. */\nfunction shortcutsOf(movable: boolean, resizable: boolean): string | undefined {\n const keys = [\n movable ? 'Alt+ArrowLeft Alt+ArrowRight' : '',\n resizable ? 'Shift+ArrowLeft Shift+ArrowRight Shift+Alt+ArrowLeft Shift+Alt+ArrowRight' : '',\n ];\n return keys.filter(Boolean).join(' ') || undefined;\n}\n\nfunction Handle({ side, onPointerDown, testId }: { side: 'l' | 'r'; onPointerDown: (event: React.PointerEvent<HTMLElement>) => void; testId: string }) {\n return <Box component=\"span\" aria-hidden sx={handleSx(side)} data-testid={testId} onPointerDown={onPointerDown} />;\n}\n\ninterface BlockProps {\n row: DayRulerRow;\n block: DayRulerBlock;\n /** Where it is drawn: its own hours, or where a drag has it now. */\n span: Span;\n /** The hours it is drawn at (its own, or a drag's). */\n at: { start: RulerHour; end: RulerHour };\n /** How far its hit band may reach on a narrow ruler, in % of the track (the midpoints to its neighbours). */\n hit: HitBounds;\n text: string;\n ctx: RowContext;\n testId: string;\n}\n\n/**\n * The block's break, where it falls inside the block as drawn: it moves with a\n * dragged block (same offset from its start) and is cut to the block's ends.\n */\nfunction breakShare(block: DayRulerBlock, start: RulerHour, end: RulerHour): Span | null {\n const span = block.breakSpan;\n const length = end - start;\n if (!span || !(length > 0)) return null;\n const shift = Math.abs(length - (block.end - block.start)) < 1e-6 ? start - block.start : 0;\n const a = Math.max(start, span.start + shift);\n const b = Math.min(end, span.end + shift);\n if (!(b > a)) return null;\n return { at: ((a - start) / length) * 100, share: ((b - a) / length) * 100 };\n}\n\n/** The block's break as a hatched band, when it falls inside the block as drawn. */\nfunction BreakBand({ block, at, testId }: { block: DayRulerBlock; at: BlockProps['at']; testId: string }): React.JSX.Element | null {\n const gap = breakShare(block, at.start, at.end);\n if (!gap) return null;\n return <Box component=\"span\" aria-hidden sx={breakSx(gap)} data-dr-break=\"\" data-testid={testId} />;\n}\n\n/** Where nothing can be measured, a block shorter than the prototype's 30% of the ruler says its start. */\nfunction fallbackFit(block: DayRulerBlock, scale: RulerScale): BlockTextFit {\n return (block.end - block.start) / (scale.to - scale.from) >= M.narrowShare ? 'full' : 'short';\n}\n\n/**\n * What the bar's fit puts on it: `data-fit` for the styles, and — while the bar\n * shows less than its full text — that full text as its name, so the name still\n * says all of it.\n */\nfunction fitProps(fit: BlockTextFit, text: string): { 'aria-label'?: string; 'data-fit'?: BlockTextFit } {\n return fit === 'full' ? {} : { 'aria-label': text, 'data-fit': fit };\n}\n\nfunction RulerBlock({ row, block, span, at, hit, text, ctx, testId }: BlockProps): React.JSX.Element {\n const { can, dragApi, scale } = ctx;\n const movable = can.move && Boolean(block.movable);\n const resizable = can.resize && Boolean(block.resizable);\n const ref = useRef<HTMLButtonElement | null>(null);\n const short = block.shortLabel ?? text;\n const fit = useTextFit(ref, text, short, fallbackFit(block, scale));\n const press = (mode: 'move' | 'start' | 'end') => (event: React.PointerEvent<HTMLElement>) =>\n dragApi.startBlock(event, row.id, block, mode);\n return (\n <Box\n component=\"button\"\n type=\"button\"\n sx={blockSx(block.tone, span, { selected: Boolean(block.selected), movable, hit })}\n title={block.title ?? block.label}\n {...fitProps(fit, text)}\n aria-keyshortcuts={shortcutsOf(movable, resizable)}\n aria-current={block.selected ? 'true' : undefined}\n ref={ref}\n data-tone={block.tone}\n data-testid={testId}\n onPointerDown={movable ? press('move') : undefined}\n onClick={() => {\n if (!dragApi.takeClick()) ctx.onBlockClick?.(block.id);\n }}\n onKeyDown={(event: React.KeyboardEvent) => ctx.onBlockKey(event, block)}\n >\n <BreakBand block={block} at={at} testId={`${ctx.testId}-break-${block.id}`} />\n {resizable ? <Handle side=\"l\" onPointerDown={press('start')} testId={`${ctx.testId}-handle-l-${block.id}`} /> : null}\n <span data-dr-text=\"full\" title={text}>\n {text}\n </span>\n <span data-dr-text=\"short\" title={text}>\n {short}\n </span>\n {resizable ? <Handle side=\"r\" onPointerDown={press('end')} testId={`${ctx.testId}-handle-r-${block.id}`} /> : null}\n </Box>\n );\n}\n\n/** A row's blocks, each where a drag has it now (with its live hours) or where it is. */\nfunction Blocks({ row, ctx }: { row: DayRulerRow; ctx: RowContext }): React.JSX.Element {\n const mine = ctx.drag && ctx.drag.rowId === row.id ? ctx.drag : null;\n const drawn = row.blocks.map((block) => {\n const live = mine?.blockId === block.id ? mine : null;\n const start = live ? live.start : block.start;\n const end = live ? live.end : block.end;\n return { block, live, start, end, span: spanOf(start, end, ctx.scale) };\n });\n const preview = mine && mine.mode === 'create' ? previewSpan(mine, ctx.scale) : null;\n // Every bar drawn on the row, the create's preview included, bounds its neighbours' hit bands.\n const hits = hitBoundsOf([...drawn.map((d) => d.span), ...(preview ? [preview] : [])]);\n return (\n <>\n {drawn.map(({ block, live, start, end, span }, index) => (\n <RulerBlock\n key={block.id}\n row={row}\n block={block}\n span={span}\n at={{ start, end }}\n hit={hits[index]!}\n text={live?.moved ? formatRange(start, end) : block.label}\n ctx={ctx}\n testId={`${ctx.testId}-block-${block.id}`}\n />\n ))}\n {mine && preview ? <CreatePreview row={row} drag={mine} span={preview} hit={hits[drawn.length]!} ctx={ctx} /> : null}\n </>\n );\n}\n\n/** Where a create drag's preview is drawn: at least one snap long. */\nfunction previewSpan(drag: RulerDrag, scale: RulerScale): Span {\n return spanOf(drag.start, Math.max(drag.end, drag.start + scale.snap), scale);\n}\n\n/** The block a create drag is drawing, with its live hours. */\nfunction CreatePreview(props: { row: DayRulerRow; drag: RulerDrag; span: Span; hit: HitBounds; ctx: RowContext }): React.JSX.Element {\n const { row, drag, span, hit, ctx } = props;\n const range = formatRange(drag.start, drag.end);\n return (\n <RulerBlock\n row={row}\n block={{ id: '\\u0000new', start: drag.start, end: drag.end, label: range, tone: 'plan' }}\n span={span}\n at={{ start: drag.start, end: drag.end }}\n hit={hit}\n text={range}\n ctx={ctx}\n testId={`${ctx.testId}-preview`}\n />\n );\n}\n\n/** The real shift under the blocks, and its label at its start. */\nfunction Actual({ row, ctx }: { row: DayRulerRow; ctx: RowContext }): React.JSX.Element | null {\n const { actual } = row;\n if (!actual) return null;\n return (\n <>\n <Box sx={actualSx(spanOf(actual.start, actual.end, ctx.scale))} data-testid={`${ctx.testId}-actual-${row.id}`} />\n {row.actualLabel ? (\n <Box component=\"span\" sx={actualLabelSx(percentOf(actual.start, ctx.scale.from, ctx.scale.to))}>\n {row.actualLabel}\n </Box>\n ) : null}\n </>\n );\n}\n\n/** A row's track: the actual bar, the now line under its blocks (or the one being dragged, live). */\nfunction Track({ row, ctx }: { row: DayRulerRow; ctx: RowContext }): React.JSX.Element {\n const { scale, now, can, dragApi } = ctx;\n const showNow = now !== undefined && now >= scale.from && now <= scale.to;\n return (\n <Box\n sx={trackSx({ hours: scale.to - scale.from, tickHours: scale.tickHours, interactive: can.create })}\n data-dr-track=\"\"\n data-testid={`${ctx.testId}-track-${row.id}`}\n role={can.create ? 'group' : undefined}\n tabIndex={can.create ? 0 : undefined}\n aria-label={can.create ? ctx.createLabel(row.label) : undefined}\n onPointerDown={can.create ? (event: React.PointerEvent<HTMLElement>) => dragApi.startCreate(event, row.id) : undefined}\n onKeyDown={(event: React.KeyboardEvent) => {\n if (!can.create || event.target !== event.currentTarget || (event.key !== 'Enter' && event.key !== ' ')) return;\n event.preventDefault();\n ctx.onKeyCreate(row);\n }}\n >\n <Actual row={row} ctx={ctx} />\n {/* Before the blocks, so it paints under them and never through a label. */}\n {showNow ? <Box sx={nowSx(percentOf(now, scale.from, scale.to))} data-testid={`${ctx.testId}-now`} /> : null}\n <Blocks row={row} ctx={ctx} />\n </Box>\n );\n}\n\n/**\n * Whether a node draws anything: nothing, a boolean, an empty string, an empty\n * array and an empty fragment do not — the actions slot (and its 8px above)\n * is rendered only for content.\n */\nexport function hasContent(node: React.ReactNode): boolean {\n if (node === null || node === undefined || typeof node === 'boolean' || node === '') return false;\n if (Array.isArray(node)) return node.some((child) => hasContent(child as React.ReactNode));\n if (isValidElement<{ children?: React.ReactNode }>(node) && node.type === Fragment) return hasContent(node.props.children);\n return true;\n}\n\n/**\n * One person: name, meta and chips, the row's actions under them · the track.\n * The actions live in the name's column, never a column of their own: a\n * column reserved for one row's \"Iniciar agora\" left every other row a blank\n * band, and a per-row one would have cut the hours out of line (FUT-3831).\n */\nexport function RulerRow({ row, ctx }: { row: DayRulerRow; ctx: RowContext }): React.JSX.Element {\n const hasActions = hasContent(row.actions);\n return (\n <Box sx={rowSx} data-testid={`${ctx.testId}-row-${row.id}`} role=\"listitem\">\n <ScheduleNameCell row={row} sx={whoSx} sizes={{ name: M.name, meta: M.meta, chipsTop: 0.75 }} />\n <Track row={row} ctx={ctx} />\n {hasActions ? (\n <Box sx={actionsSx} data-testid={`${ctx.testId}-actions-${row.id}`}>\n {row.actions}\n </Box>\n ) : null}\n </Box>\n );\n}\n\n/** \"Na escala, por hora\": a count per hour above the axis. */\nexport function Coverage(props: { coverage: readonly number[]; label?: string; scale: RulerScale; testId: string }): React.JSX.Element {\n const { coverage, label, scale, testId } = props;\n const hours = scale.to - scale.from;\n return (\n <Box sx={lineSx} data-testid={`${testId}-coverage`}>\n <Box component=\"span\" sx={coverageLabelSx}>\n {label}\n </Box>\n <Box sx={coverageSx(hours)}>\n {Array.from({ length: hours }, (_, index) => {\n const count = coverage[index] ?? 0;\n return (\n <Box key={index} component=\"span\" sx={coverageCellSx(count)} title={`${formatHour(scale.from + index)} · ${count}`}>\n {count > 0 ? count : ''}\n </Box>\n );\n })}\n </Box>\n </Box>\n );\n}\n\n/** The hour labels under the coverage row. */\nexport function Axis({ scale, testId }: { scale: RulerScale; testId: string }): React.JSX.Element {\n return (\n <Box sx={lineSx} data-testid={`${testId}-axis`} aria-hidden>\n <span />\n <Box sx={axisSx}>\n {ticksOf(scale.from, scale.to, scale.tickHours).map((h) => (\n <span key={h} style={{ left: `${percentOf(h, scale.from, scale.to)}%` }}>\n {formatHour(h)}\n </span>\n ))}\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAEhB,SAAS,UAAU,gBAAgB,cAAc;AA0DxC,SA0GL,YAAAA,WA1GK,KA+DL,YA/DK;AA7BF,IAAM,SAAS,CAAC,OAAkB,KAAgB,UAA4B;AACnF,QAAM,KAAK,UAAU,OAAO,MAAM,MAAM,MAAM,EAAE;AAChD,SAAO,EAAE,IAAI,OAAO,KAAK,IAAI,GAAG,UAAU,KAAK,MAAM,MAAM,MAAM,EAAE,IAAI,EAAE,EAAE;AAC7E;AAiBA,SAAS,YAAY,SAAkB,WAAwC;AAC7E,QAAM,OAAO;AAAA,IACX,UAAU,iCAAiC;AAAA,IAC3C,YAAY,8EAA8E;AAAA,EAC5F;AACA,SAAO,KAAK,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAC3C;AAEA,SAAS,OAAO,EAAE,MAAM,eAAe,OAAO,GAAyG;AACrJ,SAAO,oBAAC,OAAI,WAAU,QAAO,eAAW,MAAC,IAAI,SAAS,IAAI,GAAG,eAAa,QAAQ,eAA8B;AAClH;AAoBA,SAAS,WAAW,OAAsB,OAAkB,KAA6B;AACvF,QAAM,OAAO,MAAM;AACn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,IAC7D,cAAI,SACP,IACE;AAAA,KACN;AAEJ;AAGO,SAAS,SAAS,OAA8G;AACrI,QAAM,EAAE,UAAU,OAAO,OAAO,OAAO,IAAI;AAC3C,QAAM,QAAQ,MAAM,KAAK,MAAM;AAC/B,SACE,qBAAC,OAAI,IAAI,QAAQ,eAAa,GAAG,MAAM,aACrC;AAAA,wBAAC,OAAI,WAAU,QAAO,IAAI,iBACvB,iBACH;AAAA,IACA,oBAAC,OAAI,IAAI,WAAW,KAAK,GACtB,gBAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,CAAC,GAAG,UAAU;AAC3C,YAAM,QAAQ,SAAS,KAAK,KAAK;AACjC,aACE,oBAAC,OAAgB,WAAU,QAAO,IAAI,eAAe,KAAK,GAAG,OAAO,GAAG,WAAW,MAAM,OAAO,KAAK,CAAC,SAAM,KAAK,IAC7G,kBAAQ,IAAI,QAAQ,MADb,KAEV;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ;AAGO,SAAS,KAAK,EAAE,OAAO,OAAO,GAA6D;AAChG,SACE,qBAAC,OAAI,IAAI,QAAQ,eAAa,GAAG,MAAM,SAAS,eAAW,MACzD;AAAA,wBAAC,UAAK;AAAA,IACN,oBAAC,OAAI,IAAI,QACN,kBAAQ,MAAM,MAAM,MAAM,IAAI,MAAM,SAAS,EAAE,IAAI,CAAC,MACnD,oBAAC,UAAa,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,MAAM,MAAM,EAAE,CAAC,IAAI,GACnE,qBAAW,CAAC,KADJ,CAEX,CACD,GACH;AAAA,KACF;AAEJ;","names":["Fragment"]}
@@ -1,12 +1,10 @@
1
+ import {
2
+ useDisclosure
3
+ } from "./chunk-2JCRNWHE.js";
1
4
  import {
2
5
  StandaloneContainer,
3
6
  useRowLayout
4
7
  } from "./chunk-E6K2UZGR.js";
5
- import {
6
- DiscloseSlot,
7
- DragSlot,
8
- SelectSlot
9
- } from "./chunk-QO7UJXXO.js";
10
8
  import {
11
9
  actionProps,
12
10
  metaShape,
@@ -20,8 +18,10 @@ import {
20
18
  ListCardTail
21
19
  } from "./chunk-CSJ7WNXU.js";
22
20
  import {
23
- useDisclosure
24
- } from "./chunk-2JCRNWHE.js";
21
+ DiscloseSlot,
22
+ DragSlot,
23
+ SelectSlot
24
+ } from "./chunk-QO7UJXXO.js";
25
25
  import {
26
26
  DropIndicator
27
27
  } from "./chunk-K4EKTMTC.js";
@@ -185,4 +185,4 @@ function BaseListCard(props) {
185
185
  export {
186
186
  BaseListCard
187
187
  };
188
- //# sourceMappingURL=chunk-IWSTMVCA.js.map
188
+ //# sourceMappingURL=chunk-FKS2PNJF.js.map
@@ -1,21 +1,21 @@
1
- import {
2
- RangeSummary
3
- } from "./chunk-WLDP7C4K.js";
4
1
  import {
5
2
  RangeBounds
6
- } from "./chunk-FC7UCFFA.js";
3
+ } from "./chunk-ZPWPA6FR.js";
7
4
  import {
8
5
  RangePresets
9
6
  } from "./chunk-LZNUBQ5I.js";
10
7
  import {
11
- presetsFor
12
- } from "./chunk-CBOB5AV6.js";
8
+ RangeSummary
9
+ } from "./chunk-WLDP7C4K.js";
13
10
  import {
14
11
  isRangeInverted,
15
12
  isRangeSet,
16
13
  numericRange,
17
14
  rangeChipLabel
18
15
  } from "./chunk-GCZJH4XL.js";
16
+ import {
17
+ presetsFor
18
+ } from "./chunk-CBOB5AV6.js";
19
19
  import {
20
20
  useStillAnchor
21
21
  } from "./chunk-7CUZTWKW.js";
@@ -240,4 +240,4 @@ export {
240
240
  RangePill,
241
241
  PanelRangeField
242
242
  };
243
- //# sourceMappingURL=chunk-3WYEENUH.js.map
243
+ //# sourceMappingURL=chunk-FPNVOB52.js.map
@@ -24,10 +24,10 @@ import {
24
24
  skeletonCellSx,
25
25
  totalCellSx,
26
26
  totalHeaderSx
27
- } from "./chunk-RYJ6XGFA.js";
27
+ } from "./chunk-SJAOQGQI.js";
28
28
  import {
29
29
  ScheduleNameCell
30
- } from "./chunk-TZ44F6W7.js";
30
+ } from "./chunk-CGS2LQE5.js";
31
31
  import {
32
32
  SCHEDULE_GRID_METRICS
33
33
  } from "./chunk-3R6BR22L.js";
@@ -254,4 +254,4 @@ export {
254
254
  GridHeader,
255
255
  GridBody
256
256
  };
257
- //# sourceMappingURL=chunk-E73C73UD.js.map
257
+ //# sourceMappingURL=chunk-FYSS2PYA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ConfirmActionDialog
3
- } from "./chunk-7W5X3KQ2.js";
3
+ } from "./chunk-SW7JCF4Z.js";
4
4
  import {
5
5
  useConfirmAction
6
6
  } from "./chunk-EMYESBIT.js";
@@ -43,4 +43,4 @@ function useRowConfirm({
43
43
  export {
44
44
  useRowConfirm
45
45
  };
46
- //# sourceMappingURL=chunk-N557OEZR.js.map
46
+ //# sourceMappingURL=chunk-G6NMSBSQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signalInk
3
- } from "./chunk-4HK4FVMV.js";
3
+ } from "./chunk-3UAHDLKH.js";
4
4
  import {
5
5
  SCHEDULE_NAME_METRICS
6
6
  } from "./chunk-3R6BR22L.js";
@@ -91,4 +91,4 @@ export {
91
91
  nameLineSx,
92
92
  chipsSx
93
93
  };
94
- //# sourceMappingURL=chunk-A5OERY43.js.map
94
+ //# sourceMappingURL=chunk-GARM5SX6.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-I4DG3PP4.js";
4
4
  import {
5
5
  ManageViewsDialog
6
- } from "./chunk-K7IDOTSU.js";
6
+ } from "./chunk-VNMD6BA4.js";
7
7
  import {
8
8
  useDataViewsCopy
9
9
  } from "./chunk-KHG57NAE.js";
@@ -121,4 +121,4 @@ export {
121
121
  ViewsMenuSlot,
122
122
  ViewDialogs
123
123
  };
124
- //# sourceMappingURL=chunk-WJMSND5Q.js.map
124
+ //# sourceMappingURL=chunk-GXGHEOWC.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ CarouselChrome
3
+ } from "./chunk-TB5CRHTF.js";
1
4
  import {
2
5
  containerStyles,
3
6
  frameBox
@@ -8,9 +11,6 @@ import {
8
11
  import {
9
12
  useCarouselNavigation
10
13
  } from "./chunk-RUIV5TVA.js";
11
- import {
12
- CarouselChrome
13
- } from "./chunk-TB5CRHTF.js";
14
14
  import {
15
15
  withDefaults
16
16
  } from "./chunk-HPK33ACY.js";
@@ -151,4 +151,4 @@ var Carousel = (props) => {
151
151
  export {
152
152
  Carousel
153
153
  };
154
- //# sourceMappingURL=chunk-U2SAW6DH.js.map
154
+ //# sourceMappingURL=chunk-GY53SDVL.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  GridShell
3
- } from "./chunk-XFZDO2KB.js";
3
+ } from "./chunk-UIIHUWOV.js";
4
4
  import {
5
5
  useDataViewsState
6
- } from "./chunk-XBWW3QSI.js";
6
+ } from "./chunk-7WE432RQ.js";
7
7
 
8
8
  // src/components/data-display/DataViews/DataViewsGrid.tsx
9
9
  import { useEffect, useRef } from "react";
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
27
27
  export {
28
28
  DataViewsGrid
29
29
  };
30
- //# sourceMappingURL=chunk-MFX4ASX5.js.map
30
+ //# sourceMappingURL=chunk-HWZETMO4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CountedIcon
3
- } from "./chunk-LDCZPZPD.js";
3
+ } from "./chunk-24HHUCWB.js";
4
4
  import {
5
5
  rem
6
6
  } from "./chunk-YKCAJ2TN.js";
@@ -133,4 +133,4 @@ function RailCreateMenu({
133
133
  export {
134
134
  RailCreateMenu
135
135
  };
136
- //# sourceMappingURL=chunk-MM3QESLI.js.map
136
+ //# sourceMappingURL=chunk-ILJ3FXIC.js.map
@@ -1,9 +1,9 @@
1
- import {
2
- useDataViewsLayout
3
- } from "./chunk-5CAWRMDX.js";
4
1
  import {
5
2
  DataViewsScopeTabs
6
3
  } from "./chunk-PL2AB5HJ.js";
4
+ import {
5
+ useDataViewsLayout
6
+ } from "./chunk-5CAWRMDX.js";
7
7
 
8
8
  // src/components/data-display/DataViews/data-views-scope-tabs.tsx
9
9
  import { jsx } from "react/jsx-runtime";
@@ -34,4 +34,4 @@ function ScopeTabsSlot({
34
34
  export {
35
35
  ScopeTabsSlot
36
36
  };
37
- //# sourceMappingURL=chunk-K6VEN5VN.js.map
37
+ //# sourceMappingURL=chunk-K3PMMW23.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withConfirmation
3
- } from "./chunk-ALOEOGQV.js";
3
+ } from "./chunk-3TZUZXY5.js";
4
4
  import {
5
5
  Button
6
6
  } from "./chunk-YOXYSAUI.js";
@@ -18,4 +18,4 @@ function createConfirmButton(copy, errorText) {
18
18
  export {
19
19
  createConfirmButton
20
20
  };
21
- //# sourceMappingURL=chunk-T5RFH2T5.js.map
21
+ //# sourceMappingURL=chunk-KOGJBAFI.js.map
@@ -11,6 +11,11 @@ import CircularProgress from "@mui/material/CircularProgress/index.js";
11
11
  import DialogActions from "@mui/material/DialogActions/index.js";
12
12
  import { styled, useTheme } from "@mui/material/styles/index.js";
13
13
  import { jsx } from "react/jsx-runtime";
14
+ var ALERT_DIALOG_CONTAINER = "alert-dialog";
15
+ var ALERT_DIALOG_NARROW_BELOW = 480;
16
+ function narrowDialog(theme) {
17
+ return `@container ${ALERT_DIALOG_CONTAINER} (width < ${rem(theme, ALERT_DIALOG_NARROW_BELOW)})`;
18
+ }
14
19
  var StyledDialogActions = styled(DialogActions, {
15
20
  shouldForwardProp: (prop) => prop !== "fill"
16
21
  })(({ theme, fill }) => ({
@@ -21,7 +26,9 @@ var StyledDialogActions = styled(DialogActions, {
21
26
  // A 40px tap target, the floor the kit's own Button keeps (FUT-3269): MUI's
22
27
  // medium button is 37px, short of it on a phone.
23
28
  "& > .MuiButton-root": { minHeight: rem(theme, 40) },
24
- ...fill && { "& > .MuiButton-root": { flexGrow: 1, minHeight: rem(theme, 40) } }
29
+ ...fill && { "& > .MuiButton-root": { flexGrow: 1, minHeight: rem(theme, 40) } },
30
+ // A PAIR only: a lone button (`showCancel={false}`) keeps its own width.
31
+ [narrowDialog(theme)]: { "& > .MuiButton-root:not(:only-child)": { flexGrow: 1 } }
25
32
  }));
26
33
  var confirmButtonColor = (variant) => variant === "destructive" ? "error" : "primary";
27
34
  var buttonLooks = (emphasis, variant) => emphasis === "cancel" ? {
@@ -97,6 +104,9 @@ function AlertDialogFooter({
97
104
  }
98
105
 
99
106
  export {
107
+ ALERT_DIALOG_CONTAINER,
108
+ ALERT_DIALOG_NARROW_BELOW,
109
+ narrowDialog,
100
110
  AlertDialogFooter
101
111
  };
102
- //# sourceMappingURL=chunk-COK65GX2.js.map
112
+ //# sourceMappingURL=chunk-KURE5R7Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/AlertDialog/AlertDialog.parts.tsx"],"sourcesContent":["/**\n * The AlertDialog's action row, kept apart from the dialog shell so each stays\n * inside the complexity budget: which button is filled, where each one sits,\n * and how the row wraps.\n */\nimport type { ButtonProps } from '@mui/material/Button/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport DialogActions from '@mui/material/DialogActions/index.js';\nimport { styled, useTheme } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { rem } from '../../../tokens/relative';\nimport { EN_US_UI_LABELS } from '../../../en-US.labels';\n\nimport type { AlertDialogProps } from './AlertDialog.types';\n\n/** The query container the dialog's narrow layout reads: its `.MuiDialog-container`. */\nexport const ALERT_DIALOG_CONTAINER = 'alert-dialog';\n\n/**\n * Below this width of the space the dialog is given, it lays out for a phone:\n * the icon above the title, the buttons each across the row. 480px covers\n * every phone (320–430) and leaves a tablet's dialog as it was.\n */\nexport const ALERT_DIALOG_NARROW_BELOW = 480;\n\n/** `@container` for a dialog given less than {@link ALERT_DIALOG_NARROW_BELOW}. Never a media query. */\nexport function narrowDialog(theme: Theme): string {\n return `@container ${ALERT_DIALOG_CONTAINER} (width < ${rem(theme, ALERT_DIALOG_NARROW_BELOW)})`;\n}\n\n/**\n * The action row WRAPS WHOLE BUTTONS; it never breaks a label inside one. A pair\n * that did not fit side by side used to squeeze the longer label onto two\n * lines, so one button stood twice as tall as its neighbour. Now the row breaks\n * instead. `wrap-reverse` puts the LAST button — the primary, whichever\n * `emphasis` picks — on top when it stacks, the same slot it holds on the right\n * when the row fits. A pair that fits is laid out exactly as before: natural\n * widths, pushed to the right.\n *\n * `fill` — set only by `emphasis=\"cancel\"` — lets the buttons grow to share the\n * row, and so to take the full width of their line once it stacks. It is not\n * the default because growing also stretches a pair that fits, which would\n * redraw every existing dialog's footer.\n *\n * Narrow (a dialog given less than {@link ALERT_DIALOG_NARROW_BELOW}, a\n * phone) a PAIR of buttons always grows (a lone one keeps its width), so a pair that stacks is two buttons each\n * across the row rather than two ragged widths pushed to the right\n * (FUT-3831). The stacked ORDER is the library's rule, the platforms' too\n * (Material's stacked dialog actions, Apple's stacked alert buttons): the\n * primary on top and the dismissive one at the bottom, the slot a thumb\n * reaches first — so on a destructive question the safe tap is the near one,\n * and Cancel is still FIRST in the DOM, the tab order. See\n * `components-guidelines.md`, \"Stacked buttons\".\n *\n * Rendered with `disableSpacing`: MUI's own spacing is a left margin on every\n * button after the first, which would indent a button that wrapped onto a line\n * of its own. The gaps below replace it, at the same 16px across.\n */\nconst StyledDialogActions = styled(DialogActions, {\n shouldForwardProp: (prop) => prop !== 'fill',\n})<{ fill: boolean }>(({ theme, fill }) => ({\n padding: theme.spacing(2, 3, 3, 3),\n flexWrap: 'wrap-reverse',\n columnGap: theme.spacing(2),\n rowGap: theme.spacing(1),\n // A 40px tap target, the floor the kit's own Button keeps (FUT-3269): MUI's\n // medium button is 37px, short of it on a phone.\n '& > .MuiButton-root': { minHeight: rem(theme, 40) },\n ...(fill && { '& > .MuiButton-root': { flexGrow: 1, minHeight: rem(theme, 40) } }),\n // A PAIR only: a lone button (`showCancel={false}`) keeps its own width.\n [narrowDialog(theme)]: { '& > .MuiButton-root:not(:only-child)': { flexGrow: 1 } },\n}));\n\nconst confirmButtonColor = (variant: AlertDialogProps['variant']): 'error' | 'primary' =>\n variant === 'destructive' ? 'error' : 'primary';\n\ninterface ButtonLook {\n variant: ButtonProps['variant'];\n color: ButtonProps['color'];\n}\n\n/**\n * How each button is drawn, by `emphasis`: the emphasised one is filled, the\n * other a NEUTRAL outline. Primary / neutral both ways round — a confirm that\n * steps down drops the variant's colour too, so the one filled button is the\n * only coloured thing in the row and the eye has a single place to land.\n */\nconst buttonLooks = (\n emphasis: AlertDialogProps['emphasis'],\n variant: AlertDialogProps['variant'],\n): { cancel: ButtonLook; confirm: ButtonLook } =>\n emphasis === 'cancel'\n ? {\n cancel: { variant: 'contained', color: 'primary' },\n confirm: { variant: 'outlined', color: 'inherit' },\n }\n : {\n cancel: { variant: 'outlined', color: 'inherit' },\n confirm: { variant: 'contained', color: confirmButtonColor(variant) },\n };\n\n/**\n * The emphasis that applies: `cancel` only while the cancel is shown. A hidden\n * cancel with the confirm stepped down would leave a dialog with no primary.\n */\nconst effectiveEmphasis = (\n emphasis: AlertDialogProps['emphasis'],\n showCancel: boolean,\n): NonNullable<AlertDialogProps['emphasis']> =>\n emphasis === 'cancel' && showCancel ? 'cancel' : 'confirm';\n\n/**\n * Whether the cancel owns focus on open: what `initialFocus` says, and when it\n * says nothing, the emphasised button — so Enter on a steered question keeps\n * the work instead of completing the loss.\n */\nconst focusesCancel = (\n initialFocus: AlertDialogProps['initialFocus'],\n emphasis: NonNullable<AlertDialogProps['emphasis']>,\n): boolean => (initialFocus ?? emphasis) === 'cancel';\n\n/** The two buttons in slot order: the emphasised one LAST, the primary slot. */\nconst inSlotOrder = (\n emphasis: AlertDialogProps['emphasis'],\n cancel: React.ReactNode,\n confirm: React.ReactNode,\n): React.ReactNode[] => (emphasis === 'cancel' ? [confirm, cancel] : [cancel, confirm]);\n\n/**\n * Action row: the optional cancel button and the (variant-coloured) confirm,\n * with the emphasised one LAST — the primary slot, on the right or, once the\n * row stacks, on top. DOM order is the tab order, so it follows the same rule.\n */\nexport function AlertDialogFooter({\n variant,\n cancelText = EN_US_UI_LABELS.alertDialog.cancel,\n confirmText = EN_US_UI_LABELS.alertDialog.confirm,\n showCancel = true,\n loading = false,\n confirmDisabled = false,\n initialFocus,\n emphasis: asked,\n onCancel,\n onConfirm,\n dataTestId,\n}: Pick<\n AlertDialogProps,\n | 'variant'\n | 'cancelText'\n | 'confirmText'\n | 'showCancel'\n | 'loading'\n | 'confirmDisabled'\n | 'initialFocus'\n | 'emphasis'\n> & {\n onCancel: () => void;\n onConfirm: () => void;\n dataTestId: string;\n}): React.ReactElement {\n const theme = useTheme();\n const emphasis = effectiveEmphasis(asked, showCancel);\n const look = buttonLooks(emphasis, variant);\n const cancelFocused = focusesCancel(initialFocus, emphasis);\n const cancel = showCancel && (\n <Button\n key=\"cancel\"\n onClick={onCancel}\n variant={look.cancel.variant}\n color={look.cancel.color}\n disabled={loading}\n autoFocus={cancelFocused}\n data-testid={`${dataTestId}-cancel-button`}\n >\n {cancelText}\n </Button>\n );\n const confirm = (\n <Button\n key=\"confirm\"\n onClick={onConfirm}\n variant={look.confirm.variant}\n color={look.confirm.color}\n disabled={confirmDisabled || loading}\n startIcon={\n loading ? (\n <CircularProgress\n size={rem(theme, 16)}\n color=\"inherit\"\n data-testid={`${dataTestId}-loading-spinner`}\n />\n ) : undefined\n }\n autoFocus={!cancelFocused}\n data-testid={`${dataTestId}-confirm-button`}\n >\n {confirmText}\n </Button>\n );\n return (\n <StyledDialogActions\n disableSpacing\n fill={emphasis === 'cancel'}\n data-testid={`${dataTestId}-actions`}\n >\n {inSlotOrder(emphasis, cancel, confirm)}\n </StyledDialogActions>\n );\n}\n"],"mappings":";;;;;;;;AAMA,OAAO,YAAY;AACnB,OAAO,sBAAsB;AAC7B,OAAO,mBAAmB;AAC1B,SAAS,QAAQ,gBAAgB;AA+J7B;AArJG,IAAM,yBAAyB;AAO/B,IAAM,4BAA4B;AAGlC,SAAS,aAAa,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B,YAAY;AAAA,EAC1C,aAAa;AAAA,EACb,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF,GAcuB;AACrB,QAAM,QAAQ,SAAS;AACvB,QAAM,WAAW,kBAAkB,OAAO,UAAU;AACpD,QAAM,OAAO,YAAY,UAAU,OAAO;AAC1C,QAAM,gBAAgB,cAAc,cAAc,QAAQ;AAC1D,QAAM,SAAS,cACb;AAAA,IAAC;AAAA;AAAA,MAEC,SAAS;AAAA,MACT,SAAS,KAAK,OAAO;AAAA,MACrB,OAAO,KAAK,OAAO;AAAA,MACnB,UAAU;AAAA,MACV,WAAW;AAAA,MACX,eAAa,GAAG,UAAU;AAAA,MAEzB;AAAA;AAAA,IARG;AAAA,EASN;AAEF,QAAM,UACJ;AAAA,IAAC;AAAA;AAAA,MAEC,SAAS;AAAA,MACT,SAAS,KAAK,QAAQ;AAAA,MACtB,OAAO,KAAK,QAAQ;AAAA,MACpB,UAAU,mBAAmB;AAAA,MAC7B,WACE,UACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,IAAI,OAAO,EAAE;AAAA,UACnB,OAAM;AAAA,UACN,eAAa,GAAG,UAAU;AAAA;AAAA,MAC5B,IACE;AAAA,MAEN,WAAW,CAAC;AAAA,MACZ,eAAa,GAAG,UAAU;AAAA,MAEzB;AAAA;AAAA,IAjBG;AAAA,EAkBN;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAc;AAAA,MACd,MAAM,aAAa;AAAA,MACnB,eAAa,GAAG,UAAU;AAAA,MAEzB,sBAAY,UAAU,QAAQ,OAAO;AAAA;AAAA,EACxC;AAEJ;","names":[]}
@@ -1,12 +1,12 @@
1
+ import {
2
+ DAY_RULER_METRICS
3
+ } from "./chunk-273OLFJD.js";
1
4
  import {
2
5
  createdSpan,
3
6
  hourAt,
4
7
  moved,
5
8
  resized
6
- } from "./chunk-LE5JYNR7.js";
7
- import {
8
- DAY_RULER_METRICS
9
- } from "./chunk-7ZQ3KQ7J.js";
9
+ } from "./chunk-L5CAHQIN.js";
10
10
  import {
11
11
  useDragWindow,
12
12
  useTrailingClick
@@ -101,4 +101,4 @@ function useRulerDrag(scale, handlers) {
101
101
  export {
102
102
  useRulerDrag
103
103
  };
104
- //# sourceMappingURL=chunk-MAYAJXO6.js.map
104
+ //# sourceMappingURL=chunk-KXDLLS62.js.map