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,683 @@
1
+ "use client";
2
+ import { c as e, o as t } from "../ui-provider-C_U0Xma4.js";
3
+ import { useStrings as n } from "../lib/strings.js";
4
+ import { t as r } from "../utils-BRhFDwuU.js";
5
+ import { n as i } from "../buttons-DPZekJFu.js";
6
+ import { c as a, s as o } from "../typography-UTnveOEy.js";
7
+ import { t as s } from "../focus-recipes-B653VaLq.js";
8
+ import { t as c } from "../structure-BmisBK-3.js";
9
+ import { i as l, t as u } from "../tone-recipes-BPsRAvhu.js";
10
+ import { h as d, m as f, p, t as m, v as h } from "../smart-card-DiC5aac3.js";
11
+ import { t as g } from "../feedback-BYIhtitP.js";
12
+ import { n as _ } from "../action-menu-CllU52Mm.js";
13
+ import { r as v } from "../skeleton-Byjnt7qr.js";
14
+ import { t as y } from "../interaction-recipes-XR9ZpVYL.js";
15
+ import { t as b } from "../initials-format-CDoQEOd_.js";
16
+ import { i as x, n as S, s as C } from "../avatar-DAPlDvhJ.js";
17
+ import { t as w } from "../badge-HpFqoqSY.js";
18
+ import { l as T } from "../choice-inputs-CNHvARCJ.js";
19
+ import { o as E } from "../display-hAc1HjpI.js";
20
+ import { t as ee } from "../scroll-area-DcI-M1UT.js";
21
+ import { i as D, n as O, r as te, t as ne, u as re } from "../item-K5_ghvze.js";
22
+ import { i as ie, r as ae, t as oe } from "../tabs-CDocW5D1.js";
23
+ import { s as se } from "../data-display-DT_khPl_.js";
24
+ import { isValidElement as ce, useEffect as k, useId as le, useLayoutEffect as ue, useMemo as A, useRef as j, useState as M } from "react";
25
+ import { Fragment as de, jsx as N, jsxs as P } from "react/jsx-runtime";
26
+ import { ChevronLeft as fe, ChevronRight as pe, Plus as me, TriangleAlert as he } from "lucide-react";
27
+ //#region src/components/features/appointment-calendar/appointment-calendar.types.ts
28
+ var ge = {
29
+ formatBooked: (e) => `${e} booked`,
30
+ formatConflicts: (e) => e === 1 ? "1 conflict" : `${e} conflicts`,
31
+ viewLabel: "View",
32
+ day: "Day",
33
+ week: "Week",
34
+ staffLabel: "Staff",
35
+ allStaff: "All staff",
36
+ newAppointment: "New appointment",
37
+ conflictTitle: "Double-booked",
38
+ formatConflict: (e, t, n) => `${e} has ${t} overlapping bookings at ${n}.`,
39
+ dismiss: "Dismiss",
40
+ previousMonth: "Previous month",
41
+ nextMonth: "Next month",
42
+ monthLabel: "Month",
43
+ yearLabel: "Year",
44
+ categoriesLabel: "Categories",
45
+ allCategories: "All",
46
+ formatCount: (e) => e === 1 ? "1 appointment" : `${e} appointments`,
47
+ formatTimeRange: (e, t) => `${e} to ${t}`,
48
+ formatDayLabel: (e, t) => t === 0 ? e : `${e}, ${t === 1 ? "1 appointment" : `${t} appointments`}`,
49
+ formatWeekRange: (e, t) => `${e} to ${t}`,
50
+ status: {
51
+ confirmed: "Confirmed",
52
+ pending: "Pending",
53
+ completed: "Completed",
54
+ cancelled: "Cancelled",
55
+ noShow: "No-show"
56
+ },
57
+ conflict: "Conflict",
58
+ empty: "No appointments",
59
+ loading: "Loading appointments",
60
+ errorTitle: "Appointments unavailable",
61
+ errorDescription: "The appointments could not be loaded.",
62
+ retry: "Retry",
63
+ formatActionsLabel: (e) => `Actions for ${e}`
64
+ }, F = [
65
+ "chart-1",
66
+ "chart-2",
67
+ "chart-3",
68
+ "chart-4",
69
+ "chart-5"
70
+ ], I = {
71
+ "chart-1": "bg-chart-1",
72
+ "chart-2": "bg-chart-2",
73
+ "chart-3": "bg-chart-3",
74
+ "chart-4": "bg-chart-4",
75
+ "chart-5": "bg-chart-5"
76
+ };
77
+ function L(e, t) {
78
+ let n = e.findIndex((e) => e.id === t);
79
+ return n < 0 ? "chart-1" : e[n]?.color ?? F[n % F.length] ?? "chart-1";
80
+ }
81
+ function R(e) {
82
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate());
83
+ }
84
+ function z(e, t) {
85
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
86
+ }
87
+ function B(e, t) {
88
+ return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
89
+ }
90
+ function V(e, t) {
91
+ let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate();
92
+ return new Date(n.getFullYear(), n.getMonth(), Math.min(e.getDate(), r));
93
+ }
94
+ function H(e, t) {
95
+ let n = R(e);
96
+ return z(n, -((n.getDay() - t + 7) % 7));
97
+ }
98
+ function _e(e, t) {
99
+ let n = H(e, t);
100
+ return Array.from({ length: 7 }, (e, t) => z(n, t));
101
+ }
102
+ function ve(e, t) {
103
+ let n = H(new Date(e.getFullYear(), e.getMonth(), 1), t);
104
+ return Array.from({ length: 6 }, (e, t) => Array.from({ length: 7 }, (e, r) => z(n, t * 7 + r)));
105
+ }
106
+ function ye(e, t) {
107
+ let n = R(t).getTime(), r = z(t, 1).getTime();
108
+ return e.start.getTime() < r && e.end.getTime() > n;
109
+ }
110
+ function U(e, t) {
111
+ return e.filter((e) => ye(e, t)).sort((e, t) => e.start.getTime() - t.start.getTime() || e.end.getTime() - t.end.getTime());
112
+ }
113
+ function be(e, t, n) {
114
+ return e.filter((e) => (t === "all" || e.category === t) && (n === "all" || e.staff?.id === n));
115
+ }
116
+ function xe(e) {
117
+ let t = /* @__PURE__ */ new Map();
118
+ for (let n of e) {
119
+ if (!n.staff || n.status === "cancelled") continue;
120
+ let e = t.get(n.staff.id) ?? [];
121
+ e.push(n), t.set(n.staff.id, e);
122
+ }
123
+ let n = [];
124
+ for (let e of t.values()) {
125
+ let t = [...e].sort((e, t) => e.start.getTime() - t.start.getTime()), r = [], i = -Infinity, a = () => {
126
+ let e = r[0];
127
+ r.length > 1 && e?.staff && n.push({
128
+ staff: e.staff,
129
+ appointments: r,
130
+ start: e.start
131
+ });
132
+ };
133
+ for (let e of t) e.start.getTime() < i ? (r.push(e), i = Math.max(i, e.end.getTime())) : (a(), r = [e], i = e.end.getTime());
134
+ a();
135
+ }
136
+ return n.sort((e, t) => e.start.getTime() - t.start.getTime());
137
+ }
138
+ function Se(e) {
139
+ return new Set(e.flatMap((e) => e.appointments.map((e) => e.id)));
140
+ }
141
+ function Ce(e) {
142
+ let t = /* @__PURE__ */ new Map();
143
+ for (let n of e) n.staff && !t.has(n.staff.id) && t.set(n.staff.id, n.staff);
144
+ return [...t.values()];
145
+ }
146
+ function we(e, t) {
147
+ let { hour12: n } = new Intl.DateTimeFormat(t, { hour: "numeric" }).resolvedOptions();
148
+ if (!n) return new Intl.DateTimeFormat(t, {
149
+ hour: "2-digit",
150
+ minute: "2-digit"
151
+ }).format(e);
152
+ let r = e.getMinutes() === 0 ? { hour: "numeric" } : {
153
+ hour: "numeric",
154
+ minute: "2-digit"
155
+ };
156
+ return new Intl.DateTimeFormat(t, r).format(e);
157
+ }
158
+ function Te(e) {
159
+ return typeof e == "string" ? e : e?.name;
160
+ }
161
+ //#endregion
162
+ //#region src/components/features/appointment-calendar/partials/appointment-agenda.tsx
163
+ var W = {
164
+ confirmed: "success",
165
+ pending: "warning",
166
+ completed: "neutral",
167
+ cancelled: "neutral",
168
+ noShow: "destructive"
169
+ };
170
+ function G({ appointment: e, context: t }) {
171
+ let n = le(), i = Te(e.client), o = e.staff, { open: c, conflict: u } = t, d = t.actions.length > 0, f = [
172
+ `${n}-title`,
173
+ `${n}-status`,
174
+ `${n}-detail`,
175
+ o && `${n}-staff`
176
+ ].filter(Boolean).join(" "), p = j(null), m = j(!1);
177
+ return ue(() => {
178
+ !d && m.current && (m.current = !1, (!document.activeElement || document.activeElement === document.body) && p.current?.focus());
179
+ }, [d]), /* @__PURE__ */ P(ne, {
180
+ variant: "outline",
181
+ size: "sm",
182
+ padding: "default",
183
+ "data-status": e.status,
184
+ "data-conflict": u ? "" : void 0,
185
+ className: r("appointment-agenda--row relative w-full flex-nowrap", !!c && y.rowHover, u && r(l.destructive.wash, l.destructive.edge)),
186
+ children: [
187
+ !!c && /* @__PURE__ */ N("button", {
188
+ ref: p,
189
+ type: "button",
190
+ "aria-labelledby": f,
191
+ onClick: c,
192
+ className: r("appointment-agenda--open absolute inset-0 z-0 cursor-pointer rounded-inner focus-visible:outline-none", y.nativeButtonReset, s.inset)
193
+ }),
194
+ /* @__PURE__ */ N("span", {
195
+ "aria-hidden": "true",
196
+ className: r("appointment-agenda--stripe w-1 shrink-0 self-stretch rounded-full", t.categoryColorClass)
197
+ }),
198
+ /* @__PURE__ */ P(te, {
199
+ className: "min-w-0",
200
+ children: [/* @__PURE__ */ P(re, {
201
+ className: "flex-wrap",
202
+ children: [/* @__PURE__ */ N(a, {
203
+ type: "inherit",
204
+ id: `${n}-title`,
205
+ tag: "span",
206
+ weight: "medium",
207
+ className: "truncate",
208
+ children: e.title
209
+ }), /* @__PURE__ */ N(w, {
210
+ id: `${n}-status`,
211
+ tone: t.statusTone,
212
+ size: "sm",
213
+ children: t.statusLabel
214
+ })]
215
+ }), /* @__PURE__ */ N(D, {
216
+ id: `${n}-detail`,
217
+ clamp: 1,
218
+ children: i ? `${t.time} · ${i}` : t.time
219
+ })]
220
+ }),
221
+ (!!o || d) && /* @__PURE__ */ P(O, {
222
+ onFocus: () => {
223
+ m.current = !0;
224
+ },
225
+ onBlur: (e) => {
226
+ e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && (m.current = !1);
227
+ },
228
+ children: [!!o && /* @__PURE__ */ P(de, { children: [/* @__PURE__ */ N(E, { children: /* @__PURE__ */ N("span", {
229
+ id: `${n}-staff`,
230
+ children: o.name
231
+ }) }), /* @__PURE__ */ P(S, {
232
+ size: "sm",
233
+ "aria-hidden": "true",
234
+ children: [!!o.avatarUrl && /* @__PURE__ */ N(C, {
235
+ src: o.avatarUrl,
236
+ alt: ""
237
+ }), /* @__PURE__ */ N(x, { children: b(o.name) })]
238
+ })] }), t.actionsMenu]
239
+ })
240
+ ]
241
+ });
242
+ }
243
+ function Ee({ days: e, appointments: t, categories: n, conflicts: r, heading: i, loading: s, error: l, onRetry: u, locale: d, onAppointmentClick: f, appointmentActions: p, renderAppointment: h, strings: y }) {
244
+ let b = e.map((e) => ({
245
+ day: e,
246
+ items: U(t, e)
247
+ })), x = b.reduce((e, t) => e + t.items.length, 0), S = new Intl.DateTimeFormat(d, {
248
+ weekday: "long",
249
+ month: "long",
250
+ day: "numeric"
251
+ }), C = e.length > 1, w = (e) => {
252
+ let t = r.has(e.id), i = (p?.(e) ?? []).filter((e) => e.visible !== !1), a = {
253
+ category: n.find((t) => t.id === e.category),
254
+ categoryColorClass: I[L(n, e.category)],
255
+ conflict: t,
256
+ statusLabel: t ? y.conflict : y.status[e.status],
257
+ statusTone: t ? "destructive" : W[e.status],
258
+ time: y.formatTimeRange(we(e.start, d), we(e.end, d)),
259
+ open: f ? () => f(e) : void 0,
260
+ actions: i,
261
+ actionsMenu: i.length > 0 ? /* @__PURE__ */ N(_, {
262
+ actions: i,
263
+ srText: y.formatActionsLabel(e.title),
264
+ buttonProps: {
265
+ size: "sm",
266
+ className: "appointment-agenda--actions relative z-10"
267
+ }
268
+ }) : null
269
+ };
270
+ return {
271
+ ...a,
272
+ defaultRender: () => /* @__PURE__ */ N(G, {
273
+ appointment: e,
274
+ context: a
275
+ })
276
+ };
277
+ }, T = (e) => /* @__PURE__ */ N(c, {
278
+ render: /* @__PURE__ */ N("ul", {}),
279
+ gap: "sm",
280
+ className: "appointment-agenda--list m-0 list-none p-0",
281
+ children: e.map((e) => {
282
+ let t = w(e);
283
+ return /* @__PURE__ */ N("li", {
284
+ className: "min-w-0",
285
+ children: h ? h(e, t) : t.defaultRender()
286
+ }, e.id);
287
+ })
288
+ }), D;
289
+ return D = s ? /* @__PURE__ */ P(c, {
290
+ gap: "sm",
291
+ "aria-busy": "true",
292
+ className: "appointment-agenda--loading",
293
+ children: [/* @__PURE__ */ N(E, { children: y.loading }), Array.from({ length: 4 }, (e, t) => /* @__PURE__ */ N(v, { className: "h-control-lg w-full rounded-inner" }, t))]
294
+ }) : l ? ce(l) ? l : /* @__PURE__ */ N(g, {
295
+ variant: "inline",
296
+ title: y.errorTitle,
297
+ description: l instanceof Error ? l.message : typeof l == "string" || typeof l == "number" ? String(l) : y.errorDescription,
298
+ onRetry: u,
299
+ retryLabel: y.retry,
300
+ className: "appointment-agenda--error"
301
+ }) : x === 0 ? /* @__PURE__ */ N(se, {
302
+ padding: "sm",
303
+ title: y.empty,
304
+ description: !1,
305
+ ariaLabel: y.empty,
306
+ className: "appointment-agenda--empty"
307
+ }) : C ? /* @__PURE__ */ N(c, {
308
+ gap: "xl",
309
+ children: b.filter((e) => e.items.length > 0).map((e) => /* @__PURE__ */ P(c, {
310
+ render: /* @__PURE__ */ N("section", {}),
311
+ gap: "sm",
312
+ "aria-label": S.format(e.day),
313
+ className: "appointment-agenda--day",
314
+ children: [/* @__PURE__ */ N(o, {
315
+ className: "text-inherit",
316
+ tag: "h3",
317
+ size: "sm",
318
+ children: S.format(e.day)
319
+ }), T(e.items)]
320
+ }, e.day.toISOString()))
321
+ }) : T(b[0]?.items ?? []), /* @__PURE__ */ N(m, {
322
+ surface: "card",
323
+ title: i,
324
+ headerEnd: /* @__PURE__ */ N(a, {
325
+ size: "xs",
326
+ type: "secondary",
327
+ className: "tabular-nums",
328
+ children: y.formatCount(x)
329
+ }),
330
+ className: "appointment-agenda--component h-full min-h-0",
331
+ contentClassName: "min-h-0 flex-1",
332
+ children: /* @__PURE__ */ N(ee, {
333
+ className: "appointment-agenda--scroll h-full min-h-0",
334
+ children: D
335
+ })
336
+ });
337
+ }
338
+ //#endregion
339
+ //#region src/components/features/appointment-calendar/partials/appointment-month.tsx
340
+ var De = 3;
341
+ function Oe({ selected: e, onSelect: t, onVisibleMonthChange: n, appointments: o, categories: l, weekStartsOn: d, locale: f, strings: p }) {
342
+ let [m, h] = M(e), g = j(null), _ = j(!1), v = A(() => /* @__PURE__ */ new Date(), []);
343
+ k(() => h(e), [e]);
344
+ let b = m.getFullYear() * 12 + m.getMonth();
345
+ k(() => {
346
+ n?.(new Date(Math.floor(b / 12), b % 12, 1));
347
+ }, [b, n]), k(() => {
348
+ _.current && (_.current = !1, g.current?.querySelector("[data-focus-target]")?.focus());
349
+ }, [m]);
350
+ let x = A(() => ve(m, d), [m, d]), S = A(() => new Intl.DateTimeFormat(f, { month: "long" }), [f]), C = A(() => new Intl.DateTimeFormat(f, { weekday: "short" }), [f]), w = A(() => new Intl.DateTimeFormat(f, {
351
+ weekday: "long",
352
+ month: "long",
353
+ day: "numeric",
354
+ year: "numeric"
355
+ }), [f]), E = A(() => Array.from({ length: 12 }, (e, t) => ({
356
+ value: String(t),
357
+ label: S.format(new Date(2e3, t, 1))
358
+ })), [S]), ee = A(() => {
359
+ let e = /* @__PURE__ */ new Set([v.getFullYear(), m.getFullYear()]);
360
+ for (let t of o) e.add(t.start.getFullYear());
361
+ let t = Math.min(...e) - 1, n = Math.max(...e) + 1;
362
+ return Array.from({ length: n - t + 1 }, (e, n) => ({
363
+ value: String(t + n),
364
+ label: String(t + n)
365
+ }));
366
+ }, [
367
+ o,
368
+ m,
369
+ v
370
+ ]), D = (e, n = !1) => {
371
+ _.current = !0, h(e), n && t(e);
372
+ }, O = (n) => {
373
+ let r = V(e, n);
374
+ h(r), t(r);
375
+ };
376
+ return /* @__PURE__ */ P(c, {
377
+ gap: "lg",
378
+ className: "appointment-month--component min-w-0",
379
+ children: [/* @__PURE__ */ P("div", {
380
+ className: "appointment-month--header flex min-w-0 items-center gap-space-xs",
381
+ children: [
382
+ /* @__PURE__ */ N(i, {
383
+ type: "button",
384
+ tone: "secondary",
385
+ buttonStyle: "ghost",
386
+ size: "sm",
387
+ iconOnly: !0,
388
+ "aria-label": p.previousMonth,
389
+ onClick: () => O(-1),
390
+ children: /* @__PURE__ */ N(fe, {
391
+ "aria-hidden": "true",
392
+ className: "size-icon"
393
+ })
394
+ }),
395
+ /* @__PURE__ */ N(T, {
396
+ size: "sm",
397
+ "aria-label": p.monthLabel,
398
+ options: E,
399
+ value: String(e.getMonth()),
400
+ onValueChange: (t) => t !== void 0 && O(Number(t) - e.getMonth()),
401
+ className: "min-w-0 flex-1"
402
+ }),
403
+ /* @__PURE__ */ N(T, {
404
+ size: "sm",
405
+ "aria-label": p.yearLabel,
406
+ options: ee,
407
+ value: String(e.getFullYear()),
408
+ onValueChange: (t) => t !== void 0 && O((Number(t) - e.getFullYear()) * 12),
409
+ className: "min-w-0 flex-1"
410
+ }),
411
+ /* @__PURE__ */ N(i, {
412
+ type: "button",
413
+ tone: "secondary",
414
+ buttonStyle: "ghost",
415
+ size: "sm",
416
+ iconOnly: !0,
417
+ "aria-label": p.nextMonth,
418
+ onClick: () => O(1),
419
+ children: /* @__PURE__ */ N(pe, {
420
+ "aria-hidden": "true",
421
+ className: "size-icon"
422
+ })
423
+ })
424
+ ]
425
+ }), /* @__PURE__ */ P("div", {
426
+ ref: g,
427
+ role: "grid",
428
+ "aria-label": `${S.format(m)} ${m.getFullYear()}`,
429
+ onKeyDown: (e) => {
430
+ let t = {
431
+ ArrowLeft: () => z(m, -1),
432
+ ArrowRight: () => z(m, 1),
433
+ ArrowUp: () => z(m, -7),
434
+ ArrowDown: () => z(m, 7),
435
+ Home: () => H(m, d),
436
+ End: () => z(H(m, d), 6),
437
+ PageUp: () => V(m, -1),
438
+ PageDown: () => V(m, 1)
439
+ }[e.key];
440
+ t && (e.preventDefault(), D(t()));
441
+ },
442
+ className: "appointment-month--grid grid min-w-0 grid-cols-7 gap-space-2xs",
443
+ children: [/* @__PURE__ */ N("div", {
444
+ role: "row",
445
+ className: "contents",
446
+ children: x[0]?.map((e) => /* @__PURE__ */ N(a, {
447
+ tag: "div",
448
+ role: "columnheader",
449
+ size: "xs",
450
+ type: "secondary",
451
+ weight: "medium",
452
+ align: "center",
453
+ className: "appointment-month--weekday py-space-xs",
454
+ children: C.format(e)
455
+ }, e.getDay()))
456
+ }), x.map((t) => /* @__PURE__ */ N("div", {
457
+ role: "row",
458
+ className: "contents",
459
+ children: t.map((t) => {
460
+ let n = U(o, t), i = [...new Set(n.map((e) => e.category))], a = B(t, e), c = B(t, m), d = t.getMonth() !== m.getMonth();
461
+ return /* @__PURE__ */ N("div", {
462
+ role: "gridcell",
463
+ "aria-selected": a,
464
+ className: "flex min-w-0 justify-center",
465
+ children: /* @__PURE__ */ P("button", {
466
+ type: "button",
467
+ tabIndex: c ? 0 : -1,
468
+ "data-focus-target": c ? "" : void 0,
469
+ "data-selected": a ? "" : void 0,
470
+ "data-outside": d ? "" : void 0,
471
+ "aria-current": B(t, v) ? "date" : void 0,
472
+ "aria-label": p.formatDayLabel(w.format(t), n.length),
473
+ onClick: () => D(t, !0),
474
+ className: r(y.nativeButtonReset, "appointment-month--day relative flex size-action flex-col items-center justify-center rounded-inner text-sm tabular-nums outline-none", s.edge, a ? "bg-primary font-semibold text-primary-foreground" : r(y.rowHover, d ? "text-muted-foreground" : "text-foreground"), !a && B(t, v) && "font-semibold"),
475
+ children: [t.getDate(), i.length > 0 && /* @__PURE__ */ N("span", {
476
+ "aria-hidden": "true",
477
+ className: "appointment-month--dots absolute inset-x-0 bottom-space-2xs flex justify-center gap-space-2xs",
478
+ children: i.slice(0, De).map((e) => /* @__PURE__ */ N("span", { className: r(u.inline, I[L(l, e)]) }, e))
479
+ })]
480
+ })
481
+ }, t.toISOString());
482
+ })
483
+ }, t[0]?.toISOString()))]
484
+ })]
485
+ });
486
+ }
487
+ //#endregion
488
+ //#region src/components/features/appointment-calendar/appointment-calendar.tsx
489
+ function K(e, t, n) {
490
+ let [r, i] = M(t);
491
+ return [e ?? r, (t) => {
492
+ e === void 0 && i(t), n?.(t);
493
+ }];
494
+ }
495
+ function q({ appointments: s, categories: l, staff: g, title: _, date: v, defaultDate: y, onDateChange: b, view: x, defaultView: S = "day", onViewChange: C, category: w, defaultCategory: E = "all", onCategoryChange: ee, staffId: D, defaultStaffId: O = "all", onStaffChange: te, onAppointmentClick: ne, appointmentActions: re, renderAppointment: se, onRangeChange: ce, onCreateAppointment: le, onConflictsDismiss: ue, loading: de = !1, error: fe, onRetry: pe, weekStartsOn: F, strings: B, className: V }) {
496
+ let H = n(ge, B), { locale: U } = e(), Te = t(), W = F ?? Te.weekStartsOn ?? 0, [G, De] = K(v, y ?? R(/* @__PURE__ */ new Date()), b), [q, ke] = K(x, S, C), [J, Ae] = K(w, E, ee), [Y, je] = K(D, O, te), [Me, Ne] = M(""), [Pe, Fe] = M(() => new Date(G.getFullYear(), G.getMonth(), 1)), Ie = A(() => g ?? Ce(s), [g, s]), X = A(() => q === "week" ? _e(G, W) : [R(G)], [
497
+ q,
498
+ G,
499
+ W
500
+ ]), Z = A(() => be(s, J, Y), [
501
+ s,
502
+ J,
503
+ Y
504
+ ]), Q = A(() => {
505
+ let e = [...ve(Pe, W).flat(), ...X].map((e) => e.getTime());
506
+ return {
507
+ start: new Date(Math.min(...e)),
508
+ end: z(new Date(Math.max(...e)), 1)
509
+ };
510
+ }, [
511
+ Pe,
512
+ W,
513
+ X
514
+ ]), Le = j("");
515
+ k(() => {
516
+ let e = `${Q.start.getTime()}:${Q.end.getTime()}`;
517
+ e !== Le.current && (Le.current = e, ce?.(Q));
518
+ }, [Q, ce]);
519
+ let Re = A(() => Z.filter((e) => X.some((t) => ye(e, t))), [Z, X]), $ = A(() => xe(be(s, "all", Y).filter((e) => X.some((t) => ye(e, t)))), [
520
+ s,
521
+ Y,
522
+ X
523
+ ]), ze = A(() => Se($), [$]), Be = Re.filter((e) => ze.has(e.id)).length, Ve = Re.filter((e) => e.status !== "cancelled").length, He = [...ze].sort().join("|"), Ue = $.length > 0 && Me !== He, We = new Intl.DateTimeFormat(U, {
524
+ weekday: "long",
525
+ month: "long",
526
+ day: "numeric"
527
+ }), Ge = new Intl.DateTimeFormat(U, {
528
+ month: "long",
529
+ day: "numeric"
530
+ }), Ke = q === "week" ? H.formatWeekRange(Ge.format(X[0] ?? G), Ge.format(X[X.length - 1] ?? G)) : We.format(G), qe = (e) => {
531
+ Ne(He), ue?.(e);
532
+ };
533
+ return /* @__PURE__ */ P(c, {
534
+ gap: "xl",
535
+ "data-slot": "appointment-calendar",
536
+ "data-view": q,
537
+ className: r("appointment-calendar--component @container/appointment-calendar min-h-0 min-w-0", V),
538
+ children: [
539
+ /* @__PURE__ */ P("div", {
540
+ className: "appointment-calendar--header flex min-w-0 flex-wrap items-start justify-between gap-space-lg",
541
+ children: [/* @__PURE__ */ P(c, {
542
+ gap: "xs",
543
+ className: "min-w-0",
544
+ children: [!!_ && /* @__PURE__ */ N(o, {
545
+ className: "text-inherit",
546
+ tag: "h2",
547
+ size: "lg",
548
+ children: _
549
+ }), /* @__PURE__ */ P(a, {
550
+ size: "xs",
551
+ type: "secondary",
552
+ className: "appointment-calendar--counts tabular-nums",
553
+ children: [H.formatBooked(Ve), Be > 0 && ` · ${H.formatConflicts(Be)}`]
554
+ })]
555
+ }), /* @__PURE__ */ P("div", {
556
+ className: "appointment-calendar--actions flex min-w-0 flex-wrap items-center gap-space-sm",
557
+ children: [
558
+ /* @__PURE__ */ N(oe, {
559
+ value: q,
560
+ onValueChange: (e) => (e === "day" || e === "week") && ke(e),
561
+ children: /* @__PURE__ */ N(ae, {
562
+ role: "group",
563
+ "aria-label": H.viewLabel,
564
+ "aria-orientation": void 0,
565
+ activateOnFocus: !0,
566
+ children: ["day", "week"].map((e) => /* @__PURE__ */ N(ie, {
567
+ value: e,
568
+ role: "button",
569
+ "aria-selected": void 0,
570
+ "aria-controls": void 0,
571
+ "aria-pressed": q === e,
572
+ children: H[e]
573
+ }, e))
574
+ })
575
+ }),
576
+ Ie.length > 0 && /* @__PURE__ */ N(T, {
577
+ "aria-label": H.staffLabel,
578
+ options: [{
579
+ value: "all",
580
+ label: H.allStaff
581
+ }, ...Ie.map((e) => ({
582
+ value: e.id,
583
+ label: e.name
584
+ }))],
585
+ value: Y,
586
+ onValueChange: (e) => je(e ?? "all"),
587
+ className: "appointment-calendar--staff w-44"
588
+ }),
589
+ !!le && /* @__PURE__ */ P(i, {
590
+ type: "button",
591
+ tone: "primary",
592
+ onClick: () => le(G),
593
+ className: "appointment-calendar--create",
594
+ children: [/* @__PURE__ */ N(me, {
595
+ "aria-hidden": "true",
596
+ className: "size-icon"
597
+ }), H.newAppointment]
598
+ })
599
+ ]
600
+ })]
601
+ }),
602
+ Ue && /* @__PURE__ */ P(p, {
603
+ tone: "destructive",
604
+ className: "appointment-calendar--alert",
605
+ children: [
606
+ /* @__PURE__ */ N(he, { "aria-hidden": "true" }),
607
+ /* @__PURE__ */ N(h, { children: H.conflictTitle }),
608
+ /* @__PURE__ */ N(d, { children: $.map((e) => H.formatConflict(e.staff.name, e.appointments.length, we(e.start, U))).join(" ") }),
609
+ /* @__PURE__ */ N(f, { children: /* @__PURE__ */ N(i, {
610
+ type: "button",
611
+ size: "sm",
612
+ onClick: () => qe($),
613
+ children: H.dismiss
614
+ }) })
615
+ ]
616
+ }),
617
+ /* @__PURE__ */ P("div", {
618
+ 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)]",
619
+ children: [/* @__PURE__ */ N(m, {
620
+ surface: "card",
621
+ className: "appointment-calendar--aside min-w-0 self-start",
622
+ children: /* @__PURE__ */ P(c, {
623
+ gap: "xl",
624
+ children: [/* @__PURE__ */ N(Oe, {
625
+ selected: G,
626
+ onSelect: De,
627
+ onVisibleMonthChange: Fe,
628
+ appointments: Z,
629
+ categories: l,
630
+ weekStartsOn: W,
631
+ locale: U,
632
+ strings: H
633
+ }), l.length > 0 && /* @__PURE__ */ N(oe, {
634
+ value: J,
635
+ onValueChange: (e) => typeof e == "string" && Ae(e),
636
+ children: /* @__PURE__ */ N(ae, {
637
+ variant: "chips",
638
+ role: "group",
639
+ "aria-label": H.categoriesLabel,
640
+ "aria-orientation": void 0,
641
+ activateOnFocus: !0,
642
+ children: [{
643
+ id: "all",
644
+ label: H.allCategories
645
+ }, ...l].map((e) => /* @__PURE__ */ P(ie, {
646
+ value: e.id,
647
+ role: "button",
648
+ "aria-selected": void 0,
649
+ "aria-controls": void 0,
650
+ "aria-pressed": J === e.id,
651
+ className: "appointment-calendar--category gap-space-xs",
652
+ children: [e.id !== "all" && /* @__PURE__ */ N("span", {
653
+ "aria-hidden": "true",
654
+ className: r(u.inline, I[L(l, e.id)])
655
+ }), e.label]
656
+ }, e.id))
657
+ })
658
+ })]
659
+ })
660
+ }), /* @__PURE__ */ N(Ee, {
661
+ days: X,
662
+ appointments: Z,
663
+ categories: l,
664
+ conflicts: ze,
665
+ heading: Ke,
666
+ loading: de,
667
+ error: fe,
668
+ onRetry: pe,
669
+ locale: U,
670
+ onAppointmentClick: ne,
671
+ appointmentActions: re,
672
+ renderAppointment: se,
673
+ strings: H
674
+ })]
675
+ })
676
+ ]
677
+ });
678
+ }
679
+ q.displayName = "AppointmentCalendar";
680
+ //#endregion
681
+ export { q as AppointmentCalendar, U as appointmentsOn, ge as defaultAppointmentCalendarStrings, be as filterAppointments, xe as findConflicts };
682
+
683
+ //# sourceMappingURL=appointment-calendar.js.map