@alfadocs/ui-kit 0.37.0 → 0.39.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/Alfadocs_Logo_Mark-7o3L3WBI.js +56 -0
- package/dist/_chunks/{accordion-bSU21uTV.js → accordion-9lJSMMsZ.js} +6 -6
- package/dist/_chunks/{agenda-tray-By_asPN9.js → agenda-tray-Dyj9ChHC.js} +22 -21
- package/dist/_chunks/{alia-sidebar-BEoMl6UL.js → alia-sidebar-DXsYPinm.js} +2 -2
- package/dist/_chunks/{ar-D1RwVZFj.js → ar-Cn_NxqkN.js} +2 -2
- package/dist/_chunks/bmi-BxD-tFzU.js +32 -0
- package/dist/_chunks/bmi-calculator-DnEr513I.js +213 -0
- package/dist/_chunks/{booking-DqXsd1Mv.js → booking-4mCw3Mpl.js} +5 -5
- package/dist/_chunks/calculator-dialog-B74fqpFZ.js +40 -0
- package/dist/_chunks/{chart-DnHvmiDX.js → chart-Cbt0_sKv.js} +46 -37
- package/dist/_chunks/{chat-message-D53_fH2w.js → chat-message-ASgGtj-L.js} +30 -39
- package/dist/_chunks/{collapsible-CERONory.js → collapsible-X3oaLPU3.js} +5 -5
- package/dist/_chunks/{contact-profile-card-BA6fgS45.js → contact-profile-card-DHyuAPXM.js} +14 -13
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +185 -0
- package/dist/_chunks/{date-picker-CXFpu-qY.js → date-picker-CvQfs6Xh.js} +2 -2
- package/dist/_chunks/{date-range-picker-I-q5rifj.js → date-range-picker-U9fn1g9d.js} +3 -3
- package/dist/_chunks/{date-time-picker-CqpGPlcH.js → date-time-picker-Cva0ZCWw.js} +2 -2
- package/dist/_chunks/{de-HTQ4b4-J.js → de-BMM2H7Bs.js} +2 -2
- package/dist/_chunks/dependent-selector-CRWgieHm.js +324 -0
- package/dist/_chunks/document-scanner-CqS_klIr.js +703 -0
- package/dist/_chunks/due-date-calculator-CUspKSTw.js +171 -0
- package/dist/_chunks/{editable-currency-cell-renderer-DnjwZNZP.js → editable-currency-cell-renderer-DgkCIIcO.js} +3 -3
- package/dist/_chunks/{el-Dr1pjuDq.js → el-BYPonAaK.js} +2 -2
- package/dist/_chunks/{es-CvyTjLS0.js → es-CMkVCQ4F.js} +2 -2
- package/dist/_chunks/{file-upload-CdozCPct.js → file-upload-BosbPDb1.js} +3 -2
- package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js +540 -0
- package/dist/_chunks/{fr-CS7aqaFR.js → fr-BcuWxqft.js} +2 -2
- package/dist/_chunks/{freemium-paywall-D1N02Oam.js → freemium-paywall-BAk3a6er.js} +7 -7
- package/dist/_chunks/gestation-BXEgDGmP.js +50 -0
- package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js +165 -0
- package/dist/_chunks/header-settings-CBLwUK6t.js +244 -0
- package/dist/_chunks/heart-C0faivFf.js +20 -0
- package/dist/_chunks/{hi-3uy8KpsH.js → hi-wkq_rQAh.js} +2 -2
- package/dist/_chunks/image-C6RM5hfF.js +16 -0
- package/dist/_chunks/insert-result-yJ0QavoN.js +133 -0
- package/dist/_chunks/{isSameWeek-DRpMibi9.js → isSameWeek-Bim5ftRd.js} +2 -2
- package/dist/_chunks/{it-B_RF5VSw.js → it-GiQrQ9p4.js} +3 -3
- package/dist/_chunks/{ja-C1mEYy35.js → ja-qfYg3Rua.js} +2 -2
- package/dist/_chunks/{logo-_Z-jLq80.js → logo-yituK7sE.js} +42 -91
- package/dist/_chunks/{map-view-vD5pvWs9.js → map-view-qJLybrmN.js} +2 -2
- package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +296 -0
- package/dist/_chunks/{message-card-BbRhZkDI.js → message-card-DSPw5ghw.js} +20 -19
- package/dist/_chunks/{message-tray-B762TKuv.js → message-tray-hSQff9u4.js} +3 -3
- package/dist/_chunks/{nl-Dl7lO2t3.js → nl-xOogO4sZ.js} +2 -2
- package/dist/_chunks/{notification-card-DMdO4g54.js → notification-card-CObnGdJu.js} +22 -21
- package/dist/_chunks/{notification-tray-Dl3FTleW.js → notification-tray-BWHDIjgd.js} +2 -2
- package/dist/_chunks/{otp-input-CDTWT5EK.js → otp-input-CMphfBxZ.js} +70 -71
- package/dist/_chunks/{patient-shell-CDvMw_Nk.js → patient-shell-DF81lALv.js} +37 -36
- package/dist/_chunks/{payment-form-D5rgnZu7.js → payment-form-Dy3WIIsC.js} +18 -18
- package/dist/_chunks/{pdf-viewer-DvtEHcEP.js → pdf-viewer-Cy6Ul3hZ.js} +2 -2
- package/dist/_chunks/{pl-Dgsogljx.js → pl-GnOW6eGK.js} +3 -3
- package/dist/_chunks/{practice-results-BFM_lyUs.js → practice-results-C0d4IL5E.js} +4 -3
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +209 -0
- package/dist/_chunks/{privacy-lock-DD-wHxBg.js → privacy-lock-BmX_gkvt.js} +2 -2
- package/dist/_chunks/{pt-Dm2JF4bc.js → pt-_bV5b5RW.js} +2 -2
- package/dist/_chunks/{public-footer.agent-Cjfe5jus.js → public-footer.agent-okt8ZRc5.js} +3 -3
- package/dist/_chunks/qr-code-DNXhi6se.js +568 -0
- package/dist/_chunks/{react-day-picker-DYDdR8Vv.js → react-day-picker-CdtIiKjx.js} +24 -24
- package/dist/_chunks/{reviews-panel-Dow8Dzoa.js → reviews-panel-CPrXu5TX.js} +2 -2
- package/dist/_chunks/{rich-text-editor-CHmr9Bz8.js → rich-text-editor-DLbg2852.js} +114 -124
- package/dist/_chunks/{ro-BXFZ_xIX.js → ro-BEcyh5Nj.js} +2 -2
- package/dist/_chunks/rotate-ccw-BWANpitO.js +15 -0
- package/dist/_chunks/{ru-BPQkNRRV.js → ru-Bi86hqMf.js} +3 -3
- package/dist/_chunks/session-countdown-LPnhTHjn.js +214 -0
- package/dist/_chunks/{shield-check-BhHyReu8.js → shield-check-C73ma9Cs.js} +8 -24
- package/dist/_chunks/{sidebar-BbR8f6oe.js → sidebar-_vJXI9rB.js} +2 -2
- package/dist/_chunks/sign-document-DId1p-nn.js +315 -0
- package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js → sign-in-with-alfadocs-button-DeHBFRNS.js} +2 -2
- package/dist/_chunks/{signature-capture-C-fF71xI.js → signature-capture-BRzCklg4.js} +27 -24
- package/dist/_chunks/social-sign-in-button-X54ySJr1.js +243 -0
- package/dist/_chunks/{sparkline-DEROcSl0.js → sparkline-DGhCSw8M.js} +55 -46
- package/dist/_chunks/{sq-ChTlGFcJ.js → sq-BujHSAWu.js} +2 -2
- package/dist/_chunks/{stepper-accordion-BfS6lUB9.js → stepper-accordion-Dki6r9ZE.js} +2 -2
- package/dist/_chunks/subDays-_T9YeKPX.js +8 -0
- package/dist/_chunks/{sv-Do_gs6ir.js → sv-C8AeDrTA.js} +2 -2
- package/dist/_chunks/{tag-CyoaEmf_.js → tag-CdA0s_VV.js} +16 -16
- package/dist/_chunks/{task-card-BUVMh6HN.js → task-card-CPyQ5AXC.js} +6 -5
- package/dist/_chunks/{task-tray-DRK0b0Qb.js → task-tray-B8jFv5FV.js} +36 -35
- package/dist/_chunks/{tr-da_UnkYH.js → tr-CMSs_Vgf.js} +2 -2
- package/dist/_chunks/{transcript-panel-DyhTpAP7.js → transcript-panel-CR7VY1uw.js} +8 -7
- package/dist/_chunks/unit-converter-EUwO6QYq.js +168 -0
- package/dist/_chunks/wallet-pay-button-DK4ESYge.js +250 -0
- package/dist/_chunks/{warning-stack-bDicCvxs.js → warning-stack-DNR3-IbP.js} +17 -16
- package/dist/_chunks/{workflow-map-uSiHbOWQ.js → workflow-map-C3gB0FvB.js} +3 -2
- package/dist/_chunks/{zh-CN-C9qi5oak.js → zh-CN-eXB-PFu4.js} +3 -3
- package/dist/agent-catalog.json +241 -1
- package/dist/brand/provider-marks/apple-pay.d.ts +12 -0
- package/dist/brand/provider-marks/apple.d.ts +12 -0
- package/dist/brand/provider-marks/google-pay.d.ts +12 -0
- package/dist/brand/provider-marks/google.d.ts +13 -0
- package/dist/components/_shared/insert-result.d.ts +47 -0
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +3 -0
- package/dist/components/bmi-calculator/index.js +6 -5
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/calculator-dialog.d.ts +26 -0
- package/dist/components/calculator-dialog/index.d.ts +3 -0
- package/dist/components/calculator-dialog/index.js +5 -0
- package/dist/components/chart/chart.d.ts +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +21 -0
- package/dist/components/cycle-calculator/cycle.d.ts +37 -0
- package/dist/components/cycle-calculator/index.d.ts +4 -0
- package/dist/components/cycle-calculator/index.js +7 -0
- 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/dependent-selector/dependent-selector.agent.d.ts +4 -0
- package/dist/components/dependent-selector/dependent-selector.d.ts +72 -0
- package/dist/components/dependent-selector/index.d.ts +4 -0
- package/dist/components/dependent-selector/index.js +6 -0
- package/dist/components/document-scanner/document-scanner.agent.d.ts +4 -0
- package/dist/components/document-scanner/document-scanner.d.ts +93 -0
- package/dist/components/document-scanner/index.d.ts +4 -0
- package/dist/components/document-scanner/index.js +6 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +3 -0
- package/dist/components/due-date-calculator/gestation.d.ts +16 -0
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +10 -7
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts +24 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts +4 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +61 -0
- package/dist/components/fiscal-code-input/index.d.ts +6 -0
- package/dist/components/fiscal-code-input/index.js +11 -0
- package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +21 -0
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +27 -0
- package/dist/components/gestational-age-calculator/index.d.ts +3 -0
- package/dist/components/gestational-age-calculator/index.js +5 -0
- package/dist/components/header-settings/header-settings.agent.d.ts +4 -0
- package/dist/components/header-settings/header-settings.d.ts +36 -0
- package/dist/components/header-settings/index.d.ts +2 -0
- package/dist/components/header-settings/index.js +2 -241
- package/dist/components/index.d.ts +14 -0
- package/dist/components/locale-picker/locale-picker.agent.d.ts +4 -0
- package/dist/components/locale-picker/locale-picker.d.ts +80 -0
- package/dist/components/logo/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/otp-input/index.d.ts +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/index.js +9 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +19 -0
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +41 -0
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/qr-code/index.d.ts +5 -0
- package/dist/components/qr-code/index.js +8 -0
- package/dist/components/qr-code/qr-code.agent.d.ts +3 -0
- package/dist/components/qr-code/qr-code.d.ts +59 -0
- package/dist/components/qr-code/qr-encode.d.ts +46 -0
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.d.ts +4 -0
- package/dist/components/session-countdown/index.js +6 -0
- package/dist/components/session-countdown/session-countdown.agent.d.ts +3 -0
- package/dist/components/session-countdown/session-countdown.d.ts +38 -0
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.d.ts +4 -0
- package/dist/components/sign-document/index.js +6 -0
- package/dist/components/sign-document/sign-document.agent.d.ts +4 -0
- package/dist/components/sign-document/sign-document.d.ts +47 -0
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/social-sign-in-button/index.d.ts +3 -0
- package/dist/components/social-sign-in-button/index.js +5 -0
- package/dist/components/social-sign-in-button/social-sign-in-button.d.ts +56 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.d.ts +4 -0
- package/dist/components/unit-converter/index.js +9 -0
- package/dist/components/unit-converter/unit-converter.d.ts +21 -0
- package/dist/components/unit-converter/units.d.ts +18 -0
- package/dist/components/wallet-pay-button/index.d.ts +3 -0
- package/dist/components/wallet-pay-button/index.js +5 -0
- package/dist/components/wallet-pay-button/wallet-pay-button.d.ts +63 -0
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locale-meta.d.ts +56 -0
- package/dist/i18n/locales/ar.d.ts +274 -0
- package/dist/i18n/locales/ar.js +271 -0
- package/dist/i18n/locales/de.d.ts +274 -0
- package/dist/i18n/locales/de.js +271 -0
- package/dist/i18n/locales/el.d.ts +274 -0
- package/dist/i18n/locales/el.js +271 -0
- package/dist/i18n/locales/en.d.ts +274 -0
- package/dist/i18n/locales/en.js +274 -0
- package/dist/i18n/locales/es.d.ts +274 -0
- package/dist/i18n/locales/es.js +271 -0
- package/dist/i18n/locales/fr.d.ts +274 -0
- package/dist/i18n/locales/fr.js +271 -0
- package/dist/i18n/locales/hi.d.ts +274 -0
- package/dist/i18n/locales/hi.js +271 -0
- package/dist/i18n/locales/it.d.ts +274 -0
- package/dist/i18n/locales/it.js +271 -0
- package/dist/i18n/locales/ja.d.ts +274 -0
- package/dist/i18n/locales/ja.js +267 -0
- package/dist/i18n/locales/nl.d.ts +274 -0
- package/dist/i18n/locales/nl.js +271 -0
- package/dist/i18n/locales/pl.d.ts +274 -0
- package/dist/i18n/locales/pl.js +271 -0
- package/dist/i18n/locales/pt.d.ts +274 -0
- package/dist/i18n/locales/pt.js +274 -0
- package/dist/i18n/locales/ro.d.ts +274 -0
- package/dist/i18n/locales/ro.js +271 -0
- package/dist/i18n/locales/ru.d.ts +274 -0
- package/dist/i18n/locales/ru.js +271 -0
- package/dist/i18n/locales/sq.d.ts +274 -0
- package/dist/i18n/locales/sq.js +271 -0
- package/dist/i18n/locales/sv.d.ts +274 -0
- package/dist/i18n/locales/sv.js +271 -0
- package/dist/i18n/locales/tr.d.ts +274 -0
- package/dist/i18n/locales/tr.js +271 -0
- package/dist/i18n/locales/zh.d.ts +274 -0
- package/dist/i18n/locales/zh.js +267 -0
- package/dist/index.js +590 -535
- package/dist/locales/ar.json +274 -0
- package/dist/locales/de.json +274 -0
- package/dist/locales/el.json +274 -0
- package/dist/locales/en.json +274 -0
- package/dist/locales/es.json +274 -0
- package/dist/locales/fr.json +274 -0
- package/dist/locales/hi.json +274 -0
- package/dist/locales/it.json +274 -0
- package/dist/locales/ja.json +274 -0
- package/dist/locales/nl.json +274 -0
- package/dist/locales/pl.json +274 -0
- package/dist/locales/pt.json +274 -0
- package/dist/locales/ro.json +274 -0
- package/dist/locales/ru.json +274 -0
- package/dist/locales/sq.json +274 -0
- package/dist/locales/sv.json +274 -0
- package/dist/locales/tr.json +274 -0
- package/dist/locales/zh.json +274 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +12 -8
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +53 -1
- package/dist/_chunks/bmi-calculator-DQD5_nE-.js +0 -214
- package/dist/_chunks/due-date-calculator-kf9U_g7O.js +0 -173
- package/dist/_chunks/marketplace-app-shell-DXHxy9dj.js +0 -295
- package/dist/_chunks/subDays-D-WYRpdW.js +0 -8
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, useState as p, useMemo as m, useEffect as $ } from "react";
|
|
3
|
+
import { c as G } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as L } from "react-i18next";
|
|
5
|
+
import { R as f } from "./radio-TWf9Q-mp.js";
|
|
6
|
+
import { R as T } from "./radio-group-BcF92GEF.js";
|
|
7
|
+
import { F as S } from "./form-field-BOm9hK35.js";
|
|
8
|
+
import { D as k } from "./date-picker-CvQfs6Xh.js";
|
|
9
|
+
import { B as h } from "./badge-zsf5i5bH.js";
|
|
10
|
+
import { I as E } from "./insert-result-yJ0QavoN.js";
|
|
11
|
+
import { c as F, g as B, G as I } from "./gestation-BXEgDGmP.js";
|
|
12
|
+
import { s as M } from "./subDays-_T9YeKPX.js";
|
|
13
|
+
import { i as j } from "./react-day-picker-CdtIiKjx.js";
|
|
14
|
+
const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
15
|
+
variants: {
|
|
16
|
+
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { width: "full" }
|
|
19
|
+
}), V = {
|
|
20
|
+
preconception: "neutral",
|
|
21
|
+
first: "info",
|
|
22
|
+
second: "success",
|
|
23
|
+
third: "warning",
|
|
24
|
+
postterm: "error"
|
|
25
|
+
}, z = w(
|
|
26
|
+
({ defaultMethod: x = "lmp", onResultChange: d, onInsert: g, id: A, width: v, className: b }, y) => {
|
|
27
|
+
const { t: e, i18n: u } = L(), [o, C] = p(x), [i, N] = p(void 0), n = m(() => /* @__PURE__ */ new Date(), []), t = m(() => {
|
|
28
|
+
if (!i) return null;
|
|
29
|
+
const l = o === "lmp" ? i : M(i, I), r = F({ method: "lmp", date: l }, n);
|
|
30
|
+
return {
|
|
31
|
+
result: {
|
|
32
|
+
gestationalAge: r.gestationalAge,
|
|
33
|
+
trimester: r.trimester,
|
|
34
|
+
dueDate: r.dueDate
|
|
35
|
+
},
|
|
36
|
+
milestones: B(r.gestationalStart)
|
|
37
|
+
};
|
|
38
|
+
}, [o, i, n]), D = m(
|
|
39
|
+
() => new Intl.DateTimeFormat(u.language, { dateStyle: "medium" }),
|
|
40
|
+
[u.language]
|
|
41
|
+
);
|
|
42
|
+
$(() => {
|
|
43
|
+
d == null || d((t == null ? void 0 : t.result) ?? null);
|
|
44
|
+
}, [t, d]);
|
|
45
|
+
const c = (l) => l ? e("gestationalAgeCalculator.gestation", {
|
|
46
|
+
weeks: l.weeks,
|
|
47
|
+
days: l.days
|
|
48
|
+
}) : "—";
|
|
49
|
+
return /* @__PURE__ */ s(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
ref: y,
|
|
53
|
+
"data-component": "gestational-age-calculator",
|
|
54
|
+
"data-component-id": A,
|
|
55
|
+
className: R({ width: v, className: b }),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ s(
|
|
58
|
+
T,
|
|
59
|
+
{
|
|
60
|
+
label: e("gestationalAgeCalculator.method.label"),
|
|
61
|
+
variant: "horizontal",
|
|
62
|
+
value: o,
|
|
63
|
+
onValueChange: (l) => C(l),
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ a(f, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
|
|
66
|
+
/* @__PURE__ */ a(f, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ a(
|
|
71
|
+
S,
|
|
72
|
+
{
|
|
73
|
+
label: e(
|
|
74
|
+
o === "lmp" ? "gestationalAgeCalculator.lmpDate" : "gestationalAgeCalculator.eddDate"
|
|
75
|
+
),
|
|
76
|
+
children: /* @__PURE__ */ a(
|
|
77
|
+
k,
|
|
78
|
+
{
|
|
79
|
+
value: i,
|
|
80
|
+
onChange: N,
|
|
81
|
+
maxDate: o === "lmp" ? n : void 0
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ a("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t ? `${e("gestationalAgeCalculator.gestationLabel")}: ${c(
|
|
87
|
+
t.result.gestationalAge
|
|
88
|
+
)}. ${e("gestationalAgeCalculator.trimesterLabel")}: ${e(
|
|
89
|
+
`gestationalAgeCalculator.trimester.${t.result.trimester}`
|
|
90
|
+
)}.` : "" }),
|
|
91
|
+
t ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
92
|
+
/* @__PURE__ */ s("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
93
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
94
|
+
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.trimesterLabel") }),
|
|
95
|
+
/* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
|
|
96
|
+
h,
|
|
97
|
+
{
|
|
98
|
+
variant: V[t.result.trimester],
|
|
99
|
+
size: "lg",
|
|
100
|
+
children: e(
|
|
101
|
+
`gestationalAgeCalculator.trimester.${t.result.trimester}`
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
) })
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
|
|
107
|
+
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.gestationLabel") }),
|
|
108
|
+
/* @__PURE__ */ a("dd", { className: "type-metric ds:text-foreground", children: c(t.result.gestationalAge) })
|
|
109
|
+
] })
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
112
|
+
/* @__PURE__ */ a("span", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.milestonesLabel") }),
|
|
113
|
+
/* @__PURE__ */ a("ul", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: t.milestones.map((l) => {
|
|
114
|
+
const r = j(n, l.date);
|
|
115
|
+
return /* @__PURE__ */ s(
|
|
116
|
+
"li",
|
|
117
|
+
{
|
|
118
|
+
className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]",
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ a("span", { className: "type-body ds:text-foreground", children: e(`gestationalAgeCalculator.milestone.${l.key}`) }),
|
|
121
|
+
/* @__PURE__ */ s("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
122
|
+
/* @__PURE__ */ a("span", { className: "type-body ds:text-muted-foreground", children: D.format(l.date) }),
|
|
123
|
+
r ? /* @__PURE__ */ a(h, { variant: "success", children: e("gestationalAgeCalculator.reached") }) : null
|
|
124
|
+
] })
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
l.key
|
|
128
|
+
);
|
|
129
|
+
}) })
|
|
130
|
+
] }),
|
|
131
|
+
g ? /* @__PURE__ */ a(
|
|
132
|
+
E,
|
|
133
|
+
{
|
|
134
|
+
onInsert: g,
|
|
135
|
+
card: {
|
|
136
|
+
title: e("insert.title.gestationalAge"),
|
|
137
|
+
highlight: e(
|
|
138
|
+
`gestationalAgeCalculator.trimester.${t.result.trimester}`
|
|
139
|
+
),
|
|
140
|
+
fields: [
|
|
141
|
+
{
|
|
142
|
+
label: e("gestationalAgeCalculator.gestationLabel"),
|
|
143
|
+
value: c(t.result.gestationalAge)
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: e("gestationalAgeCalculator.trimesterLabel"),
|
|
147
|
+
value: e(
|
|
148
|
+
`gestationalAgeCalculator.trimester.${t.result.trimester}`
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
) : null
|
|
155
|
+
] }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("gestationalAgeCalculator.empty") })
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
z.displayName = "GestationalAgeCalculator";
|
|
162
|
+
export {
|
|
163
|
+
z as G
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=gestational-age-calculator-CsQ05qDy.js.map
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as A, useRef as p, useImperativeHandle as C, useCallback as x, useMemo as I } from "react";
|
|
3
|
+
import { c as N } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as E } from "react-i18next";
|
|
5
|
+
import { I as o } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { I as M } from "./icon-button-group-C48khLE0.js";
|
|
7
|
+
import { D as r } from "./dropdown-menu-BC5ZdOMo.js";
|
|
8
|
+
import { S as R } from "./switch-BJ6HD3Mn.js";
|
|
9
|
+
import { c as v, a as H, L as _ } from "./locale-picker-D99UyZVJ.js";
|
|
10
|
+
import { u as O } from "./use-locale-BkCIHujH.js";
|
|
11
|
+
import { u as P } from "./use-theme-C2dHKUAN.js";
|
|
12
|
+
import { u as j } from "./registry-nPAVE19X.js";
|
|
13
|
+
import { S as K } from "./settings-ca2Yi9R8.js";
|
|
14
|
+
import { S as D, M as z } from "./sun-BuXE0xUS.js";
|
|
15
|
+
import { M as V } from "./monitor-D-SFdbrU.js";
|
|
16
|
+
const B = {
|
|
17
|
+
id: "header-settings",
|
|
18
|
+
capabilities: ["view_change"],
|
|
19
|
+
state: {},
|
|
20
|
+
actions: {
|
|
21
|
+
set_locale: {
|
|
22
|
+
safety: "write",
|
|
23
|
+
argsType: "{ locale: string }",
|
|
24
|
+
descriptionKey: "ui.agent.headerSettings.actions.setLocale",
|
|
25
|
+
description: "Switch the active locale to the given IETF tag.",
|
|
26
|
+
invoke: (t, i) => {
|
|
27
|
+
t.setLocale(i.locale);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
set_theme: {
|
|
31
|
+
safety: "write",
|
|
32
|
+
argsType: '{ theme: "light" | "dark" | "system" }',
|
|
33
|
+
descriptionKey: "ui.agent.headerSettings.actions.setTheme",
|
|
34
|
+
description: "Switch the theme preference.",
|
|
35
|
+
invoke: (t, i) => {
|
|
36
|
+
t.setTheme(i.theme);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
set_accessibility: {
|
|
40
|
+
safety: "write",
|
|
41
|
+
argsType: '{ accessibility: "default" | "accessible" }',
|
|
42
|
+
descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
|
|
43
|
+
description: "Switch the accessibility preference.",
|
|
44
|
+
invoke: (t, i) => {
|
|
45
|
+
t.setAccessibility(i.accessibility);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
domHooks: {
|
|
50
|
+
root: {
|
|
51
|
+
attr: "data-component",
|
|
52
|
+
value: "header-settings",
|
|
53
|
+
description: "Marks the HeaderSettings wrapper."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
function G(t, i) {
|
|
58
|
+
if (!(typeof window > "u"))
|
|
59
|
+
try {
|
|
60
|
+
window.localStorage.setItem(t, i);
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function W(t) {
|
|
65
|
+
if (typeof document > "u") return;
|
|
66
|
+
const i = document.documentElement;
|
|
67
|
+
i.lang = t, i.dir = v[t].dir;
|
|
68
|
+
}
|
|
69
|
+
const F = N("ds:inline-flex ds:items-center", {
|
|
70
|
+
variants: {
|
|
71
|
+
align: {
|
|
72
|
+
start: "",
|
|
73
|
+
end: ""
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
defaultVariants: { align: "end" }
|
|
77
|
+
}), U = [
|
|
78
|
+
"ds:w-[20rem] ds:p-[var(--spacing-xs)]",
|
|
79
|
+
"ds:rounded-[var(--radius-md)] ds:border ds:border-border",
|
|
80
|
+
"ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]"
|
|
81
|
+
].join(" "), Y = A(
|
|
82
|
+
(t, i) => {
|
|
83
|
+
const {
|
|
84
|
+
align: g = "end",
|
|
85
|
+
size: y = "md",
|
|
86
|
+
disabled: S = !1,
|
|
87
|
+
className: w,
|
|
88
|
+
id: m,
|
|
89
|
+
...L
|
|
90
|
+
} = t, { t: s } = E(), n = P(), { setLocale: h } = O(), u = p(null);
|
|
91
|
+
C(i, () => u.current, []);
|
|
92
|
+
const f = x(
|
|
93
|
+
(a) => {
|
|
94
|
+
h(a), W(a), G(_, a);
|
|
95
|
+
},
|
|
96
|
+
[h]
|
|
97
|
+
), b = p(f);
|
|
98
|
+
b.current = f;
|
|
99
|
+
const c = p(n);
|
|
100
|
+
c.current = n;
|
|
101
|
+
const k = I(
|
|
102
|
+
() => ({
|
|
103
|
+
setLocale: (a) => {
|
|
104
|
+
Object.prototype.hasOwnProperty.call(v, a) && b.current(a);
|
|
105
|
+
},
|
|
106
|
+
setTheme: (a) => c.current.setTheme(a),
|
|
107
|
+
setAccessibility: (a) => c.current.setAccessibility(a)
|
|
108
|
+
}),
|
|
109
|
+
[]
|
|
110
|
+
);
|
|
111
|
+
j(B, k, m);
|
|
112
|
+
const T = n.accessibility === "accessible";
|
|
113
|
+
return /* @__PURE__ */ e(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
ref: u,
|
|
117
|
+
"data-component": "header-settings",
|
|
118
|
+
"data-component-id": m,
|
|
119
|
+
className: F({ align: g, className: w }),
|
|
120
|
+
...L,
|
|
121
|
+
children: /* @__PURE__ */ l(r.Root, { children: [
|
|
122
|
+
/* @__PURE__ */ e(r.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
123
|
+
o,
|
|
124
|
+
{
|
|
125
|
+
size: y,
|
|
126
|
+
disabled: S,
|
|
127
|
+
icon: /* @__PURE__ */ e(K, { "aria-hidden": !0 }),
|
|
128
|
+
"aria-label": s("navigation.headerSettings.trigger")
|
|
129
|
+
}
|
|
130
|
+
) }),
|
|
131
|
+
/* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ l(
|
|
132
|
+
r.Content,
|
|
133
|
+
{
|
|
134
|
+
align: g,
|
|
135
|
+
sideOffset: 8,
|
|
136
|
+
className: U,
|
|
137
|
+
onKeyDownCapture: (a) => {
|
|
138
|
+
const d = a.target;
|
|
139
|
+
(d == null ? void 0 : d.tagName) === "INPUT" && // Always allow Escape so the menu can close.
|
|
140
|
+
a.key !== "Escape" && a.stopPropagation();
|
|
141
|
+
},
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.language.label") }),
|
|
144
|
+
/* @__PURE__ */ e(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
role: "group",
|
|
148
|
+
"aria-label": s("navigation.headerSettings.language.label"),
|
|
149
|
+
className: [
|
|
150
|
+
"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
151
|
+
// Stretch the compact LocalePicker to the full menu
|
|
152
|
+
// width so it reads as a single row affordance (not
|
|
153
|
+
// a centred pill). The picker's root is
|
|
154
|
+
// inline-flex; the `*:` child selector + `flex-1`
|
|
155
|
+
// gives it `flex: 1 1 0%` once it's a child of the
|
|
156
|
+
// flex container we make this div into.
|
|
157
|
+
"ds:flex ds:[&>*]:flex-1"
|
|
158
|
+
].join(" "),
|
|
159
|
+
children: /* @__PURE__ */ e(H, { variant: "compact", popoverSide: "end" })
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ e(r.Separator, {}),
|
|
163
|
+
/* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.appearance.label") }),
|
|
164
|
+
/* @__PURE__ */ e(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
role: "group",
|
|
168
|
+
"aria-label": s("navigation.headerSettings.appearance.label"),
|
|
169
|
+
className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
170
|
+
children: /* @__PURE__ */ l(
|
|
171
|
+
M,
|
|
172
|
+
{
|
|
173
|
+
role: "radiogroup",
|
|
174
|
+
mode: "toggle-single",
|
|
175
|
+
size: "sm",
|
|
176
|
+
"aria-label": s("navigation.headerSettings.appearance.label"),
|
|
177
|
+
value: n.theme,
|
|
178
|
+
onValueChange: (a) => n.setTheme(a),
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ e(
|
|
181
|
+
o,
|
|
182
|
+
{
|
|
183
|
+
icon: /* @__PURE__ */ e(D, { "aria-hidden": !0 }),
|
|
184
|
+
"aria-label": s("navigation.headerSettings.appearance.light"),
|
|
185
|
+
value: "light"
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ e(
|
|
189
|
+
o,
|
|
190
|
+
{
|
|
191
|
+
icon: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
|
|
192
|
+
"aria-label": s("navigation.headerSettings.appearance.dark"),
|
|
193
|
+
value: "dark"
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ e(
|
|
197
|
+
o,
|
|
198
|
+
{
|
|
199
|
+
icon: /* @__PURE__ */ e(V, { "aria-hidden": !0 }),
|
|
200
|
+
"aria-label": s(
|
|
201
|
+
"navigation.headerSettings.appearance.system"
|
|
202
|
+
),
|
|
203
|
+
value: "system"
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ e(r.Separator, {}),
|
|
212
|
+
/* @__PURE__ */ e(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
role: "group",
|
|
216
|
+
"aria-label": s(
|
|
217
|
+
"navigation.headerSettings.appearance.accessible"
|
|
218
|
+
),
|
|
219
|
+
className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
|
|
220
|
+
children: /* @__PURE__ */ e(
|
|
221
|
+
R,
|
|
222
|
+
{
|
|
223
|
+
label: s("navigation.headerSettings.appearance.accessible"),
|
|
224
|
+
labelSide: "start",
|
|
225
|
+
size: "sm",
|
|
226
|
+
checked: T,
|
|
227
|
+
onCheckedChange: (a) => n.setAccessibility(a ? "accessible" : "default")
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
) })
|
|
235
|
+
] })
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
Y.displayName = "HeaderSettings";
|
|
241
|
+
export {
|
|
242
|
+
Y as H
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=header-settings-CBLwUK6t.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { c as a } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const c = [
|
|
9
|
+
[
|
|
10
|
+
"path",
|
|
11
|
+
{
|
|
12
|
+
d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
|
|
13
|
+
key: "mvr1a0"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
], o = a("heart", c);
|
|
17
|
+
export {
|
|
18
|
+
o as H
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=heart-C0faivFf.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as o, o as s, r, v as u } from "./react-day-picker-
|
|
1
|
+
import { q as o, o as s, r, v as u } from "./react-day-picker-CdtIiKjx.js";
|
|
2
2
|
const d = {
|
|
3
3
|
locale: {
|
|
4
4
|
1: "१",
|
|
@@ -430,4 +430,4 @@ const y = {
|
|
|
430
430
|
export {
|
|
431
431
|
H as hi
|
|
432
432
|
};
|
|
433
|
-
//# sourceMappingURL=hi-
|
|
433
|
+
//# sourceMappingURL=hi-wkq_rQAh.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { c as e } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const c = [
|
|
9
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
10
|
+
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
11
|
+
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
12
|
+
], a = e("image", c);
|
|
13
|
+
export {
|
|
14
|
+
a as I
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=image-C6RM5hfF.js.map
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { jsxs as p, Fragment as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as v } from "react";
|
|
3
|
+
import { useTranslation as w } from "react-i18next";
|
|
4
|
+
import { B as I } from "./button-DD_0Xdmr.js";
|
|
5
|
+
import { D as c } from "./dropdown-menu-BC5ZdOMo.js";
|
|
6
|
+
import { C as D } from "./chevron-down-BX_NP2Yh.js";
|
|
7
|
+
import { c as Y } from "./createLucideIcon-CrFbzy84.js";
|
|
8
|
+
import { I as A } from "./image-C6RM5hfF.js";
|
|
9
|
+
import { C as P } from "./copy-B00HK7tj.js";
|
|
10
|
+
/**
|
|
11
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
const R = [
|
|
17
|
+
["path", { d: "M12 4v16", key: "1654pz" }],
|
|
18
|
+
["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2", key: "e0r10z" }],
|
|
19
|
+
["path", { d: "M9 20h6", key: "s66wpe" }]
|
|
20
|
+
], S = Y("type", R), z = ["fg", "muted", "accent", "border", "bg"];
|
|
21
|
+
function B(t) {
|
|
22
|
+
const e = {
|
|
23
|
+
fg: "currentColor",
|
|
24
|
+
muted: "currentColor",
|
|
25
|
+
accent: "currentColor",
|
|
26
|
+
border: "currentColor",
|
|
27
|
+
bg: "transparent",
|
|
28
|
+
font: "sans-serif"
|
|
29
|
+
};
|
|
30
|
+
if (!t) return e;
|
|
31
|
+
const o = (i) => {
|
|
32
|
+
const s = t.querySelector(`[data-k="${i}"]`);
|
|
33
|
+
return s && getComputedStyle(s).color || "currentColor";
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
fg: o("fg"),
|
|
37
|
+
muted: o("muted"),
|
|
38
|
+
accent: o("accent"),
|
|
39
|
+
border: o("border"),
|
|
40
|
+
bg: o("bg"),
|
|
41
|
+
font: getComputedStyle(t).fontFamily || "sans-serif"
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const l = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
45
|
+
function j(t) {
|
|
46
|
+
const e = [t.title];
|
|
47
|
+
t.highlight && e.push(t.highlight);
|
|
48
|
+
for (const o of t.fields) e.push(`• ${o.label}: ${o.value}`);
|
|
49
|
+
return e.join(`
|
|
50
|
+
`);
|
|
51
|
+
}
|
|
52
|
+
function T(t) {
|
|
53
|
+
const e = t.fields.map((i) => `<li>${l(i.label)}: ${l(i.value)}</li>`).join(""), o = t.highlight ? `<p><strong>${l(t.highlight)}</strong></p>` : "";
|
|
54
|
+
return `<p><strong>${l(t.title)}</strong></p>${o}<ul>${e}</ul>`;
|
|
55
|
+
}
|
|
56
|
+
function E(t, e) {
|
|
57
|
+
const a = !!t.highlight, n = 62, h = (a ? n : 38) + 28, u = 22, f = h + t.fields.length * u + 8, g = f + 20, d = l(e.font), x = t.fields.map(($, b) => `<text x="20" y="${h + b * u}" font-family="${d}" font-size="13"><tspan fill="${e.muted}">${l(
|
|
58
|
+
$.label
|
|
59
|
+
)}: </tspan><tspan fill="${e.fg}">${l($.value)}</tspan></text>`).join(""), y = a ? `<text x="20" y="${n}" font-family="${d}" font-size="14" font-weight="600" fill="${e.accent}">${l(
|
|
60
|
+
t.highlight
|
|
61
|
+
)}</text>` : "";
|
|
62
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="380" height="${g}" viewBox="0 0 380 ${g}" role="img" aria-label="${l(
|
|
63
|
+
t.title
|
|
64
|
+
)}"><rect x="0.5" y="0.5" width="379" height="${g - 1}" rx="12" fill="${e.bg}" stroke="${e.border}"/><text x="20" y="38" font-family="${d}" font-size="16" font-weight="700" fill="${e.fg}">${l(
|
|
65
|
+
t.title
|
|
66
|
+
)}</text>${y}${x}<text x="20" y="${f}" font-family="${d}" font-size="10" fill="${e.muted}">AlfaDocs</text></svg>`;
|
|
67
|
+
}
|
|
68
|
+
function L({
|
|
69
|
+
card: t,
|
|
70
|
+
onInsert: e,
|
|
71
|
+
size: o = "sm"
|
|
72
|
+
}) {
|
|
73
|
+
const { t: i } = w(), s = v(null), a = (n) => {
|
|
74
|
+
const h = j(t), u = T(t);
|
|
75
|
+
let m = "", f = "";
|
|
76
|
+
if (n !== "text") {
|
|
77
|
+
const g = B(s.current);
|
|
78
|
+
m = E(t, g), f = `data:image/svg+xml,${encodeURIComponent(m)}`;
|
|
79
|
+
}
|
|
80
|
+
e({ mode: n, text: h, html: u, svg: m, imageDataUri: f });
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ p(C, { children: [
|
|
83
|
+
/* @__PURE__ */ r("span", { ref: s, "aria-hidden": !0, className: "ds:sr-only", children: z.map((n) => /* @__PURE__ */ r(
|
|
84
|
+
"span",
|
|
85
|
+
{
|
|
86
|
+
"data-k": n,
|
|
87
|
+
className: n === "fg" ? "ds:text-foreground" : n === "muted" ? "ds:text-muted-foreground" : n === "accent" ? "ds:text-[color:var(--primary)]" : n === "border" ? "ds:text-[color:var(--border)]" : "ds:text-[color:var(--card)]"
|
|
88
|
+
},
|
|
89
|
+
n
|
|
90
|
+
)) }),
|
|
91
|
+
/* @__PURE__ */ p(c.Root, { children: [
|
|
92
|
+
/* @__PURE__ */ r(c.Trigger, { asChild: !0, children: /* @__PURE__ */ r(
|
|
93
|
+
I,
|
|
94
|
+
{
|
|
95
|
+
intent: "outline",
|
|
96
|
+
size: o,
|
|
97
|
+
endIcon: /* @__PURE__ */ r(D, { "aria-hidden": !0 }),
|
|
98
|
+
children: i("insert.button")
|
|
99
|
+
}
|
|
100
|
+
) }),
|
|
101
|
+
/* @__PURE__ */ p(c.Content, { children: [
|
|
102
|
+
/* @__PURE__ */ r(
|
|
103
|
+
c.Item,
|
|
104
|
+
{
|
|
105
|
+
startIcon: /* @__PURE__ */ r(S, { "aria-hidden": !0 }),
|
|
106
|
+
onSelect: () => a("text"),
|
|
107
|
+
children: i("insert.text")
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ r(
|
|
111
|
+
c.Item,
|
|
112
|
+
{
|
|
113
|
+
startIcon: /* @__PURE__ */ r(A, { "aria-hidden": !0 }),
|
|
114
|
+
onSelect: () => a("image"),
|
|
115
|
+
children: i("insert.image")
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ r(
|
|
119
|
+
c.Item,
|
|
120
|
+
{
|
|
121
|
+
startIcon: /* @__PURE__ */ r(P, { "aria-hidden": !0 }),
|
|
122
|
+
onSelect: () => a("text-image"),
|
|
123
|
+
children: i("insert.textImage")
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] })
|
|
127
|
+
] })
|
|
128
|
+
] });
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
L as I
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=insert-result-yJ0QavoN.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as l } from "./isSameDay-DUEiAT0G.js";
|
|
2
|
-
import { s as r } from "./react-day-picker-
|
|
2
|
+
import { s as r } from "./react-day-picker-CdtIiKjx.js";
|
|
3
3
|
function i(a, m, e) {
|
|
4
4
|
const [t, f] = l(
|
|
5
5
|
e == null ? void 0 : e.in,
|
|
@@ -11,4 +11,4 @@ function i(a, m, e) {
|
|
|
11
11
|
export {
|
|
12
12
|
i
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=isSameWeek-
|
|
14
|
+
//# sourceMappingURL=isSameWeek-Bim5ftRd.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as s, q as i, r, v as l } from "./react-day-picker-
|
|
2
|
-
import { i as d } from "./isSameWeek-
|
|
1
|
+
import { o as s, q as i, r, v as l } from "./react-day-picker-CdtIiKjx.js";
|
|
2
|
+
import { i as d } from "./isSameWeek-Bim5ftRd.js";
|
|
3
3
|
const c = {
|
|
4
4
|
lessThanXSeconds: {
|
|
5
5
|
one: "meno di un secondo",
|
|
@@ -398,4 +398,4 @@ const P = {
|
|
|
398
398
|
export {
|
|
399
399
|
I as it
|
|
400
400
|
};
|
|
401
|
-
//# sourceMappingURL=it-
|
|
401
|
+
//# sourceMappingURL=it-GiQrQ9p4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as s, q as o, r as i, v as d } from "./react-day-picker-
|
|
1
|
+
import { o as s, q as o, r as i, v as d } from "./react-day-picker-CdtIiKjx.js";
|
|
2
2
|
const u = {
|
|
3
3
|
lessThanXSeconds: {
|
|
4
4
|
one: "1秒未満",
|
|
@@ -363,4 +363,4 @@ const u = {
|
|
|
363
363
|
export {
|
|
364
364
|
L as ja
|
|
365
365
|
};
|
|
366
|
-
//# sourceMappingURL=ja-
|
|
366
|
+
//# sourceMappingURL=ja-qfYg3Rua.js.map
|