@alfadocs/ui-kit 1.141.0 → 1.142.0

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 (232) hide show
  1. package/dist/_chunks/{actions-cell-renderer-C-l_ppP6.js → actions-cell-renderer-CPNyF6ye.js} +3 -3
  2. package/dist/_chunks/{ai-credits-notice-BNFcQoXo.js → ai-credits-notice-D_Zm_N2A.js} +2 -2
  3. package/dist/_chunks/{ai-prompt-input-B2QFwuJ1.js → ai-prompt-input-y4-dtQIT.js} +2 -2
  4. package/dist/_chunks/{alia-sidebar-CVBlKur9.js → alia-sidebar-uxTsUbIt.js} +2 -2
  5. package/dist/_chunks/{anamnesis-summary-rows-YJGs2uWD.js → anamnesis-summary-rows-C2Ca9_Qj.js} +8 -8
  6. package/dist/_chunks/{appointment-card-r0OZm77v.js → appointment-card-C0UFYFLZ.js} +2 -2
  7. package/dist/_chunks/{appointment-details-panel.history-DrIMDQYf.js → appointment-details-panel.history-BUXwhill.js} +2 -2
  8. package/dist/_chunks/{appointment-peek-BP_ACFz5.js → appointment-peek-BCzekfWh.js} +3 -3
  9. package/dist/_chunks/{appointment-timeline-Bs-rTMzi.js → appointment-timeline-BK68CCBl.js} +4 -4
  10. package/dist/_chunks/{appointment-tray-t_ltp-Yi.js → appointment-tray-dfgScPcC.js} +2 -2
  11. package/dist/_chunks/{audio-recorder-6dUq8I38.js → audio-recorder-DxhCiLqG.js} +2 -2
  12. package/dist/_chunks/{balance-badge-cell-CRStPNDd.js → balance-badge-cell-CXi6moSa.js} +5 -5
  13. package/dist/_chunks/{bill-line-table-DTqXdBED.js → bill-line-table-qAdmV19W.js} +2 -2
  14. package/dist/_chunks/{bishop-score-M7Fi-ykx.js → bishop-score-DbvfBlBM.js} +2 -2
  15. package/dist/_chunks/{button-group-DuQuuulC.js → button-group-DoKG16Fy.js} +2 -2
  16. package/dist/_chunks/{calculator-dialog-Cg3GjaRf.js → calculator-dialog-BWizCwN5.js} +2 -2
  17. package/dist/_chunks/{calendar-appointment-editor-dialog-CuXpgLCw.js → calendar-appointment-editor-dialog-BDc8Q4Ji.js} +17 -17
  18. package/dist/_chunks/{calendar-editor-discard-host-BcMEgVEq.js → calendar-editor-discard-host-BblBxMqT.js} +5 -5
  19. package/dist/_chunks/{calendar-waiting-list-panel-BNQrUndD.js → calendar-waiting-list-panel-js-0KEh8.js} +6 -6
  20. package/dist/_chunks/{calendar.sheets-DcW8A3DI.js → calendar.sheets-sBWH7Jxn.js} +12 -12
  21. package/dist/_chunks/{calls-panel-CJNQm7r8.js → calls-panel-CnjAKFgA.js} +92 -90
  22. package/dist/_chunks/{care-plan-card-CjHq6PLo.js → care-plan-card-TZH6C60K.js} +2 -2
  23. package/dist/_chunks/{care-plan-entry-card-DY1toF6E.js → care-plan-entry-card-CufvXAWa.js} +2 -2
  24. package/dist/_chunks/{chart-D0EeFWst.js → chart-ChNsJf9_.js} +2 -2
  25. package/dist/_chunks/{color-picker-CC8ZfntU.js → color-picker-5FKOk_z1.js} +2 -2
  26. package/dist/_chunks/{communications-panel-DBWM9II9.js → communications-panel-EP27FN7e.js} +3 -3
  27. package/dist/_chunks/{control-room-rail-DcJpHbp4.js → control-room-rail-7SidoPJH.js} +2 -2
  28. package/dist/_chunks/{cycle-calculator-Cb66X2Pf.js → cycle-calculator-BUCGfEcy.js} +2 -2
  29. package/dist/_chunks/{dashboard-grid-2uVXEe9e.js → dashboard-grid-D2egA1Zu.js} +2 -2
  30. package/dist/_chunks/{data-grid-tabs-D9Y4DeeH.js → data-grid-tabs-Mbj6bSK2.js} +2 -2
  31. package/dist/_chunks/{data-grid-CRUSZcVT.js → data-grid-tyE2kGfx.js} +5 -5
  32. package/dist/_chunks/{data-table-CnLfOwxg.js → data-table-Bq1FRBGB.js} +4 -4
  33. package/dist/_chunks/{data-table-tabs-NYLhD8_Z.js → data-table-tabs-D5ujdK56.js} +2 -2
  34. package/dist/_chunks/{date-picker-BmVBVpVu.js → date-picker-CD-PBzXM.js} +2 -2
  35. package/dist/_chunks/{date-range-panel-CT9Pk-HF.js → date-range-panel-BOgfP_V3.js} +2 -2
  36. package/dist/_chunks/{date-range-picker-2Up_FRrM.js → date-range-picker-Z-hI5Vb7.js} +2 -2
  37. package/dist/_chunks/{date-time-picker-C6b_Vymc.js → date-time-picker-DHza1SEH.js} +2 -2
  38. package/dist/_chunks/{default-tabs-CRbVCDSU.js → default-tabs-ChkVzOL8.js} +7 -7
  39. package/dist/_chunks/dialog-239Geb7Z.js +431 -0
  40. package/dist/_chunks/dialog-container-DHR0byah.js +17 -0
  41. package/dist/_chunks/{document-preview-FTCHXYhk.js → document-preview-x_S8V7VC.js} +3 -3
  42. package/dist/_chunks/{dropdown-menu-DBWaW4pq.js → dropdown-menu-Bm1KALnk.js} +2 -2
  43. package/dist/_chunks/{due-date-calculator-Dlqegxx9.js → due-date-calculator-DpN0Z9p4.js} +2 -2
  44. package/dist/_chunks/{editable-currency-cell-renderer-CZMQ5xRT.js → editable-currency-cell-renderer-C6z6ABN_.js} +2 -2
  45. package/dist/_chunks/{face-scheme-Bxt7ZnJn.js → face-scheme-S88jbOzl.js} +3 -3
  46. package/dist/_chunks/{file-manager-Bsccb8Jj.js → file-manager-ChQSjfU8.js} +5 -5
  47. package/dist/_chunks/{gestational-age-calculator-DXSPWG8u.js → gestational-age-calculator-CCDIhSMV.js} +3 -3
  48. package/dist/_chunks/{hcg-doubling-Dqbj6PQj.js → hcg-doubling-BekuksBv.js} +2 -2
  49. package/dist/_chunks/{header-settings-Cu-MKOsO.js → header-settings-CvZ7Qii6.js} +3 -3
  50. package/dist/_chunks/{heatmap-CFPaEKD_.js → heatmap-D0OGx-70.js} +3 -3
  51. package/dist/_chunks/{help-me-write-templates-DO6vJeP4.js → help-me-write-templates-C84_4iwX.js} +2 -2
  52. package/dist/_chunks/{hover-card-CuRIA4wN.js → hover-card-CIiPOlyM.js} +2 -2
  53. package/dist/_chunks/{icon-button-group-SmkdVCNx.js → icon-button-group-CLhC7wjU.js} +2 -2
  54. package/dist/_chunks/{icon-picker-BmU6gpZT.js → icon-picker-Ct6n8GTa.js} +2 -2
  55. package/dist/_chunks/{info-tip-B3cn3fY2.js → info-tip-CkH2En-i.js} +2 -2
  56. package/dist/_chunks/{invoice-upload-list-BR6vycF7.js → invoice-upload-list-CZ1B9yWh.js} +4 -4
  57. package/dist/_chunks/{kit-extensions-QddOSnIq.js → kit-extensions-C_oZ7WOq.js} +4 -4
  58. package/dist/_chunks/{link-cell-renderer-hAJplRFF.js → link-cell-renderer-ByOAy2Sb.js} +4 -4
  59. package/dist/_chunks/{locale-picker-C86h8Yt1.js → locale-picker-OrojXX6E.js} +2 -2
  60. package/dist/_chunks/{marketplace-app-shell-dMmxI6MT.js → marketplace-app-shell-DnL187-U.js} +4 -4
  61. package/dist/_chunks/{message-tray-pLGgLmoG.js → message-tray-g6dp_AAt.js} +2 -2
  62. package/dist/_chunks/{muscle-scheme-BB2eBfww.js → muscle-scheme-vNd8wU7V.js} +2 -2
  63. package/dist/_chunks/{non-modal-tab-exit-j3CPOuE3.js → non-modal-tab-exit-DqJao_E-.js} +2 -1
  64. package/dist/_chunks/{notes-panel-C4HSUudf.js → notes-panel-CtMLUJOe.js} +5 -4
  65. package/dist/_chunks/{notification-tray-mlCfxNRH.js → notification-tray-DqCYs9Bw.js} +2 -2
  66. package/dist/_chunks/{optical-prescription-GzeK_2cf.js → optical-prescription-CWwrW4YQ.js} +2 -2
  67. package/dist/_chunks/{pagination-C7N_NiRN.js → pagination-BpXG5jVk.js} +2 -2
  68. package/dist/_chunks/{parts-BOnDDU3E.js → parts-IFiXO68Y.js} +3 -3
  69. package/dist/_chunks/{patient-account-settings-nSvNKKOL.js → patient-account-settings-e8Wp2g-F.js} +3 -3
  70. package/dist/_chunks/{patient-check-in-resume-Cj2wg_NQ.js → patient-check-in-resume-_nwf9gpx.js} +5 -5
  71. package/dist/_chunks/{patient-details-D0PjzALT.js → patient-details-6uJZ27ZL.js} +2 -2
  72. package/dist/_chunks/{patient-field-row-DlpIModg.js → patient-field-row-D8Cu_MQp.js} +5 -5
  73. package/dist/_chunks/{patient-search-aTFd7p9s.js → patient-search-C6-INPjs.js} +2 -2
  74. package/dist/_chunks/{patient-summary-card-BP_K7g_q.js → patient-summary-card-NYjO0IfN.js} +3 -3
  75. package/dist/_chunks/{pdf-viewer-TRC5jEm5.js → pdf-viewer-C8no312t.js} +2 -2
  76. package/dist/_chunks/{phone-input-DRKcJUi4.js → phone-input-DHiYJZ9v.js} +2 -2
  77. package/dist/_chunks/{popover-CN5IsOeS.js → popover-CkvP3rHZ.js} +2 -2
  78. package/dist/_chunks/{popup-region-qz_5_A0V.js → popup-region-BgZ8oeUB.js} +2 -2
  79. package/dist/_chunks/{portal-details-Cnyqf9kY.js → portal-details-D9oF6FUV.js} +2 -2
  80. package/dist/_chunks/{portal-documents-g109Dl0O.js → portal-documents-DSiLSave.js} +5 -5
  81. package/dist/_chunks/{portal-parts-DgDFuED8.js → portal-parts-8qrUM-uK.js} +3 -3
  82. package/dist/_chunks/{practice-results-DaxGw9_f.js → practice-results-BUEsl2Pj.js} +3 -3
  83. package/dist/_chunks/{pregnancy-dating-a6WIg4oy.js → pregnancy-dating-wc9iCN0f.js} +3 -3
  84. package/dist/_chunks/{prescription-history-Bp_JHhdF.js → prescription-history-DFcPXYdF.js} +8 -8
  85. package/dist/_chunks/{product-hub-panel-K4QbULG7.js → product-hub-panel-BPpmVDm5.js} +2 -2
  86. package/dist/_chunks/{public-header.agent-DaeDfLfy.js → public-header.agent-Dsl9zhA2.js} +2 -2
  87. package/dist/_chunks/{radiograph-panel.agent-88VjqlG7.js → radiograph-panel.agent-CSpr2paU.js} +4 -4
  88. package/dist/_chunks/{registration-form-Cs9o6e5q.js → registration-form-DRGMzq9V.js} +3 -3
  89. package/dist/_chunks/{reserved.agent-L2ElYPuj.js → reserved.agent-C_pr0bHy.js} +4 -4
  90. package/dist/_chunks/{rich-text-editor-orJ-hPgm.js → rich-text-editor-CQ54ybTB.js} +7 -7
  91. package/dist/_chunks/{row-actions-BF2-uizV.js → row-actions-C6d6vy5z.js} +3 -3
  92. package/dist/_chunks/{saved-view-tabs-DLWm88Eq.js → saved-view-tabs-CVUM3Nqz.js} +2 -2
  93. package/dist/_chunks/{select-Bm8s3q-X.js → select-Bw5FvGJ7.js} +2 -2
  94. package/dist/_chunks/{send-registration-link-form-C1vw6H1M.js → send-registration-link-form-D-NkS__p.js} +3 -3
  95. package/dist/_chunks/{sheet-BdhYeQQT.js → sheet-BIAhwdyS.js} +2 -2
  96. package/dist/_chunks/{sign-document-DDZbmYHu.js → sign-document-BUhWw-7S.js} +2 -2
  97. package/dist/_chunks/{signature-request-D3sLLOM6.js → signature-request-BfKo3vOz.js} +4 -4
  98. package/dist/_chunks/{signing-end-screen-BdhbkPKO.js → signing-end-screen-Pmda6tCH.js} +4 -4
  99. package/dist/_chunks/{step-up-dialog-C2JqJmCA.js → step-up-dialog-C1O8ctoh.js} +2 -2
  100. package/dist/_chunks/{sync-tray-BhnkgXKK.js → sync-tray-BTmveFGE.js} +2 -2
  101. package/dist/_chunks/{tab-bar-CeC2QOwB.js → tab-bar-C6tPDq9s.js} +2 -2
  102. package/dist/_chunks/{tabs-BXr5XeGq.js → tabs-BOf9OO--.js} +3 -3
  103. package/dist/_chunks/{task-editor-DDVDPKJf.js → task-editor-DNkrLbgK.js} +7 -6
  104. package/dist/_chunks/{tasks-panel-BHXaPNOZ.js → tasks-panel-Dmp49cBo.js} +3 -3
  105. package/dist/_chunks/{theme-toggle-BQDFxvVS.js → theme-toggle-C2LPw3xr.js} +3 -3
  106. package/dist/_chunks/{token-insert-menu-BLtfMTJd.js → token-insert-menu-sGtftx4Y.js} +2 -2
  107. package/dist/_chunks/{tool-rail-Kup1b7xI.js → tool-rail-CKOuVHUQ.js} +213 -209
  108. package/dist/_chunks/{toolbar-B7UHCMSr.js → toolbar-JTR20W-U.js} +3 -3
  109. package/dist/_chunks/{tooth-scheme-BtnFgugP.js → tooth-scheme-DpgciFU8.js} +2 -2
  110. package/dist/_chunks/{unit-converter-OBhSDXee.js → unit-converter-D1e1wZRE.js} +2 -2
  111. package/dist/_chunks/{use-appointment-details-read-DeQnmmZw.js → use-appointment-details-read-DIRHedaM.js} +7 -7
  112. package/dist/_chunks/{verify-identity-types-C6Bam8v6.js → verify-identity-types-CpeJIc9F.js} +2 -2
  113. package/dist/_chunks/{voice-control-panel-Dc_NFH2R.js → voice-control-panel-CfBUrzhJ.js} +3 -3
  114. package/dist/_chunks/{widget-picker-D3T7e8a4.js → widget-picker-Ddl0lDWV.js} +2 -2
  115. package/dist/_chunks/{workflow-map-DaZFP9SJ.js → workflow-map-CsfRHhlz.js} +2 -2
  116. package/dist/_chunks/{workflow-status-CO0mxXs2.js → workflow-status-Cg7yjnye.js} +2 -2
  117. package/dist/_chunks/{workflow-webhook-action-BsGSh3h9.js → workflow-webhook-action-BUWc2txJ.js} +2 -2
  118. package/dist/agent-catalog.json +1 -1
  119. package/dist/appointment-editor-panel/index.js +2 -2
  120. package/dist/browser-support.js +1 -1
  121. package/dist/calendar-action-buttons/index.js +1 -1
  122. package/dist/components/_shared/non-modal-tab-exit.d.ts +1 -0
  123. package/dist/components/ai-credits-notice/index.js +1 -1
  124. package/dist/components/ai-prompt-input/index.js +1 -1
  125. package/dist/components/appointment-card/index.js +2 -2
  126. package/dist/components/appointment-details-panel/index.js +1 -1
  127. package/dist/components/appointment-peek/index.js +1 -1
  128. package/dist/components/appointment-timeline/index.js +1 -1
  129. package/dist/components/audio-recorder/index.js +1 -1
  130. package/dist/components/bill-line-table/index.js +1 -1
  131. package/dist/components/bill-table/index.js +1 -1
  132. package/dist/components/bishop-score/index.js +1 -1
  133. package/dist/components/booking/index.js +1 -1
  134. package/dist/components/button-group/index.js +1 -1
  135. package/dist/components/calculator-dialog/index.js +1 -1
  136. package/dist/components/calls-panel/index.js +1 -1
  137. package/dist/components/care-plan-card/index.js +1 -1
  138. package/dist/components/care-plan-entry-card/index.js +1 -1
  139. package/dist/components/chart/index.js +1 -1
  140. package/dist/components/color-picker/index.js +1 -1
  141. package/dist/components/communications-panel/index.js +1 -1
  142. package/dist/components/control-room-rail/index.js +1 -1
  143. package/dist/components/cycle-calculator/index.js +1 -1
  144. package/dist/components/dashboard-grid/index.js +1 -1
  145. package/dist/components/data-grid/index.js +2 -2
  146. package/dist/components/data-grid-tabs/index.js +1 -1
  147. package/dist/components/data-table/index.js +4 -4
  148. package/dist/components/data-table-tabs/index.js +1 -1
  149. package/dist/components/date-picker/index.js +1 -1
  150. package/dist/components/date-range-picker/index.js +1 -1
  151. package/dist/components/date-time-picker/index.js +1 -1
  152. package/dist/components/dialog/dialog-container.d.ts +27 -0
  153. package/dist/components/dialog/dialog.d.ts +12 -2
  154. package/dist/components/dialog/index.d.ts +3 -1
  155. package/dist/components/dialog/index.js +5 -3
  156. package/dist/components/document-preview/index.js +1 -1
  157. package/dist/components/dropdown-menu/index.js +1 -1
  158. package/dist/components/due-date-calculator/index.js +1 -1
  159. package/dist/components/face-scheme/index.js +1 -1
  160. package/dist/components/file-manager/index.js +1 -1
  161. package/dist/components/gestational-age-calculator/index.js +1 -1
  162. package/dist/components/hcg-doubling/index.js +1 -1
  163. package/dist/components/header-settings/index.js +1 -1
  164. package/dist/components/heatmap/index.js +1 -1
  165. package/dist/components/hover-card/index.js +1 -1
  166. package/dist/components/icon-button-group/index.js +1 -1
  167. package/dist/components/icon-picker/index.js +1 -1
  168. package/dist/components/info-tip/index.js +1 -1
  169. package/dist/components/invoice-upload-list/index.js +1 -1
  170. package/dist/components/locale-picker/index.js +1 -1
  171. package/dist/components/message-tray/index.js +1 -1
  172. package/dist/components/muscle-scheme/index.js +1 -1
  173. package/dist/components/notes-panel/index.js +1 -1
  174. package/dist/components/notification-tray/index.js +1 -1
  175. package/dist/components/optical-prescription/index.js +1 -1
  176. package/dist/components/pagination/index.js +1 -1
  177. package/dist/components/patient-details/index.js +1 -1
  178. package/dist/components/patient-search/index.js +1 -1
  179. package/dist/components/patient-summary-card/index.js +1 -1
  180. package/dist/components/patient-table/index.js +1 -1
  181. package/dist/components/pdf-viewer/index.js +1 -1
  182. package/dist/components/phone-input/index.js +1 -1
  183. package/dist/components/popover/index.js +1 -1
  184. package/dist/components/practice-results/index.js +1 -1
  185. package/dist/components/pregnancy-dating/index.js +1 -1
  186. package/dist/components/product-hub-tray/index.js +1 -1
  187. package/dist/components/public-header/index.js +1 -1
  188. package/dist/components/radiograph-panel/index.js +1 -1
  189. package/dist/components/rich-text-editor/index.js +2 -2
  190. package/dist/components/row-actions/index.js +1 -1
  191. package/dist/components/select/index.js +1 -1
  192. package/dist/components/sheet/index.js +1 -1
  193. package/dist/components/sign-document/index.js +1 -1
  194. package/dist/components/skeleton-scheme/index.js +1 -1
  195. package/dist/components/step-up-dialog/index.js +1 -1
  196. package/dist/components/sync-tray/index.js +1 -1
  197. package/dist/components/tab-bar/index.js +1 -1
  198. package/dist/components/tabs/index.js +1 -1
  199. package/dist/components/task-editor/index.js +1 -1
  200. package/dist/components/tasks-panel/index.js +1 -1
  201. package/dist/components/theme-toggle/index.js +1 -1
  202. package/dist/components/token-insert-menu/index.js +1 -1
  203. package/dist/components/tool-rail/index.js +1 -1
  204. package/dist/components/tooth-scheme/index.js +1 -1
  205. package/dist/components/unit-converter/index.js +1 -1
  206. package/dist/components/voice-control-panel/index.js +1 -1
  207. package/dist/components/widget-picker/index.js +1 -1
  208. package/dist/components/workflow/index.js +1 -1
  209. package/dist/components/workflow-status/index.js +1 -1
  210. package/dist/core.css +1 -1
  211. package/dist/find-free-slots-panel/index.js +1 -1
  212. package/dist/index.js +945 -943
  213. package/dist/online-bookings-panel/index.js +1 -1
  214. package/dist/patterns/alia-assistant/index.js +1 -1
  215. package/dist/patterns/anamnesis/index.js +1 -1
  216. package/dist/patterns/calendar/index.js +3 -3
  217. package/dist/patterns/help-me-write-templates/index.js +1 -1
  218. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  219. package/dist/patterns/patient-account-settings/index.js +1 -1
  220. package/dist/patterns/patient-check-in/index.js +1 -1
  221. package/dist/patterns/patient-portal/index.js +2 -2
  222. package/dist/patterns/prescription/index.js +1 -1
  223. package/dist/patterns/registration-form/index.js +1 -1
  224. package/dist/patterns/send-registration-link-form/index.js +1 -1
  225. package/dist/patterns/signature-request/index.js +1 -1
  226. package/dist/patterns/signing/index.js +1 -1
  227. package/dist/patterns/verify-identity/index.js +1 -1
  228. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  229. package/dist/tokens.css +1 -1
  230. package/dist/waiting-list-panel/index.js +2 -2
  231. package/package.json +1 -1
  232. package/dist/_chunks/dialog-CVTxyR0v.js +0 -349
@@ -4,8 +4,8 @@ import { useTranslation as K } from "react-i18next";
4
4
  import { d as s, b as L } from "../_chunks/toast-DQ1Zu1kk.js";
5
5
  import { a as M } from "../_chunks/tooltip-uEBdD1-5.js";
6
6
  import { C as Q } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
7
- import { S as V } from "../_chunks/calendar.sheets-DcW8A3DI.js";
8
- import { W as X } from "../_chunks/calendar-waiting-list-panel-BNQrUndD.js";
7
+ import { S as V } from "../_chunks/calendar.sheets-sBWH7Jxn.js";
8
+ import { W as X } from "../_chunks/calendar-waiting-list-panel-js-0KEh8.js";
9
9
  import { P as Y } from "../_chunks/privacy-mask-C2ZLKrMh.js";
10
10
  import { H as Z } from "../_chunks/hourglass-BEAzW1wE.js";
11
11
  const q = { open: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.141.0",
3
+ "version": "1.142.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -1,349 +0,0 @@
1
- import { jsx as n, jsxs as O } from "react/jsx-runtime";
2
- import { useRef as m, useEffect as K, useMemo as j, forwardRef as u, useContext as S, createContext as Y } from "react";
3
- import * as l from "@radix-ui/react-dialog";
4
- import { c as k } from "./index-D2ZczOXr.js";
5
- import { useTranslation as G } from "react-i18next";
6
- import { u as J } from "./use-controllable-state-BiY4xTzM.js";
7
- import { u as Q } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
- import { u as W } from "./registry-DvAUVLHh.js";
9
- import { u as Z } from "./non-modal-tab-exit-j3CPOuE3.js";
10
- import { c as B } from "./compose-refs-C0k0tdqF.js";
11
- import { r as ee } from "./body-pointer-lock-CsOEDm1I.js";
12
- import { X as te } from "./x-B5YnXwCz.js";
13
- const oe = 8;
14
- function h(e) {
15
- return e instanceof HTMLElement ? e : null;
16
- }
17
- function ae(e) {
18
- var a;
19
- const t = e.ownerDocument, o = ((a = e.getAttribute("aria-labelledby")) == null ? void 0 : a.split(/\s+/)) ?? [];
20
- for (const s of o) {
21
- const r = s ? h(t.getElementById(s)) : null;
22
- if (r && !e.contains(r)) return r;
23
- }
24
- if (e.id) {
25
- const s = h(
26
- t.querySelector(`[aria-controls~="${CSS.escape(e.id)}"]`)
27
- );
28
- if (s && !e.contains(s)) return s;
29
- }
30
- return null;
31
- }
32
- function se(e) {
33
- const t = [];
34
- let o = h(e);
35
- if (!o || o === o.ownerDocument.body) return t;
36
- for (let a = 0; o && a <= oe; a += 1) {
37
- t.push(o);
38
- const s = o.closest('[role="menu"]');
39
- if (!s) break;
40
- o = ae(s);
41
- }
42
- return t;
43
- }
44
- function ne(e) {
45
- return e.isConnected && !e.matches(":disabled") && e.closest("[inert]") === null && e.getClientRects().length > 0;
46
- }
47
- function ie(e) {
48
- for (const t of e)
49
- if (ne(t) && (t.focus({ preventScroll: !0 }), t.ownerDocument.activeElement === t))
50
- return !0;
51
- return !1;
52
- }
53
- const re = {
54
- id: "dialog",
55
- capabilities: ["open", "close", "dismiss"],
56
- state: {
57
- isOpen: {
58
- type: "boolean",
59
- descriptionKey: "ui.agent.dialog.state.isOpen",
60
- description: "True when the dialog is currently open.",
61
- read: (e) => e.getIsOpen()
62
- }
63
- },
64
- actions: {
65
- open: {
66
- safety: "read",
67
- idempotent: !0,
68
- descriptionKey: "ui.agent.dialog.actions.open",
69
- description: "Open the dialog.",
70
- invoke: (e) => {
71
- e.open();
72
- }
73
- },
74
- close: {
75
- safety: "read",
76
- idempotent: !0,
77
- descriptionKey: "ui.agent.dialog.actions.close",
78
- description: "Close the dialog. Reversible by reopening.",
79
- invoke: (e) => {
80
- e.close();
81
- }
82
- },
83
- dismiss: {
84
- safety: "destructive",
85
- idempotent: !0,
86
- descriptionKey: "ui.agent.dialog.actions.dismiss",
87
- description: "Dismiss the dialog. Loses any in-progress input that has not been committed.",
88
- invoke: (e) => {
89
- e.close();
90
- }
91
- }
92
- },
93
- domHooks: {
94
- root: { attr: "data-component", value: "dialog" },
95
- instanceId: {
96
- attr: "data-component-id",
97
- sourceProp: "id",
98
- description: "Sourced from the id prop on Dialog.Root."
99
- }
100
- }
101
- }, de = [
102
- "ds-dialog__backdrop",
103
- "ds:backdrop-blur-sm",
104
- "ds:data-[state=open]:animate-in ds:data-[state=open]:fade-in-0",
105
- "ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out-0",
106
- "ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
107
- ].join(" "), le = [
108
- "ds:focus-visible:outline-none",
109
- "ds:data-[state=open]:animate-in ds:data-[state=open]:fade-in-0 ds:data-[state=open]:zoom-in-95",
110
- "ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out-0 ds:data-[state=closed]:zoom-out-95",
111
- "ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
112
- ].join(" "), ce = k(`ds-dialog ds-dialog__surface ${le}`, {
113
- variants: {
114
- size: {
115
- sm: "ds-dialog__surface--sm",
116
- md: "",
117
- lg: "ds-dialog__surface--lg",
118
- xl: "ds-dialog__surface--xl",
119
- fullscreen: "ds-dialog__surface--fullscreen"
120
- },
121
- // `body` pins the header and footer and scrolls only `Dialog.Body` once
122
- // the content passes the height cap. `surface` (default) scrolls the
123
- // whole panel as one block.
124
- scroll: {
125
- surface: "",
126
- body: "ds-dialog__surface--scroll-body"
127
- },
128
- // `flush` drops the surface padding for content that brings its own
129
- // header, scroll box and footer (a docked panel thrown in a dialog).
130
- flush: {
131
- true: "ds-dialog__surface--flush",
132
- false: ""
133
- }
134
- },
135
- defaultVariants: { size: "md", scroll: "surface", flush: !1 }
136
- }), N = Y({
137
- modal: !0,
138
- triggerRef: { current: null },
139
- returnFocusRef: { current: [] }
140
- }), C = ({
141
- children: e,
142
- id: t,
143
- open: o,
144
- defaultOpen: a,
145
- onOpenChange: s,
146
- modal: r = !0,
147
- ...v
148
- }) => {
149
- const [f, c] = J({
150
- value: o,
151
- defaultValue: a ?? !1,
152
- onChange: s
153
- }), i = f ?? !1, p = m(i);
154
- K(() => {
155
- p.current = i;
156
- }, [i]);
157
- const b = j(
158
- () => ({
159
- getIsOpen: () => p.current,
160
- open: () => c(!0),
161
- close: () => c(!1)
162
- }),
163
- [c]
164
- );
165
- W(re, b, t);
166
- const D = m(null), g = m([]);
167
- Q(() => {
168
- i && (g.current = se(document.activeElement));
169
- }, [i]);
170
- const y = j(
171
- () => ({ id: t, modal: r, triggerRef: D, returnFocusRef: g }),
172
- [t, r]
173
- );
174
- return /* @__PURE__ */ n(N.Provider, { value: y, children: /* @__PURE__ */ n(
175
- l.Root,
176
- {
177
- open: i,
178
- onOpenChange: c,
179
- modal: r,
180
- ...v,
181
- children: e
182
- }
183
- ) });
184
- };
185
- C.displayName = "Dialog.Root";
186
- const H = u(({ children: e, ...t }, o) => {
187
- const { triggerRef: a } = S(N);
188
- return /* @__PURE__ */ n(l.Trigger, { ref: B(o, a), ...t, children: e });
189
- });
190
- H.displayName = "Dialog.Trigger";
191
- const M = u(({ children: e, ...t }, o) => /* @__PURE__ */ n(l.Close, { ref: o, ...t, children: e }));
192
- M.displayName = "Dialog.Close";
193
- const L = u(
194
- ({
195
- size: e = "md",
196
- variant: t = "default",
197
- scroll: o = "surface",
198
- flush: a = !1,
199
- hideCloseButton: s,
200
- className: r,
201
- children: v,
202
- onKeyDown: f,
203
- onCloseAutoFocus: c,
204
- onInteractOutside: i,
205
- ...p
206
- }, b) => {
207
- const { t: D } = G("ui"), {
208
- id: g,
209
- modal: y,
210
- triggerRef: A,
211
- returnFocusRef: I
212
- } = S(N), x = m(null), _ = m(!1), U = Z(!y), X = t === "alert" ? { role: "alertdialog" } : {}, $ = s ?? t !== "default";
213
- return /* @__PURE__ */ O(l.Portal, { children: [
214
- /* @__PURE__ */ n(
215
- l.Overlay,
216
- {
217
- "data-component": "dialog-overlay",
218
- className: de
219
- }
220
- ),
221
- /* @__PURE__ */ O(
222
- l.Content,
223
- {
224
- ref: B(b, x),
225
- ...X,
226
- "data-component": "dialog",
227
- "data-component-id": g,
228
- className: ce({ size: e, scroll: o, flush: a, className: r }),
229
- ...p,
230
- onKeyDown: (d) => {
231
- f == null || f(d), U(d);
232
- },
233
- onInteractOutside: (d) => {
234
- i == null || i(d), d.defaultPrevented || (_.current = !0);
235
- },
236
- onCloseAutoFocus: (d) => {
237
- var T, E;
238
- ee(), c == null || c(d);
239
- const q = _.current;
240
- if (_.current = !1, d.defaultPrevented || (T = A.current) != null && T.isConnected || !y && q) return;
241
- const R = document.activeElement;
242
- R !== null && R !== document.body && !((E = x.current) != null && E.contains(R)) || ie(I.current) && d.preventDefault();
243
- },
244
- children: [
245
- v,
246
- !$ && // The close is a plain button carrying the `ds-dialog__close`
247
- // contract class — the SAME class a vanilla host renders. The CSS
248
- // (src/styles.css) owns its position, sizing, glyph size, hover
249
- // wash, and focus ring from tokens, so the React and non-React
250
- // close buttons are identical and can't drift.
251
- /* @__PURE__ */ n(
252
- l.Close,
253
- {
254
- type: "button",
255
- className: "ds-dialog__close",
256
- "aria-label": D("common.close", "Close"),
257
- children: /* @__PURE__ */ n(te, { "aria-hidden": "true" })
258
- }
259
- )
260
- ]
261
- }
262
- )
263
- ] });
264
- }
265
- );
266
- L.displayName = "Dialog.Content";
267
- const P = u(
268
- ({ className: e, ...t }, o) => /* @__PURE__ */ n(
269
- "div",
270
- {
271
- ref: o,
272
- className: ["ds-dialog__header", e].filter(Boolean).join(" "),
273
- ...t
274
- }
275
- )
276
- );
277
- P.displayName = "Dialog.Header";
278
- const w = u(
279
- ({ className: e, ...t }, o) => /* @__PURE__ */ n(
280
- "div",
281
- {
282
- ref: o,
283
- className: ["ds-dialog__body", e].filter(Boolean).join(" "),
284
- ...t
285
- }
286
- )
287
- );
288
- w.displayName = "Dialog.Body";
289
- const F = u(({ className: e, ...t }, o) => /* @__PURE__ */ n(
290
- l.Title,
291
- {
292
- ref: o,
293
- className: ["ds-dialog__title type-title-card ds:break-words", e].filter(Boolean).join(" "),
294
- ...t
295
- }
296
- ));
297
- F.displayName = "Dialog.Title";
298
- const V = u(({ className: e, ...t }, o) => /* @__PURE__ */ n(
299
- l.Description,
300
- {
301
- ref: o,
302
- className: ["type-body-sm ds:text-[var(--muted-foreground)]", e].filter(Boolean).join(" "),
303
- ...t
304
- }
305
- ));
306
- V.displayName = "Dialog.Description";
307
- const ue = k(
308
- [
309
- "ds:@container/dialog-footer",
310
- "ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-sm)]",
311
- "ds:@max-[384px]/dialog-footer:[&>*]:w-full",
312
- "ds:mt-[var(--spacing-md)]"
313
- ].join(" "),
314
- {
315
- variants: {
316
- divider: {
317
- true: "ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-md)]",
318
- false: ""
319
- }
320
- },
321
- defaultVariants: { divider: !1 }
322
- }
323
- ), z = u(
324
- ({ className: e, divider: t = !1, ...o }, a) => /* @__PURE__ */ n(
325
- "div",
326
- {
327
- ref: a,
328
- className: ue({ divider: t, className: e }),
329
- ...o
330
- }
331
- )
332
- );
333
- z.displayName = "Dialog.Footer";
334
- const Ne = Object.assign(C, {
335
- Root: C,
336
- Trigger: H,
337
- Content: L,
338
- Header: P,
339
- Title: F,
340
- Description: V,
341
- Body: w,
342
- Footer: z,
343
- Close: M
344
- });
345
- export {
346
- Ne as D,
347
- re as d
348
- };
349
- //# sourceMappingURL=dialog-CVTxyR0v.js.map