themelia-react-ui 2.0.1 → 2.0.3

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 (490) hide show
  1. package/CHANGELOG.md +317 -131
  2. package/README.md +25 -9
  3. package/THIRD_PARTY_NOTICES.md +7 -0
  4. package/dist/{accordion-B6a3vVgA.js → accordion-Cjb6sx0G.js} +14 -13
  5. package/dist/accordion-Cjb6sx0G.js.map +1 -0
  6. package/dist/action-menu-CllU52Mm.js +280 -0
  7. package/dist/action-menu-CllU52Mm.js.map +1 -0
  8. package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
  9. package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
  10. package/dist/ai-artifact-DvTwDVyL.js +1148 -0
  11. package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
  12. package/dist/{app-shell-ZK5RWdo6.js → app-shell-C4FhvCqF.js} +5 -5
  13. package/dist/{app-shell-ZK5RWdo6.js.map → app-shell-C4FhvCqF.js.map} +1 -1
  14. package/dist/attachment-BxDfL2mw.js +246 -0
  15. package/dist/attachment-BxDfL2mw.js.map +1 -0
  16. package/dist/{auth-CYxKfo69.js → auth-BGua8ouh.js} +58 -54
  17. package/dist/auth-BGua8ouh.js.map +1 -0
  18. package/dist/{avatar-BBnEJIx8.js → avatar-DAPlDvhJ.js} +7 -7
  19. package/dist/avatar-DAPlDvhJ.js.map +1 -0
  20. package/dist/{badge-MrKVNzW9.js → badge-HpFqoqSY.js} +40 -40
  21. package/dist/badge-HpFqoqSY.js.map +1 -0
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +1 -1
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +40 -36
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +92 -92
  33. package/dist/base/cascader.js.map +1 -1
  34. package/dist/base/chart.js +1 -1
  35. package/dist/base/choice-inputs.js +2 -2
  36. package/dist/base/code-block.js +1 -1
  37. package/dist/base/combobox.js +2 -2
  38. package/dist/base/command.js +1 -1
  39. package/dist/base/copyable.js +1 -1
  40. package/dist/base/date-pickers.js +2 -2
  41. package/dist/base/display.js +6 -6
  42. package/dist/base/feedback.js +3 -3
  43. package/dist/base/forms-numeric.js +1 -1
  44. package/dist/base/forms.js +2 -2
  45. package/dist/base/inline-edit.js +14 -14
  46. package/dist/base/inline-edit.js.map +1 -1
  47. package/dist/base/item.js +1 -1
  48. package/dist/base/media-gallery.js +1 -1
  49. package/dist/base/metadata-list.js +1 -1
  50. package/dist/base/navigation.js +6 -6
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +1 -1
  54. package/dist/base/repeaters.js +171 -176
  55. package/dist/base/repeaters.js.map +1 -1
  56. package/dist/base/sheet.js +1 -1
  57. package/dist/base/sidebar.js +1 -1
  58. package/dist/base/signature-pad.js +6 -6
  59. package/dist/base/skeleton.js +1 -1
  60. package/dist/base/spinner.js +79 -2
  61. package/dist/base/spinner.js.map +1 -0
  62. package/dist/base/structure.js +1 -1
  63. package/dist/base/table.js +1 -1
  64. package/dist/base/text-inputs.js +2 -2
  65. package/dist/base/toaster.js +46 -45
  66. package/dist/base/toaster.js.map +1 -1
  67. package/dist/base/tree.js +1 -1
  68. package/dist/base/upload-queue.js +1 -1
  69. package/dist/base/upload.js +3 -3
  70. package/dist/base/value-inputs.js +1 -1
  71. package/dist/{batch-action-bar-BZGDG-Si.js → batch-action-bar-DnUJ21NQ.js} +6 -5
  72. package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
  73. package/dist/blocks/admin.js +42 -42
  74. package/dist/blocks/admin.js.map +1 -1
  75. package/dist/blocks/ai.js +260 -240
  76. package/dist/blocks/ai.js.map +1 -1
  77. package/dist/blocks/analytics/usage-card.js +1 -1
  78. package/dist/blocks/analytics.js +620 -585
  79. package/dist/blocks/analytics.js.map +1 -1
  80. package/dist/blocks/collaboration.js +1 -1
  81. package/dist/blocks/commerce/receipt.js +1 -1
  82. package/dist/blocks/commerce.js +1152 -1109
  83. package/dist/blocks/commerce.js.map +1 -1
  84. package/dist/blocks/data-display.js +2 -2
  85. package/dist/blocks/onboarding.js +48 -39
  86. package/dist/blocks/onboarding.js.map +1 -1
  87. package/dist/blocks/planning.js +13 -12
  88. package/dist/blocks/planning.js.map +1 -1
  89. package/dist/blocks/timelines.js +1 -1
  90. package/dist/{breadcrumbs-D5t7I023.js → breadcrumbs-C-oqs1sQ.js} +5 -5
  91. package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
  92. package/dist/{button-QYwiyhD2.js → button-DVzspB_G.js} +2 -2
  93. package/dist/{button-QYwiyhD2.js.map → button-DVzspB_G.js.map} +1 -1
  94. package/dist/{buttons-SbIcm1HJ.js → buttons-DPZekJFu.js} +20 -15
  95. package/dist/buttons-DPZekJFu.js.map +1 -0
  96. package/dist/cards-BaBZR-AU.js +68 -0
  97. package/dist/cards-BaBZR-AU.js.map +1 -0
  98. package/dist/{chart-QfrARkXl.js → chart-ZOYyK2xG.js} +58 -55
  99. package/dist/chart-ZOYyK2xG.js.map +1 -0
  100. package/dist/{checkbox-DhB6K0bK.js → checkbox-AWIhNhmo.js} +2 -2
  101. package/dist/{checkbox-DhB6K0bK.js.map → checkbox-AWIhNhmo.js.map} +1 -1
  102. package/dist/{choice-inputs-t6w3ATNz.js → choice-inputs-CNHvARCJ.js} +49 -45
  103. package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
  104. package/dist/{code-block-Dgbu-CU3.js → code-block-DeneBJR_.js} +8 -8
  105. package/dist/code-block-DeneBJR_.js.map +1 -0
  106. package/dist/{collapsible-D8AEGU1-.js → collapsible-C-_l4hpy.js} +3 -3
  107. package/dist/{collapsible-D8AEGU1-.js.map → collapsible-C-_l4hpy.js.map} +1 -1
  108. package/dist/{collection-content-uK16Grv0.js → collection-content-By56pLog.js} +3 -3
  109. package/dist/{collection-content-uK16Grv0.js.map → collection-content-By56pLog.js.map} +1 -1
  110. package/dist/combobox-DaHESuiL.js +355 -0
  111. package/dist/combobox-DaHESuiL.js.map +1 -0
  112. package/dist/{combobox-DLl0bfiq.js → combobox-Dxo2fAYQ.js} +289 -279
  113. package/dist/combobox-Dxo2fAYQ.js.map +1 -0
  114. package/dist/{command-kNR20o7x.js → command-C25VMRII.js} +7 -7
  115. package/dist/{command-kNR20o7x.js.map → command-C25VMRII.js.map} +1 -1
  116. package/dist/{comments-BpDuCUUu.js → comments-DD0DUPwJ.js} +114 -105
  117. package/dist/comments-DD0DUPwJ.js.map +1 -0
  118. package/dist/components/base/badge/badge.recipes.d.ts +1 -1
  119. package/dist/components/base/buttons/loader-button.d.ts +2 -1
  120. package/dist/components/base/cards/card.recipes.d.ts +2 -3
  121. package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
  122. package/dist/components/base/cards/smart-card.types.d.ts +11 -4
  123. package/dist/components/base/chart/chart.d.ts +2 -5
  124. package/dist/components/base/combobox/combobox-field.d.ts +16 -0
  125. package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
  126. package/dist/components/base/combobox/index.d.ts +30 -4
  127. package/dist/components/base/forms/form-sizing.d.ts +11 -3
  128. package/dist/components/base/navigation/pagination.d.ts +5 -2
  129. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  130. package/dist/components/base/table/index.d.ts +9 -2
  131. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  132. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  133. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  134. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
  135. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  136. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  137. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  138. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  139. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  140. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  141. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  142. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  143. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  144. package/dist/components/features/combobox/types.d.ts +4 -0
  145. package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
  146. package/dist/components/features/rich-text-editor/index.d.ts +1 -1
  147. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
  148. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
  149. package/dist/components/features/table/table-header.d.ts +1 -1
  150. package/dist/components/features/table/table.strings.d.ts +55 -1
  151. package/dist/components/features/table/table.types.d.ts +17 -4
  152. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  153. package/dist/components/primitives/number.d.ts +4 -2
  154. package/dist/components/primitives/value.d.ts +3 -1
  155. package/dist/components/typography/text-link.d.ts +4 -0
  156. package/dist/components/ui/combobox-dismiss.d.ts +16 -0
  157. package/dist/components/ui/combobox.d.ts +16 -7
  158. package/dist/components/ui/dialog.d.ts +1 -1
  159. package/dist/components/ui/item.d.ts +8 -8
  160. package/dist/components/ui/popover.d.ts +1 -1
  161. package/dist/components/ui/sheet.d.ts +1 -1
  162. package/dist/components/ui/tabs.d.ts +1 -1
  163. package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
  164. package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
  165. package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
  166. package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
  167. package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
  168. package/dist/data-display-DT_khPl_.js.map +1 -0
  169. package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
  170. package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
  171. package/dist/{date-picker-CF-DtUpF.js → date-picker-B2K3ucWn.js} +594 -593
  172. package/dist/date-picker-B2K3ucWn.js.map +1 -0
  173. package/dist/date-pickers-Ds8gLaoP.js +175 -0
  174. package/dist/date-pickers-Ds8gLaoP.js.map +1 -0
  175. package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
  176. package/dist/display-hAc1HjpI.js.map +1 -0
  177. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  178. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  179. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  180. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  181. package/dist/features/activities.js +398 -375
  182. package/dist/features/activities.js.map +1 -1
  183. package/dist/features/ai-chat.js +188 -179
  184. package/dist/features/ai-chat.js.map +1 -1
  185. package/dist/features/appointment-calendar.js +683 -0
  186. package/dist/features/appointment-calendar.js.map +1 -0
  187. package/dist/features/async-preview.js +109 -107
  188. package/dist/features/async-preview.js.map +1 -1
  189. package/dist/features/combobox.js +1 -1
  190. package/dist/features/comments.js +1 -1
  191. package/dist/features/data-view.js +137 -137
  192. package/dist/features/data-view.js.map +1 -1
  193. package/dist/features/email-composer.js +255 -255
  194. package/dist/features/email-composer.js.map +1 -1
  195. package/dist/features/event-calendar.js +254 -248
  196. package/dist/features/event-calendar.js.map +1 -1
  197. package/dist/features/filters.js +1 -1
  198. package/dist/features/global-search.js +35 -32
  199. package/dist/features/global-search.js.map +1 -1
  200. package/dist/features/kanban.js +118 -117
  201. package/dist/features/kanban.js.map +1 -1
  202. package/dist/features/map.js +233 -231
  203. package/dist/features/map.js.map +1 -1
  204. package/dist/features/media-library.js +789 -775
  205. package/dist/features/media-library.js.map +1 -1
  206. package/dist/features/mentions.js +1 -1
  207. package/dist/features/overlays.js +1 -1
  208. package/dist/features/products.js +922 -902
  209. package/dist/features/products.js.map +1 -1
  210. package/dist/features/questionnaire.js +28 -24
  211. package/dist/features/questionnaire.js.map +1 -1
  212. package/dist/features/resource-assignment.js +18 -15
  213. package/dist/features/resource-assignment.js.map +1 -1
  214. package/dist/features/resource.js +12 -12
  215. package/dist/features/resource.js.map +1 -1
  216. package/dist/features/rich-text-editor.js +2 -2
  217. package/dist/features/schema-form.js +15 -13
  218. package/dist/features/schema-form.js.map +1 -1
  219. package/dist/features/suggestions.js +3 -3
  220. package/dist/features/sync.js +11 -5
  221. package/dist/features/sync.js.map +1 -1
  222. package/dist/features/table.js +1 -1
  223. package/dist/features/theme-tweaker.js +493 -489
  224. package/dist/features/theme-tweaker.js.map +1 -1
  225. package/dist/feedback-BYIhtitP.js +239 -0
  226. package/dist/feedback-BYIhtitP.js.map +1 -0
  227. package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
  228. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  229. package/dist/{filters-BkHH53uv.js → filters-DJVAveHA.js} +589 -580
  230. package/dist/filters-DJVAveHA.js.map +1 -0
  231. package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
  232. package/dist/form-field-CwH9y77i.js.map +1 -0
  233. package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
  234. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  235. package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
  236. package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
  237. package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
  238. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  239. package/dist/{header-BOefOKd1.js → header-BSfIEWbI.js} +160 -153
  240. package/dist/header-BSfIEWbI.js.map +1 -0
  241. package/dist/{hooks-9k_TtmKh.js → hooks-ClH9thn4.js} +2 -2
  242. package/dist/{hooks-9k_TtmKh.js.map → hooks-ClH9thn4.js.map} +1 -1
  243. package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
  244. package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
  245. package/dist/index.js +3 -3
  246. package/dist/input-CZw8iU99.js +21 -0
  247. package/dist/input-CZw8iU99.js.map +1 -0
  248. package/dist/input-DQdEd0YD.js +263 -0
  249. package/dist/input-DQdEd0YD.js.map +1 -0
  250. package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
  251. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  252. package/dist/item-K5_ghvze.js +275 -0
  253. package/dist/item-K5_ghvze.js.map +1 -0
  254. package/dist/layout/app-shell.js +1 -1
  255. package/dist/layout/auth.js +1 -1
  256. package/dist/layout/containers.js +1 -1
  257. package/dist/layout/header.js +1 -1
  258. package/dist/layout/hooks.js +1 -1
  259. package/dist/layout/navigation.js +1 -1
  260. package/dist/layout/page.js +1 -1
  261. package/dist/layout/settings.js +1 -1
  262. package/dist/layout/sidebar.js +2 -2
  263. package/dist/layout/workspace.js +1 -1
  264. package/dist/layout.js +10 -10
  265. package/dist/lib/affordance-geometry.generated.d.ts +71 -0
  266. package/dist/lib/editable-text-recipe.d.ts +4 -4
  267. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  268. package/dist/lib/interaction-recipes.d.ts +5 -0
  269. package/dist/lib/theme-mode-css.d.ts +7 -0
  270. package/dist/lib/tone-recipes.d.ts +8 -0
  271. package/dist/lib/ui-provider/types.d.ts +2 -2
  272. package/dist/lib/use-popup-focus-recovery.d.ts +8 -0
  273. package/dist/lib/utils.js +1 -1
  274. package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
  275. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  276. package/dist/{mentions-D-uyCh01.js → mentions-CGlEJ15c.js} +144 -142
  277. package/dist/mentions-CGlEJ15c.js.map +1 -0
  278. package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
  279. package/dist/message-DZ_ruyUV.js.map +1 -0
  280. package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
  281. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  282. package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
  283. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  284. package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
  285. package/dist/navigation-BzhHI3lo.js.map +1 -0
  286. package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  287. package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  288. package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
  289. package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
  290. package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
  291. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  292. package/dist/{overlays-I0axtYA6.js → overlays-tMkF-VAN.js} +282 -278
  293. package/dist/overlays-tMkF-VAN.js.map +1 -0
  294. package/dist/{page-B5dTH9gE.js → page-CL9YeH_V.js} +8 -8
  295. package/dist/{page-B5dTH9gE.js.map → page-CL9YeH_V.js.map} +1 -1
  296. package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
  297. package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
  298. package/dist/pagination-BL25hu2s.js +158 -0
  299. package/dist/pagination-BL25hu2s.js.map +1 -0
  300. package/dist/{popover-Di55PyAI.js → popover-gnTOhbFM.js} +69 -66
  301. package/dist/popover-gnTOhbFM.js.map +1 -0
  302. package/dist/popover-menu-Cn9rUkdc.js +100 -0
  303. package/dist/popover-menu-Cn9rUkdc.js.map +1 -0
  304. package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
  305. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  306. package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
  307. package/dist/primitives-BFK08r9M.js.map +1 -0
  308. package/dist/primitives.js +4 -4
  309. package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
  310. package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
  311. package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
  312. package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  313. package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
  314. package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
  315. package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
  316. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  317. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  318. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  319. package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
  320. package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
  321. package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
  322. package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
  323. package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
  324. package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
  325. package/dist/services/actions.js +1 -1
  326. package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
  327. package/dist/settings-ybnjVwbd.js.map +1 -0
  328. package/dist/{sheet-4SEvVYzA.js → sheet-ijlsjq-n.js} +76 -73
  329. package/dist/sheet-ijlsjq-n.js.map +1 -0
  330. package/dist/{sidebar-C7WWR29L.js → sidebar-Db6gkh3U.js} +183 -182
  331. package/dist/sidebar-Db6gkh3U.js.map +1 -0
  332. package/dist/{sidebar-d7Dg80ln.js → sidebar-DkTO4VTO.js} +14 -13
  333. package/dist/{sidebar-d7Dg80ln.js.map → sidebar-DkTO4VTO.js.map} +1 -1
  334. package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
  335. package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  336. package/dist/smart-card-DiC5aac3.js +604 -0
  337. package/dist/smart-card-DiC5aac3.js.map +1 -0
  338. package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
  339. package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
  340. package/dist/style.css +1 -1
  341. package/dist/table-BweFy_P9.js +1530 -0
  342. package/dist/table-BweFy_P9.js.map +1 -0
  343. package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
  344. package/dist/table-DsfzoUia.js.map +1 -0
  345. package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
  346. package/dist/tabs-CDocW5D1.js.map +1 -0
  347. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  348. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  349. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  350. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  351. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  352. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  353. package/dist/theme.css +285 -228
  354. package/dist/themes/green.css +16 -12
  355. package/dist/timelines-CwM_9IhD.js +457 -0
  356. package/dist/timelines-CwM_9IhD.js.map +1 -0
  357. package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
  358. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  359. package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
  360. package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
  361. package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
  362. package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
  363. package/dist/typography/rich-text.js +1 -1
  364. package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
  365. package/dist/typography-UTnveOEy.js.map +1 -0
  366. package/dist/typography.js +2 -2
  367. package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
  368. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  369. package/dist/ui-provider.js +2 -2
  370. package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
  371. package/dist/upload-CXyxmQBP.js.map +1 -0
  372. package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
  373. package/dist/upload-queue-Boscubn9.js.map +1 -0
  374. package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
  375. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  376. package/dist/use-popup-focus-recovery-C0QPvgOR.js +36 -0
  377. package/dist/use-popup-focus-recovery-C0QPvgOR.js.map +1 -0
  378. package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
  379. package/dist/utils-BRhFDwuU.js.map +1 -0
  380. package/dist/{value-inputs-TAYMX111.js → value-inputs-TaX4OjNk.js} +268 -252
  381. package/dist/value-inputs-TaX4OjNk.js.map +1 -0
  382. package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
  383. package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  384. package/dist/{workspace-DH0v0KcB.js → workspace-B-OEm3Kf.js} +34 -33
  385. package/dist/workspace-B-OEm3Kf.js.map +1 -0
  386. package/docs/consumer-skill/SKILL.md +3 -3
  387. package/docs/consumer-skill/references/agents-md.md +1 -1
  388. package/docs/consumer-skill/references/composition.md +8 -6
  389. package/docs/consumer-skill/references/installation.md +6 -0
  390. package/docs/consumer-skill/references/integration.md +4 -3
  391. package/docs/consumer-skill/references/public-api.json +105 -2
  392. package/docs/consumer-skill/references/review.md +7 -0
  393. package/docs/consumer-skill/references/theming.md +71 -6
  394. package/docs/consumer-skill/references/tokens.json +1 -1
  395. package/docs/consumer-skill/references/workflows.md +26 -0
  396. package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
  397. package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
  398. package/package.json +8 -4
  399. package/dist/accordion-B6a3vVgA.js.map +0 -1
  400. package/dist/action-menu-TzCoSlwL.js +0 -280
  401. package/dist/action-menu-TzCoSlwL.js.map +0 -1
  402. package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
  403. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
  404. package/dist/ai-artifact-BMJdv-6q.js +0 -1115
  405. package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
  406. package/dist/attachment-BtfhGm8i.js +0 -245
  407. package/dist/attachment-BtfhGm8i.js.map +0 -1
  408. package/dist/auth-CYxKfo69.js.map +0 -1
  409. package/dist/avatar-BBnEJIx8.js.map +0 -1
  410. package/dist/badge-MrKVNzW9.js.map +0 -1
  411. package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
  412. package/dist/breadcrumbs-D5t7I023.js.map +0 -1
  413. package/dist/buttons-SbIcm1HJ.js.map +0 -1
  414. package/dist/cards-CiiHpKYd.js +0 -66
  415. package/dist/cards-CiiHpKYd.js.map +0 -1
  416. package/dist/chart-QfrARkXl.js.map +0 -1
  417. package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
  418. package/dist/code-block-Dgbu-CU3.js.map +0 -1
  419. package/dist/combobox-2Ic8N9bL.js +0 -278
  420. package/dist/combobox-2Ic8N9bL.js.map +0 -1
  421. package/dist/combobox-DLl0bfiq.js.map +0 -1
  422. package/dist/comments-BpDuCUUu.js.map +0 -1
  423. package/dist/data-display-DafIvCl5.js.map +0 -1
  424. package/dist/date-picker-CF-DtUpF.js.map +0 -1
  425. package/dist/date-pickers-BmzxJl5l.js +0 -174
  426. package/dist/date-pickers-BmzxJl5l.js.map +0 -1
  427. package/dist/display-DsQTVzMz.js.map +0 -1
  428. package/dist/dropdown-menu-E2qmdC7o.js +0 -193
  429. package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
  430. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  431. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  432. package/dist/feedback-qNuMBtRH.js +0 -233
  433. package/dist/feedback-qNuMBtRH.js.map +0 -1
  434. package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
  435. package/dist/filters-BkHH53uv.js.map +0 -1
  436. package/dist/form-field-DUt4UxSV.js.map +0 -1
  437. package/dist/form-sizing-By94KzXE.js.map +0 -1
  438. package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
  439. package/dist/header-BOefOKd1.js.map +0 -1
  440. package/dist/input-DWhBBBww.js +0 -262
  441. package/dist/input-DWhBBBww.js.map +0 -1
  442. package/dist/input-Ddi_LSYv.js +0 -20
  443. package/dist/input-Ddi_LSYv.js.map +0 -1
  444. package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
  445. package/dist/item-DEmDiTlD.js +0 -265
  446. package/dist/item-DEmDiTlD.js.map +0 -1
  447. package/dist/media-gallery-DcTtAaeC.js.map +0 -1
  448. package/dist/mentions-D-uyCh01.js.map +0 -1
  449. package/dist/message-CdHgIWKf.js.map +0 -1
  450. package/dist/metadata-list-X5rYAKSB.js.map +0 -1
  451. package/dist/navigation-D3KwXmaq.js.map +0 -1
  452. package/dist/navigation-HJf5zxlH.js.map +0 -1
  453. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
  454. package/dist/overlays-I0axtYA6.js.map +0 -1
  455. package/dist/pagination-3bPA_a6K.js +0 -149
  456. package/dist/pagination-3bPA_a6K.js.map +0 -1
  457. package/dist/popover-Di55PyAI.js.map +0 -1
  458. package/dist/popover-menu-B71Tn2Qz.js +0 -99
  459. package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
  460. package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
  461. package/dist/primitives-B-CkiEMU.js.map +0 -1
  462. package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
  463. package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
  464. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
  465. package/dist/settings-CQW3b-Cu.js.map +0 -1
  466. package/dist/sheet-4SEvVYzA.js.map +0 -1
  467. package/dist/sidebar-C7WWR29L.js.map +0 -1
  468. package/dist/smart-card-lFKxn5Hu.js +0 -595
  469. package/dist/smart-card-lFKxn5Hu.js.map +0 -1
  470. package/dist/spinner-fa3h1Aif.js +0 -80
  471. package/dist/spinner-fa3h1Aif.js.map +0 -1
  472. package/dist/table-CIKyLUsy.js.map +0 -1
  473. package/dist/table-CrcLN9Io.js +0 -1458
  474. package/dist/table-CrcLN9Io.js.map +0 -1
  475. package/dist/tabs-DwBJfjxX.js.map +0 -1
  476. package/dist/text-inputs-aaK9wcDT.js +0 -326
  477. package/dist/text-inputs-aaK9wcDT.js.map +0 -1
  478. package/dist/theme-scope-kStaAer0.js +0 -39
  479. package/dist/theme-scope-kStaAer0.js.map +0 -1
  480. package/dist/timelines-C_SBwHNP.js +0 -442
  481. package/dist/timelines-C_SBwHNP.js.map +0 -1
  482. package/dist/tone-recipes-CPoExcTE.js.map +0 -1
  483. package/dist/typography-DTRkE9zL.js.map +0 -1
  484. package/dist/ui-provider-1D_NSYzO.js.map +0 -1
  485. package/dist/upload-BO8-CLN6.js.map +0 -1
  486. package/dist/upload-queue-EOC8g1gf.js.map +0 -1
  487. package/dist/usage-card-obRaBskq.js.map +0 -1
  488. package/dist/utils-l5LpDw2z.js.map +0 -1
  489. package/dist/value-inputs-TAYMX111.js.map +0 -1
  490. package/dist/workspace-DH0v0KcB.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appointment-calendar.js","names":["_Fragment","useFormattingConfig","useDatesConfig","cn","Button","Text","Heading","focusRecipes","Stack","toneRecipes","dotRecipes","AlertDescription","AlertAction","Card","AlertTitle","ErrorState","ActionMenu","Skeleton","interactionRecipes","formatInitials","AvatarFallback","Avatar","AvatarImage","Badge","Select","VisuallyHidden","ScrollArea","ItemDescription","ItemActions","ItemContent","Item","ItemTitle","TabsTrigger","TabsList","Tabs","EmptyState","Fragment$1","defaultAppointmentCalendarStrings","count","staffName","time","start","end","date","title","CHART_SERIES","appointmentCategoryColorClasses","categoryColor","index","categories","category","id","startOfDay","addDays","days","isSameDay","a","b","addMonths","target","months","lastDay","startOfWeek","day","weekStartsOn","weekDays","first","monthGrid","week","occursOn","dayStart","dayEnd","appointment","appointmentsOn","appointments","filterAppointments","staffId","findConflicts","byStaff","list","conflicts","sorted","group","groupEnd","flush","conflictingIds","conflict","staffFrom","seen","formatTime","locale","hour12","options","personName","person","STATUS_TONE","AppointmentRow","useId","client","staff","context","hasActions","labelledBy","openRef","useRef","actionsHadFocus","useLayoutEffect","open","event","AppointmentAgenda","groups","total","sum","dayFormat","grouped","contextFor","actions","appointmentActions","action","strings","onAppointmentClick","items","renderAppointment","body","loading","error","isValidElement","heading","MAX_DOTS","AppointmentMonth","focused","setFocused","useState","selected","gridRef","focusOnRender","today","useMemo","visibleMonth","useEffect","onVisibleMonthChange","weeks","monthFormat","weekdayFormat","monthOptions","month","yearOptions","years","min","max","moveTo","select","onSelect","changeMonth","next","ChevronLeft","value","ChevronRight","move","dayAppointments","dayCategories","isSelected","isFocused","outside","useControllable","local","setLocal","fallback","onChange","AppointmentCalendar","staffProp","dateProp","viewProp","categoryProp","staffIdProp","weekStartsOnProp","stringsProp","useStrings","dates","setDate","defaultDate","onDateChange","view","setView","defaultView","onViewChange","setCategory","defaultCategory","onCategoryChange","setStaffId","defaultStaffId","onStaffChange","dismissed","setDismissed","setVisibleMonth","visible","range","edges","reportedRange","key","onRangeChange","inRange","conflictIds","visibleConflicts","booked","conflictKey","showAlert","headingFormat","rangeFormat","dismissConflicts","onConflictsDismiss","shown","className","option","onCreateAppointment","Plus","Alert","TriangleAlert"],"sources":["../../src/components/features/appointment-calendar/appointment-calendar.types.ts","../../src/components/features/appointment-calendar/appointment-calendar.utils.ts","../../src/components/features/appointment-calendar/partials/appointment-agenda.tsx","../../src/components/features/appointment-calendar/partials/appointment-month.tsx","../../src/components/features/appointment-calendar/appointment-calendar.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ActionMenuAction } from '../../base/action-menu';\nimport type { BadgeTone } from '../../base/badge';\nimport type { StringsProp } from '../../../lib/strings';\n\n/** Where an appointment stands. Conflicts are derived, never a status. */\nexport type AppointmentStatus = 'confirmed' | 'pending' | 'completed' | 'cancelled' | 'noShow';\n\n/** The day agenda or the seven-day week agenda beside the month. */\nexport type AppointmentCalendarView = 'day' | 'week';\n\n/**\n * Categorical colour for a service category. Categories are kinds, not\n * statuses, so they draw from the chart series palette and never from the\n * success, warning or destructive tones that status chips own.\n */\nexport type AppointmentCategoryColor = 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5';\n\n/** A service category: its label, filter chip and marker colour. */\nexport interface AppointmentCategory {\n\t/** Stable identity, referenced by `Appointment.category`. */\n\tid: string;\n\t/** Chip and legend label. */\n\tlabel: string;\n\t/** Marker colour. Defaults to the chart series by the category's position. */\n\tcolor?: AppointmentCategoryColor;\n}\n\n/** A person on an appointment: the staff member who delivers it, or the client. */\nexport interface AppointmentPerson {\n\t/** Stable identity. Staff overlap is detected by this id. */\n\tid: string;\n\t/** Display name. */\n\tname: string;\n\t/** Portrait. Initials stand in without one, or when it fails to load. */\n\tavatarUrl?: string;\n}\n\n/** One booked slot. The calendar formats it; it never fetches or saves. */\nexport interface Appointment {\n\t/** Stable identity. */\n\tid: string;\n\t/** The service: \"Cut and blow-dry\". */\n\ttitle: string;\n\t/** Start of the slot. */\n\tstart: Date;\n\t/** End of the slot; later than `start`. */\n\tend: Date;\n\t/** Category id, matching an `AppointmentCategory`. */\n\tcategory: string;\n\t/** Booking state. Cancelled appointments are listed but never conflict. */\n\tstatus: AppointmentStatus;\n\t/** Who the appointment is for, shown after the time. */\n\tclient?: AppointmentPerson | string;\n\t/** Who delivers it. Two overlapping appointments for one staff member conflict. */\n\tstaff?: AppointmentPerson;\n}\n\n/** The days on screen: the month grid and the agenda. `end` is exclusive (midnight after the last day). */\nexport interface AppointmentDateRange {\n\tstart: Date;\n\tend: Date;\n}\n\n/** Overlapping appointments for one staff member. */\nexport interface AppointmentConflict<T extends Appointment = Appointment> {\n\t/** The double-booked staff member. */\n\tstaff: AppointmentPerson;\n\t/** The appointments that overlap, earliest first. */\n\tappointments: T[];\n\t/** When the overlap begins. */\n\tstart: Date;\n}\n\nexport interface AppointmentCalendarStrings {\n\t/** Booked count beside the title: \"8 booked\". */\n\tformatBooked: (count: number) => string;\n\t/** Conflict count beside the title: \"2 conflicts\". */\n\tformatConflicts: (count: number) => string;\n\t/** Accessible name of the Day/Week switch. */\n\tviewLabel: string;\n\tday: string;\n\tweek: string;\n\t/** Accessible name of the staff filter. */\n\tstaffLabel: string;\n\t/** The staff filter's \"everyone\" option. */\n\tallStaff: string;\n\t/** Primary command. */\n\tnewAppointment: string;\n\t/** Conflict alert title. */\n\tconflictTitle: string;\n\t/** One overlapping-booking sentence per double-booked staff member. */\n\tformatConflict: (staffName: string, count: number, time: string) => string;\n\t/** Hides the conflict alert. */\n\tdismiss: string;\n\tpreviousMonth: string;\n\tnextMonth: string;\n\t/** Accessible name of the month select. */\n\tmonthLabel: string;\n\t/** Accessible name of the year select. */\n\tyearLabel: string;\n\t/** Accessible name of the category filter. */\n\tcategoriesLabel: string;\n\t/** The category filter's \"every category\" chip. */\n\tallCategories: string;\n\t/** Count beside the agenda heading: \"8 appointments\". */\n\tformatCount: (count: number) => string;\n\t/** A slot: \"9 AM to 10 AM\". Receives already formatted times. */\n\tformatTimeRange: (start: string, end: string) => string;\n\t/** Accessible day label in the month: \"Tuesday, June 9, 3 appointments\". */\n\tformatDayLabel: (date: string, count: number) => string;\n\t/** Agenda heading for the week view: \"June 8 to 14\". */\n\tformatWeekRange: (start: string, end: string) => string;\n\t/** Status chip words. */\n\tstatus: Record<AppointmentStatus, string>;\n\t/** Chip shown instead of the status when an appointment overlaps another. */\n\tconflict: string;\n\t/** Agenda copy when nothing matches the day or week. */\n\tempty: string;\n\t/** Loading copy for assistive technology. */\n\tloading: string;\n\t/** Default error state title. */\n\terrorTitle: string;\n\t/** Default error state description, when `error` carries no message. */\n\terrorDescription: string;\n\t/** Retry command in the default error state. */\n\tretry: string;\n\t/** Accessible name of an appointment's actions menu: \"Actions for Balayage\". */\n\tformatActionsLabel: (title: string) => string;\n}\n\nexport const defaultAppointmentCalendarStrings: AppointmentCalendarStrings = {\n\tformatBooked: (count) => `${count} booked`,\n\tformatConflicts: (count) => (count === 1 ? '1 conflict' : `${count} conflicts`),\n\tviewLabel: 'View',\n\tday: 'Day',\n\tweek: 'Week',\n\tstaffLabel: 'Staff',\n\tallStaff: 'All staff',\n\tnewAppointment: 'New appointment',\n\tconflictTitle: 'Double-booked',\n\tformatConflict: (staffName, count, time) => `${staffName} has ${count} overlapping bookings at ${time}.`,\n\tdismiss: 'Dismiss',\n\tpreviousMonth: 'Previous month',\n\tnextMonth: 'Next month',\n\tmonthLabel: 'Month',\n\tyearLabel: 'Year',\n\tcategoriesLabel: 'Categories',\n\tallCategories: 'All',\n\tformatCount: (count) => (count === 1 ? '1 appointment' : `${count} appointments`),\n\tformatTimeRange: (start, end) => `${start} to ${end}`,\n\tformatDayLabel: (date, count) => (count === 0 ? date : `${date}, ${count === 1 ? '1 appointment' : `${count} appointments`}`),\n\tformatWeekRange: (start, end) => `${start} to ${end}`,\n\tstatus: { confirmed: 'Confirmed', pending: 'Pending', completed: 'Completed', cancelled: 'Cancelled', noShow: 'No-show' },\n\tconflict: 'Conflict',\n\tempty: 'No appointments',\n\tloading: 'Loading appointments',\n\terrorTitle: 'Appointments unavailable',\n\terrorDescription: 'The appointments could not be loaded.',\n\tretry: 'Retry',\n\tformatActionsLabel: (title) => `Actions for ${title}`,\n};\n\n/** What the calendar has worked out for one appointment, handed to `renderAppointment`. */\nexport interface AppointmentRenderContext {\n\t/** The appointment's category, when one matches. */\n\tcategory?: AppointmentCategory;\n\t/** The category's marker class (`bg-chart-N`), for a stripe or dot of your own. */\n\tcategoryColorClass: string;\n\t/** Whether it overlaps another booking for the same staff member. */\n\tconflict: boolean;\n\t/** The status chip's word, or the conflict word when it overlaps. */\n\tstatusLabel: string;\n\t/** The status chip's tone: destructive for a conflict, otherwise the status tone. */\n\tstatusTone: BadgeTone;\n\t/** The formatted slot: \"09:00 to 10:00\". */\n\ttime: string;\n\t/** Opens it through `onAppointmentClick`. Undefined when rows are not interactive. */\n\topen?: () => void;\n\t/** The visible commands `appointmentActions` returned for it. */\n\tactions: readonly ActionMenuAction[];\n\t/** The built-in actions menu for those commands, or null when there are none. */\n\tactionsMenu: ReactNode;\n\t/** The built-in row, to wrap or extend instead of replacing. */\n\tdefaultRender: () => ReactNode;\n}\n\n/**\n * Props for `AppointmentCalendar`. `T` is the app's own appointment type: extra\n * fields such as a price or notes come back, typed, in every callback.\n */\nexport interface AppointmentCalendarProps<T extends Appointment = Appointment> {\n\t/** Appointments to place. The calendar filters and formats; it never fetches. */\n\tappointments: T[];\n\t/** Service categories: filter chips, markers and day dots. */\n\tcategories: AppointmentCategory[];\n\t/** Staff offered by the staff filter. Defaults to the staff found on appointments. */\n\tstaff?: AppointmentPerson[];\n\t/** Heading above the calendar: the location or calendar name. */\n\ttitle?: ReactNode;\n\t/** Selected day. Controlled with `onDateChange`. */\n\tdate?: Date;\n\t/** Selected day for uncontrolled use. Defaults to today. */\n\tdefaultDate?: Date;\n\t/** Fired when a day is chosen or the month moves. */\n\tonDateChange?: (date: Date) => void;\n\t/** Day or week agenda. Controlled with `onViewChange`. */\n\tview?: AppointmentCalendarView;\n\t/** View for uncontrolled use. Defaults to `day`. */\n\tdefaultView?: AppointmentCalendarView;\n\t/** Fired when the Day/Week switch changes. */\n\tonViewChange?: (view: AppointmentCalendarView) => void;\n\t/** Category filter: a category id, or `all`. Controlled with `onCategoryChange`. */\n\tcategory?: string;\n\t/** Category filter for uncontrolled use. Defaults to `all`. */\n\tdefaultCategory?: string;\n\t/** Fired when a category chip is chosen. */\n\tonCategoryChange?: (category: string) => void;\n\t/** Staff filter: a staff id, or `all`. Controlled with `onStaffChange`. */\n\tstaffId?: string;\n\t/** Staff filter for uncontrolled use. Defaults to `all`. */\n\tdefaultStaffId?: string;\n\t/** Fired when the staff filter changes. */\n\tonStaffChange?: (staffId: string) => void;\n\t/** Fired when an appointment is activated. Without it, rows are not interactive. */\n\tonAppointmentClick?: (appointment: T) => void;\n\t/**\n\t * Commands for one appointment, such as confirm, reschedule or cancel,\n\t * offered in a menu at the end of its row. Return an empty list for none.\n\t */\n\tappointmentActions?: (appointment: T) => readonly ActionMenuAction[];\n\t/**\n\t * Renders one appointment in the agenda instead of the built-in row. The\n\t * context carries its category colour, conflict, time, `open`, its actions\n\t * and a ready actions menu, and `defaultRender` for the built-in row.\n\t */\n\trenderAppointment?: (appointment: T, context: AppointmentRenderContext) => ReactNode;\n\t/**\n\t * Fired with the days on screen, the month grid and the agenda together, once\n\t * on mount and whenever they change. Load appointments for this range.\n\t */\n\tonRangeChange?: (range: AppointmentDateRange) => void;\n\t/** Shows the primary \"New appointment\" command; receives the selected day. */\n\tonCreateAppointment?: (date: Date) => void;\n\t/** Fired when the conflict alert is dismissed, with the conflicts it showed. */\n\tonConflictsDismiss?: (conflicts: AppointmentConflict<T>[]) => void;\n\t/** Shows the loading state in the agenda. */\n\tloading?: boolean;\n\t/**\n\t * Shows the error state in the agenda. A string or Error becomes its\n\t * description; any other element replaces the default state.\n\t */\n\terror?: ReactNode | Error;\n\t/** Adds Retry to the default error state. */\n\tonRetry?: () => void;\n\t/** First column of the month and first day of the week. Defaults to the provider, then Sunday. */\n\tweekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\t/** Overrides this calendar's own copy. */\n\tstrings?: StringsProp<AppointmentCalendarStrings>;\n\t/** Merged onto the root. */\n\tclassName?: string;\n}\n","/**\n * Pure helpers for the appointment calendar: day arithmetic, filtering,\n * conflict detection and time formatting. No React, so they are testable and\n * reusable by an application that pre-computes its own view.\n */\nimport type {\n\tAppointment,\n\tAppointmentCategory,\n\tAppointmentCategoryColor,\n\tAppointmentConflict,\n\tAppointmentPerson,\n} from './appointment-calendar.types';\n\nconst CHART_SERIES: AppointmentCategoryColor[] = ['chart-1', 'chart-2', 'chart-3', 'chart-4', 'chart-5'];\n\n/** Marker colour classes per chart series. Literal so Tailwind generates them. */\nexport const appointmentCategoryColorClasses: Record<AppointmentCategoryColor, string> = {\n\t'chart-1': 'bg-chart-1',\n\t'chart-2': 'bg-chart-2',\n\t'chart-3': 'bg-chart-3',\n\t'chart-4': 'bg-chart-4',\n\t'chart-5': 'bg-chart-5',\n};\n\n/** A category's colour: its own, or the chart series at its position. */\nexport function categoryColor(categories: AppointmentCategory[], id: string): AppointmentCategoryColor {\n\tconst index = categories.findIndex((category) => category.id === id);\n\tif (index < 0) return 'chart-1';\n\treturn categories[index]?.color ?? CHART_SERIES[index % CHART_SERIES.length] ?? 'chart-1';\n}\n\nexport function startOfDay(date: Date): Date {\n\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate());\n}\n\nexport function addDays(date: Date, days: number): Date {\n\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);\n}\n\nexport function isSameDay(a: Date, b: Date): boolean {\n\treturn a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();\n}\n\n/** The same day of the month in another month, clamped to that month's length. */\nexport function addMonths(date: Date, months: number): Date {\n\tconst target = new Date(date.getFullYear(), date.getMonth() + months, 1);\n\tconst lastDay = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();\n\treturn new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), lastDay));\n}\n\nexport function startOfWeek(date: Date, weekStartsOn: number): Date {\n\tconst day = startOfDay(date);\n\treturn addDays(day, -((day.getDay() - weekStartsOn + 7) % 7));\n}\n\n/** The seven days of the week that holds `date`. */\nexport function weekDays(date: Date, weekStartsOn: number): Date[] {\n\tconst first = startOfWeek(date, weekStartsOn);\n\treturn Array.from({ length: 7 }, (_, index) => addDays(first, index));\n}\n\n/** Six full weeks covering the month of `date`, so the grid never changes height. */\nexport function monthGrid(date: Date, weekStartsOn: number): Date[][] {\n\tconst first = startOfWeek(new Date(date.getFullYear(), date.getMonth(), 1), weekStartsOn);\n\treturn Array.from({ length: 6 }, (_, week) => Array.from({ length: 7 }, (_, day) => addDays(first, week * 7 + day)));\n}\n\n/** Whether an appointment touches a day (it may run past midnight). */\nexport function occursOn(appointment: Appointment, day: Date): boolean {\n\tconst dayStart = startOfDay(day).getTime();\n\tconst dayEnd = addDays(day, 1).getTime();\n\treturn appointment.start.getTime() < dayEnd && appointment.end.getTime() > dayStart;\n}\n\nexport function appointmentsOn<T extends Appointment>(appointments: T[], day: Date): T[] {\n\treturn appointments\n\t\t.filter((appointment) => occursOn(appointment, day))\n\t\t.sort((a, b) => a.start.getTime() - b.start.getTime() || a.end.getTime() - b.end.getTime());\n}\n\n/** Applies the category and staff filters; `all` keeps everything. */\nexport function filterAppointments<T extends Appointment>(appointments: T[], category: string, staffId: string): T[] {\n\treturn appointments.filter((appointment) =>\n\t\t(category === 'all' || appointment.category === category) &&\n\t\t(staffId === 'all' || appointment.staff?.id === staffId),\n\t);\n}\n\n/**\n * Overlapping appointments per staff member. Two appointments conflict when\n * the same staff member is booked for both and their times overlap; touching\n * ends (10:00 to 10:00) do not overlap, and cancelled appointments never conflict.\n */\nexport function findConflicts<T extends Appointment>(appointments: T[]): AppointmentConflict<T>[] {\n\tconst byStaff = new Map<string, T[]>();\n\tfor (const appointment of appointments) {\n\t\tif (!appointment.staff || appointment.status === 'cancelled') continue;\n\t\tconst list = byStaff.get(appointment.staff.id) ?? [];\n\t\tlist.push(appointment);\n\t\tbyStaff.set(appointment.staff.id, list);\n\t}\n\tconst conflicts: AppointmentConflict<T>[] = [];\n\tfor (const list of byStaff.values()) {\n\t\tconst sorted = [...list].sort((a, b) => a.start.getTime() - b.start.getTime());\n\t\tlet group: T[] = [];\n\t\tlet groupEnd = -Infinity;\n\t\tconst flush = () => {\n\t\t\tconst first = group[0];\n\t\t\tif (group.length > 1 && first?.staff) conflicts.push({ staff: first.staff, appointments: group, start: first.start });\n\t\t};\n\t\tfor (const appointment of sorted) {\n\t\t\tif (appointment.start.getTime() < groupEnd) {\n\t\t\t\tgroup.push(appointment);\n\t\t\t\tgroupEnd = Math.max(groupEnd, appointment.end.getTime());\n\t\t\t} else {\n\t\t\t\tflush();\n\t\t\t\tgroup = [appointment];\n\t\t\t\tgroupEnd = appointment.end.getTime();\n\t\t\t}\n\t\t}\n\t\tflush();\n\t}\n\treturn conflicts.sort((a, b) => a.start.getTime() - b.start.getTime());\n}\n\n/** Ids of every appointment that takes part in a conflict. */\nexport function conflictingIds(conflicts: AppointmentConflict[]): Set<string> {\n\treturn new Set(conflicts.flatMap((conflict) => conflict.appointments.map((appointment) => appointment.id)));\n}\n\n/** Distinct staff found on appointments, in first-seen order. */\nexport function staffFrom(appointments: Appointment[]): AppointmentPerson[] {\n\tconst seen = new Map<string, AppointmentPerson>();\n\tfor (const appointment of appointments) if (appointment.staff && !seen.has(appointment.staff.id)) seen.set(appointment.staff.id, appointment.staff);\n\treturn [...seen.values()];\n}\n\n/**\n * \"9 AM\", or \"9:30 AM\" when the minutes matter. A 24-hour clock always keeps\n * its minutes (\"09:00\"), since a bare \"09\" does not read as a time.\n */\nexport function formatTime(date: Date, locale?: string): string {\n\tconst { hour12 } = new Intl.DateTimeFormat(locale, { hour: 'numeric' }).resolvedOptions();\n\tif (!hour12) return new Intl.DateTimeFormat(locale, { hour: '2-digit', minute: '2-digit' }).format(date);\n\tconst options: Intl.DateTimeFormatOptions = date.getMinutes() === 0 ? { hour: 'numeric' } : { hour: 'numeric', minute: '2-digit' };\n\treturn new Intl.DateTimeFormat(locale, options).format(date);\n}\n\nexport function personName(person: AppointmentPerson | string | undefined): string | undefined {\n\treturn typeof person === 'string' ? person : person?.name;\n}\n","/**\n * AppointmentAgenda — the list beside the month: one day's appointments, or\n * the selected week grouped by day. Each row shows its category stripe, the\n * service with its status chip (or the conflict chip when it overlaps another\n * booking for the same staff member), the time range and client, and the\n * staff member's avatar. A row opens only when the app can open it: a\n * transparent button stretched over the row takes the click, and the actions\n * menu sits above it, since a button cannot hold another. Private to the\n * appointment calendar.\n */\nimport { isValidElement, useId, useLayoutEffect, useRef, type ReactNode } from 'react';\n\nimport { ActionMenu, type ActionMenuAction } from '../../../base/action-menu';\nimport { Avatar, AvatarFallback, AvatarImage } from '../../../base/avatar';\nimport { Badge, type BadgeTone } from '../../../base/badge';\nimport { Card } from '../../../base/cards';\nimport { ScrollArea, VisuallyHidden } from '../../../base/display';\nimport { ErrorState } from '../../../base/feedback';\nimport { Item, ItemActions, ItemContent, ItemDescription, ItemTitle } from '../../../base/item';\nimport { Skeleton } from '../../../base/skeleton';\nimport { Stack } from '../../../base/structure';\nimport { formatInitials } from '../../../primitives';\nimport { Heading, Text } from '../../../typography';\nimport { EmptyState } from '../../../blocks/data-display';\nimport { focusRecipes } from '../../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../../lib/interaction-recipes';\nimport { toneRecipes } from '../../../../lib/tone-recipes';\nimport { cn } from '../../../../lib/utils';\n\nimport type {\n\tAppointment,\n\tAppointmentCalendarStrings,\n\tAppointmentCategory,\n\tAppointmentRenderContext,\n\tAppointmentStatus,\n} from '../appointment-calendar.types';\nimport {\n\tappointmentCategoryColorClasses,\n\tappointmentsOn,\n\tcategoryColor,\n\tformatTime,\n\tpersonName,\n} from '../appointment-calendar.utils';\n\n/** Status chip tones. Completed and cancelled are history, not a state to act on. */\nconst STATUS_TONE: Record<AppointmentStatus, BadgeTone> = {\n\tconfirmed: 'success',\n\tpending: 'warning',\n\tcompleted: 'neutral',\n\tcancelled: 'neutral',\n\tnoShow: 'destructive',\n};\n\nexport interface AppointmentAgendaProps {\n\t/** The days to list: one for the day view, seven for the week view. */\n\tdays: Date[];\n\t/** Appointments after the category and staff filters. */\n\tappointments: Appointment[];\n\tcategories: AppointmentCategory[];\n\t/** Ids of appointments that overlap another booking for the same staff member. */\n\tconflicts: Set<string>;\n\theading: string;\n\tloading: boolean;\n\terror?: ReactNode | Error;\n\tonRetry?: () => void;\n\tlocale?: string;\n\tonAppointmentClick?: (appointment: Appointment) => void;\n\tappointmentActions?: (appointment: Appointment) => readonly ActionMenuAction[];\n\trenderAppointment?: (appointment: Appointment, context: AppointmentRenderContext) => ReactNode;\n\tstrings: AppointmentCalendarStrings;\n}\n\ntype RowContext = Omit<AppointmentRenderContext, 'defaultRender'>;\n\n/** The built-in row, drawn from the same context a custom row receives. */\nfunction AppointmentRow({ appointment, context }: { appointment: Appointment; context: RowContext }) {\n\tconst id = useId();\n\tconst client = personName(appointment.client);\n\tconst staff = appointment.staff;\n\tconst { open, conflict } = context;\n\tconst hasActions = context.actions.length > 0;\n\t// The open button is named by the row's own visible copy and the staff name,\n\t// one part per id so the title and its chip read as separate words.\n\tconst labelledBy = [`${id}-title`, `${id}-status`, `${id}-detail`, staff && `${id}-staff`].filter(Boolean).join(' ');\n\tconst openRef = useRef<HTMLButtonElement>(null);\n\tconst actionsHadFocus = useRef(false);\n\n\t// A command can remove the row's last action, and the menu trigger with it.\n\t// Focus then returns to the row's open button instead of falling to the page.\n\tuseLayoutEffect(() => {\n\t\tif (hasActions || !actionsHadFocus.current) return;\n\t\tactionsHadFocus.current = false;\n\t\tif (!document.activeElement || document.activeElement === document.body) openRef.current?.focus();\n\t}, [hasActions]);\n\n\treturn (\n\t\t<Item\n\t\t\tvariant=\"outline\"\n\t\t\tsize=\"sm\"\n\t\t\tpadding=\"default\"\n\t\t\tdata-status={appointment.status}\n\t\t\tdata-conflict={conflict ? '' : undefined}\n\t\t\tclassName={cn(\n\t\t\t\t'appointment-agenda--row relative w-full flex-nowrap',\n\t\t\t\t!!open && interactionRecipes.rowHover,\n\t\t\t\tconflict && cn(toneRecipes.destructive.wash, toneRecipes.destructive.edge),\n\t\t\t)}\n\t\t>\n\t\t\t{!!open && (\n\t\t\t\t<button\n\t\t\t\t\tref={openRef}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\taria-labelledby={labelledBy}\n\t\t\t\t\tonClick={open}\n\t\t\t\t\tclassName={cn('appointment-agenda--open absolute inset-0 z-0 cursor-pointer rounded-inner focus-visible:outline-none', interactionRecipes.nativeButtonReset, focusRecipes.inset)}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{/* The category stripe: a categorical mark, so it draws from the chart palette. */}\n\t\t\t<span aria-hidden=\"true\" className={cn('appointment-agenda--stripe w-1 shrink-0 self-stretch rounded-full', context.categoryColorClass)} />\n\t\t\t<ItemContent className=\"min-w-0\">\n\t\t\t\t<ItemTitle className=\"flex-wrap\">\n\t\t\t\t\t<Text type=\"inherit\" id={`${id}-title`} tag=\"span\" weight=\"medium\" className=\"truncate\">{appointment.title}</Text>\n\t\t\t\t\t<Badge id={`${id}-status`} tone={context.statusTone} size=\"sm\">\n\t\t\t\t\t\t{context.statusLabel}\n\t\t\t\t\t</Badge>\n\t\t\t\t</ItemTitle>\n\t\t\t\t<ItemDescription id={`${id}-detail`} clamp={1}>\n\t\t\t\t\t{client ? `${context.time} · ${client}` : context.time}\n\t\t\t\t</ItemDescription>\n\t\t\t</ItemContent>\n\t\t\t{(!!staff || hasActions) && (\n\t\t\t\t<ItemActions\n\t\t\t\t\t// React focus events bubble from the portaled menu, so this tracks the trigger and its menu together.\n\t\t\t\t\tonFocus={() => { actionsHadFocus.current = true; }}\n\t\t\t\t\tonBlur={(event) => {\n\t\t\t\t\t\tif (event.relatedTarget instanceof Node && !event.currentTarget.contains(event.relatedTarget)) actionsHadFocus.current = false;\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{!!staff && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<VisuallyHidden><span id={`${id}-staff`}>{staff.name}</span></VisuallyHidden>\n\t\t\t\t\t\t\t<Avatar size=\"sm\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t{!!staff.avatarUrl && <AvatarImage src={staff.avatarUrl} alt=\"\" />}\n\t\t\t\t\t\t\t\t<AvatarFallback>{formatInitials(staff.name)}</AvatarFallback>\n\t\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t\t{context.actionsMenu}\n\t\t\t\t</ItemActions>\n\t\t\t)}\n\t\t</Item>\n\t);\n}\n\nexport function AppointmentAgenda({ days, appointments, categories, conflicts, heading, loading, error, onRetry, locale, onAppointmentClick, appointmentActions, renderAppointment, strings }: AppointmentAgendaProps) {\n\tconst groups = days.map((day) => ({ day, items: appointmentsOn(appointments, day) }));\n\tconst total = groups.reduce((sum, group) => sum + group.items.length, 0);\n\tconst dayFormat = new Intl.DateTimeFormat(locale, { weekday: 'long', month: 'long', day: 'numeric' });\n\tconst grouped = days.length > 1;\n\n\t// One context per appointment: the built-in row draws from it, and a custom\n\t// row receives the same values, so both stay consistent.\n\tconst contextFor = (appointment: Appointment): AppointmentRenderContext => {\n\t\tconst conflict = conflicts.has(appointment.id);\n\t\tconst actions = (appointmentActions?.(appointment) ?? []).filter((action) => action.visible !== false);\n\t\tconst context: RowContext = {\n\t\t\tcategory: categories.find((category) => category.id === appointment.category),\n\t\t\tcategoryColorClass: appointmentCategoryColorClasses[categoryColor(categories, appointment.category)],\n\t\t\tconflict,\n\t\t\tstatusLabel: conflict ? strings.conflict : strings.status[appointment.status],\n\t\t\tstatusTone: conflict ? 'destructive' : STATUS_TONE[appointment.status],\n\t\t\ttime: strings.formatTimeRange(formatTime(appointment.start, locale), formatTime(appointment.end, locale)),\n\t\t\topen: onAppointmentClick ? () => onAppointmentClick(appointment) : undefined,\n\t\t\tactions,\n\t\t\t// Above a stretched open button, so the menu takes its own clicks.\n\t\t\tactionsMenu: actions.length > 0 ? (\n\t\t\t\t<ActionMenu\n\t\t\t\t\tactions={actions}\n\t\t\t\t\tsrText={strings.formatActionsLabel(appointment.title)}\n\t\t\t\t\tbuttonProps={{ size: 'sm', className: 'appointment-agenda--actions relative z-10' }}\n\t\t\t\t/>\n\t\t\t) : null,\n\t\t};\n\t\treturn { ...context, defaultRender: () => <AppointmentRow appointment={appointment} context={context} /> };\n\t};\n\n\tconst list = (items: Appointment[]) => (\n\t\t<Stack render={<ul />} gap=\"sm\" className=\"appointment-agenda--list m-0 list-none p-0\">\n\t\t\t{items.map((appointment) => {\n\t\t\t\tconst context = contextFor(appointment);\n\t\t\t\treturn (\n\t\t\t\t\t<li key={appointment.id} className=\"min-w-0\">\n\t\t\t\t\t\t{renderAppointment ? renderAppointment(appointment, context) : context.defaultRender()}\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Stack>\n\t);\n\n\tlet body;\n\tif (loading) {\n\t\tbody = (\n\t\t\t<Stack gap=\"sm\" aria-busy=\"true\" className=\"appointment-agenda--loading\">\n\t\t\t\t<VisuallyHidden>{strings.loading}</VisuallyHidden>\n\t\t\t\t{Array.from({ length: 4 }, (_, index) => <Skeleton key={index} className=\"h-control-lg w-full rounded-inner\" />)}\n\t\t\t</Stack>\n\t\t);\n\t} else if (error) {\n\t\t// An app's own element replaces the default; a message becomes its description.\n\t\tbody = isValidElement(error) ? error : (\n\t\t\t<ErrorState\n\t\t\t\tvariant=\"inline\"\n\t\t\t\ttitle={strings.errorTitle}\n\t\t\t\tdescription={error instanceof Error ? error.message : typeof error === 'string' || typeof error === 'number' ? String(error) : strings.errorDescription}\n\t\t\t\tonRetry={onRetry}\n\t\t\t\tretryLabel={strings.retry}\n\t\t\t\tclassName=\"appointment-agenda--error\"\n\t\t\t/>\n\t\t);\n\t} else if (total === 0) {\n\t\tbody = <EmptyState padding=\"sm\" title={strings.empty} description={false} ariaLabel={strings.empty} className=\"appointment-agenda--empty\" />;\n\t} else if (grouped) {\n\t\tbody = (\n\t\t\t<Stack gap=\"xl\">\n\t\t\t\t{groups.filter((group) => group.items.length > 0).map((group) => (\n\t\t\t\t\t<Stack key={group.day.toISOString()} render={<section />} gap=\"sm\" aria-label={dayFormat.format(group.day)} className=\"appointment-agenda--day\">\n\t\t\t\t\t\t<Heading className=\"text-inherit\" tag=\"h3\" size=\"sm\">{dayFormat.format(group.day)}</Heading>\n\t\t\t\t\t\t{list(group.items)}\n\t\t\t\t\t</Stack>\n\t\t\t\t))}\n\t\t\t</Stack>\n\t\t);\n\t} else {\n\t\tbody = list(groups[0]?.items ?? []);\n\t}\n\n\treturn (\n\t\t<Card\n\t\t\tsurface=\"card\"\n\t\t\ttitle={heading}\n\t\t\theaderEnd={<Text size=\"xs\" type=\"secondary\" className=\"tabular-nums\">{strings.formatCount(total)}</Text>}\n\t\t\tclassName=\"appointment-agenda--component h-full min-h-0\"\n\t\t\tcontentClassName=\"min-h-0 flex-1\"\n\t\t>\n\t\t\t<ScrollArea className=\"appointment-agenda--scroll h-full min-h-0\">\n\t\t\t\t{body}\n\t\t\t</ScrollArea>\n\t\t</Card>\n\t);\n}\n","/**\n * AppointmentMonth — the compact month beside the agenda: month and year\n * selects with previous/next, and a day grid whose dots show which categories\n * are booked that day. The grid is one tab stop: arrow keys move by a day or a\n * week, Home/End to the week's edges, PageUp/PageDown by a month, and Enter or\n * Space chooses the focused day. Private to the appointment calendar.\n */\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useEffect, useMemo, useRef, useState, type KeyboardEvent } from 'react';\n\nimport { Button } from '../../../base/buttons';\nimport { Select } from '../../../base/choice-inputs';\nimport { Stack } from '../../../base/structure';\nimport { Text } from '../../../typography';\nimport { focusRecipes } from '../../../../lib/focus-recipes';\nimport { interactionRecipes } from '../../../../lib/interaction-recipes';\nimport { dotRecipes } from '../../../../lib/tone-recipes';\nimport { cn } from '../../../../lib/utils';\n\nimport type { Appointment, AppointmentCalendarStrings, AppointmentCategory } from '../appointment-calendar.types';\nimport {\n\taddDays,\n\taddMonths,\n\tappointmentCategoryColorClasses,\n\tappointmentsOn,\n\tcategoryColor,\n\tisSameDay,\n\tmonthGrid,\n\tstartOfWeek,\n} from '../appointment-calendar.utils';\n\nexport interface AppointmentMonthProps {\n\tselected: Date;\n\tonSelect: (date: Date) => void;\n\t/** The first day of the month on screen, which keyboard focus can move away from the selection. */\n\tonVisibleMonthChange?: (month: Date) => void;\n\tappointments: Appointment[];\n\tcategories: AppointmentCategory[];\n\tweekStartsOn: number;\n\tlocale?: string;\n\tstrings: AppointmentCalendarStrings;\n}\n\n/** Days with this many categories or more show only the first three dots. */\nconst MAX_DOTS = 3;\n\nexport function AppointmentMonth({ selected, onSelect, onVisibleMonthChange, appointments, categories, weekStartsOn, locale, strings }: AppointmentMonthProps) {\n\tconst [focused, setFocused] = useState(selected);\n\tconst gridRef = useRef<HTMLDivElement>(null);\n\tconst focusOnRender = useRef(false);\n\tconst today = useMemo(() => new Date(), []);\n\n\t// The roving focus follows the selection when it changes from outside.\n\tuseEffect(() => setFocused(selected), [selected]);\n\tconst visibleMonth = focused.getFullYear() * 12 + focused.getMonth();\n\tuseEffect(() => {\n\t\tonVisibleMonthChange?.(new Date(Math.floor(visibleMonth / 12), visibleMonth % 12, 1));\n\t}, [visibleMonth, onVisibleMonthChange]);\n\tuseEffect(() => {\n\t\tif (!focusOnRender.current) return;\n\t\tfocusOnRender.current = false;\n\t\tgridRef.current?.querySelector<HTMLButtonElement>('[data-focus-target]')?.focus();\n\t}, [focused]);\n\n\tconst weeks = useMemo(() => monthGrid(focused, weekStartsOn), [focused, weekStartsOn]);\n\tconst monthFormat = useMemo(() => new Intl.DateTimeFormat(locale, { month: 'long' }), [locale]);\n\tconst weekdayFormat = useMemo(() => new Intl.DateTimeFormat(locale, { weekday: 'short' }), [locale]);\n\tconst dayFormat = useMemo(() => new Intl.DateTimeFormat(locale, { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric' }), [locale]);\n\tconst monthOptions = useMemo(() => Array.from({ length: 12 }, (_, month) => ({ value: String(month), label: monthFormat.format(new Date(2000, month, 1)) })), [monthFormat]);\n\tconst yearOptions = useMemo(() => {\n\t\tconst years = new Set<number>([today.getFullYear(), focused.getFullYear()]);\n\t\tfor (const appointment of appointments) years.add(appointment.start.getFullYear());\n\t\tconst min = Math.min(...years) - 1;\n\t\tconst max = Math.max(...years) + 1;\n\t\treturn Array.from({ length: max - min + 1 }, (_, index) => ({ value: String(min + index), label: String(min + index) }));\n\t}, [appointments, focused, today]);\n\n\tconst moveTo = (date: Date, select = false) => {\n\t\tfocusOnRender.current = true;\n\t\tsetFocused(date);\n\t\tif (select) onSelect(date);\n\t};\n\tconst changeMonth = (months: number) => {\n\t\tconst next = addMonths(selected, months);\n\t\tsetFocused(next);\n\t\tonSelect(next);\n\t};\n\n\tconst onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n\t\tconst moves: Record<string, () => Date> = {\n\t\t\tArrowLeft: () => addDays(focused, -1),\n\t\t\tArrowRight: () => addDays(focused, 1),\n\t\t\tArrowUp: () => addDays(focused, -7),\n\t\t\tArrowDown: () => addDays(focused, 7),\n\t\t\tHome: () => startOfWeek(focused, weekStartsOn),\n\t\t\tEnd: () => addDays(startOfWeek(focused, weekStartsOn), 6),\n\t\t\tPageUp: () => addMonths(focused, -1),\n\t\t\tPageDown: () => addMonths(focused, 1),\n\t\t};\n\t\tconst move = moves[event.key];\n\t\tif (!move) return;\n\t\tevent.preventDefault();\n\t\tmoveTo(move());\n\t};\n\n\treturn (\n\t\t<Stack gap=\"lg\" className=\"appointment-month--component min-w-0\">\n\t\t\t<div className=\"appointment-month--header flex min-w-0 items-center gap-space-xs\">\n\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.previousMonth} onClick={() => changeMonth(-1)}>\n\t\t\t\t\t<ChevronLeft aria-hidden=\"true\" className=\"size-icon\" />\n\t\t\t\t</Button>\n\t\t\t\t<Select\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\taria-label={strings.monthLabel}\n\t\t\t\t\toptions={monthOptions}\n\t\t\t\t\tvalue={String(selected.getMonth())}\n\t\t\t\t\tonValueChange={(value) => value !== undefined && changeMonth(Number(value) - selected.getMonth())}\n\t\t\t\t\tclassName=\"min-w-0 flex-1\"\n\t\t\t\t/>\n\t\t\t\t<Select\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\taria-label={strings.yearLabel}\n\t\t\t\t\toptions={yearOptions}\n\t\t\t\t\tvalue={String(selected.getFullYear())}\n\t\t\t\t\tonValueChange={(value) => value !== undefined && changeMonth((Number(value) - selected.getFullYear()) * 12)}\n\t\t\t\t\tclassName=\"min-w-0 flex-1\"\n\t\t\t\t/>\n\t\t\t\t<Button type=\"button\" tone=\"secondary\" buttonStyle=\"ghost\" size=\"sm\" iconOnly aria-label={strings.nextMonth} onClick={() => changeMonth(1)}>\n\t\t\t\t\t<ChevronRight aria-hidden=\"true\" className=\"size-icon\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tref={gridRef}\n\t\t\t\trole=\"grid\"\n\t\t\t\taria-label={`${monthFormat.format(focused)} ${focused.getFullYear()}`}\n\t\t\t\tonKeyDown={onKeyDown}\n\t\t\t\tclassName=\"appointment-month--grid grid min-w-0 grid-cols-7 gap-space-2xs\"\n\t\t\t>\n\t\t\t\t<div role=\"row\" className=\"contents\">\n\t\t\t\t\t{weeks[0]?.map((day) => (\n\t\t\t\t\t\t<Text key={day.getDay()} tag=\"div\" role=\"columnheader\" size=\"xs\" type=\"secondary\" weight=\"medium\" align=\"center\" className=\"appointment-month--weekday py-space-xs\">\n\t\t\t\t\t\t\t{weekdayFormat.format(day)}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t{weeks.map((week) => (\n\t\t\t\t\t<div key={week[0]?.toISOString()} role=\"row\" className=\"contents\">\n\t\t\t\t\t\t{week.map((day) => {\n\t\t\t\t\t\t\tconst dayAppointments = appointmentsOn(appointments, day);\n\t\t\t\t\t\t\tconst dayCategories = [...new Set(dayAppointments.map((appointment) => appointment.category))];\n\t\t\t\t\t\t\tconst isSelected = isSameDay(day, selected);\n\t\t\t\t\t\t\tconst isFocused = isSameDay(day, focused);\n\t\t\t\t\t\t\tconst outside = day.getMonth() !== focused.getMonth();\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div key={day.toISOString()} role=\"gridcell\" aria-selected={isSelected} className=\"flex min-w-0 justify-center\">\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\ttabIndex={isFocused ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tdata-focus-target={isFocused ? '' : undefined}\n\t\t\t\t\t\t\t\t\t\tdata-selected={isSelected ? '' : undefined}\n\t\t\t\t\t\t\t\t\t\tdata-outside={outside ? '' : undefined}\n\t\t\t\t\t\t\t\t\t\taria-current={isSameDay(day, today) ? 'date' : undefined}\n\t\t\t\t\t\t\t\t\t\taria-label={strings.formatDayLabel(dayFormat.format(day), dayAppointments.length)}\n\t\t\t\t\t\t\t\t\t\tonClick={() => moveTo(day, true)}\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\tinteractionRecipes.nativeButtonReset,\n\t\t\t\t\t\t\t\t\t\t\t'appointment-month--day relative flex size-action flex-col items-center justify-center rounded-inner text-sm tabular-nums outline-none',\n\t\t\t\t\t\t\t\t\t\t\tfocusRecipes.edge,\n\t\t\t\t\t\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t\t\t\t\t\t? 'bg-primary font-semibold text-primary-foreground'\n\t\t\t\t\t\t\t\t\t\t\t\t: cn(interactionRecipes.rowHover, outside ? 'text-muted-foreground' : 'text-foreground'),\n\t\t\t\t\t\t\t\t\t\t\t!isSelected && isSameDay(day, today) && 'font-semibold',\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{day.getDate()}\n\t\t\t\t\t\t\t\t\t\t{dayCategories.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t\t<span aria-hidden=\"true\" className=\"appointment-month--dots absolute inset-x-0 bottom-space-2xs flex justify-center gap-space-2xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t{dayCategories.slice(0, MAX_DOTS).map((category) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span key={category} className={cn(dotRecipes.inline, appointmentCategoryColorClasses[categoryColor(categories, category)])} />\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</Stack>\n\t);\n}\n","/**\n * AppointmentCalendar — a booking calendar laid out side by side: a compact\n * month with category dots and filters beside the agenda for the chosen day\n * or week.\n *\n * The header carries the title with booked and conflict counts, the Day/Week\n * switch, an optional staff filter and the \"New appointment\" command. Two\n * overlapping appointments for one staff member are a conflict: both rows say\n * so, and a dismissible alert names who is double-booked and when. Categories\n * are kinds, so their stripes and dots draw from the chart palette, and status\n * chips keep the status tones. The layout follows its own container: the month\n * sits beside the agenda when there is room and above it otherwise.\n *\n * Data, creation and editing stay with the app: the calendar formats and\n * filters the appointments it is given and reports intent through callbacks.\n */\nimport { Plus, TriangleAlert } from 'lucide-react';\nimport { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Card } from '../../base/cards';\nimport { Select } from '../../base/choice-inputs';\nimport { Alert, AlertAction, AlertDescription, AlertTitle } from '../../base/feedback';\nimport { Tabs, TabsList, TabsTrigger } from '../../base/navigation/tabs';\nimport { Stack } from '../../base/structure';\nimport { Heading, Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { dotRecipes } from '../../../lib/tone-recipes';\nimport { useDatesConfig, useFormattingConfig } from '../../../lib/ui-provider';\nimport { cn } from '../../../lib/utils';\n\nimport {\n\tdefaultAppointmentCalendarStrings,\n\ttype Appointment,\n\ttype AppointmentCalendarProps,\n\ttype AppointmentCalendarView,\n\ttype AppointmentConflict,\n\ttype AppointmentDateRange,\n} from './appointment-calendar.types';\nimport {\n\taddDays,\n\tappointmentCategoryColorClasses,\n\tcategoryColor,\n\tconflictingIds,\n\tfilterAppointments,\n\tfindConflicts,\n\tformatTime,\n\tmonthGrid,\n\toccursOn,\n\tstaffFrom,\n\tstartOfDay,\n\tweekDays,\n} from './appointment-calendar.utils';\nimport { AppointmentAgenda, type AppointmentAgendaProps } from './partials/appointment-agenda';\nimport { AppointmentMonth } from './partials/appointment-month';\n\n/** Controlled when `value` is given, otherwise local state seeded by `fallback`. */\nfunction useControllable<T>(value: T | undefined, fallback: T, onChange?: (next: T) => void): [T, (next: T) => void] {\n\tconst [local, setLocal] = useState(fallback);\n\tconst current = value ?? local;\n\treturn [current, (next: T) => {\n\t\tif (value === undefined) setLocal(next);\n\t\tonChange?.(next);\n\t}];\n}\n\nexport function AppointmentCalendar<T extends Appointment = Appointment>({\n\tappointments,\n\tcategories,\n\tstaff: staffProp,\n\ttitle,\n\tdate: dateProp,\n\tdefaultDate,\n\tonDateChange,\n\tview: viewProp,\n\tdefaultView = 'day',\n\tonViewChange,\n\tcategory: categoryProp,\n\tdefaultCategory = 'all',\n\tonCategoryChange,\n\tstaffId: staffIdProp,\n\tdefaultStaffId = 'all',\n\tonStaffChange,\n\tonAppointmentClick,\n\tappointmentActions,\n\trenderAppointment,\n\tonRangeChange,\n\tonCreateAppointment,\n\tonConflictsDismiss,\n\tloading = false,\n\terror,\n\tonRetry,\n\tweekStartsOn: weekStartsOnProp,\n\tstrings: stringsProp,\n\tclassName,\n}: AppointmentCalendarProps<T>) {\n\tconst strings = useStrings(defaultAppointmentCalendarStrings, stringsProp);\n\tconst { locale } = useFormattingConfig();\n\tconst dates = useDatesConfig();\n\tconst weekStartsOn = weekStartsOnProp ?? dates.weekStartsOn ?? 0;\n\n\tconst [date, setDate] = useControllable(dateProp, defaultDate ?? startOfDay(new Date()), onDateChange);\n\tconst [view, setView] = useControllable<AppointmentCalendarView>(viewProp, defaultView, onViewChange);\n\tconst [category, setCategory] = useControllable(categoryProp, defaultCategory, onCategoryChange);\n\tconst [staffId, setStaffId] = useControllable(staffIdProp, defaultStaffId, onStaffChange);\n\tconst [dismissed, setDismissed] = useState<string>('');\n\tconst [visibleMonth, setVisibleMonth] = useState(() => new Date(date.getFullYear(), date.getMonth(), 1));\n\n\tconst staff = useMemo(() => staffProp ?? staffFrom(appointments), [staffProp, appointments]);\n\tconst days = useMemo(() => (view === 'week' ? weekDays(date, weekStartsOn) : [startOfDay(date)]), [view, date, weekStartsOn]);\n\tconst visible = useMemo(() => filterAppointments(appointments, category, staffId), [appointments, category, staffId]);\n\t// The days on screen: the month grid, widened by the agenda when keyboard\n\t// focus has moved the month away from the selected day or week.\n\tconst range = useMemo<AppointmentDateRange>(() => {\n\t\tconst edges = [...monthGrid(visibleMonth, weekStartsOn).flat(), ...days].map((day) => day.getTime());\n\t\treturn { start: new Date(Math.min(...edges)), end: addDays(new Date(Math.max(...edges)), 1) };\n\t}, [visibleMonth, weekStartsOn, days]);\n\tconst reportedRange = useRef('');\n\tuseEffect(() => {\n\t\tconst key = `${range.start.getTime()}:${range.end.getTime()}`;\n\t\tif (key === reportedRange.current) return;\n\t\treportedRange.current = key;\n\t\tonRangeChange?.(range);\n\t}, [range, onRangeChange]);\n\tconst inRange = useMemo(() => visible.filter((appointment) => days.some((day) => occursOn(appointment, day))), [visible, days]);\n\n\t// A staff member is double-booked whatever the category filter shows, so\n\t// overlaps are found across every category, then narrowed to the range.\n\tconst conflicts = useMemo(() => {\n\t\tconst staffScoped = filterAppointments(appointments, 'all', staffId).filter((appointment) => days.some((day) => occursOn(appointment, day)));\n\t\treturn findConflicts(staffScoped);\n\t}, [appointments, staffId, days]);\n\tconst conflictIds = useMemo(() => conflictingIds(conflicts), [conflicts]);\n\tconst visibleConflicts = inRange.filter((appointment) => conflictIds.has(appointment.id)).length;\n\tconst booked = inRange.filter((appointment) => appointment.status !== 'cancelled').length;\n\tconst conflictKey = [...conflictIds].sort().join('|');\n\tconst showAlert = conflicts.length > 0 && dismissed !== conflictKey;\n\n\tconst headingFormat = new Intl.DateTimeFormat(locale, { weekday: 'long', month: 'long', day: 'numeric' });\n\tconst rangeFormat = new Intl.DateTimeFormat(locale, { month: 'long', day: 'numeric' });\n\tconst heading = view === 'week'\n\t\t? strings.formatWeekRange(rangeFormat.format(days[0] ?? date), rangeFormat.format(days[days.length - 1] ?? date))\n\t\t: headingFormat.format(date);\n\n\tconst dismissConflicts = (shown: AppointmentConflict<T>[]) => {\n\t\tsetDismissed(conflictKey);\n\t\tonConflictsDismiss?.(shown);\n\t};\n\n\treturn (\n\t\t<Stack gap=\"xl\" data-slot=\"appointment-calendar\" data-view={view} className={cn('appointment-calendar--component @container/appointment-calendar min-h-0 min-w-0', className)}>\n\t\t\t<div className=\"appointment-calendar--header flex min-w-0 flex-wrap items-start justify-between gap-space-lg\">\n\t\t\t\t<Stack gap=\"xs\" className=\"min-w-0\">\n\t\t\t\t\t{!!title && <Heading className=\"text-inherit\" tag=\"h2\" size=\"lg\">{title}</Heading>}\n\t\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"appointment-calendar--counts tabular-nums\">\n\t\t\t\t\t\t{strings.formatBooked(booked)}\n\t\t\t\t\t\t{visibleConflicts > 0 && ` · ${strings.formatConflicts(visibleConflicts)}`}\n\t\t\t\t\t</Text>\n\t\t\t\t</Stack>\n\t\t\t\t<div className=\"appointment-calendar--actions flex min-w-0 flex-wrap items-center gap-space-sm\">\n\t\t\t\t\t<Tabs value={view} onValueChange={(next) => (next === 'day' || next === 'week') && setView(next)}>\n\t\t\t\t\t\t<TabsList role=\"group\" aria-label={strings.viewLabel} aria-orientation={undefined} activateOnFocus>\n\t\t\t\t\t\t\t{(['day', 'week'] as const).map((option) => (\n\t\t\t\t\t\t\t\t<TabsTrigger key={option} value={option} role=\"button\" aria-selected={undefined} aria-controls={undefined} aria-pressed={view === option}>\n\t\t\t\t\t\t\t\t\t{strings[option]}\n\t\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t</Tabs>\n\t\t\t\t\t{staff.length > 0 && (\n\t\t\t\t\t\t<Select\n\t\t\t\t\t\t\taria-label={strings.staffLabel}\n\t\t\t\t\t\t\toptions={[{ value: 'all', label: strings.allStaff }, ...staff.map((person) => ({ value: person.id, label: person.name }))]}\n\t\t\t\t\t\t\tvalue={staffId}\n\t\t\t\t\t\t\tonValueChange={(next) => setStaffId(next ?? 'all')}\n\t\t\t\t\t\t\tclassName=\"appointment-calendar--staff w-44\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{!!onCreateAppointment && (\n\t\t\t\t\t\t<Button type=\"button\" tone=\"primary\" onClick={() => onCreateAppointment(date)} className=\"appointment-calendar--create\">\n\t\t\t\t\t\t\t<Plus aria-hidden=\"true\" className=\"size-icon\" />\n\t\t\t\t\t\t\t{strings.newAppointment}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{showAlert && (\n\t\t\t\t<Alert tone=\"destructive\" className=\"appointment-calendar--alert\">\n\t\t\t\t\t<TriangleAlert aria-hidden=\"true\" />\n\t\t\t\t\t<AlertTitle>{strings.conflictTitle}</AlertTitle>\n\t\t\t\t\t<AlertDescription>\n\t\t\t\t\t\t{conflicts.map((conflict) => strings.formatConflict(conflict.staff.name, conflict.appointments.length, formatTime(conflict.start, locale))).join(' ')}\n\t\t\t\t\t</AlertDescription>\n\t\t\t\t\t<AlertAction>\n\t\t\t\t\t\t<Button type=\"button\" size=\"sm\" onClick={() => dismissConflicts(conflicts)}>{strings.dismiss}</Button>\n\t\t\t\t\t</AlertAction>\n\t\t\t\t</Alert>\n\t\t\t)}\n\n\t\t\t<div className=\"appointment-calendar--body grid min-h-0 min-w-0 flex-1 gap-space-xl @3xl/appointment-calendar:grid-cols-[minmax(17rem,20rem)_minmax(0,1fr)]\">\n\t\t\t\t<Card surface=\"card\" className=\"appointment-calendar--aside min-w-0 self-start\">\n\t\t\t\t\t<Stack gap=\"xl\">\n\t\t\t\t\t\t<AppointmentMonth\n\t\t\t\t\t\t\tselected={date}\n\t\t\t\t\t\t\tonSelect={setDate}\n\t\t\t\t\t\t\tonVisibleMonthChange={setVisibleMonth}\n\t\t\t\t\t\t\tappointments={visible}\n\t\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\t\tlocale={locale}\n\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{categories.length > 0 && (\n\t\t\t\t\t\t\t<Tabs value={category} onValueChange={(next) => typeof next === 'string' && setCategory(next)}>\n\t\t\t\t\t\t\t\t<TabsList variant=\"chips\" role=\"group\" aria-label={strings.categoriesLabel} aria-orientation={undefined} activateOnFocus>\n\t\t\t\t\t\t\t\t\t{[{ id: 'all', label: strings.allCategories }, ...categories].map((option) => (\n\t\t\t\t\t\t\t\t\t\t<TabsTrigger key={option.id} value={option.id} role=\"button\" aria-selected={undefined} aria-controls={undefined} aria-pressed={category === option.id} className=\"appointment-calendar--category gap-space-xs\">\n\t\t\t\t\t\t\t\t\t\t\t{option.id !== 'all' && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span aria-hidden=\"true\" className={cn(dotRecipes.inline, appointmentCategoryColorClasses[categoryColor(categories, option.id)])} />\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t{option.label}\n\t\t\t\t\t\t\t\t\t\t</TabsTrigger>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</TabsList>\n\t\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Stack>\n\t\t\t\t</Card>\n\n\t\t\t\t<AppointmentAgenda\n\t\t\t\t\tdays={days}\n\t\t\t\t\tappointments={visible}\n\t\t\t\t\tcategories={categories}\n\t\t\t\t\tconflicts={conflictIds}\n\t\t\t\t\theading={heading}\n\t\t\t\t\tloading={loading}\n\t\t\t\t\terror={error}\n\t\t\t\t\tonRetry={onRetry}\n\t\t\t\t\tlocale={locale}\n\t\t\t\t\t// The agenda only hands back items from `appointments`, so the app's own type holds.\n\t\t\t\t\tonAppointmentClick={onAppointmentClick as ((appointment: Appointment) => void) | undefined}\n\t\t\t\t\tappointmentActions={appointmentActions as AppointmentAgendaProps['appointmentActions']}\n\t\t\t\t\trenderAppointment={renderAppointment as AppointmentAgendaProps['renderAppointment']}\n\t\t\t\t\tstrings={strings}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Stack>\n\t);\n}\n\nAppointmentCalendar.displayName = 'AppointmentCalendar';\n"],"mappings":";;;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G,UAAA,CAAC;SAAE,IAAI;SAAO,OAAOA,EAAQ;QAAc,GAAG,GAAGtE,CAAU,CAAC,CAAC,KAAK,MAClE,kBAACjB,IAAD;SAA6B,OAAOqL,EAAO;SAAI,MAAK;SAAS,iBAAe,KAAA;SAAW,iBAAe,KAAA;SAAW,gBAAcnK,MAAamK,EAAO;SAAI,WAAU;SAAjK,UAAA,CACEA,EAAO,OAAO,SACd,kBAAC,QAAD;UAAM,eAAY;UAAO,WAAWlN,EAAGO,EAAW,QAAQoC,EAAgCC,EAAcE,GAAYoK,EAAO,EAAE,EAAE;SAAI,CAAA,GAEnIA,EAAO,KACI;QALK,GAAAA,EAAO,EAKZ,CACb;OACQ,CAAA;MACL,CAAA,CAED;;IACF,CAAA,GAEN,kBAACxG,IAAD;KACO;KACN,cAAcsF;KACF;KACZ,WAAWO;KACF;KACA;KACF;KACE;KACD;KAEY;KACA;KACD;KACV;IACT,CAAA,CACG;;EACC;;AAET;AAEA,EAAoB,cAAc"}
@@ -1,14 +1,15 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "../lib/strings.js";
3
- import { t } from "../utils-l5LpDw2z.js";
4
- import { n } from "../buttons-SbIcm1HJ.js";
5
- import { t as r } from "../structure-DC2dygdA.js";
6
- import { n as i, t as a } from "../feedback-qNuMBtRH.js";
7
- import { _ as o, d as s, g as c, p as l } from "../primitives-B-CkiEMU.js";
8
- import { t as u } from "../badge-MrKVNzW9.js";
9
- import { c as d, o as f, t as p } from "../popover-Di55PyAI.js";
10
- import { s as m } from "../data-display-DafIvCl5.js";
11
- import h, { createContext as g, useCallback as _, useContext as v, useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
3
+ import { t } from "../utils-BRhFDwuU.js";
4
+ import { n } from "../buttons-DPZekJFu.js";
5
+ import { t as r } from "../structure-BmisBK-3.js";
6
+ import { n as i, t as a } from "../feedback-BYIhtitP.js";
7
+ import { i as o } from "../popover.recipes-D3j8R8Yp.js";
8
+ import { _ as s, d as c, g as l, p as u } from "../primitives-BFK08r9M.js";
9
+ import { t as d } from "../badge-HpFqoqSY.js";
10
+ import { c as f, o as p, t as m } from "../popover-gnTOhbFM.js";
11
+ import { s as h } from "../data-display-DT_khPl_.js";
12
+ import g, { createContext as _, useCallback as v, useContext as y, useEffect as b, useMemo as ee, useRef as x, useState as S } from "react";
12
13
  import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
13
14
  import { ChevronDown as E } from "lucide-react";
14
15
  //#region src/components/features/async-preview/async-preview.strings.ts
@@ -31,42 +32,42 @@ function k(e, t) {
31
32
  return n;
32
33
  }
33
34
  }
34
- function ee(e) {
35
+ function te(e) {
35
36
  return e !== !1 && e;
36
37
  }
37
- function te(e) {
38
+ function ne(e) {
38
39
  return Object.prototype.hasOwnProperty.call(e, "data");
39
40
  }
40
41
  function A(e) {
41
- let { type: t, context: n, cacheKey: r, cachePolicy: i = "cache-first", staleTime: a = 3e5, open: o, defaultOpen: s = !1, onOpenChange: c, onBeforeShow: l, onData: u, onError: d, onSettled: f, onRefresh: p } = e, m = te(e), h = m ? e.data ?? null : null, g = m ? void 0 : e.onShow, v = o !== void 0, [C, w] = S(s), T = o ?? C, [E, D] = S(() => {
42
+ let { type: t, context: n, cacheKey: r, cachePolicy: i = "cache-first", staleTime: a = 3e5, open: o, defaultOpen: s = !1, onOpenChange: c, onBeforeShow: l, onData: u, onError: d, onSettled: f, onRefresh: p } = e, m = ne(e), h = m ? e.data ?? null : null, g = m ? void 0 : e.onShow, _ = o !== void 0, [y, C] = S(s), w = o ?? y, [T, E] = S(() => {
42
43
  if (m) return h;
43
44
  let e = k(r, a);
44
45
  return e?.status === "success" ? e.data : null;
45
- }), [A, j] = S(() => m ? h === null ? "empty" : "success" : k(r, a)?.status ?? "idle"), [M, N] = S(null), [P, F] = S(!1), [I, L] = S(() => k(r, a)?.meta ?? {}), [R, z] = S(() => k(r, a) !== void 0), B = m ? h : E, V = m ? h === null ? "empty" : "success" : A, H = x(null), U = x(0), W = x(!1), G = x(I), K = x(null), q = x(null), J = x(null), Y = _((e) => {
46
- v || w(e);
47
- let t = J.current;
46
+ }), [D, A] = S(() => m ? h === null ? "empty" : "success" : k(r, a)?.status ?? "idle"), [j, M] = S(null), [N, P] = S(!1), [F, I] = S(() => k(r, a)?.meta ?? {}), [L, R] = S(() => k(r, a) !== void 0), z = m ? h : T, B = m ? h === null ? "empty" : "success" : D, V = x(null), H = x(0), U = x(!1), W = x(F), G = x(null), K = x(null), q = x(null), J = v((e) => {
47
+ _ || C(e);
48
+ let t = q.current;
48
49
  t && c?.(e, {
49
50
  ...t,
50
51
  open: e
51
52
  });
52
- }, [v, c]), X = _(async (e) => {
53
+ }, [_, c]), Y = v(async (e) => {
53
54
  if (m || !g) return;
54
- let o = r ?? t, s = H.current;
55
- if (e === "open" && q.current === o && s && !s.signal.aborted) return;
56
- H.current?.abort(), H.current = null, q.current = null;
55
+ let o = r ?? t, s = V.current;
56
+ if (e === "open" && K.current === o && s && !s.signal.aborted) return;
57
+ V.current?.abort(), V.current = null, K.current = null;
57
58
  let c = k(r, a);
58
59
  if (e === "open" && c !== void 0 && i === "cache-first") {
59
- z(!0), N(null), G.current = c.meta, L(c.meta), D(c.status === "success" ? c.data : null), j(c.status), F(!1);
60
+ R(!0), M(null), W.current = c.meta, I(c.meta), E(c.status === "success" ? c.data : null), A(c.status), P(!1);
60
61
  return;
61
62
  }
62
63
  let h = new AbortController();
63
- H.current = h, q.current = o;
64
- let _ = U.current + 1;
65
- U.current = _;
64
+ V.current = h, K.current = o;
65
+ let _ = H.current + 1;
66
+ H.current = _;
66
67
  let v = c !== void 0;
67
- z(!1), N(null), j("loading"), F({ label: void 0 });
68
- let y = J.current ? {
69
- ...J.current,
68
+ R(!1), M(null), A("loading"), P({ label: void 0 });
69
+ let y = q.current ? {
70
+ ...q.current,
70
71
  error: null,
71
72
  loading: { label: void 0 },
72
73
  status: "loading",
@@ -74,7 +75,7 @@ function A(e) {
74
75
  } : null;
75
76
  y && l?.(y), e === "refresh" && y && p?.(y);
76
77
  let b = (e) => {
77
- U.current !== _ || h.signal.aborted || e();
78
+ H.current !== _ || h.signal.aborted || e();
78
79
  };
79
80
  try {
80
81
  let i = await g({
@@ -83,30 +84,30 @@ function A(e) {
83
84
  signal: h.signal,
84
85
  reason: e,
85
86
  cached: v,
86
- setLoading: (e) => b(() => F(ee(e))),
87
+ setLoading: (e) => b(() => P(te(e))),
87
88
  setMeta: (e) => b(() => {
88
89
  let t = {
89
- ...G.current,
90
+ ...W.current,
90
91
  ...e
91
92
  };
92
- G.current = t, L(t);
93
+ W.current = t, I(t);
93
94
  })
94
95
  });
95
96
  b(() => {
96
97
  let e = i == null ? "empty" : "success", t = e === "success" ? i : null;
97
- D(t), j(e), F(!1), N(null), z(!1), r && O.set(r, {
98
+ E(t), A(e), P(!1), M(null), R(!1), r && O.set(r, {
98
99
  timestamp: Date.now(),
99
100
  data: t,
100
101
  status: e,
101
- meta: G.current
102
+ meta: W.current
102
103
  });
103
- let n = J.current ? {
104
- ...J.current,
104
+ let n = q.current ? {
105
+ ...q.current,
105
106
  data: t,
106
107
  error: null,
107
108
  loading: !1,
108
109
  status: e,
109
- meta: G.current,
110
+ meta: W.current,
110
111
  cached: !1
111
112
  } : null;
112
113
  t !== null && n && u?.(t, n), n && f?.(n);
@@ -114,9 +115,9 @@ function A(e) {
114
115
  } catch (e) {
115
116
  if (h.signal.aborted) return;
116
117
  b(() => {
117
- N(e), j("error"), F(!1);
118
- let t = J.current ? {
119
- ...J.current,
118
+ M(e), A("error"), P(!1);
119
+ let t = q.current ? {
120
+ ...q.current,
120
121
  error: e,
121
122
  loading: !1,
122
123
  status: "error",
@@ -125,7 +126,7 @@ function A(e) {
125
126
  t && d?.(e, t), t && f?.(t);
126
127
  });
127
128
  } finally {
128
- U.current === _ && (H.current === h && (H.current = null), q.current === o && (q.current = null));
129
+ H.current === _ && (V.current === h && (V.current = null), K.current === o && (K.current = null));
129
130
  }
130
131
  }, [
131
132
  r,
@@ -140,66 +141,66 @@ function A(e) {
140
141
  g,
141
142
  a,
142
143
  t
143
- ]), Z = _(() => {
144
- X("refresh");
145
- }, [X]), Q = _(() => {
146
- m || W.current || (W.current = !0, X("prefetch"));
147
- }, [m, X]), $ = _(() => {
148
- Y(!1);
149
- }, [Y]), ne = b(() => ({
144
+ ]), X = v(() => {
145
+ Y("refresh");
146
+ }, [Y]), Z = v(() => {
147
+ m || U.current || (U.current = !0, Y("prefetch"));
148
+ }, [m, Y]), Q = v(() => {
149
+ J(!1);
150
+ }, [J]), $ = ee(() => ({
150
151
  type: t,
151
152
  context: n,
152
- data: B,
153
- error: M,
154
- loading: P,
155
- status: V,
156
- meta: I,
157
- open: T,
158
- cached: R,
159
- refresh: Z,
160
- prefetch: Q,
161
- close: $
153
+ data: z,
154
+ error: j,
155
+ loading: N,
156
+ status: B,
157
+ meta: F,
158
+ open: w,
159
+ cached: L,
160
+ refresh: X,
161
+ prefetch: Z,
162
+ close: Q
162
163
  }), [
163
- R,
164
- $,
165
- n,
166
- M,
167
- P,
168
- I,
169
- T,
164
+ L,
170
165
  Q,
166
+ n,
167
+ j,
168
+ N,
169
+ F,
170
+ w,
171
171
  Z,
172
+ X,
173
+ z,
172
174
  B,
173
- V,
174
175
  t
175
176
  ]);
176
- return J.current = ne, G.current = I, y(() => {
177
- m && (H.current?.abort(), H.current = null, q.current = null, K.current = null, N(null), F(!1), z(!1));
178
- }, [m, h]), y(() => {
179
- if (!T) {
180
- K.current = null;
177
+ return q.current = $, W.current = F, b(() => {
178
+ m && (V.current?.abort(), V.current = null, K.current = null, G.current = null, M(null), P(!1), R(!1));
179
+ }, [m, h]), b(() => {
180
+ if (!w) {
181
+ G.current = null;
181
182
  return;
182
183
  }
183
184
  if (m) return;
184
185
  let e = r ?? t;
185
- K.current !== e && (K.current = e, X("open"));
186
+ G.current !== e && (G.current = e, Y("open"));
186
187
  }, [
187
188
  r,
188
189
  m,
189
- T,
190
- X,
190
+ w,
191
+ Y,
191
192
  t
192
- ]), y(() => {
193
- W.current = !1;
193
+ ]), b(() => {
194
+ U.current = !1;
194
195
  }, [
195
196
  r,
196
197
  m,
197
198
  t
198
- ]), y(() => () => {
199
- H.current?.abort();
199
+ ]), b(() => () => {
200
+ V.current?.abort();
200
201
  }, []), {
201
- ...ne,
202
- setOpen: Y
202
+ ...$,
203
+ setOpen: J
203
204
  };
204
205
  }
205
206
  function j(e) {
@@ -211,9 +212,9 @@ function j(e) {
211
212
  }
212
213
  //#endregion
213
214
  //#region src/components/features/async-preview/async-preview.tsx
214
- var M = g(null);
215
+ var M = _(null);
215
216
  function N() {
216
- let e = v(M);
217
+ let e = y(M);
217
218
  if (!e) throw Error("AsyncPreview compound parts must be rendered inside <AsyncPreview.Root>.");
218
219
  return e;
219
220
  }
@@ -241,7 +242,7 @@ function P({ children: t, strings: n, prefetchOn: r = !1, ...i }) {
241
242
  },
242
243
  children: /* @__PURE__ */ w("span", {
243
244
  className: "async-preview--component contents",
244
- children: /* @__PURE__ */ w(f, {
245
+ children: /* @__PURE__ */ w(p, {
245
246
  open: s.open,
246
247
  onOpenChange: o.setOpen,
247
248
  children: t
@@ -264,12 +265,12 @@ function F({ render: e, children: t }) {
264
265
  state: r,
265
266
  triggerProps: o
266
267
  }) : e;
267
- return /* @__PURE__ */ w(d, {
268
+ return /* @__PURE__ */ w(f, {
268
269
  render: t,
269
270
  ...o
270
271
  });
271
272
  }
272
- return /* @__PURE__ */ w(d, { render: /* @__PURE__ */ w(n, {
273
+ return /* @__PURE__ */ w(f, { render: /* @__PURE__ */ w(n, {
273
274
  type: "button",
274
275
  tone: "secondary",
275
276
  buttonStyle: "ghost",
@@ -277,27 +278,27 @@ function F({ render: e, children: t }) {
277
278
  children: t
278
279
  }) });
279
280
  }
280
- function I({ className: e, children: n, align: r = "start", sideOffset: i = 8, finalFocus: a = !0, ...o }) {
281
- let { state: s } = N(), { size: c = "md", padding: l = "none", ...u } = o, d = {
282
- sm: "w-72",
283
- md: "w-80",
284
- lg: "w-90"
285
- }[c], f = {
281
+ function I({ className: e, children: n, align: r = "start", sideOffset: i = 8, finalFocus: a = !0, ...s }) {
282
+ let { state: c } = N(), { size: l = "md", padding: u = "none", ...d } = s, f = {
283
+ sm: o.md,
284
+ md: o.lg,
285
+ lg: o.xl
286
+ }[l], p = {
286
287
  none: "flush",
287
288
  sm: "compact",
288
289
  md: "default",
289
290
  lg: "flush"
290
- }[l];
291
- return /* @__PURE__ */ w(p, {
291
+ }[u];
292
+ return /* @__PURE__ */ w(m, {
292
293
  align: r,
293
294
  sideOffset: i,
294
295
  finalFocus: a,
295
- inset: f,
296
- className: t("async-preview--content max-w-[calc(100vw-2rem)] overflow-hidden", d, l === "none" ? "gap-0" : void 0, e),
297
- "data-status": s.status,
298
- "data-preview-type": s.type,
299
- ...u,
300
- children: l === "lg" ? /* @__PURE__ */ w("div", {
296
+ inset: p,
297
+ className: t("async-preview--content overflow-hidden", f, u === "none" ? "gap-0" : void 0, e),
298
+ "data-status": c.status,
299
+ "data-preview-type": c.type,
300
+ ...d,
301
+ children: u === "lg" ? /* @__PURE__ */ w("div", {
301
302
  className: "p-surface-lg",
302
303
  children: n
303
304
  }) : n
@@ -342,7 +343,7 @@ function B({ children: e, className: n }) {
342
343
  }
343
344
  function V({ children: e, className: n }) {
344
345
  let { state: r, strings: i } = N();
345
- return r.status === "empty" ? e ? /* @__PURE__ */ w(C, { children: e(r) }) : /* @__PURE__ */ w(m, {
346
+ return r.status === "empty" ? e ? /* @__PURE__ */ w(C, { children: e(r) }) : /* @__PURE__ */ w(h, {
346
347
  className: t("async-preview--empty", n),
347
348
  padding: "md",
348
349
  title: i.emptyTitle,
@@ -378,14 +379,14 @@ function W(e) {
378
379
  return e == null || e === "";
379
380
  }
380
381
  function G(e) {
381
- return e ? typeof e == "object" && !Array.isArray(e) && "label" in e ? /* @__PURE__ */ w(u, {
382
+ return e ? typeof e == "object" && !Array.isArray(e) && "label" in e ? /* @__PURE__ */ w(d, {
382
383
  inline: !0,
383
384
  tone: e.tone ?? "secondary",
384
385
  size: e.size,
385
386
  children: e.label
386
387
  }) : e : null;
387
388
  }
388
- function K({ value: e, name: n, secondary: i, leading: a, trailing: u, badge: d, icon: f, emptyLabel: p = "--", forceNameCase: m, contentClassName: h }) {
389
+ function K({ value: e, name: n, secondary: i, leading: a, trailing: o, badge: d, icon: f, emptyLabel: p = "--", forceNameCase: m, contentClassName: h }) {
389
390
  let g = W(n) && W(e);
390
391
  return /* @__PURE__ */ T(r, {
391
392
  render: /* @__PURE__ */ w("span", {}),
@@ -413,33 +414,34 @@ function K({ value: e, name: n, secondary: i, leading: a, trailing: u, badge: d,
413
414
  gap: "sm",
414
415
  wrap: !1,
415
416
  className: "max-w-full",
416
- children: [g ? /* @__PURE__ */ w(l, {
417
+ children: [g ? /* @__PURE__ */ w(u, {
417
418
  className: "truncate",
418
419
  children: p
419
- }) : n ? /* @__PURE__ */ w(s, {
420
+ }) : n ? /* @__PURE__ */ w(c, {
420
421
  value: n,
421
422
  force: m,
422
423
  weight: "medium",
423
424
  className: "truncate"
424
- }) : /* @__PURE__ */ w(o, {
425
+ }) : /* @__PURE__ */ w(s, {
426
+ type: "inherit",
425
427
  weight: "medium",
426
428
  className: "truncate",
427
429
  children: e
428
430
  }), G(d)]
429
- }), !W(i) && /* @__PURE__ */ w(c, {
431
+ }), !W(i) && /* @__PURE__ */ w(l, {
430
432
  size: "xs",
431
433
  className: "max-w-full truncate",
432
434
  children: i
433
435
  })]
434
436
  }),
435
- !!u && /* @__PURE__ */ w("span", {
437
+ !!o && /* @__PURE__ */ w("span", {
436
438
  className: "preview-trigger-cell--trailing inline-flex shrink-0 items-center",
437
- children: u
439
+ children: o
438
440
  })
439
441
  ]
440
442
  });
441
443
  }
442
- var q = h.forwardRef(function({ value: e, name: r, secondary: i, leading: a, trailing: o, badge: s, icon: c, emptyLabel: l, hasPreview: u, disabledReason: d, forceNameCase: f, className: p, contentClassName: m, type: h, ...g }, _) {
444
+ var q = g.forwardRef(function({ value: e, name: r, secondary: i, leading: a, trailing: o, badge: s, icon: c, emptyLabel: l, hasPreview: u, disabledReason: d, forceNameCase: f, className: p, contentClassName: m, type: h, ...g }, _) {
443
445
  let v = {
444
446
  value: e,
445
447
  name: r,