@alfadocs/ui-kit 1.103.1 → 1.105.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 (202) hide show
  1. package/dist/_chunks/{ai-credits-exhausted-notice-CwZnSACy.js → ai-credits-exhausted-notice-Lws3113e.js} +2 -2
  2. package/dist/_chunks/{ai-permission-notice-VNh3W57L.js → ai-permission-notice-BkgcGmu8.js} +2 -2
  3. package/dist/_chunks/{alert-9kEwDza3.js → alert-C4WKViaS.js} +59 -50
  4. package/dist/_chunks/{anamnesis-summary-rows-B9HqOGd7.js → anamnesis-summary-rows-QhbDdY7b.js} +4 -4
  5. package/dist/_chunks/{audio-recorder-BOm2FgEu.js → audio-recorder-BlDozxdU.js} +2 -2
  6. package/dist/_chunks/{auth-form-parts-B3GWChvG.js → auth-form-parts-DVHfqnp6.js} +2 -2
  7. package/dist/_chunks/{balance-badge-cell-DGFm2jfP.js → balance-badge-cell-wJ6cTD_h.js} +3 -3
  8. package/dist/_chunks/{calendar-appointment-editor-dialog-DqyATSh3.js → calendar-appointment-editor-dialog-D8DblVjW.js} +8 -8
  9. package/dist/_chunks/{care-plan-card-YWKV8Kjq.js → care-plan-card-DMjlYlFc.js} +2 -2
  10. package/dist/_chunks/{care-plan-entry-card-CApivtMW.js → care-plan-entry-card-3hguBW45.js} +2 -2
  11. package/dist/_chunks/{contact-profile-card-uExd3pKC.js → contact-profile-card-CAL66GaH.js} +120 -111
  12. package/dist/_chunks/{data-table-C5uN4ato.js → data-table-zXBxFYpJ.js} +761 -715
  13. package/dist/_chunks/{date-range-picker-B_j4VQlV.js → date-range-picker-DCADIR8o.js} +2 -2
  14. package/dist/_chunks/{date-time-picker-cwsWiB4q.js → date-time-picker-CT2bC7-A.js} +2 -2
  15. package/dist/_chunks/{document-preview-U8H6tnDJ.js → document-preview-BalyZqnn.js} +2 -2
  16. package/dist/_chunks/{document-scanner-Bf3VUp00.js → document-scanner-5p-Uu8dy.js} +2 -2
  17. package/dist/_chunks/{entity-summary-BKfR4Vws.js → entity-summary-BbqqYqF1.js} +2 -2
  18. package/dist/_chunks/{error-summary-mGxIyDAY.js → error-summary-DxNhwf_G.js} +2 -2
  19. package/dist/_chunks/{face-scheme-DdVLQ5dP.js → face-scheme-e2M2HJGz.js} +2 -2
  20. package/dist/_chunks/{file-manager-CnGBVX_q.js → file-manager-BDKe59sg.js} +2 -2
  21. package/dist/_chunks/{forgot-password-form-CeTb5p-x.js → forgot-password-form-vfCO2-Tt.js} +4 -4
  22. package/dist/_chunks/{freemium-paywall-CM0zQSDE.js → freemium-paywall-BDeq9QWR.js} +2 -2
  23. package/dist/_chunks/{gestational-age-calculator-CXcDKQqC.js → gestational-age-calculator-AnaH00nk.js} +2 -2
  24. package/dist/_chunks/{hcg-doubling-BJFR3onB.js → hcg-doubling-DdyUt4gz.js} +2 -2
  25. package/dist/_chunks/{heatmap-Cz0Krieg.js → heatmap-D4qqpCEj.js} +1550 -1547
  26. package/dist/_chunks/{help-me-write-templates-ra5a__Yy.js → help-me-write-templates-YmceSxf5.js} +3 -3
  27. package/dist/_chunks/info-tip-C-MPkShR.js +266 -0
  28. package/dist/_chunks/{kit-extensions-C4o_tFN4.js → kit-extensions-BOnTM4Yf.js} +3 -3
  29. package/dist/_chunks/{link-cell-renderer-BRek9kz7.js → link-cell-renderer-C8vfCOEp.js} +2 -2
  30. package/dist/_chunks/{login-dev-card-D5BV5j1i.js → login-dev-card-Cz1Clugq.js} +3 -3
  31. package/dist/_chunks/{marketplace-app-shell-BsctSegT.js → marketplace-app-shell-C-4QF6mp.js} +2 -2
  32. package/dist/_chunks/{notes-panel-BjTpaz8d.js → notes-panel-SlzUL8in.js} +4 -4
  33. package/dist/_chunks/{notice-group-DkYzKyAZ.js → notice-group-B-trhof8.js} +3 -3
  34. package/dist/_chunks/{patient-details-BXM3dRKb.js → patient-details-wMgTFtpp.js} +2 -2
  35. package/dist/_chunks/{patient-field-row--dCDO5oB.js → patient-field-row-Bhm2Ig1P.js} +2 -2
  36. package/dist/_chunks/{patient-summary-card-DB7fv-Tr.js → patient-summary-card-DMdPPG3n.js} +2 -2
  37. package/dist/_chunks/{payment-automation-upsell-BPF0c-5D.js → payment-automation-upsell-u5EuFyCY.js} +2 -2
  38. package/dist/_chunks/{payment-form-PBuh8PIa.js → payment-form-C-s1x-bU.js} +2 -2
  39. package/dist/_chunks/{pdf-viewer-DlceXkfW.js → pdf-viewer-BnBKdx0y.js} +2 -2
  40. package/dist/_chunks/{practice-profile-hero-BAvGdQmt.js → practice-profile-hero-Bb4YyxHA.js} +31 -29
  41. package/dist/_chunks/{practice-results-ChBP9x2r.js → practice-results-BXz01sti.js} +485 -445
  42. package/dist/_chunks/{pregnancy-dating-D0Kf9s7s.js → pregnancy-dating-D6dLkMpl.js} +2 -2
  43. package/dist/_chunks/{progress-notice-DiHWZ8Ms.js → progress-notice-F7ao70ZP.js} +2 -2
  44. package/dist/_chunks/{radiograph-panel.agent-BQ95uFCd.js → radiograph-panel.agent-0ngF2sGS.js} +2 -2
  45. package/dist/_chunks/{registration-form-JzzTomhd.js → registration-form-CEJRUS9G.js} +3 -3
  46. package/dist/_chunks/{reserved.agent-BxD0gnbt.js → reserved.agent-C-C9cvO5.js} +2 -2
  47. package/dist/_chunks/{reset-password-form-DDdGEoIL.js → reset-password-form-B0acanDD.js} +4 -4
  48. package/dist/_chunks/{rich-text-editor-F04przIt.js → rich-text-editor-C3nANKZt.js} +2 -2
  49. package/dist/_chunks/{send-registration-link-form-DHCQpA4C.js → send-registration-link-form-Nn0jf65G.js} +3 -3
  50. package/dist/_chunks/{sign-document-B5qZhthO.js → sign-document-CQZVzfpk.js} +2 -2
  51. package/dist/_chunks/{signature-request-DB6kePIm.js → signature-request-DtLph5Z4.js} +3 -3
  52. package/dist/_chunks/stat-group-DSNnzkbW.js +107 -0
  53. package/dist/_chunks/{switch-D--x7n6h.js → switch-DO6uC4HJ.js} +40 -36
  54. package/dist/_chunks/{task-editor-BiPGFXtB.js → task-editor-CmXcj6cC.js} +4 -4
  55. package/dist/_chunks/{tasks-panel-iVeuu9a8.js → tasks-panel-CFo5uIHx.js} +3 -3
  56. package/dist/_chunks/{theme-toggle-jZRbAidE.js → theme-toggle-Czq3K9jB.js} +2 -2
  57. package/dist/_chunks/{time-picker-DSt-ns5F.js → time-picker-DDr5vhwQ.js} +344 -332
  58. package/dist/_chunks/{tooth-scheme-Bd7xECuj.js → tooth-scheme-C-ALCHaV.js} +2 -2
  59. package/dist/_chunks/{use-appointment-details-read-CmqGGYCy.js → use-appointment-details-read-VI26Z-pc.js} +3 -3
  60. package/dist/_chunks/{voice-control-panel-BGJjUwnY.js → voice-control-panel-B0TUZAiP.js} +3 -3
  61. package/dist/_chunks/{warning-stack-3S7e2q07.js → warning-stack-Dx7cpj10.js} +2 -2
  62. package/dist/_chunks/week-availability-CsTiwtYj.js +318 -0
  63. package/dist/_chunks/weekly-hours-editor-BsVsgeOc.js +252 -0
  64. package/dist/_chunks/{workflow-map-B1jf6QaB.js → workflow-map-DWk-rZse.js} +2 -2
  65. package/dist/_chunks/{workflow-webhook-action-B_52rH7O.js → workflow-webhook-action-DILFqAVd.js} +2 -2
  66. package/dist/ag-grid.css +5 -1
  67. package/dist/agent-catalog.json +1 -1
  68. package/dist/components/ai-credits-notice/index.js +1 -1
  69. package/dist/components/ai-permission-notice/index.js +1 -1
  70. package/dist/components/alert/index.js +1 -1
  71. package/dist/components/appointment-details-panel/index.js +1 -1
  72. package/dist/components/audio-recorder/index.js +1 -1
  73. package/dist/components/booking/index.js +1 -1
  74. package/dist/components/care-plan-card/index.js +1 -1
  75. package/dist/components/care-plan-entry-card/index.js +1 -1
  76. package/dist/components/contact-profile-card/contact-profile-card.d.ts +8 -0
  77. package/dist/components/contact-profile-card/index.js +1 -1
  78. package/dist/components/data-table/data-table.d.ts +6 -0
  79. package/dist/components/data-table/header-min-width.d.ts +21 -0
  80. package/dist/components/data-table/index.js +2 -2
  81. package/dist/components/date-range-picker/index.js +1 -1
  82. package/dist/components/date-time-picker/index.js +1 -1
  83. package/dist/components/document-preview/index.js +1 -1
  84. package/dist/components/document-scanner/index.js +1 -1
  85. package/dist/components/entity-summary/index.js +1 -1
  86. package/dist/components/error-summary/index.js +1 -1
  87. package/dist/components/face-scheme/index.js +1 -1
  88. package/dist/components/file-manager/index.js +1 -1
  89. package/dist/components/freemium-paywall/index.js +1 -1
  90. package/dist/components/gestational-age-calculator/index.js +1 -1
  91. package/dist/components/hcg-doubling/index.js +1 -1
  92. package/dist/components/heatmap/heatmap.d.ts +5 -0
  93. package/dist/components/heatmap/index.js +1 -1
  94. package/dist/components/index.d.ts +3 -0
  95. package/dist/components/info-tip/index.js +1 -1
  96. package/dist/components/info-tip/info-tip.d.ts +10 -0
  97. package/dist/components/notes-panel/index.js +1 -1
  98. package/dist/components/notice-group/index.js +1 -1
  99. package/dist/components/patient-details/index.js +1 -1
  100. package/dist/components/patient-summary-card/index.js +1 -1
  101. package/dist/components/patient-table/index.js +1 -1
  102. package/dist/components/payment-form/index.js +1 -1
  103. package/dist/components/pdf-viewer/index.js +1 -1
  104. package/dist/components/practice-profile-hero/index.js +1 -1
  105. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +7 -0
  106. package/dist/components/practice-results/index.js +1 -1
  107. package/dist/components/practice-results/practice-results.d.ts +13 -0
  108. package/dist/components/pregnancy-dating/index.js +1 -1
  109. package/dist/components/progress-notice/index.js +1 -1
  110. package/dist/components/radiograph-panel/index.js +1 -1
  111. package/dist/components/rich-text-editor/index.js +2 -2
  112. package/dist/components/sign-document/index.js +1 -1
  113. package/dist/components/stat-group/index.d.ts +3 -0
  114. package/dist/components/stat-group/index.js +8 -0
  115. package/dist/components/stat-group/stat-group.d.ts +23 -0
  116. package/dist/components/switch/index.js +1 -1
  117. package/dist/components/switch/switch.d.ts +2 -0
  118. package/dist/components/task-editor/index.js +1 -1
  119. package/dist/components/tasks-panel/index.js +1 -1
  120. package/dist/components/theme-toggle/index.js +1 -1
  121. package/dist/components/time-picker/index.js +1 -1
  122. package/dist/components/tooth-scheme/index.js +1 -1
  123. package/dist/components/voice-control-panel/index.js +1 -1
  124. package/dist/components/warning-stack/index.js +1 -1
  125. package/dist/components/week-availability/index.d.ts +3 -0
  126. package/dist/components/week-availability/index.js +10 -0
  127. package/dist/components/week-availability/week-availability.d.ts +68 -0
  128. package/dist/components/weekly-hours-editor/index.d.ts +3 -0
  129. package/dist/components/weekly-hours-editor/index.js +9 -0
  130. package/dist/components/weekly-hours-editor/weekly-hours-editor.d.ts +42 -0
  131. package/dist/components/workflow/index.js +1 -1
  132. package/dist/core.css +1 -1
  133. package/dist/i18n/locales/ar.d.ts +34 -0
  134. package/dist/i18n/locales/ar.js +34 -0
  135. package/dist/i18n/locales/de.d.ts +34 -0
  136. package/dist/i18n/locales/de.js +34 -0
  137. package/dist/i18n/locales/el.d.ts +34 -0
  138. package/dist/i18n/locales/el.js +34 -0
  139. package/dist/i18n/locales/en.d.ts +34 -0
  140. package/dist/i18n/locales/en.js +34 -0
  141. package/dist/i18n/locales/es.d.ts +34 -0
  142. package/dist/i18n/locales/es.js +34 -0
  143. package/dist/i18n/locales/fr.d.ts +34 -0
  144. package/dist/i18n/locales/fr.js +34 -0
  145. package/dist/i18n/locales/hi.d.ts +34 -0
  146. package/dist/i18n/locales/hi.js +34 -0
  147. package/dist/i18n/locales/it.d.ts +34 -0
  148. package/dist/i18n/locales/it.js +34 -0
  149. package/dist/i18n/locales/ja.d.ts +34 -0
  150. package/dist/i18n/locales/ja.js +34 -0
  151. package/dist/i18n/locales/nl.d.ts +34 -0
  152. package/dist/i18n/locales/nl.js +34 -0
  153. package/dist/i18n/locales/pl.d.ts +34 -0
  154. package/dist/i18n/locales/pl.js +34 -0
  155. package/dist/i18n/locales/pt.d.ts +34 -0
  156. package/dist/i18n/locales/pt.js +34 -0
  157. package/dist/i18n/locales/ro.d.ts +34 -0
  158. package/dist/i18n/locales/ro.js +34 -0
  159. package/dist/i18n/locales/ru.d.ts +34 -0
  160. package/dist/i18n/locales/ru.js +34 -0
  161. package/dist/i18n/locales/sq.d.ts +34 -0
  162. package/dist/i18n/locales/sq.js +34 -0
  163. package/dist/i18n/locales/sv.d.ts +34 -0
  164. package/dist/i18n/locales/sv.js +34 -0
  165. package/dist/i18n/locales/tr.d.ts +34 -0
  166. package/dist/i18n/locales/tr.js +34 -0
  167. package/dist/i18n/locales/zh.d.ts +34 -0
  168. package/dist/i18n/locales/zh.js +34 -0
  169. package/dist/index.js +885 -867
  170. package/dist/locales/ar.json +34 -0
  171. package/dist/locales/de.json +34 -0
  172. package/dist/locales/el.json +34 -0
  173. package/dist/locales/en.json +34 -0
  174. package/dist/locales/es.json +34 -0
  175. package/dist/locales/fr.json +34 -0
  176. package/dist/locales/hi.json +34 -0
  177. package/dist/locales/it.json +34 -0
  178. package/dist/locales/ja.json +34 -0
  179. package/dist/locales/nl.json +34 -0
  180. package/dist/locales/pl.json +34 -0
  181. package/dist/locales/pt.json +34 -0
  182. package/dist/locales/ro.json +34 -0
  183. package/dist/locales/ru.json +34 -0
  184. package/dist/locales/sq.json +34 -0
  185. package/dist/locales/sv.json +34 -0
  186. package/dist/locales/tr.json +34 -0
  187. package/dist/locales/zh.json +34 -0
  188. package/dist/patterns/anamnesis/index.js +1 -1
  189. package/dist/patterns/calendar/index.js +1 -1
  190. package/dist/patterns/forgot-password-form/index.js +1 -1
  191. package/dist/patterns/help-me-write-templates/index.js +2 -2
  192. package/dist/patterns/login-form/index.js +1 -1
  193. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  194. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  195. package/dist/patterns/registration-form/index.js +1 -1
  196. package/dist/patterns/reset-password-form/index.js +1 -1
  197. package/dist/patterns/send-registration-link-form/index.js +1 -1
  198. package/dist/patterns/signature-request/index.js +1 -1
  199. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  200. package/dist/tokens.css +3 -1
  201. package/package.json +13 -1
  202. package/dist/_chunks/info-tip-1Xsq9GLi.js +0 -230
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.103.1",
3
+ "version": "1.105.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",
@@ -731,6 +731,10 @@
731
731
  "types": "./dist/components/stat/index.d.ts",
732
732
  "import": "./dist/components/stat/index.js"
733
733
  },
734
+ "./stat-group": {
735
+ "types": "./dist/components/stat-group/index.d.ts",
736
+ "import": "./dist/components/stat-group/index.js"
737
+ },
734
738
  "./stepper-accordion": {
735
739
  "types": "./dist/components/stepper-accordion/index.d.ts",
736
740
  "import": "./dist/components/stepper-accordion/index.js"
@@ -847,6 +851,14 @@
847
851
  "types": "./dist/components/warning-stack/index.d.ts",
848
852
  "import": "./dist/components/warning-stack/index.js"
849
853
  },
854
+ "./week-availability": {
855
+ "types": "./dist/components/week-availability/index.d.ts",
856
+ "import": "./dist/components/week-availability/index.js"
857
+ },
858
+ "./weekly-hours-editor": {
859
+ "types": "./dist/components/weekly-hours-editor/index.d.ts",
860
+ "import": "./dist/components/weekly-hours-editor/index.js"
861
+ },
850
862
  "./whatsapp-button": {
851
863
  "types": "./dist/components/whatsapp-button/index.d.ts",
852
864
  "import": "./dist/components/whatsapp-button/index.js"
@@ -1,230 +0,0 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as E, useState as F, useRef as o, useEffect as M, useMemo as O } from "react";
3
- import { c as H } from "./index-D2ZczOXr.js";
4
- import { useTranslation as V } from "react-i18next";
5
- import { P as l } from "./popover-CN5IsOeS.js";
6
- import { L as q } from "./link-DtCfnLnF.js";
7
- import { S as B } from "./scroll-area-CY5SLYNw.js";
8
- import { c as G } from "./compose-refs-C0k0tdqF.js";
9
- import { u as J } from "./registry-DvAUVLHh.js";
10
- import { I as Q } from "./info-CGn22peZ.js";
11
- const U = {
12
- id: "info-tip",
13
- capabilities: ["open", "close"],
14
- state: {
15
- isOpen: {
16
- type: "boolean",
17
- descriptionKey: "ui.agent.infoTip.state.isOpen",
18
- description: "True when the info tip card is currently open.",
19
- read: (n) => n.getIsOpen()
20
- }
21
- },
22
- actions: {
23
- open: {
24
- safety: "read",
25
- idempotent: !0,
26
- descriptionKey: "ui.agent.infoTip.actions.open",
27
- description: "Open the info tip card (including its formula and Learn more link, when set).",
28
- invoke: (n) => {
29
- n.open();
30
- }
31
- },
32
- close: {
33
- safety: "read",
34
- idempotent: !0,
35
- descriptionKey: "ui.agent.infoTip.actions.close",
36
- description: "Close the info tip card.",
37
- invoke: (n) => {
38
- n.close();
39
- }
40
- }
41
- },
42
- domHooks: {
43
- root: {
44
- attr: "data-component",
45
- value: "info-tip",
46
- description: "Marks the InfoTip trigger button."
47
- },
48
- instanceId: {
49
- attr: "data-component-id",
50
- sourceProp: "id",
51
- description: "Sourced from the id prop on InfoTip."
52
- }
53
- }
54
- }, W = H(
55
- [
56
- "ds:relative ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
57
- "ds:rounded-[var(--radius-full)]",
58
- "ds:bg-[var(--card)]",
59
- "ds:text-[var(--accent)]",
60
- // Single ring: the Lucide Info glyph draws its own accent circle, so the
61
- // trigger carries NO CSS border of its own (a border would read as a
62
- // second, concentric ring). The white circle comes from `bg-card` showing
63
- // through the glyph, lifted by the drop shadow.
64
- "ds:shadow-[var(--shadow-sm)]",
65
- "ds:cursor-pointer",
66
- "ds:transition-[color,box-shadow] ds:motion-reduce:transition-none",
67
- "ds:hover:text-[var(--accent-hover)] ds:hover:shadow-[var(--shadow-md)]",
68
- "ds:data-[state=open]:text-[var(--accent-hover)] ds:data-[state=open]:shadow-[var(--shadow-md)]",
69
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
70
- "ds:forced-colors:focus-visible:outline-[CanvasText]"
71
- ].join(" "),
72
- {
73
- variants: {
74
- size: {
75
- // Both diameters sit below `--min-target-size` (44/48px), so each
76
- // re-uses IconButton's invisible `::before` hit-area expansion to a
77
- // full touch target on touch / small screens. From the `sm:`
78
- // breakpoint up the pointer is precise, so the expansion relaxes —
79
- // but the interactive target must never fall below WCAG 2.5.8's 24px:
80
- // • md (24px visual) already meets the 24px floor, so its `::before`
81
- // is hidden on desktop and the 24px circle IS the target.
82
- // • sm (20px visual) would fall to 20px if hidden — below the floor
83
- // — so instead of hiding, its `::before` shrinks to a persistent
84
- // `--spacing-lg` (24px) minimum that holds on desktop too.
85
- sm: 'ds:w-5 ds:h-5 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:inset-x-[calc((var(--spacing-lg)-100%)/-2)] ds:sm:before:inset-y-[calc((var(--spacing-lg)-100%)/-2)]',
86
- md: 'ds:w-6 ds:h-6 ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:hidden'
87
- }
88
- },
89
- defaultVariants: {
90
- size: "md"
91
- }
92
- }
93
- ), X = E(
94
- ({
95
- content: n,
96
- heading: r,
97
- size: u = "md",
98
- cardSize: D,
99
- side: z = "top",
100
- align: C = "center",
101
- "aria-label": L,
102
- id: g,
103
- className: S,
104
- formula: b,
105
- learnMoreHref: y,
106
- learnMoreLabel: A,
107
- onLearnMore: K
108
- }, x) => {
109
- const { t: m } = V("ui"), [f, p] = F(!1), i = o(f);
110
- M(() => {
111
- i.current = f;
112
- }, [f]);
113
- const P = O(
114
- () => ({
115
- getIsOpen: () => i.current,
116
- open: () => p(!0),
117
- close: () => p(!1)
118
- }),
119
- []
120
- );
121
- J(U, P, g);
122
- const v = o(null), T = () => {
123
- v.current = i.current;
124
- }, w = y != null, k = o(null), j = O(
125
- () => G(x, k),
126
- [x]
127
- ), I = o(null), R = o(null), N = o(null), h = L ?? m("infoTip.triggerLabel", "More information");
128
- return /* @__PURE__ */ d(l, { openOn: "hover-or-click", open: f, onOpenChange: p, children: [
129
- /* @__PURE__ */ t(
130
- l.Trigger,
131
- {
132
- ref: j,
133
- "aria-label": h,
134
- className: W({ size: u, className: S }),
135
- "data-component": "info-tip",
136
- "data-component-id": g,
137
- onPointerDown: T,
138
- onKeyDown: (e) => {
139
- (e.key === "Enter" || e.key === " ") && T();
140
- const s = N.current, a = (s == null ? void 0 : s.tabIndex) === 0, c = a ? s : I.current;
141
- (w || a) && e.key === "Tab" && !e.shiftKey && i.current && c && (e.preventDefault(), c.focus());
142
- },
143
- onClick: (e) => {
144
- const s = v.current;
145
- v.current = null, s === !1 && i.current && e.preventDefault();
146
- },
147
- children: /* @__PURE__ */ t(
148
- Q,
149
- {
150
- "aria-hidden": "true",
151
- className: u === "sm" ? "ds:size-5" : "ds:size-6"
152
- }
153
- )
154
- }
155
- ),
156
- /* @__PURE__ */ d(
157
- l.Content,
158
- {
159
- ref: R,
160
- side: z,
161
- align: C,
162
- size: D ?? (u === "sm" ? "sm" : "md"),
163
- className: "ds:flex ds:flex-col ds:max-h-[var(--radix-popover-content-available-height)]",
164
- "aria-label": r == null ? h : void 0,
165
- onOpenAutoFocus: (e) => e.preventDefault(),
166
- onCloseAutoFocus: (e) => e.preventDefault(),
167
- onEscapeKeyDown: (e) => {
168
- var a, c;
169
- const s = document.activeElement;
170
- s && ((a = R.current) != null && a.contains(s)) && (e.preventDefault(), (c = k.current) == null || c.focus(), p(!1));
171
- },
172
- children: [
173
- r != null && /* @__PURE__ */ t(l.Heading, { children: r }),
174
- /* @__PURE__ */ t(l.Description, { className: "ds:flex ds:min-h-0 ds:flex-col", children: /* @__PURE__ */ d(
175
- B,
176
- {
177
- ref: N,
178
- type: "native",
179
- "aria-label": typeof r == "string" ? r : h,
180
- className: "ds:min-h-[3lh]",
181
- children: [
182
- n,
183
- b != null && /* @__PURE__ */ d(
184
- "div",
185
- {
186
- "data-slot": "formula",
187
- className: "type-body-sm ds:mt-[var(--spacing-sm)] ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)] ds:text-[var(--foreground)] ds:tabular-nums",
188
- children: [
189
- /* @__PURE__ */ d("span", { className: "ds:sr-only", children: [
190
- m("infoTip.formula", "Formula"),
191
- ":",
192
- " "
193
- ] }),
194
- b
195
- ]
196
- }
197
- )
198
- ]
199
- }
200
- ) }),
201
- w && /* @__PURE__ */ t(
202
- "div",
203
- {
204
- "data-slot": "footer",
205
- className: "ds:mt-[var(--spacing-sm)] ds:flex ds:justify-end",
206
- children: /* @__PURE__ */ t(
207
- q,
208
- {
209
- ref: I,
210
- href: y,
211
- onClick: K,
212
- weight: "strong",
213
- className: "type-body-sm",
214
- children: A ?? m("infoTip.learnMore", "Learn more")
215
- }
216
- )
217
- }
218
- )
219
- ]
220
- }
221
- )
222
- ] });
223
- }
224
- );
225
- X.displayName = "InfoTip";
226
- export {
227
- X as I,
228
- U as i
229
- };
230
- //# sourceMappingURL=info-tip-1Xsq9GLi.js.map