@alfadocs/ui-kit 1.3.13 → 1.4.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 (185) hide show
  1. package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
  2. package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
  3. package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
  4. package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
  5. package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
  6. package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
  7. package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
  8. package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
  9. package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
  10. package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
  11. package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
  12. package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
  13. package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
  14. package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
  15. package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
  16. package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
  17. package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
  18. package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
  19. package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
  20. package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
  21. package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
  22. package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
  23. package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
  24. package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
  25. package/dist/_chunks/format-4HNwNGrN.js +1315 -0
  26. package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
  27. package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
  28. package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
  29. package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
  30. package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
  31. package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
  32. package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
  33. package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
  34. package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
  35. package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
  36. package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
  37. package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
  38. package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
  39. package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
  40. package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
  41. package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
  42. package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
  43. package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
  44. package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
  45. package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
  46. package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
  47. package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
  48. package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
  49. package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
  50. package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
  51. package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
  52. package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
  53. package/dist/_chunks/progress-CK8otcQ-.js +343 -0
  54. package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
  55. package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
  56. package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
  57. package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
  58. package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
  59. package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
  60. package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
  61. package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
  62. package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
  63. package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
  64. package/dist/_chunks/subDays-CAUv47M1.js +8 -0
  65. package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
  66. package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
  67. package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
  68. package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
  69. package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
  70. package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
  71. package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
  72. package/dist/agent-catalog.json +6426 -3382
  73. package/dist/agent-i18n/en.json +234 -15
  74. package/dist/components/agenda-card/index.js +1 -1
  75. package/dist/components/appointment-timeline/index.js +1 -1
  76. package/dist/components/bmi-calculator/index.js +1 -1
  77. package/dist/components/booking/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/care-plan-card/index.js +1 -1
  80. package/dist/components/care-plan-entry-card/index.js +1 -1
  81. package/dist/components/chat-container/chat-container.d.ts +14 -0
  82. package/dist/components/chat-container/index.js +1 -1
  83. package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
  84. package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
  85. package/dist/components/cycle-calculator/index.d.ts +1 -1
  86. package/dist/components/cycle-calculator/index.js +1 -1
  87. package/dist/components/data-table/index.js +1 -1
  88. package/dist/components/date-picker/index.js +1 -1
  89. package/dist/components/date-range-picker/index.js +1 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/document-preview/index.js +1 -1
  92. package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
  93. package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
  94. package/dist/components/due-date-calculator/index.d.ts +1 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
  97. package/dist/components/editor-overlay/index.js +1 -1
  98. package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
  99. package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
  100. package/dist/components/fetal-weight/index.d.ts +1 -1
  101. package/dist/components/fetal-weight/index.js +1 -1
  102. package/dist/components/freemium-paywall/index.js +1 -1
  103. package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
  104. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
  105. package/dist/components/gestational-age-calculator/index.d.ts +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
  108. package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
  109. package/dist/components/hcg-doubling/index.d.ts +1 -1
  110. package/dist/components/hcg-doubling/index.js +1 -1
  111. package/dist/components/header-settings/header-settings.d.ts +13 -1
  112. package/dist/components/header-settings/index.js +1 -1
  113. package/dist/components/locale-picker/index.js +1 -1
  114. package/dist/components/locale-picker/locale-picker.d.ts +9 -0
  115. package/dist/components/map-view/index.js +1 -1
  116. package/dist/components/map-view/map-view.d.ts +22 -0
  117. package/dist/components/notes-panel/index.js +1 -1
  118. package/dist/components/number-input/index.js +1 -1
  119. package/dist/components/number-input/number-input.d.ts +2 -1
  120. package/dist/components/optical-prescription/index.js +1 -1
  121. package/dist/components/patient-details/index.js +1 -1
  122. package/dist/components/patient-table/index.js +1 -1
  123. package/dist/components/payment-form/index.d.ts +1 -1
  124. package/dist/components/payment-form/index.js +1 -1
  125. package/dist/components/payment-form/payment-form.d.ts +32 -1
  126. package/dist/components/pdf-viewer/index.js +1 -1
  127. package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
  128. package/dist/components/practice-results/index.js +1 -1
  129. package/dist/components/pregnancy-dating/index.d.ts +1 -1
  130. package/dist/components/pregnancy-dating/index.js +1 -1
  131. package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
  132. package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
  133. package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
  134. package/dist/components/pregnancy-weight-gain/index.js +6 -5
  135. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
  136. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
  137. package/dist/components/progress/index.js +1 -1
  138. package/dist/components/progress/progress.d.ts +13 -0
  139. package/dist/components/radiograph-panel/index.js +1 -1
  140. package/dist/components/rich-text-editor/index.js +1 -1
  141. package/dist/components/session-countdown/index.js +1 -1
  142. package/dist/components/sign-document/index.js +1 -1
  143. package/dist/components/slot-grid/index.d.ts +2 -1
  144. package/dist/components/slot-grid/index.js +5 -4
  145. package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
  146. package/dist/components/slot-grid/slot-grid.d.ts +34 -0
  147. package/dist/components/sparkline/index.js +1 -1
  148. package/dist/components/sparkline/sparkline.d.ts +10 -0
  149. package/dist/components/tab-bar/index.js +1 -1
  150. package/dist/components/tab-bar/tab-bar.d.ts +13 -0
  151. package/dist/components/task-card/index.js +1 -1
  152. package/dist/components/unit-converter/index.js +1 -1
  153. package/dist/components/warning-stack/index.js +1 -1
  154. package/dist/index.js +630 -627
  155. package/dist/patterns/alia-assistant/index.js +1 -1
  156. package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
  157. package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
  158. package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
  159. package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
  160. package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
  161. package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
  162. package/dist/patterns/anamnesis/index.d.ts +3 -2
  163. package/dist/patterns/anamnesis/index.js +7 -6
  164. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  165. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
  166. package/dist/tokens.css +1 -1
  167. package/package.json +1 -1
  168. package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
  169. package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
  170. package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
  171. package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
  172. package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
  173. package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
  174. package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
  175. package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
  176. package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
  177. package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
  178. package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
  179. package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
  180. package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
  181. package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
  182. package/dist/_chunks/progress-DA413-zn.js +0 -299
  183. package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
  184. package/dist/_chunks/subDays-BcNi04uf.js +0 -8
  185. package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.3.13",
3
+ "version": "1.4.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,27 +0,0 @@
1
- const t = {
2
- id: "agenda-card",
3
- // `pick` (activation) and `dismiss` are HOST-DELEGATED: the card exposes no
4
- // imperative handle of its own. A containing AgendaTray drives selection via
5
- // agenda-tray.select_item; dismissal is performed by the host queue. The
6
- // capabilities are declared so an MCP UI bridge knows the surface participates
7
- // in those flows even though the action lives on the tray.
8
- capabilities: ["pick", "dismiss"],
9
- state: {},
10
- actions: {},
11
- domHooks: {
12
- root: {
13
- attr: "data-component",
14
- value: "agenda-card",
15
- description: "Marks the element as a kit AgendaCard. The card root also emits data-component-id sourced from item.id and data-status with the appointment lifecycle."
16
- },
17
- instanceId: {
18
- attr: "data-component-id",
19
- sourceProp: "item.id",
20
- description: "Sourced from item.id — the stable appointment identifier."
21
- }
22
- }
23
- };
24
- export {
25
- t as a
26
- };
27
- //# sourceMappingURL=agenda-card.agent-mTCrkKSZ.js.map
@@ -1,40 +0,0 @@
1
- import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import { D as r } from "./dialog-UbKJCi1X.js";
4
- const u = p(
5
- ({
6
- trigger: i,
7
- title: e,
8
- description: o,
9
- children: t,
10
- size: n = "lg",
11
- open: c,
12
- defaultOpen: d,
13
- onOpenChange: m,
14
- id: s,
15
- className: g
16
- }, h) => /* @__PURE__ */ a(
17
- r,
18
- {
19
- open: c,
20
- defaultOpen: d,
21
- onOpenChange: m,
22
- id: s,
23
- children: [
24
- /* @__PURE__ */ l(r.Trigger, { asChild: !0, children: i }),
25
- /* @__PURE__ */ a(r.Content, { ref: h, size: n, children: [
26
- /* @__PURE__ */ a(r.Header, { children: [
27
- /* @__PURE__ */ l(r.Title, { children: e }),
28
- o ? /* @__PURE__ */ l(r.Description, { children: o }) : null
29
- ] }),
30
- /* @__PURE__ */ l("div", { "data-component": "calculator-dialog", className: g, children: t })
31
- ] })
32
- ]
33
- }
34
- )
35
- );
36
- u.displayName = "CalculatorDialog";
37
- export {
38
- u as C
39
- };
40
- //# sourceMappingURL=calculator-dialog-DuXMQSdm.js.map
@@ -1,252 +0,0 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as A, useState as C, useMemo as N, useEffect as I } from "react";
3
- import { c as S } from "./index-D2ZczOXr.js";
4
- import { useTranslation as k } from "react-i18next";
5
- import { F as L } from "./form-field-M5UpX65Z.js";
6
- import { D as z } from "./date-picker-ZHejTVAJ.js";
7
- import { N as D } from "./number-input-DrozbZAU.js";
8
- import { C as E } from "./card-DPmk26CL.js";
9
- import { B as P } from "./badge-DCOqV9mI.js";
10
- import { I as B } from "./insert-result-D074GtHX.js";
11
- import { a as i } from "./date-picker-variants-eL6HjWvw.js";
12
- import { C as G } from "./check-DrFSN__t.js";
13
- import { H as R } from "./heart--qCA4ffe.js";
14
- import { c as Y } from "./createLucideIcon-DhHxpK9K.js";
15
- /**
16
- * @license lucide-react v1.22.0 - ISC
17
- *
18
- * This source code is licensed under the ISC license.
19
- * See the LICENSE file in the root directory of this source tree.
20
- */
21
- const j = [
22
- [
23
- "path",
24
- {
25
- d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",
26
- key: "c7niix"
27
- }
28
- ]
29
- ], M = Y("droplet", j), b = 28, U = 14, K = 1;
30
- function O(c, s = 3) {
31
- const o = c.cycleLength ?? b, { lastPeriodStart: d } = c, n = i(d, o - U), g = {
32
- start: i(n, -5),
33
- end: i(n, K)
34
- }, u = i(d, o), f = Array.from(
35
- { length: s },
36
- (w, y) => i(d, o * (y + 1))
37
- ), h = c.periodLength && c.periodLength > 0 ? {
38
- start: d,
39
- end: i(d, c.periodLength - 1)
40
- } : null;
41
- return { nextPeriod: u, ovulation: n, fertileWindow: g, upcomingPeriods: f, periodRange: h };
42
- }
43
- const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
44
- variants: {
45
- width: { full: "ds:w-full", auto: "ds:inline-flex" }
46
- },
47
- defaultVariants: { width: "full" }
48
- }), q = "--accent", J = A(
49
- ({
50
- defaultCycleLength: c = b,
51
- onResultChange: s,
52
- onInsert: o,
53
- insertVariant: d = "insert",
54
- onCopy: n,
55
- onError: g,
56
- insertBrand: u,
57
- id: f,
58
- width: h,
59
- className: w
60
- }, y) => {
61
- const { t, i18n: T } = k(), [m, _] = C(void 0), [x, H] = C(
62
- c
63
- ), [v, W] = C(null), a = N(() => m ? O({
64
- lastPeriodStart: m,
65
- cycleLength: x ?? b,
66
- periodLength: v ?? void 0
67
- }) : null, [m, x, v]), F = N(
68
- () => new Intl.DateTimeFormat(T.language, { dateStyle: "medium" }),
69
- [T.language]
70
- );
71
- I(() => {
72
- s == null || s(a);
73
- }, [a, s]);
74
- const $ = N(() => /* @__PURE__ */ new Date(), []), l = (p) => F.format(p);
75
- return /* @__PURE__ */ r(
76
- "div",
77
- {
78
- ref: y,
79
- "data-component": "cycle-calculator",
80
- "data-component-id": f,
81
- className: V({ width: h, className: w }),
82
- children: [
83
- /* @__PURE__ */ r("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
84
- /* @__PURE__ */ e(L, { label: t("cycleCalculator.lastPeriod"), children: /* @__PURE__ */ e(
85
- z,
86
- {
87
- value: m,
88
- onChange: _,
89
- maxDate: $
90
- }
91
- ) }),
92
- /* @__PURE__ */ e(
93
- L,
94
- {
95
- label: t("cycleCalculator.cycleLength"),
96
- description: t("cycleCalculator.cycleLengthHint"),
97
- children: /* @__PURE__ */ e(
98
- D,
99
- {
100
- mode: "integer",
101
- min: 20,
102
- max: 45,
103
- value: x,
104
- onChange: H
105
- }
106
- )
107
- }
108
- ),
109
- /* @__PURE__ */ e(
110
- L,
111
- {
112
- label: t("cycleCalculator.periodLength"),
113
- description: t("cycleCalculator.periodLengthHint"),
114
- children: /* @__PURE__ */ e(
115
- D,
116
- {
117
- mode: "integer",
118
- min: 1,
119
- max: 14,
120
- value: v,
121
- onChange: W
122
- }
123
- )
124
- }
125
- )
126
- ] }),
127
- /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a ? `${t("cycleCalculator.ovulation")}: ${l(a.ovulation)}. ${t(
128
- "cycleCalculator.nextPeriod"
129
- )}: ${l(a.nextPeriod)}.` : "" }),
130
- a ? /* @__PURE__ */ e(E, { variant: "elevated", children: /* @__PURE__ */ r(E.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
131
- /* @__PURE__ */ r("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
132
- /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
133
- /* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: t("cycleCalculator.ovulation") }),
134
- /* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
135
- P,
136
- {
137
- variant: "success",
138
- size: "lg",
139
- leading: /* @__PURE__ */ e(G, { "aria-hidden": !0 }),
140
- children: l(a.ovulation)
141
- }
142
- ) })
143
- ] }),
144
- /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
145
- /* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: t("cycleCalculator.fertileWindow") }),
146
- /* @__PURE__ */ e("dd", { children: /* @__PURE__ */ r(
147
- P,
148
- {
149
- variant: "accent",
150
- size: "lg",
151
- leading: /* @__PURE__ */ e(R, { "aria-hidden": !0 }),
152
- children: [
153
- l(a.fertileWindow.start),
154
- " –",
155
- " ",
156
- l(a.fertileWindow.end)
157
- ]
158
- }
159
- ) })
160
- ] }),
161
- /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
162
- /* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: t("cycleCalculator.nextPeriod") }),
163
- /* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
164
- P,
165
- {
166
- variant: "error",
167
- size: "lg",
168
- leading: /* @__PURE__ */ e(M, { "aria-hidden": !0 }),
169
- children: l(a.nextPeriod)
170
- }
171
- ) })
172
- ] })
173
- ] }),
174
- a.periodRange ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
175
- /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: t("cycleCalculator.periodRange") }),
176
- /* @__PURE__ */ r("span", { className: "type-body ds:text-foreground", children: [
177
- l(a.periodRange.start),
178
- " –",
179
- " ",
180
- l(a.periodRange.end)
181
- ] })
182
- ] }) : null,
183
- /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
184
- /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: t("cycleCalculator.upcomingPeriods") }),
185
- /* @__PURE__ */ e("ul", { className: "ds:flex ds:flex-wrap ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-2xs)]", children: a.upcomingPeriods.map((p) => /* @__PURE__ */ e(
186
- "li",
187
- {
188
- className: "type-body ds:text-foreground",
189
- children: l(p)
190
- },
191
- p.getTime()
192
- )) })
193
- ] }),
194
- d === "copy" || o ? /* @__PURE__ */ e(
195
- B,
196
- {
197
- onInsert: o,
198
- variant: d,
199
- onCopy: n,
200
- onError: g,
201
- card: {
202
- title: t("insert.title.cycle"),
203
- icon: "heart",
204
- highlight: `${l(a.fertileWindow.start)} – ${l(
205
- a.fertileWindow.end
206
- )}`,
207
- // Chip reuses the on-screen fertile-window badge's accent
208
- // token so the inserted PNG chip matches the screen.
209
- highlightToken: q,
210
- brand: u,
211
- fields: [
212
- {
213
- // Ovulation is a predicted date → calendar glyph (the
214
- // on-screen badge uses a Check tick, which ICON_GEOMETRY
215
- // does not carry, so the calendar reads the date meaning).
216
- icon: "calendar",
217
- label: t("cycleCalculator.ovulation"),
218
- value: l(a.ovulation)
219
- },
220
- {
221
- // Fertile window → heart glyph, matching the on-screen
222
- // fertile-window badge's Heart icon.
223
- icon: "heart",
224
- label: t("cycleCalculator.fertileWindow"),
225
- value: `${l(a.fertileWindow.start)} – ${l(
226
- a.fertileWindow.end
227
- )}`
228
- },
229
- {
230
- // Next period → droplets glyph, matching the on-screen
231
- // next-period badge's Droplet icon.
232
- icon: "droplets",
233
- label: t("cycleCalculator.nextPeriod"),
234
- value: l(a.nextPeriod)
235
- }
236
- ]
237
- }
238
- }
239
- ) : null
240
- ] }) }) : /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: t("cycleCalculator.empty") })
241
- ]
242
- }
243
- );
244
- }
245
- );
246
- J.displayName = "CycleCalculator";
247
- export {
248
- J as C,
249
- U as L,
250
- O as p
251
- };
252
- //# sourceMappingURL=cycle-calculator-BwqYVPB4.js.map