@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.
- package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
- package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
- package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
- package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
- package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
- package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
- package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
- package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
- package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
- package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
- package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
- package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
- package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
- package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
- package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
- package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
- package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
- package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
- package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
- package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
- package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
- package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
- package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
- package/dist/_chunks/format-4HNwNGrN.js +1315 -0
- package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
- package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
- package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
- package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
- package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
- package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
- package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
- package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
- package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
- package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
- package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
- package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
- package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
- package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
- package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
- package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
- package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
- package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
- package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
- package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
- package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
- package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
- package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
- package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
- package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
- package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
- package/dist/_chunks/progress-CK8otcQ-.js +343 -0
- package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
- package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
- package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
- package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
- package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
- package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
- package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
- package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
- package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
- package/dist/_chunks/subDays-CAUv47M1.js +8 -0
- package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
- package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
- package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
- package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
- package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
- package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
- package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
- package/dist/agent-catalog.json +6426 -3382
- package/dist/agent-i18n/en.json +234 -15
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +14 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
- package/dist/components/cycle-calculator/index.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
- package/dist/components/fetal-weight/index.d.ts +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
- package/dist/components/gestational-age-calculator/index.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
- package/dist/components/hcg-doubling/index.d.ts +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +13 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +9 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +22 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +2 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +32 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.d.ts +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
- package/dist/components/pregnancy-weight-gain/index.js +6 -5
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/slot-grid/index.d.ts +2 -1
- package/dist/components/slot-grid/index.js +5 -4
- package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
- package/dist/components/slot-grid/slot-grid.d.ts +34 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +10 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +13 -0
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/index.js +630 -627
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
- package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
- package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
- package/dist/patterns/anamnesis/index.d.ts +3 -2
- package/dist/patterns/anamnesis/index.js +7 -6
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
- package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
- package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
- package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
- package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
- package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
- package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
- package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
- package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
- package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
- package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
- package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
- package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
- package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
- package/dist/_chunks/progress-DA413-zn.js +0 -299
- package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
- package/dist/_chunks/subDays-BcNi04uf.js +0 -8
- package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
package/package.json
CHANGED
|
@@ -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
|