@alfadocs/ui-kit-debug 1.0.0 → 1.2.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 (231) hide show
  1. package/dist/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js} +600 -565
  2. package/dist/_chunks/actions-cell-renderer-ClGCSQnA.js.map +1 -0
  3. package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js → ai-consent-banner-DKgFfSzc.js} +2 -2
  4. package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js.map → ai-consent-banner-DKgFfSzc.js.map} +1 -1
  5. package/dist/_chunks/{alert-Cxaqd-QO.js → alert-DS22ha1n.js} +103 -98
  6. package/dist/_chunks/alert-DS22ha1n.js.map +1 -0
  7. package/dist/_chunks/{annotation-marker-qt5R9WZX.js → annotation-marker-CsUJGZjQ.js} +7 -5
  8. package/dist/_chunks/annotation-marker-CsUJGZjQ.js.map +1 -0
  9. package/dist/_chunks/{audio-recorder-BjnB7V8n.js → audio-recorder-sRsGS-0V.js} +2 -2
  10. package/dist/_chunks/{audio-recorder-BjnB7V8n.js.map → audio-recorder-sRsGS-0V.js.map} +1 -1
  11. package/dist/_chunks/{booking-DSOK-bnR.js → booking-D8fCzcUd.js} +2 -2
  12. package/dist/_chunks/{booking-DSOK-bnR.js.map → booking-D8fCzcUd.js.map} +1 -1
  13. package/dist/_chunks/{care-plan-card-BrwhyIJI.js → care-plan-card-DjjVnBYz.js} +2 -2
  14. package/dist/_chunks/{care-plan-card-BrwhyIJI.js.map → care-plan-card-DjjVnBYz.js.map} +1 -1
  15. package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js → care-plan-entry-card-BVhpvd-P.js} +2 -2
  16. package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js.map → care-plan-entry-card-BVhpvd-P.js.map} +1 -1
  17. package/dist/_chunks/{collapsible-BrnRiCC6.js → collapsible-CGL9ontS.js} +65 -61
  18. package/dist/_chunks/collapsible-CGL9ontS.js.map +1 -0
  19. package/dist/_chunks/{document-preview-DXsCEj4U.js → document-preview-DAczwybt.js} +2 -2
  20. package/dist/_chunks/{document-preview-DXsCEj4U.js.map → document-preview-DAczwybt.js.map} +1 -1
  21. package/dist/_chunks/{document-scanner-cS_ispQs.js → document-scanner-BRYIc3A-.js} +2 -2
  22. package/dist/_chunks/{document-scanner-cS_ispQs.js.map → document-scanner-BRYIc3A-.js.map} +1 -1
  23. package/dist/_chunks/{entity-summary-BILN4wEG.js → entity-summary-BS6n7Iah.js} +2 -2
  24. package/dist/_chunks/{entity-summary-BILN4wEG.js.map → entity-summary-BS6n7Iah.js.map} +1 -1
  25. package/dist/_chunks/{face-scheme-CjQAHvSP.js → face-scheme-Cou2efl7.js} +2 -2
  26. package/dist/_chunks/{face-scheme-CjQAHvSP.js.map → face-scheme-Cou2efl7.js.map} +1 -1
  27. package/dist/_chunks/{file-manager-B9LZzT5E.js → file-manager-CNSLiuLo.js} +2 -2
  28. package/dist/_chunks/{file-manager-B9LZzT5E.js.map → file-manager-CNSLiuLo.js.map} +1 -1
  29. package/dist/_chunks/{freemium-paywall-Dr2342_S.js → freemium-paywall-DsT7MaLd.js} +2 -2
  30. package/dist/_chunks/{freemium-paywall-Dr2342_S.js.map → freemium-paywall-DsT7MaLd.js.map} +1 -1
  31. package/dist/_chunks/link-cell-renderer-_DlEZHLI.js +772 -0
  32. package/dist/_chunks/link-cell-renderer-_DlEZHLI.js.map +1 -0
  33. package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js → marketplace-app-shell-DQC9Gpm0.js} +2 -2
  34. package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js.map → marketplace-app-shell-DQC9Gpm0.js.map} +1 -1
  35. package/dist/_chunks/{muscle-scheme-kgCX5qfO.js → muscle-scheme-yfzP_xoJ.js} +2 -2
  36. package/dist/_chunks/{muscle-scheme-kgCX5qfO.js.map → muscle-scheme-yfzP_xoJ.js.map} +1 -1
  37. package/dist/_chunks/notes-panel-CCz0J140.js +370 -0
  38. package/dist/_chunks/notes-panel-CCz0J140.js.map +1 -0
  39. package/dist/_chunks/{patient-details-UmNcxL0c.js → patient-details-l7pnsUq9.js} +2 -2
  40. package/dist/_chunks/{patient-details-UmNcxL0c.js.map → patient-details-l7pnsUq9.js.map} +1 -1
  41. package/dist/_chunks/{patient-search-vtRTSdf6.js → patient-search-H54Utav2.js} +2 -2
  42. package/dist/_chunks/{patient-search-vtRTSdf6.js.map → patient-search-H54Utav2.js.map} +1 -1
  43. package/dist/_chunks/{patient-table-QEVsFvwq.js → patient-table-DXk0wW8Q.js} +243 -239
  44. package/dist/_chunks/patient-table-DXk0wW8Q.js.map +1 -0
  45. package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js +305 -0
  46. package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js.map +1 -0
  47. package/dist/_chunks/{payment-form-BoGxEmGn.js → payment-form-CyKT20xZ.js} +2 -2
  48. package/dist/_chunks/{payment-form-BoGxEmGn.js.map → payment-form-CyKT20xZ.js.map} +1 -1
  49. package/dist/_chunks/{payment-request-card-CygO1anM.js → payment-request-card-CN30J6yM.js} +107 -138
  50. package/dist/_chunks/payment-request-card-CN30J6yM.js.map +1 -0
  51. package/dist/_chunks/{pdf-viewer-CcOuR2wj.js → pdf-viewer-DHg8SfUI.js} +2 -2
  52. package/dist/_chunks/{pdf-viewer-CcOuR2wj.js.map → pdf-viewer-DHg8SfUI.js.map} +1 -1
  53. package/dist/_chunks/{practice-results-yKbwIxqa.js → practice-results-qvJRkvLn.js} +2 -2
  54. package/dist/_chunks/{practice-results-yKbwIxqa.js.map → practice-results-qvJRkvLn.js.map} +1 -1
  55. package/dist/_chunks/receipt-euro-C6k4Gzhr.js +36 -0
  56. package/dist/_chunks/receipt-euro-C6k4Gzhr.js.map +1 -0
  57. package/dist/_chunks/{reviews-panel-DmOjvmyH.js → reviews-panel-BfUJhx3m.js} +2 -2
  58. package/dist/_chunks/{reviews-panel-DmOjvmyH.js.map → reviews-panel-BfUJhx3m.js.map} +1 -1
  59. package/dist/_chunks/{sign-document-cH9CboWB.js → sign-document-D70TEUw9.js} +2 -2
  60. package/dist/_chunks/{sign-document-cH9CboWB.js.map → sign-document-D70TEUw9.js.map} +1 -1
  61. package/dist/_chunks/{signature-request-BzXTV_RH.js → signature-request-BlNCXpRN.js} +2 -2
  62. package/dist/_chunks/{signature-request-BzXTV_RH.js.map → signature-request-BlNCXpRN.js.map} +1 -1
  63. package/dist/_chunks/sparkline-DJtZBe7O.js +501 -0
  64. package/dist/_chunks/sparkline-DJtZBe7O.js.map +1 -0
  65. package/dist/_chunks/{warning-stack-DKeAfj5M.js → warning-stack-IVf0oxh2.js} +2 -2
  66. package/dist/_chunks/{warning-stack-DKeAfj5M.js.map → warning-stack-IVf0oxh2.js.map} +1 -1
  67. package/dist/_chunks/{workflow-map-SIfAhmWz.js → workflow-map-ByyBYj6Y.js} +2 -2
  68. package/dist/_chunks/{workflow-map-SIfAhmWz.js.map → workflow-map-ByyBYj6Y.js.map} +1 -1
  69. package/dist/agent-catalog.json +237 -7
  70. package/dist/agent-i18n/en.json +17 -5
  71. package/dist/components/ai-consent-banner/index.js +1 -1
  72. package/dist/components/alert/alert.d.ts +20 -0
  73. package/dist/components/alert/alert.d.ts.map +1 -1
  74. package/dist/components/alert/index.d.ts +1 -1
  75. package/dist/components/alert/index.d.ts.map +1 -1
  76. package/dist/components/alert/index.js +1 -1
  77. package/dist/components/annotation-marker/annotation-marker.d.ts.map +1 -1
  78. package/dist/components/annotation-marker/index.js +1 -1
  79. package/dist/components/audio-recorder/index.js +1 -1
  80. package/dist/components/booking/index.js +1 -1
  81. package/dist/components/care-plan-card/index.js +1 -1
  82. package/dist/components/care-plan-entry-card/index.js +1 -1
  83. package/dist/components/collapsible/collapsible.d.ts.map +1 -1
  84. package/dist/components/collapsible/index.js +1 -1
  85. package/dist/components/data-table/data-table.d.ts.map +1 -1
  86. package/dist/components/data-table/filters/select-filter.d.ts +6 -0
  87. package/dist/components/data-table/filters/select-filter.d.ts.map +1 -1
  88. package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts +19 -0
  89. package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts.map +1 -0
  90. package/dist/components/data-table/index.js +2 -2
  91. package/dist/components/document-preview/index.js +1 -1
  92. package/dist/components/document-scanner/index.js +1 -1
  93. package/dist/components/entity-summary/index.js +1 -1
  94. package/dist/components/face-scheme/index.js +1 -1
  95. package/dist/components/file-manager/index.js +1 -1
  96. package/dist/components/freemium-paywall/index.js +1 -1
  97. package/dist/components/muscle-scheme/index.js +1 -1
  98. package/dist/components/notes-panel/index.js +1 -1
  99. package/dist/components/notes-panel/notes-panel.agent.d.ts.map +1 -1
  100. package/dist/components/notes-panel/notes-panel.d.ts +45 -2
  101. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  102. package/dist/components/patient-details/index.js +1 -1
  103. package/dist/components/patient-search/index.js +1 -1
  104. package/dist/components/patient-table/columns.d.ts.map +1 -1
  105. package/dist/components/patient-table/index.js +1 -1
  106. package/dist/components/payment-card/index.js +1 -1
  107. package/dist/components/payment-form/index.js +1 -1
  108. package/dist/components/pdf-viewer/index.js +1 -1
  109. package/dist/components/practice-results/index.js +1 -1
  110. package/dist/components/reviews-panel/index.js +1 -1
  111. package/dist/components/sign-document/index.js +1 -1
  112. package/dist/components/skeleton-scheme/index.js +1 -1
  113. package/dist/components/sparkline/index.d.ts +1 -1
  114. package/dist/components/sparkline/index.d.ts.map +1 -1
  115. package/dist/components/sparkline/index.js +1 -1
  116. package/dist/components/sparkline/sparkline.agent.d.ts.map +1 -1
  117. package/dist/components/sparkline/sparkline.d.ts +60 -3
  118. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  119. package/dist/components/warning-stack/index.js +1 -1
  120. package/dist/components/workflow/index.js +1 -1
  121. package/dist/host-compat.css +13 -1
  122. package/dist/i18n/locales/ar.d.ts +3 -0
  123. package/dist/i18n/locales/ar.d.ts.map +1 -1
  124. package/dist/i18n/locales/ar.js +3 -0
  125. package/dist/i18n/locales/ar.js.map +1 -1
  126. package/dist/i18n/locales/de.d.ts +3 -0
  127. package/dist/i18n/locales/de.d.ts.map +1 -1
  128. package/dist/i18n/locales/de.js +3 -0
  129. package/dist/i18n/locales/de.js.map +1 -1
  130. package/dist/i18n/locales/el.d.ts +3 -0
  131. package/dist/i18n/locales/el.d.ts.map +1 -1
  132. package/dist/i18n/locales/el.js +3 -0
  133. package/dist/i18n/locales/el.js.map +1 -1
  134. package/dist/i18n/locales/en.d.ts +3 -0
  135. package/dist/i18n/locales/en.d.ts.map +1 -1
  136. package/dist/i18n/locales/en.js +3 -0
  137. package/dist/i18n/locales/en.js.map +1 -1
  138. package/dist/i18n/locales/es.d.ts +3 -0
  139. package/dist/i18n/locales/es.d.ts.map +1 -1
  140. package/dist/i18n/locales/es.js +3 -0
  141. package/dist/i18n/locales/es.js.map +1 -1
  142. package/dist/i18n/locales/fr.d.ts +3 -0
  143. package/dist/i18n/locales/fr.d.ts.map +1 -1
  144. package/dist/i18n/locales/fr.js +3 -0
  145. package/dist/i18n/locales/fr.js.map +1 -1
  146. package/dist/i18n/locales/hi.d.ts +3 -0
  147. package/dist/i18n/locales/hi.d.ts.map +1 -1
  148. package/dist/i18n/locales/hi.js +3 -0
  149. package/dist/i18n/locales/hi.js.map +1 -1
  150. package/dist/i18n/locales/it.d.ts +3 -0
  151. package/dist/i18n/locales/it.d.ts.map +1 -1
  152. package/dist/i18n/locales/it.js +3 -0
  153. package/dist/i18n/locales/it.js.map +1 -1
  154. package/dist/i18n/locales/ja.d.ts +3 -0
  155. package/dist/i18n/locales/ja.d.ts.map +1 -1
  156. package/dist/i18n/locales/ja.js +3 -0
  157. package/dist/i18n/locales/ja.js.map +1 -1
  158. package/dist/i18n/locales/nl.d.ts +3 -0
  159. package/dist/i18n/locales/nl.d.ts.map +1 -1
  160. package/dist/i18n/locales/nl.js +3 -0
  161. package/dist/i18n/locales/nl.js.map +1 -1
  162. package/dist/i18n/locales/pl.d.ts +3 -0
  163. package/dist/i18n/locales/pl.d.ts.map +1 -1
  164. package/dist/i18n/locales/pl.js +3 -0
  165. package/dist/i18n/locales/pl.js.map +1 -1
  166. package/dist/i18n/locales/pt.d.ts +3 -0
  167. package/dist/i18n/locales/pt.d.ts.map +1 -1
  168. package/dist/i18n/locales/pt.js +3 -0
  169. package/dist/i18n/locales/pt.js.map +1 -1
  170. package/dist/i18n/locales/ro.d.ts +3 -0
  171. package/dist/i18n/locales/ro.d.ts.map +1 -1
  172. package/dist/i18n/locales/ro.js +3 -0
  173. package/dist/i18n/locales/ro.js.map +1 -1
  174. package/dist/i18n/locales/ru.d.ts +3 -0
  175. package/dist/i18n/locales/ru.d.ts.map +1 -1
  176. package/dist/i18n/locales/ru.js +3 -0
  177. package/dist/i18n/locales/ru.js.map +1 -1
  178. package/dist/i18n/locales/sq.d.ts +3 -0
  179. package/dist/i18n/locales/sq.d.ts.map +1 -1
  180. package/dist/i18n/locales/sq.js +3 -0
  181. package/dist/i18n/locales/sq.js.map +1 -1
  182. package/dist/i18n/locales/sv.d.ts +3 -0
  183. package/dist/i18n/locales/sv.d.ts.map +1 -1
  184. package/dist/i18n/locales/sv.js +3 -0
  185. package/dist/i18n/locales/sv.js.map +1 -1
  186. package/dist/i18n/locales/tr.d.ts +3 -0
  187. package/dist/i18n/locales/tr.d.ts.map +1 -1
  188. package/dist/i18n/locales/tr.js +3 -0
  189. package/dist/i18n/locales/tr.js.map +1 -1
  190. package/dist/i18n/locales/zh.d.ts +3 -0
  191. package/dist/i18n/locales/zh.d.ts.map +1 -1
  192. package/dist/i18n/locales/zh.js +3 -0
  193. package/dist/i18n/locales/zh.js.map +1 -1
  194. package/dist/index.js +974 -1268
  195. package/dist/index.js.map +1 -1
  196. package/dist/locales/ar.json +3 -0
  197. package/dist/locales/de.json +3 -0
  198. package/dist/locales/el.json +3 -0
  199. package/dist/locales/en.json +3 -0
  200. package/dist/locales/es.json +3 -0
  201. package/dist/locales/fr.json +3 -0
  202. package/dist/locales/hi.json +3 -0
  203. package/dist/locales/it.json +3 -0
  204. package/dist/locales/ja.json +3 -0
  205. package/dist/locales/nl.json +3 -0
  206. package/dist/locales/pl.json +3 -0
  207. package/dist/locales/pt.json +3 -0
  208. package/dist/locales/ro.json +3 -0
  209. package/dist/locales/ru.json +3 -0
  210. package/dist/locales/sq.json +3 -0
  211. package/dist/locales/sv.json +3 -0
  212. package/dist/locales/tr.json +3 -0
  213. package/dist/locales/zh.json +3 -0
  214. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  215. package/dist/patterns/payment-automation-upsell/index.js +5 -0
  216. package/dist/patterns/payment-automation-upsell/index.js.map +1 -0
  217. package/dist/patterns/signature-request/index.js +1 -1
  218. package/dist/tokens.css +1 -1
  219. package/package.json +5 -1
  220. package/dist/_chunks/actions-cell-renderer-DaL80uqL.js.map +0 -1
  221. package/dist/_chunks/alert-Cxaqd-QO.js.map +0 -1
  222. package/dist/_chunks/annotation-marker-qt5R9WZX.js.map +0 -1
  223. package/dist/_chunks/collapsible-BrnRiCC6.js.map +0 -1
  224. package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js +0 -728
  225. package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js.map +0 -1
  226. package/dist/_chunks/notes-panel-CTcOLLVo.js +0 -324
  227. package/dist/_chunks/notes-panel-CTcOLLVo.js.map +0 -1
  228. package/dist/_chunks/patient-table-QEVsFvwq.js.map +0 -1
  229. package/dist/_chunks/payment-request-card-CygO1anM.js.map +0 -1
  230. package/dist/_chunks/sparkline-DcXqRZoq.js +0 -283
  231. package/dist/_chunks/sparkline-DcXqRZoq.js.map +0 -1
@@ -1,27 +1,27 @@
1
- import { jsxs as k, jsx as e, Fragment as U } from "react/jsx-runtime";
2
- import { forwardRef as v, useState as I, useRef as M, useCallback as _, Children as P, isValidElement as W, useContext as O, useId as G, createContext as H } from "react";
3
- import { c as X } from "./index-D2ZczOXr.js";
4
- import { useTranslation as R } from "react-i18next";
5
- import { u as $ } from "./use-controllable-state-BiY4xTzM.js";
6
- import { u as S } from "./use-clamp-overflow-DQE2kwZ9.js";
7
- import { T as q } from "./tooltip-DvmfrNvB.js";
8
- import { X as J } from "./x-B5YnXwCz.js";
9
- import { c as K } from "./createLucideIcon-DhHxpK9K.js";
10
- import { C as Q } from "./circle-alert-rGDZ73Wh.js";
11
- import { T as Y } from "./triangle-alert-CBnO6nq_.js";
12
- import { C as Z } from "./circle-check-BN6rz4NV.js";
13
- import { I as ee } from "./info-CGn22peZ.js";
1
+ import { jsxs as I, jsx as e, Fragment as G } from "react/jsx-runtime";
2
+ import { forwardRef as p, useState as O, useRef as P, useCallback as C, Children as W, isValidElement as H, useContext as R, useId as X, createContext as $ } from "react";
3
+ import { c as q } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as S } from "react-i18next";
5
+ import { u as J } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { u as E } from "./use-clamp-overflow-DQE2kwZ9.js";
7
+ import { T as K } from "./tooltip-DvmfrNvB.js";
8
+ import { X as Q } from "./x-B5YnXwCz.js";
9
+ import { c as Y } from "./createLucideIcon-DhHxpK9K.js";
10
+ import { C as Z } from "./circle-alert-rGDZ73Wh.js";
11
+ import { T as ee } from "./triangle-alert-CBnO6nq_.js";
12
+ import { C as te } from "./circle-check-BN6rz4NV.js";
13
+ import { I as se } from "./info-CGn22peZ.js";
14
14
  /**
15
15
  * @license lucide-react v1.22.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
19
  */
20
- const te = [
20
+ const oe = [
21
21
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
22
22
  ["path", { d: "m16 12-4-4-4 4", key: "177agl" }],
23
23
  ["path", { d: "M12 16V8", key: "1sbj14" }]
24
- ], se = K("circle-arrow-up", te), C = H(!1), oe = [
24
+ ], re = Y("circle-arrow-up", oe), _ = $(!1), ae = [
25
25
  // Full-opacity `text-current` so it matches the body text's contrast (an
26
26
  // `opacity` dim would drop the variant-tinted text below AA). Underline
27
27
  // carries the affordance instead. No `--min-target-size` floor: this is an
@@ -34,7 +34,7 @@ const te = [
34
34
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
35
35
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
36
36
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
37
- ].join(" "), re = X(
37
+ ].join(" "), ne = q(
38
38
  [
39
39
  // Default `items-center` keeps the icon + dismiss optically aligned
40
40
  // with a single-line description. The `data-[has-title=true]`
@@ -104,7 +104,7 @@ const te = [
104
104
  variant: "info"
105
105
  }
106
106
  }
107
- ), E = "ds:shrink-0 ds:size-5", ae = `${E} ds:mt-0.5`, ne = [
107
+ ), L = "ds:shrink-0 ds:size-5", ie = `${L} ds:mt-0.5`, de = [
108
108
  // Default (no title): the alert root uses `items-center` and the
109
109
  // button centres in the cross-axis. A centred 16×16 glyph inside a
110
110
  // 44×44 button aligns optically with a single-line description.
@@ -128,147 +128,152 @@ const te = [
128
128
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
129
129
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
130
130
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
131
- ].join(" "), ie = {
132
- info: { icon: /* @__PURE__ */ e(ee, { "aria-hidden": "true" }), role: "status", live: "polite" },
131
+ ].join(" "), le = {
132
+ info: { icon: /* @__PURE__ */ e(se, { "aria-hidden": "true" }), role: "status", live: "polite" },
133
133
  success: {
134
- icon: /* @__PURE__ */ e(Z, { "aria-hidden": "true" }),
134
+ icon: /* @__PURE__ */ e(te, { "aria-hidden": "true" }),
135
135
  role: "status",
136
136
  live: "polite"
137
137
  },
138
138
  warning: {
139
- icon: /* @__PURE__ */ e(Y, { "aria-hidden": "true" }),
139
+ icon: /* @__PURE__ */ e(ee, { "aria-hidden": "true" }),
140
140
  role: "alert",
141
141
  live: "assertive"
142
142
  },
143
143
  error: {
144
- icon: /* @__PURE__ */ e(Q, { "aria-hidden": "true" }),
144
+ icon: /* @__PURE__ */ e(Z, { "aria-hidden": "true" }),
145
145
  role: "alert",
146
146
  live: "assertive"
147
147
  },
148
148
  // Promotions never interrupt — same polite semantics as info.
149
149
  promo: {
150
- icon: /* @__PURE__ */ e(se, { "aria-hidden": "true" }),
150
+ icon: /* @__PURE__ */ e(re, { "aria-hidden": "true" }),
151
151
  role: "status",
152
152
  live: "polite"
153
153
  }
154
- }, y = v(
155
- ({ as: a = "h5", className: i, children: s, ...o }, t) => {
156
- const n = O(C), { ref: d, isOverflowing: r } = S(n), m = _(
154
+ }, ce = {
155
+ off: { role: void 0, live: void 0 },
156
+ polite: { role: "status", live: "polite" },
157
+ assertive: { role: "alert", live: "assertive" }
158
+ }, y = p(
159
+ ({ as: n = "h5", className: d, children: s, ...o }, t) => {
160
+ const r = R(_), { ref: l, isOverflowing: a } = E(r), f = C(
157
161
  (c) => {
158
- d.current = c, typeof t == "function" ? t(c) : t && (t.current = c);
162
+ l.current = c, typeof t == "function" ? t(c) : t && (t.current = c);
159
163
  },
160
- [t, d]
161
- ), l = n && r && typeof s == "string", f = /* @__PURE__ */ e(
162
- a,
164
+ [t, l]
165
+ ), i = r && a && typeof s == "string", m = /* @__PURE__ */ e(
166
+ n,
163
167
  {
164
- ref: m,
165
- tabIndex: l ? 0 : void 0,
168
+ ref: f,
169
+ tabIndex: i ? 0 : void 0,
166
170
  className: [
167
171
  "type-title-item",
168
- n ? "ds:line-clamp-2" : "",
169
- i
172
+ r ? "ds:line-clamp-2" : "",
173
+ d
170
174
  ].filter(Boolean).join(" "),
171
175
  ...o,
172
176
  children: s
173
177
  }
174
178
  );
175
- return l ? /* @__PURE__ */ e(q, { label: s, children: f }) : f;
179
+ return i ? /* @__PURE__ */ e(K, { label: s, children: m }) : m;
176
180
  }
177
181
  );
178
182
  y.displayName = "Alert.Title";
179
- const L = v(({ className: a, children: i, ...s }, o) => {
180
- const t = O(C), { t: n } = R(), d = G(), [r, m] = I(!1), { ref: l, isOverflowing: f } = S(t && !r), c = _(
183
+ const V = p(({ className: n, children: d, ...s }, o) => {
184
+ const t = R(_), { t: r } = S(), l = X(), [a, f] = O(!1), { ref: i, isOverflowing: m } = E(t && !a), c = C(
181
185
  (u) => {
182
- l.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
186
+ i.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
183
187
  },
184
- [o, l]
185
- ), g = t && (f || r);
186
- return /* @__PURE__ */ k(U, { children: [
188
+ [o, i]
189
+ ), g = t && (m || a);
190
+ return /* @__PURE__ */ I(G, { children: [
187
191
  /* @__PURE__ */ e(
188
192
  "p",
189
193
  {
190
194
  ref: c,
191
- id: t ? d : void 0,
195
+ id: t ? l : void 0,
192
196
  className: [
193
197
  "ds:[[data-has-title=true]_&]:mt-[var(--spacing-xs)] type-body-sm",
194
- t && !r ? "ds:line-clamp-2" : "",
195
- a
198
+ t && !a ? "ds:line-clamp-2" : "",
199
+ n
196
200
  ].filter(Boolean).join(" "),
197
201
  ...s,
198
- children: i
202
+ children: d
199
203
  }
200
204
  ),
201
205
  g ? /* @__PURE__ */ e(
202
206
  "button",
203
207
  {
204
208
  type: "button",
205
- "aria-expanded": r,
206
- "aria-controls": d,
207
- onClick: () => m((u) => !u),
208
- className: oe,
209
- children: r ? n("feedback.alert.readLess", "Read less") : n("feedback.alert.readMore", "Read more")
209
+ "aria-expanded": a,
210
+ "aria-controls": l,
211
+ onClick: () => f((u) => !u),
212
+ className: ae,
213
+ children: a ? r("feedback.alert.readLess", "Read less") : r("feedback.alert.readMore", "Read more")
210
214
  }
211
215
  ) : null
212
216
  ] });
213
217
  });
214
- L.displayName = "Alert.Description";
215
- const V = v(
216
- ({ className: a, ...i }, s) => /* @__PURE__ */ e(
218
+ V.displayName = "Alert.Description";
219
+ const z = p(
220
+ ({ className: n, ...d }, s) => /* @__PURE__ */ e(
217
221
  "div",
218
222
  {
219
223
  ref: s,
220
224
  className: [
221
225
  "ds:mt-[var(--spacing-sm)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
222
- a
226
+ n
223
227
  ].filter(Boolean).join(" "),
224
- ...i
228
+ ...d
225
229
  }
226
230
  )
227
231
  );
228
- V.displayName = "Alert.Action";
229
- const z = v(
232
+ z.displayName = "Alert.Action";
233
+ const B = p(
230
234
  ({
231
- variant: a = "info",
232
- dismissible: i = !1,
235
+ variant: n = "info",
236
+ dismissible: d = !1,
233
237
  open: s,
234
238
  onOpenChange: o,
235
239
  icon: t,
236
- live: n,
237
- clamp: d = !1,
238
- className: r,
239
- children: m,
240
- ...l
241
- }, f) => {
242
- const { t: c } = R(), [g, u] = $({
240
+ announce: r,
241
+ live: l,
242
+ clamp: a = !1,
243
+ className: f,
244
+ children: i,
245
+ ...m
246
+ }, c) => {
247
+ const { t: g } = S(), [u, D] = J({
243
248
  value: s,
244
249
  defaultValue: !0,
245
250
  onChange: o
246
- }), B = g ?? !0, [w, A] = I(!1), b = M(null), D = _(() => {
251
+ }), F = u ?? !0, [w, N] = O(!1), b = P(null), U = C(() => {
247
252
  if (typeof window > "u") return 200;
248
- const p = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
249
- if (!p) return 200;
250
- const j = p.trim(), h = parseFloat(j);
251
- return Number.isFinite(h) ? j.endsWith("ms") ? h : h * 1e3 : 200;
253
+ const v = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
254
+ if (!v) return 200;
255
+ const k = v.trim(), h = parseFloat(k);
256
+ return Number.isFinite(h) ? k.endsWith("ms") ? h : h * 1e3 : 200;
252
257
  }, []);
253
- if (!B) return null;
254
- const x = ie[a], T = t !== void 0 ? t : x.icon, N = P.toArray(m).some(
255
- (p) => W(p) && p.type === y
256
- ), F = () => {
257
- w || (A(!0), b.current && clearTimeout(b.current), b.current = setTimeout(() => {
258
- A(!1), u(!1);
259
- }, D()));
258
+ if (!F) return null;
259
+ const x = le[n], A = t !== void 0 ? t : x.icon, T = r ? ce[r] : { role: x.role, live: l ?? x.live }, j = W.toArray(i).some(
260
+ (v) => H(v) && v.type === y
261
+ ), M = () => {
262
+ w || (N(!0), b.current && clearTimeout(b.current), b.current = setTimeout(() => {
263
+ N(!1), D(!1);
264
+ }, U()));
260
265
  };
261
- return /* @__PURE__ */ k(
266
+ return /* @__PURE__ */ I(
262
267
  "div",
263
268
  {
264
- ref: f,
265
- role: x.role,
266
- "aria-live": n ?? x.live,
269
+ ref: c,
270
+ role: T.role,
271
+ "aria-live": T.live,
267
272
  "data-component": "alert",
268
- "data-has-title": N ? "true" : "false",
273
+ "data-has-title": j ? "true" : "false",
269
274
  "data-state": w ? "closing" : "open",
270
275
  className: [
271
- re({ variant: a, className: r }),
276
+ ne({ variant: n, className: f }),
272
277
  // Entry: fade + slide-down on mount. Exit: fade + slide-up + slight
273
278
  // scale when dismissed. Driven by `tw-animate-css`. Respects
274
279
  // `prefers-reduced-motion` via `motion-safe:` and zeroes under the
@@ -282,19 +287,19 @@ const z = v(
282
287
  "ds:motion-safe:data-[state=closing]:fill-mode-forwards",
283
288
  "ds:motion-safe:duration-[var(--animation-duration)]"
284
289
  ].join(" "),
285
- ...l,
290
+ ...m,
286
291
  children: [
287
- T ? /* @__PURE__ */ e("span", { className: N ? ae : E, children: T }) : null,
288
- /* @__PURE__ */ e("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ e(C.Provider, { value: d, children: m }) }),
289
- i ? /* @__PURE__ */ e(
292
+ A ? /* @__PURE__ */ e("span", { className: j ? ie : L, children: A }) : null,
293
+ /* @__PURE__ */ e("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ e(_.Provider, { value: a, children: i }) }),
294
+ d ? /* @__PURE__ */ e(
290
295
  "button",
291
296
  {
292
297
  type: "button",
293
- "aria-label": c("common.close", "Close"),
294
- onClick: F,
298
+ "aria-label": g("common.close", "Close"),
299
+ onClick: M,
295
300
  "data-alert-dismiss": "",
296
- className: ne,
297
- children: /* @__PURE__ */ e(J, { "aria-hidden": "true", className: "ds:size-4" })
301
+ className: de,
302
+ children: /* @__PURE__ */ e(Q, { "aria-hidden": "true", className: "ds:size-4" })
298
303
  }
299
304
  ) : null
300
305
  ]
@@ -302,13 +307,13 @@ const z = v(
302
307
  );
303
308
  }
304
309
  );
305
- z.displayName = "Alert";
306
- const Ce = Object.assign(z, {
310
+ B.displayName = "Alert";
311
+ const Ne = Object.assign(B, {
307
312
  Title: y,
308
- Description: L,
309
- Action: V
313
+ Description: V,
314
+ Action: z
310
315
  });
311
316
  export {
312
- Ce as A
317
+ Ne as A
313
318
  };
314
- //# sourceMappingURL=alert-Cxaqd-QO.js.map
319
+ //# sourceMappingURL=alert-DS22ha1n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-DS22ha1n.js","sources":["../../node_modules/lucide-react/dist/esm/icons/circle-arrow-up.mjs","../../src/components/alert/alert.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"m16 12-4-4-4 4\", key: \"177agl\" }],\n [\"path\", { d: \"M12 16V8\", key: \"1sbj14\" }]\n];\nconst CircleArrowUp = createLucideIcon(\"circle-arrow-up\", __iconNode);\n\nexport { __iconNode, CircleArrowUp as default };\n//# sourceMappingURL=circle-arrow-up.mjs.map\n","import {\n Children,\n createContext,\n forwardRef,\n isValidElement,\n useCallback,\n useContext,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n type MutableRefObject,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n CircleAlert,\n CircleArrowUp,\n CircleCheck,\n Info,\n TriangleAlert,\n X,\n} from 'lucide-react';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useClampOverflow } from '../../hooks/use-clamp-overflow';\nimport { Tooltip } from '../tooltip';\n\n/* ------------------------------------------------------------------ */\n/* Clamp context — opt-in compact mode propagated from the root Alert */\n/* to its Title / Description so a consumer enables it with one prop. */\n/* ------------------------------------------------------------------ */\n\nconst AlertClampContext = createContext(false);\n\n/** Inline \"Read more / Read less\" disclosure. Tinted with `text-current` so it\n * inherits the alert variant's foreground rather than the link palette. */\nconst DISCLOSURE_BUTTON_CLASSES = [\n // Full-opacity `text-current` so it matches the body text's contrast (an\n // `opacity` dim would drop the variant-tinted text below AA). Underline\n // carries the affordance instead. No `--min-target-size` floor: this is an\n // inline text disclosure sitting in the flow of the body copy, which is\n // exempt from WCAG 2.5.8 target-size the same way an inline link is.\n 'ds:mt-[var(--spacing-2xs)] ds:inline-flex ds:items-center ds:self-start',\n 'ds:text-[length:var(--font-size-xs)] ds:font-semibold',\n 'ds:underline ds:underline-offset-2 ds:text-current ds:hover:no-underline',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\nconst alertVariants = cva(\n [\n // Default `items-center` keeps the icon + dismiss optically aligned\n // with a single-line description. The `data-[has-title=true]`\n // selector flips to `items-start` when an `<Alert.Title>` is\n // present so the icon anchors to the heading's top instead of\n // floating against the centre of the title+description block.\n // For multi-line descriptions without a title, `items-center` still\n // looks right at 2–3 lines and matches Toast / Notification.\n 'ds:flex ds:items-center ds:data-[has-title=true]:items-start ds:gap-[var(--spacing-md)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:border ds:border-[length:var(--border-width-sm)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:break-words',\n ].join(' '),\n {\n variants: {\n // Each variant paints `<Button intent=\"tonal\">` descendants via a\n // child selector — the button carries `data-intent=\"tonal\"`, the\n // Alert applies the matching tint (`*-foreground` for bg + the\n // surface `--background` for fg). Descendant selectors sidestep\n // custom-property inheritance and are rock-solid across themes.\n variant: {\n info: [\n 'ds:border-[color:var(--info)]',\n 'ds:bg-[color-mix(in_srgb,var(--info)_10%,transparent)]',\n 'ds:text-[var(--info-foreground)]',\n 'ds:[&_[data-intent=tonal]]:bg-[color:var(--info-foreground)]',\n 'ds:[&_[data-intent=tonal]]:text-[color:var(--background)]',\n ].join(' '),\n success: [\n 'ds:border-[color:var(--success)]',\n 'ds:bg-[color-mix(in_srgb,var(--success)_10%,transparent)]',\n 'ds:text-[var(--success-foreground)]',\n 'ds:[&_[data-intent=tonal]]:bg-[color:var(--success-foreground)]',\n 'ds:[&_[data-intent=tonal]]:text-[color:var(--background)]',\n ].join(' '),\n warning: [\n 'ds:border-[color:var(--warning)]',\n 'ds:bg-[color-mix(in_srgb,var(--warning)_10%,transparent)]',\n 'ds:text-[var(--warning-foreground)]',\n 'ds:[&_[data-intent=tonal]]:bg-[color:var(--warning-foreground)]',\n 'ds:[&_[data-intent=tonal]]:text-[color:var(--background)]',\n ].join(' '),\n error: [\n 'ds:border-[color:var(--error)]',\n 'ds:bg-[color-mix(in_srgb,var(--error)_10%,transparent)]',\n 'ds:text-[var(--error-foreground)]',\n 'ds:[&_[data-intent=tonal]]:bg-[color:var(--error-foreground)]',\n 'ds:[&_[data-intent=tonal]]:text-[color:var(--background)]',\n ].join(' '),\n // Sales / marketing upsell — accent magenta via the --promo\n // semantic pair so marketing pushes (product hub → warning\n // stack) read as offers, not operational warnings. Surface is\n // the same subtle accent gradient as SidebarUpgradeChip (it\n // flattens in the accessible themes and follows Canvas in\n // forced-colors), keeping the two upsell affordances kin.\n promo: [\n 'ds:border-[color:var(--promo)]',\n 'ds:bg-[image:var(--gradient-surface-subtle-accent)]',\n 'ds:text-[var(--promo-foreground)]',\n 'ds:[&_[data-intent=tonal]]:bg-[color:var(--promo-foreground)]',\n 'ds:[&_[data-intent=tonal]]:text-[color:var(--background)]',\n ].join(' '),\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n);\n\n// Icon stays `mt-0.5` only when an `<Alert.Title>` is present — that\n// offset compensates for the title's cap-height vs. line-box origin so\n// the glyph aligns with the heading's caps. Without a title, the\n// container uses `items-center` and the offset would push the icon\n// 2px off the optical axis.\nconst ICON_BASE = 'ds:shrink-0 ds:size-5';\nconst ICON_WITH_TITLE = `${ICON_BASE} ds:mt-0.5`;\n\nconst CLOSE_BUTTON_CLASSES = [\n // Default (no title): the alert root uses `items-center` and the\n // button centres in the cross-axis. A centred 16×16 glyph inside a\n // 44×44 button aligns optically with a single-line description.\n // With a title: the root flips to `items-start` so the button's top\n // edge aligns with the title row top. A centred glyph would then\n // land ~11 px below the title's optical centre (button height is\n // --min-target-size, much taller than the title's line-height). The\n // `[data-has-title=true]` variant below flips the button to\n // `items-start` and adds a block-start padding that pulls the glyph\n // up onto the title row — same cap-height compensation idea as the\n // leading icon's `mt-0.5`.\n 'ds:ms-auto ds:shrink-0 ds:inline-flex ds:items-center ds:justify-center',\n 'ds:[[data-has-title=true]_&]:items-start',\n 'ds:[[data-has-title=true]_&]:pt-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:-mt-[var(--spacing-xs)] ds:-me-[var(--spacing-xs)]',\n 'ds:text-current ds:opacity-70',\n 'ds:hover:opacity-100',\n 'ds:transition-opacity ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n].join(' ');\n\n// `role` / `live` here are only the *default* announcement for each tint.\n// The `announce` prop overrides both — visual severity and announcement\n// urgency are independent (a warning-tinted static notice must not interrupt).\nconst VARIANT_CONFIG = {\n info: { icon: <Info aria-hidden=\"true\" />, role: 'status', live: 'polite' },\n success: {\n icon: <CircleCheck aria-hidden=\"true\" />,\n role: 'status',\n live: 'polite',\n },\n warning: {\n icon: <TriangleAlert aria-hidden=\"true\" />,\n role: 'alert',\n live: 'assertive',\n },\n error: {\n icon: <CircleAlert aria-hidden=\"true\" />,\n role: 'alert',\n live: 'assertive',\n },\n // Promotions never interrupt — same polite semantics as info.\n promo: {\n icon: <CircleArrowUp aria-hidden=\"true\" />,\n role: 'status',\n live: 'polite',\n },\n} as const;\n\n// `off` emits neither role nor aria-live: a permanently-mounted notice is\n// read in document order and is not a live region at all.\nconst ANNOUNCE_CONFIG = {\n off: { role: undefined, live: undefined },\n polite: { role: 'status', live: 'polite' },\n assertive: { role: 'alert', live: 'assertive' },\n} as const;\n\ninterface AlertTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';\n}\n\nconst AlertTitle = forwardRef<HTMLHeadingElement, AlertTitleProps>(\n ({ as: Tag = 'h5', className, children, ...props }, ref) => {\n const clamp = useContext(AlertClampContext);\n const { ref: clampRef, isOverflowing } =\n useClampOverflow<HTMLHeadingElement>(clamp);\n const setRefs = useCallback(\n (node: HTMLHeadingElement | null) => {\n (clampRef as MutableRefObject<HTMLHeadingElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as MutableRefObject<HTMLHeadingElement | null>).current = node;\n },\n [ref, clampRef],\n );\n\n // The full title stays in the DOM (line-clamp only clips it visually), so\n // screen readers always read it whole. The tooltip is a sighted-user\n // affordance, shown only when the title is actually cut — and only for\n // string titles, since the Tooltip label must be plain text.\n const tooltipReady = clamp && isOverflowing && typeof children === 'string';\n\n const heading = (\n <Tag\n ref={setRefs}\n // Focusable only when truncated, so keyboard users can surface the\n // tooltip too (otherwise it would be mouse/hover-only).\n tabIndex={tooltipReady ? 0 : undefined}\n className={[\n 'type-title-item',\n clamp ? 'ds:line-clamp-2' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </Tag>\n );\n\n return tooltipReady ? (\n <Tooltip label={children as string}>{heading}</Tooltip>\n ) : (\n heading\n );\n },\n);\nAlertTitle.displayName = 'Alert.Title';\n\nconst AlertDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const clamp = useContext(AlertClampContext);\n const { t } = useTranslation();\n const bodyId = useId();\n const [expanded, setExpanded] = useState(false);\n // Only measure while clamped — once expanded there's nothing to clip.\n const { ref: clampRef, isOverflowing } =\n useClampOverflow<HTMLParagraphElement>(clamp && !expanded);\n const setRefs = useCallback(\n (node: HTMLParagraphElement | null) => {\n (clampRef as MutableRefObject<HTMLParagraphElement | null>).current =\n node;\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as MutableRefObject<HTMLParagraphElement | null>).current = node;\n },\n [ref, clampRef],\n );\n // Show the toggle once the body has overflowed; keep it while expanded so\n // the user can collapse again.\n const showToggle = clamp && (isOverflowing || expanded);\n\n return (\n <>\n <p\n ref={setRefs}\n id={clamp ? bodyId : undefined}\n // `mt` is gated on the root's `data-has-title=\"true\"` attribute so\n // the margin only paints when there's a Title above the\n // Description to separate from. Without this gate, a Description\n // rendered alone sits a few pixels below the icon + dismiss ×\n // optical centre — visible on the AlfaDocs marketing privacy\n // generator before HTP-4860's follow-up fix.\n className={[\n 'ds:[[data-has-title=true]_&]:mt-[var(--spacing-xs)] type-body-sm',\n clamp && !expanded ? 'ds:line-clamp-2' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </p>\n {showToggle ? (\n <button\n type=\"button\"\n aria-expanded={expanded}\n aria-controls={bodyId}\n onClick={() => setExpanded((prev) => !prev)}\n className={DISCLOSURE_BUTTON_CLASSES}\n >\n {expanded\n ? t('feedback.alert.readLess', 'Read less')\n : t('feedback.alert.readMore', 'Read more')}\n </button>\n ) : null}\n </>\n );\n});\nAlertDescription.displayName = 'Alert.Description';\n\nconst AlertAction = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={[\n 'ds:mt-[var(--spacing-sm)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n ),\n);\nAlertAction.displayName = 'Alert.Action';\n\n/** How urgently the alert is announced — independent of the visual `variant`.\n *\n * - `off` — not a live region. No `role`, no `aria-live`. Correct for a\n * static notice that is present from mount (a read-only banner, a summary\n * of missing answers on a form the user is still typing into).\n * - `polite` — `role=\"status\"` + `aria-live=\"polite\"`. Queued behind the\n * current utterance. The right default for anything that appears in\n * response to a user action but is not an emergency.\n * - `assertive` — `role=\"alert\"` + `aria-live=\"assertive\"`. Interrupts the\n * screen reader immediately. Reserve for content the user cannot miss.\n */\nexport type AlertAnnounce = 'off' | 'polite' | 'assertive';\n\nexport interface AlertProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'role'>,\n VariantProps<typeof alertVariants> {\n variant?: 'info' | 'success' | 'warning' | 'error' | 'promo';\n dismissible?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n icon?: ReactNode;\n /** Announcement urgency — sets `role` **and** `aria-live` together, so the\n * tint (`variant`) and the interruption are chosen independently. Defaults\n * to the variant's historical mapping: `info` / `success` / `promo` →\n * `polite`, `warning` / `error` → `assertive`. Wins over `live`. */\n announce?: AlertAnnounce;\n /** @deprecated Use `announce`. Sets `aria-live` only and leaves `role`\n * variant-derived, which can pair `role=\"alert\"` with `aria-live=\"polite\"`.\n * Kept for the consumers already shipping it. */\n live?: 'assertive' | 'polite' | 'off';\n /** Compact mode: clamps `Alert.Title` to 2 lines (with a tooltip when the\n * title is truncated) and `Alert.Description` to 2 lines (with a \"Read more\"\n * toggle). Opt-in — leave off for standalone alerts whose full message must\n * always be visible. */\n clamp?: boolean;\n}\n\nexport type { AlertTitleProps };\n\nconst AlertRoot = forwardRef<HTMLDivElement, AlertProps>(\n (\n {\n variant = 'info',\n dismissible = false,\n open: controlledOpen,\n onOpenChange,\n icon,\n announce,\n live,\n clamp = false,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [isOpenRaw, setOpen] = useControllableState<boolean>({\n value: controlledOpen,\n defaultValue: true,\n onChange: onOpenChange,\n });\n const isOpen = isOpenRaw ?? true;\n const [isClosing, setIsClosing] = useState(false);\n const closeTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const animationDurationMs = useCallback((): number => {\n if (typeof window === 'undefined') return 200;\n const raw = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('--animation-duration');\n if (!raw) return 200;\n const trimmed = raw.trim();\n const n = parseFloat(trimmed);\n if (!Number.isFinite(n)) return 200;\n return trimmed.endsWith('ms') ? n : n * 1000;\n }, []);\n\n if (!isOpen) return null;\n\n const config = VARIANT_CONFIG[variant];\n const effectiveIcon = icon !== undefined ? icon : config.icon;\n\n // `announce` owns role + aria-live together. Without it we keep the\n // shipped behaviour exactly: role from the variant, aria-live from the\n // legacy `live` prop or the variant default.\n const announcement = announce\n ? ANNOUNCE_CONFIG[announce]\n : { role: config.role, live: live ?? config.live };\n\n // Detect an `<Alert.Title>` anywhere in the immediate children so\n // the root can flip its cross-axis alignment. Nested wrappers\n // around a Title aren't supported — keep the API as flat as the\n // existing `Alert.Title` / `Alert.Description` convention.\n const hasTitle = Children.toArray(children).some(\n (child) => isValidElement(child) && child.type === AlertTitle,\n );\n\n const handleDismiss = () => {\n if (isClosing) return;\n setIsClosing(true);\n if (closeTimerRef.current) clearTimeout(closeTimerRef.current);\n closeTimerRef.current = setTimeout(() => {\n setIsClosing(false);\n setOpen(false);\n }, animationDurationMs());\n };\n\n return (\n <div\n ref={ref}\n role={announcement.role}\n aria-live={announcement.live}\n data-component=\"alert\"\n data-has-title={hasTitle ? 'true' : 'false'}\n data-state={isClosing ? 'closing' : 'open'}\n className={[\n alertVariants({ variant, className }),\n // Entry: fade + slide-down on mount. Exit: fade + slide-up + slight\n // scale when dismissed. Driven by `tw-animate-css`. Respects\n // `prefers-reduced-motion` via `motion-safe:` and zeroes under the\n // accessible theme (`--animation-duration: 0ms`).\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:slide-in-from-top-2',\n 'ds:motion-safe:data-[state=closing]:animate-out ds:motion-safe:data-[state=closing]:fade-out-0',\n 'ds:motion-safe:data-[state=closing]:slide-out-to-top-2 ds:motion-safe:data-[state=closing]:zoom-out-95',\n // Pin the exit's end-state until React unmounts. Without\n // `fill-mode-forwards` the element snaps back to opacity:1 for one\n // paint frame after the animation ends.\n 'ds:motion-safe:data-[state=closing]:fill-mode-forwards',\n 'ds:motion-safe:duration-[var(--animation-duration)]',\n ].join(' ')}\n {...props}\n >\n {effectiveIcon ? (\n <span className={hasTitle ? ICON_WITH_TITLE : ICON_BASE}>\n {effectiveIcon}\n </span>\n ) : null}\n\n <div className=\"ds:flex-1 ds:min-w-0\">\n <AlertClampContext.Provider value={clamp}>\n {children}\n </AlertClampContext.Provider>\n </div>\n\n {dismissible ? (\n <button\n type=\"button\"\n aria-label={t('common.close', 'Close')}\n onClick={handleDismiss}\n // Stable hook for containers (WarningStack) that hand focus to\n // a neighbouring dismiss control after this one unmounts.\n data-alert-dismiss=\"\"\n className={CLOSE_BUTTON_CLASSES}\n >\n <X aria-hidden=\"true\" className=\"ds:size-4\" />\n </button>\n ) : null}\n </div>\n );\n },\n);\n\nAlertRoot.displayName = 'Alert';\n\nexport const Alert = Object.assign(AlertRoot, {\n Title: AlertTitle,\n Description: AlertDescription,\n Action: AlertAction,\n});\n"],"names":["__iconNode","CircleArrowUp","createLucideIcon","AlertClampContext","createContext","DISCLOSURE_BUTTON_CLASSES","alertVariants","cva","ICON_BASE","ICON_WITH_TITLE","CLOSE_BUTTON_CLASSES","VARIANT_CONFIG","jsx","Info","CircleCheck","TriangleAlert","CircleAlert","ANNOUNCE_CONFIG","AlertTitle","forwardRef","Tag","className","children","props","ref","clamp","useContext","clampRef","isOverflowing","useClampOverflow","setRefs","useCallback","node","tooltipReady","heading","Tooltip","AlertDescription","t","useTranslation","bodyId","useId","expanded","setExpanded","useState","showToggle","jsxs","Fragment","prev","AlertAction","AlertRoot","variant","dismissible","controlledOpen","onOpenChange","icon","announce","live","isOpenRaw","setOpen","useControllableState","isOpen","isClosing","setIsClosing","closeTimerRef","useRef","animationDurationMs","raw","trimmed","n","config","effectiveIcon","announcement","hasTitle","Children","child","isValidElement","handleDismiss","X","Alert"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,kBAAkB,KAAK,SAAQ,CAAE;AAAA,EAC/C,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAC3C,GACMC,KAAgBC,EAAiB,mBAAmBF,EAAU,GCmB9DG,IAAoBC,EAAc,EAAK,GAIvCC,KAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,GAAG,GAEJC,KAAgBC;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GA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ACH,EAAA,CACF;AAAA,UAEC6B,IACC,gBAAAvC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAYyB,EAAE,gBAAgB,OAAO;AAAA,cACrC,SAASuC;AAAA,cAGT,sBAAmB;AAAA,cACnB,WAAWlE;AAAA,cAEX,UAAA,gBAAAE,EAACiE,GAAA,EAAE,eAAY,QAAO,WAAU,YAAA,CAAY;AAAA,YAAA;AAAA,UAAA,IAE5C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEA5B,EAAU,cAAc;AAEjB,MAAM6B,KAAQ,OAAO,OAAO7B,GAAW;AAAA,EAC5C,OAAO/B;AAAA,EACP,aAAakB;AAAA,EACb,QAAQY;AACV,CAAC;","x_google_ignoreList":[0]}
@@ -51,7 +51,9 @@ const p = t(
51
51
  neutral: "ds:[--marker-color:var(--muted-foreground)]",
52
52
  info: "ds:[--marker-color:var(--info)]",
53
53
  success: "ds:[--marker-color:var(--success)]",
54
- warning: "ds:[--marker-color:var(--warning)]",
54
+ // `--warning-readable`: the glyph is a thin non-text graphic (WCAG
55
+ // 1.4.11), and yellow-500 is ~1.6:1 on a light surface.
56
+ warning: "ds:[--marker-color:var(--warning-readable)]",
55
57
  error: "ds:[--marker-color:var(--destructive)]",
56
58
  accent: "ds:[--marker-color:var(--accent)]"
57
59
  },
@@ -81,12 +83,12 @@ const p = t(
81
83
  "aria-label": i,
82
84
  className: d,
83
85
  ...m
84
- }, $) => {
85
- const { t: l } = f(), u = i ?? (typeof r == "string" ? r : l(`annotationMarker.shape.${o}`));
86
+ }, l) => {
87
+ const { t: $ } = f(), u = i ?? (typeof r == "string" ? r : $(`annotationMarker.shape.${o}`));
86
88
  return /* @__PURE__ */ k(
87
89
  "span",
88
90
  {
89
- ref: $,
91
+ ref: l,
90
92
  "data-component": "annotation-marker",
91
93
  "data-marker-shape": o,
92
94
  "data-marker-tone": e,
@@ -117,4 +119,4 @@ export {
117
119
  b as M,
118
120
  v as m
119
121
  };
120
- //# sourceMappingURL=annotation-marker-qt5R9WZX.js.map
122
+ //# sourceMappingURL=annotation-marker-CsUJGZjQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation-marker-CsUJGZjQ.js","sources":["../../src/components/annotation-marker/annotation-marker.tsx"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* AnnotationMarker — the shared clinical-scheme marker glyph. */\n/* */\n/* A small presentational glyph used to mark a finding on any charting */\n/* surface (MuscleScheme region overlay, a finding-type picker, a */\n/* legend, a note card). The SHAPE is the channel — meaning is never */\n/* carried by colour alone (WCAG 1.4.1). The same geometry is shared */\n/* with MuscleScheme via `markerPath`, so the in-SVG overlay and the */\n/* standalone glyph never drift. */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\n\n/* ------------------------------------------------------------------ */\n/* Vocabulary */\n/* ------------------------------------------------------------------ */\n\nexport type MarkerShape =\n | 'circle'\n | 'square'\n | 'triangle'\n | 'diamond'\n | 'cross';\nexport type MarkerTone =\n | 'neutral'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'accent';\n\nexport const MARKER_SHAPES: MarkerShape[] = [\n 'circle',\n 'square',\n 'triangle',\n 'diamond',\n 'cross',\n];\n\n/* ------------------------------------------------------------------ */\n/* Geometry — pure, shared with MuscleScheme */\n/* ------------------------------------------------------------------ */\n\n/**\n * SVG path `d` for a marker shape centred at `(cx, cy)` with radius `r`,\n * in the parent SVG's own user units. Pure — no React, no DOM. MuscleScheme\n * draws its finding overlay with this exact function so the figure overlay and\n * the standalone glyph stay visually identical.\n */\nexport function markerPath(\n shape: MarkerShape,\n cx: number,\n cy: number,\n r: number,\n): string {\n switch (shape) {\n case 'circle':\n return `M ${cx - r} ${cy} a ${r} ${r} 0 1 0 ${2 * r} 0 a ${r} ${r} 0 1 0 ${-2 * r} 0 Z`;\n case 'square': {\n const s = r * 0.88;\n return `M ${cx - s} ${cy - s} H ${cx + s} V ${cy + s} H ${cx - s} Z`;\n }\n case 'triangle': {\n const w = r * 0.95;\n return `M ${cx} ${cy - r} L ${cx + w} ${cy + r * 0.8} L ${cx - w} ${cy + r * 0.8} Z`;\n }\n case 'diamond':\n return `M ${cx} ${cy - r} L ${cx + r} ${cy} L ${cx} ${cy + r} L ${cx - r} ${cy} Z`;\n case 'cross': {\n // A filled plus sign — reads as a distinct shape at any fill/stroke.\n const a = r * 0.4;\n return [\n `M ${cx - a} ${cy - r}`,\n `H ${cx + a}`,\n `V ${cy - a}`,\n `H ${cx + r}`,\n `V ${cy + a}`,\n `H ${cx + a}`,\n `V ${cy + r}`,\n `H ${cx - a}`,\n `V ${cy + a}`,\n `H ${cx - r}`,\n `V ${cy - a}`,\n `H ${cx - a}`,\n 'Z',\n ].join(' ');\n }\n }\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA — glyph fill/stroke per tone */\n/* ------------------------------------------------------------------ */\n\n// Each tone resolves to a single token; `filled` fills the shape, otherwise it\n// is drawn as an outline. The shape (not the tone) is the accessible channel.\nconst glyphVariants = cva(\n 'ds:block ds:[inline-size:var(--marker-box)] ds:[block-size:var(--marker-box)]',\n {\n variants: {\n tone: {\n neutral: 'ds:[--marker-color:var(--muted-foreground)]',\n info: 'ds:[--marker-color:var(--info)]',\n success: 'ds:[--marker-color:var(--success)]',\n // `--warning-readable`: the glyph is a thin non-text graphic (WCAG\n // 1.4.11), and yellow-500 is ~1.6:1 on a light surface.\n warning: 'ds:[--marker-color:var(--warning-readable)]',\n error: 'ds:[--marker-color:var(--destructive)]',\n accent: 'ds:[--marker-color:var(--accent)]',\n },\n filled: {\n true: 'ds:[fill:var(--marker-color)] ds:[stroke:none]',\n false:\n 'ds:[fill:none] ds:[stroke:var(--marker-color)] ds:[stroke-width:2.5]',\n },\n },\n defaultVariants: { tone: 'neutral', filled: true },\n },\n);\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center ds:gap-1.5', {\n variants: {\n size: {\n sm: 'ds:[--marker-box:0.75rem]',\n md: 'ds:[--marker-box:1rem]',\n lg: 'ds:[--marker-box:1.25rem]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface AnnotationMarkerProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'>,\n VariantProps<typeof wrapperVariants> {\n /** Shape of the marker — the accessible channel (never colour alone). */\n shape: MarkerShape;\n /** Semantic tone. Decorative reinforcement of the shape, not the meaning. */\n tone?: MarkerTone;\n /** Fill the shape (default) or draw it as an outline. */\n filled?: boolean;\n /**\n * Accessible name. Required for an icon-only marker (no `label`); when `label`\n * text is shown, this overrides the visible text for assistive tech.\n */\n 'aria-label'?: string;\n /** Optional visible label rendered after the glyph (e.g. in a legend). */\n label?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* AnnotationMarker */\n/* ------------------------------------------------------------------ */\n\nexport const AnnotationMarker = forwardRef<\n HTMLSpanElement,\n AnnotationMarkerProps\n>(\n (\n {\n shape,\n tone = 'neutral',\n filled = true,\n size = 'md',\n label,\n 'aria-label': ariaLabel,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const accessibleName =\n ariaLabel ??\n (typeof label === 'string'\n ? label\n : t(`annotationMarker.shape.${shape}`));\n\n return (\n <span\n ref={ref}\n data-component=\"annotation-marker\"\n data-marker-shape={shape}\n data-marker-tone={tone}\n className={wrapperVariants({ size, className })}\n {...props}\n >\n <svg\n viewBox=\"0 0 24 24\"\n className={glyphVariants({ tone, filled })}\n role=\"img\"\n aria-label={label ? undefined : accessibleName}\n aria-hidden={label ? true : undefined}\n focusable=\"false\"\n >\n <path d={markerPath(shape, 12, 12, 9)} />\n </svg>\n {label != null && <span>{label}</span>}\n </span>\n );\n },\n);\n\nAnnotationMarker.displayName = 'AnnotationMarker';\n"],"names":["MARKER_SHAPES","markerPath","shape","cx","cy","r","s","w","a","glyphVariants","cva","wrapperVariants","AnnotationMarker","forwardRef","tone","filled","size","label","ariaLabel","className","props","ref","t","useTranslation","accessibleName","jsxs","jsx"],"mappings":";;;;AAiCO,MAAMA,IAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAYO,SAASC,EACdC,GACAC,GACAC,GACAC,GACQ;AACR,UAAQH,GAAA;AAAA,IACN,KAAK;AACH,aAAO,KAAKC,IAAKE,CAAC,IAAID,CAAE,MAAMC,CAAC,IAAIA,CAAC,UAAU,IAAIA,CAAC,QAAQA,CAAC,IAAIA,CAAC,UAAU,KAAKA,CAAC;AAAA,IACnF,KAAK,UAAU;AACb,YAAMC,IAAID,IAAI;AACd,aAAO,KAAKF,IAAKG,CAAC,IAAIF,IAAKE,CAAC,MAAMH,IAAKG,CAAC,MAAMF,IAAKE,CAAC,MAAMH,IAAKG,CAAC;AAAA,IAClE;AAAA,IACA,KAAK,YAAY;AACf,YAAMC,IAAIF,IAAI;AACd,aAAO,KAAKF,CAAE,IAAIC,IAAKC,CAAC,MAAMF,IAAKI,CAAC,IAAIH,IAAKC,IAAI,GAAG,MAAMF,IAAKI,CAAC,IAAIH,IAAKC,IAAI,GAAG;AAAA,IAClF;AAAA,IACA,KAAK;AACH,aAAO,KAAKF,CAAE,IAAIC,IAAKC,CAAC,MAAMF,IAAKE,CAAC,IAAID,CAAE,MAAMD,CAAE,IAAIC,IAAKC,CAAC,MAAMF,IAAKE,CAAC,IAAID,CAAE;AAAA,IAChF,KAAK,SAAS;AAEZ,YAAMI,IAAIH,IAAI;AACd,aAAO;AAAA,QACL,KAAKF,IAAKK,CAAC,IAAIJ,IAAKC,CAAC;AAAA,QACrB,KAAKF,IAAKK,CAAC;AAAA,QACX,KAAKJ,IAAKI,CAAC;AAAA,QACX,KAAKL,IAAKE,CAAC;AAAA,QACX,KAAKD,IAAKI,CAAC;AAAA,QACX,KAAKL,IAAK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;AAAA,QACf,qBAAmBnB;AAAA,QACnB,oBAAkBY;AAAA,QAClB,WAAWH,EAAgB,EAAE,MAAAK,GAAM,WAAAG,GAAW;AAAA,QAC7C,GAAGC;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAM;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,WAAWjB,EAAc,EAAE,MAAAK,GAAM,QAAAC,GAAQ;AAAA,cACzC,MAAK;AAAA,cACL,cAAYE,IAAQ,SAAYO;AAAA,cAChC,eAAaP,IAAQ,KAAO;AAAA,cAC5B,WAAU;AAAA,cAEV,UAAA,gBAAAS,EAAC,UAAK,GAAGzB,EAAWC,GAAO,IAAI,IAAI,CAAC,EAAA,CAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAExCe,KAAS,QAAQ,gBAAAS,EAAC,QAAA,EAAM,UAAAT,EAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGrC;AACF;AAEAL,EAAiB,cAAc;"}
@@ -6,7 +6,7 @@ import { B as G } from "./button-CPGiR_bH.js";
6
6
  import { I as D } from "./icon-button-C_kbcd7I.js";
7
7
  import { S as pe } from "./select-BW5ecXlX.js";
8
8
  import { A as le } from "./audio-visualiser-l6zPd0AG.js";
9
- import { A as F } from "./alert-Cxaqd-QO.js";
9
+ import { A as F } from "./alert-DS22ha1n.js";
10
10
  import { u as me } from "./registry-DvAUVLHh.js";
11
11
  import { M as fe } from "./mic-CUklMZGF.js";
12
12
  import { c as J } from "./createLucideIcon-DhHxpK9K.js";
@@ -447,4 +447,4 @@ export {
447
447
  De as A,
448
448
  Re as a
449
449
  };
450
- //# sourceMappingURL=audio-recorder-BjnB7V8n.js.map
450
+ //# sourceMappingURL=audio-recorder-sRsGS-0V.js.map