@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
@@ -1,170 +0,0 @@
1
- import { jsxs as t, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as k, useState as p, useMemo as T, useEffect as S } from "react";
3
- import { c as V } from "./index-D2ZczOXr.js";
4
- import { useTranslation as j } from "react-i18next";
5
- import { F as f } from "./form-field-M5UpX65Z.js";
6
- import { N as L } from "./number-input-DrozbZAU.js";
7
- import { D as M } from "./date-time-picker-695QvBGj.js";
8
- import { C as _ } from "./card-DPmk26CL.js";
9
- import { B as A } from "./badge-DCOqV9mI.js";
10
- import { I as C } from "./insert-result-D074GtHX.js";
11
- const O = 1e3 * 60 * 60, z = 35;
12
- function G(D) {
13
- const { hcg1: r, hcg2: s, date1: d, date2: o } = D;
14
- if (!(r > 0) || !(s > 0)) return null;
15
- const i = (o.getTime() - d.getTime()) / O;
16
- if (!(i > 0)) return null;
17
- const a = s / r, v = (a - 1) * 100, c = (a ** (48 / i) - 1) * 100, x = a > 1 ? i * Math.LN2 / Math.log(a) : null, N = a <= 1 ? "plateau-falling" : c >= z ? "rising-normal" : "rising-slow";
18
- return {
19
- intervalHours: i,
20
- ratio: a,
21
- percentRise: v,
22
- twoDayRisePercent: c,
23
- doublingTimeHours: x,
24
- trend: N
25
- };
26
- }
27
- const K = V("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
28
- variants: {
29
- width: { full: "ds:w-full", auto: "ds:inline-flex" }
30
- },
31
- defaultVariants: { width: "full" }
32
- }), U = {
33
- "rising-normal": "success",
34
- "rising-slow": "warning",
35
- "plateau-falling": "error"
36
- }, q = {
37
- "rising-normal": "--success",
38
- "rising-slow": "--warning-readable",
39
- "plateau-falling": "--destructive"
40
- }, J = k(
41
- ({
42
- defaultDate1: D,
43
- defaultDate2: r,
44
- onResultChange: s,
45
- onInsert: d,
46
- insertVariant: o = "insert",
47
- onCopy: i,
48
- onError: a,
49
- insertBrand: v,
50
- id: c,
51
- width: x,
52
- className: N
53
- }, I) => {
54
- const { t: e, i18n: w } = j(), [g, B] = p(null), [u, F] = p(D), [m, P] = p(null), [h, R] = p(r), H = T(() => /* @__PURE__ */ new Date(), []), n = T(() => g === null || m === null || !u || !h ? null : G({ hcg1: g, date1: u, hcg2: m, date2: h }), [g, u, m, h]);
55
- S(() => {
56
- s == null || s(n);
57
- }, [n, s]);
58
- const $ = T(
59
- () => new Intl.NumberFormat(w.language, { maximumFractionDigits: 0 }),
60
- [w.language]
61
- ), y = (b) => b.doublingTimeHours === null ? "—" : e("hcgDoubling.hoursValue", {
62
- hours: $.format(b.doublingTimeHours)
63
- }), E = (b) => e("hcgDoubling.percentValue", { value: $.format(b.twoDayRisePercent) });
64
- return /* @__PURE__ */ t(
65
- "div",
66
- {
67
- ref: I,
68
- "data-component": "hcg-doubling",
69
- "data-component-id": c,
70
- className: K({ width: x, className: N }),
71
- children: [
72
- /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
73
- /* @__PURE__ */ l(
74
- f,
75
- {
76
- label: `${e("hcgDoubling.hcg1")} (${e("hcgDoubling.units")})`,
77
- children: /* @__PURE__ */ l(
78
- L,
79
- {
80
- mode: "decimal",
81
- min: 0,
82
- value: g,
83
- onChange: B
84
- }
85
- )
86
- }
87
- ),
88
- /* @__PURE__ */ l(f, { label: e("hcgDoubling.date1"), children: /* @__PURE__ */ l(M, { value: u, onChange: F, maxDate: H }) }),
89
- /* @__PURE__ */ l(
90
- f,
91
- {
92
- label: `${e("hcgDoubling.hcg2")} (${e("hcgDoubling.units")})`,
93
- children: /* @__PURE__ */ l(
94
- L,
95
- {
96
- mode: "decimal",
97
- min: 0,
98
- value: m,
99
- onChange: P
100
- }
101
- )
102
- }
103
- ),
104
- /* @__PURE__ */ l(f, { label: e("hcgDoubling.date2"), children: /* @__PURE__ */ l(M, { value: h, onChange: R, maxDate: H }) })
105
- ] }),
106
- /* @__PURE__ */ l("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: n ? `${e("hcgDoubling.doublingLabel")}: ${y(n)}. ${e(
107
- `hcgDoubling.trend.${n.trend}`
108
- )}.` : "" }),
109
- n ? /* @__PURE__ */ l(_, { variant: "elevated", children: /* @__PURE__ */ t(_.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
110
- /* @__PURE__ */ t("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
111
- /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
112
- /* @__PURE__ */ l("dt", { className: "type-label ds:text-muted-foreground", children: e("hcgDoubling.doublingLabel") }),
113
- /* @__PURE__ */ l("dd", { className: "type-metric ds:text-foreground", children: y(n) })
114
- ] }),
115
- /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
116
- /* @__PURE__ */ l("dt", { className: "type-label ds:text-muted-foreground", children: e("hcgDoubling.riseLabel") }),
117
- /* @__PURE__ */ l("dd", { className: "type-body ds:text-foreground", children: E(n) })
118
- ] }),
119
- /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
120
- /* @__PURE__ */ l("dt", { className: "type-label ds:text-muted-foreground", children: e("hcgDoubling.trendLabel") }),
121
- /* @__PURE__ */ l("dd", { children: /* @__PURE__ */ l(A, { variant: U[n.trend], size: "lg", children: e(`hcgDoubling.trend.${n.trend}`) }) })
122
- ] })
123
- ] }),
124
- /* @__PURE__ */ l("p", { className: "type-body-sm ds:text-muted-foreground", children: e("hcgDoubling.disclaimer") }),
125
- o === "copy" || d ? /* @__PURE__ */ l(
126
- C,
127
- {
128
- onInsert: d,
129
- variant: o,
130
- onCopy: i,
131
- onError: a,
132
- card: {
133
- title: e("insert.title.hcg"),
134
- icon: "activity",
135
- highlight: e(`hcgDoubling.trend.${n.trend}`),
136
- highlightToken: q[n.trend],
137
- brand: v,
138
- fields: [
139
- {
140
- icon: "clock",
141
- label: e("hcgDoubling.doublingLabel"),
142
- value: y(n)
143
- },
144
- {
145
- icon: "trending-up",
146
- label: e("hcgDoubling.riseLabel"),
147
- value: E(n)
148
- },
149
- {
150
- icon: "tag",
151
- label: e("hcgDoubling.trendLabel"),
152
- value: e(`hcgDoubling.trend.${n.trend}`)
153
- }
154
- ]
155
- }
156
- }
157
- ) : null
158
- ] }) }) : /* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: e("hcgDoubling.empty") })
159
- ]
160
- }
161
- );
162
- }
163
- );
164
- J.displayName = "HcgDoubling";
165
- export {
166
- J as H,
167
- z as M,
168
- G as a
169
- };
170
- //# sourceMappingURL=hcg-doubling-BBqD2wI2.js.map
@@ -1,284 +0,0 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { forwardRef as A, useRef as p, useImperativeHandle as x, useCallback as C, useMemo as I } from "react";
3
- import { c as E } from "./index-D2ZczOXr.js";
4
- import { useTranslation as M } from "react-i18next";
5
- import { I as o } from "./icon-button-C_kbcd7I.js";
6
- import { I as N } from "./icon-button-group-BLHPN6jg.js";
7
- import { D as r } from "./dropdown-menu-DU-Hrf33.js";
8
- import { S as j } from "./switch-OILsBLWo.js";
9
- import { c as y, a as H, L as R } from "./locale-picker-BfBUdT1m.js";
10
- import { u as P } from "./use-locale-BkCIHujH.js";
11
- import { u as _ } from "./use-theme-CAuo6EYT.js";
12
- import { u as O } from "./registry-DvAUVLHh.js";
13
- import { S as K } from "./settings-d25ju_6L.js";
14
- import { S as D, M as q } from "./sun-Bj9Mr553.js";
15
- import { M as z } from "./monitor-xXSrufmP.js";
16
- const V = {
17
- id: "header-settings",
18
- // Each setter persists a single preference value (locale / theme /
19
- // accessibility) — `set_value` semantics, not an ephemeral view switch.
20
- capabilities: ["set_value"],
21
- state: {},
22
- actions: {
23
- set_locale: {
24
- safety: "write",
25
- argsType: "{ locale: string }",
26
- argsSchema: {
27
- type: "object",
28
- properties: {
29
- locale: {
30
- type: "string",
31
- description: 'IETF language tag (e.g. "en", "it", "ar"). Unknown tags are silently dropped.'
32
- }
33
- },
34
- required: ["locale"]
35
- },
36
- idempotent: !0,
37
- descriptionKey: "ui.agent.headerSettings.actions.setLocale",
38
- description: "Switch the active locale to the given IETF tag.",
39
- examples: [{ args: { locale: "it" }, note: "Switch to Italian." }],
40
- invoke: (t, i) => {
41
- t.setLocale(i.locale);
42
- }
43
- },
44
- set_theme: {
45
- safety: "write",
46
- argsType: '{ theme: "light" | "dark" | "system" }',
47
- argsSchema: {
48
- type: "object",
49
- properties: { theme: { enum: ["light", "dark", "system"] } },
50
- required: ["theme"]
51
- },
52
- idempotent: !0,
53
- descriptionKey: "ui.agent.headerSettings.actions.setTheme",
54
- description: "Switch the theme preference.",
55
- examples: [
56
- { args: { theme: "dark" }, note: "Switch to the dark theme." }
57
- ],
58
- invoke: (t, i) => {
59
- t.setTheme(i.theme);
60
- }
61
- },
62
- set_accessibility: {
63
- safety: "write",
64
- argsType: '{ accessibility: "default" | "accessible" }',
65
- argsSchema: {
66
- type: "object",
67
- properties: { accessibility: { enum: ["default", "accessible"] } },
68
- required: ["accessibility"]
69
- },
70
- idempotent: !0,
71
- descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
72
- description: "Switch the accessibility preference.",
73
- examples: [
74
- {
75
- args: { accessibility: "accessible" },
76
- note: "Enable the AAA-accessible profile."
77
- }
78
- ],
79
- invoke: (t, i) => {
80
- t.setAccessibility(i.accessibility);
81
- }
82
- }
83
- },
84
- domHooks: {
85
- root: {
86
- attr: "data-component",
87
- value: "header-settings",
88
- description: "Marks the HeaderSettings wrapper."
89
- },
90
- instanceId: {
91
- attr: "data-component-id",
92
- sourceProp: "id",
93
- description: "Sourced from the id prop (forwarded via HTMLAttributes)."
94
- }
95
- }
96
- };
97
- function B(t, i) {
98
- if (!(typeof window > "u"))
99
- try {
100
- window.localStorage.setItem(t, i);
101
- } catch {
102
- }
103
- }
104
- function F(t) {
105
- if (typeof document > "u") return;
106
- const i = document.documentElement;
107
- i.lang = t, i.dir = y[t].dir;
108
- }
109
- const G = E("ds:inline-flex ds:items-center", {
110
- variants: {
111
- align: {
112
- start: "",
113
- end: ""
114
- }
115
- },
116
- defaultVariants: { align: "end" }
117
- }), U = [
118
- "ds:w-[20rem] ds:p-[var(--spacing-xs)]",
119
- "ds:rounded-[var(--radius-md)] ds:border ds:border-border",
120
- "ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]"
121
- ].join(" "), W = A(
122
- (t, i) => {
123
- const {
124
- align: g = "end",
125
- size: v = "md",
126
- disabled: S = !1,
127
- className: w,
128
- id: m,
129
- ...k
130
- } = t, { t: s } = M(), n = _(), { setLocale: h } = P(), u = p(null);
131
- x(i, () => u.current, []);
132
- const b = C(
133
- (a) => {
134
- h(a), F(a), B(R, a);
135
- },
136
- [h]
137
- ), f = p(b);
138
- f.current = b;
139
- const c = p(n);
140
- c.current = n;
141
- const L = I(
142
- () => ({
143
- setLocale: (a) => {
144
- Object.prototype.hasOwnProperty.call(y, a) && f.current(a);
145
- },
146
- setTheme: (a) => c.current.setTheme(a),
147
- setAccessibility: (a) => c.current.setAccessibility(a)
148
- }),
149
- []
150
- );
151
- O(V, L, m);
152
- const T = n.accessibility === "accessible";
153
- return /* @__PURE__ */ e(
154
- "div",
155
- {
156
- ref: u,
157
- "data-component": "header-settings",
158
- "data-component-id": m,
159
- className: G({ align: g, className: w }),
160
- ...k,
161
- children: /* @__PURE__ */ d(r.Root, { children: [
162
- /* @__PURE__ */ e(r.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
163
- o,
164
- {
165
- size: v,
166
- disabled: S,
167
- icon: /* @__PURE__ */ e(K, { "aria-hidden": !0 }),
168
- "aria-label": s("navigation.headerSettings.trigger")
169
- }
170
- ) }),
171
- /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ d(
172
- r.Content,
173
- {
174
- align: g,
175
- sideOffset: 8,
176
- className: U,
177
- onKeyDownCapture: (a) => {
178
- const l = a.target;
179
- (l == null ? void 0 : l.tagName) === "INPUT" && // Always allow Escape so the menu can close.
180
- a.key !== "Escape" && a.stopPropagation();
181
- },
182
- children: [
183
- /* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.language.label") }),
184
- /* @__PURE__ */ e(
185
- "div",
186
- {
187
- role: "group",
188
- "aria-label": s("navigation.headerSettings.language.label"),
189
- className: [
190
- "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
191
- // Stretch the compact LocalePicker to the full menu
192
- // width so it reads as a single row affordance (not
193
- // a centred pill). The picker's root is
194
- // inline-flex; the `*:` child selector + `flex-1`
195
- // gives it `flex: 1 1 0%` once it's a child of the
196
- // flex container we make this div into.
197
- "ds:flex ds:[&>*]:flex-1"
198
- ].join(" "),
199
- children: /* @__PURE__ */ e(H, { variant: "compact", popoverSide: "end" })
200
- }
201
- ),
202
- /* @__PURE__ */ e(r.Separator, {}),
203
- /* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.appearance.label") }),
204
- /* @__PURE__ */ e(
205
- "div",
206
- {
207
- role: "group",
208
- "aria-label": s("navigation.headerSettings.appearance.label"),
209
- className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
210
- children: /* @__PURE__ */ d(
211
- N,
212
- {
213
- role: "radiogroup",
214
- mode: "toggle-single",
215
- size: "sm",
216
- "aria-label": s("navigation.headerSettings.appearance.label"),
217
- value: n.theme,
218
- onValueChange: (a) => n.setTheme(a),
219
- children: [
220
- /* @__PURE__ */ e(
221
- o,
222
- {
223
- icon: /* @__PURE__ */ e(D, { "aria-hidden": !0 }),
224
- "aria-label": s("navigation.headerSettings.appearance.light"),
225
- value: "light"
226
- }
227
- ),
228
- /* @__PURE__ */ e(
229
- o,
230
- {
231
- icon: /* @__PURE__ */ e(q, { "aria-hidden": !0 }),
232
- "aria-label": s("navigation.headerSettings.appearance.dark"),
233
- value: "dark"
234
- }
235
- ),
236
- /* @__PURE__ */ e(
237
- o,
238
- {
239
- icon: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
240
- "aria-label": s(
241
- "navigation.headerSettings.appearance.system"
242
- ),
243
- value: "system"
244
- }
245
- )
246
- ]
247
- }
248
- )
249
- }
250
- ),
251
- /* @__PURE__ */ e(r.Separator, {}),
252
- /* @__PURE__ */ e(
253
- "div",
254
- {
255
- role: "group",
256
- "aria-label": s(
257
- "navigation.headerSettings.appearance.accessible"
258
- ),
259
- className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
260
- children: /* @__PURE__ */ e(
261
- j,
262
- {
263
- label: s("navigation.headerSettings.appearance.accessible"),
264
- labelSide: "start",
265
- size: "sm",
266
- checked: T,
267
- onCheckedChange: (a) => n.setAccessibility(a ? "accessible" : "default")
268
- }
269
- )
270
- }
271
- )
272
- ]
273
- }
274
- ) })
275
- ] })
276
- }
277
- );
278
- }
279
- );
280
- W.displayName = "HeaderSettings";
281
- export {
282
- W as H
283
- };
284
- //# sourceMappingURL=header-settings--pjYOe6g.js.map
@@ -1,39 +0,0 @@
1
- const a = 6048e5, m = 864e5, l = 6e4, y = 36e5, D = 1e3, r = Symbol.for("constructDateFrom");
2
- function o(n, t) {
3
- return typeof n == "function" ? n(t) : n && typeof n == "object" && r in n ? n[r](t) : n instanceof Date ? new n.constructor(t) : new Date(t);
4
- }
5
- function u(n, t) {
6
- return o(t || n, n);
7
- }
8
- function f(n, ...t) {
9
- const c = o.bind(
10
- null,
11
- n || t.find((s) => typeof s == "object")
12
- );
13
- return t.map(c);
14
- }
15
- function e(n, t) {
16
- const c = u(n, t == null ? void 0 : t.in);
17
- return c.setHours(0, 0, 0, 0), c;
18
- }
19
- function b(n, t, c) {
20
- const [s, i] = f(
21
- c == null ? void 0 : c.in,
22
- n,
23
- t
24
- );
25
- return +e(s) == +e(i);
26
- }
27
- export {
28
- l as a,
29
- D as b,
30
- o as c,
31
- m as d,
32
- a as e,
33
- b as i,
34
- y as m,
35
- f as n,
36
- e as s,
37
- u as t
38
- };
39
- //# sourceMappingURL=isSameDay-DUEiAT0G.js.map
@@ -1,14 +0,0 @@
1
- import { n as l } from "./isSameDay-DUEiAT0G.js";
2
- import { s as r } from "./date-picker-variants-eL6HjWvw.js";
3
- function i(a, m, e) {
4
- const [t, f] = l(
5
- e == null ? void 0 : e.in,
6
- a,
7
- m
8
- );
9
- return +r(t, e) == +r(f, e);
10
- }
11
- export {
12
- i
13
- };
14
- //# sourceMappingURL=isSameWeek-CK4HS9lH.js.map