@alfadocs/ui-kit 0.41.2 → 0.43.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/address-autocomplete-CSjMrBvu.js +358 -0
- package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
- package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
- package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
- package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
- package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
- package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
- package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
- package/dist/_chunks/cycle-calculator-Dln-y1k_.js +192 -0
- package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
- package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
- package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
- package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
- package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
- package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
- package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
- package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
- package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-Cc4dRqTI.js} +62 -41
- package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-9jqwDv5x.js} +3 -3
- package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
- package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
- package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
- package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
- package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-ZMSrzkRW.js} +59 -45
- package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
- package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
- package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
- package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
- package/dist/_chunks/insert-result-DisOY2G-.js +243 -0
- package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
- package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
- package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
- package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
- package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
- package/dist/_chunks/marketplace-app-shell-Dc5cTIt8.js +428 -0
- package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
- package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
- package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-CnT4L8gn.js} +3 -3
- package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
- package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
- package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
- package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
- package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js +224 -0
- package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
- package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
- package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
- package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
- package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
- package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
- package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
- package/dist/_chunks/sign-document-B-3k_0LO.js +344 -0
- package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
- package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
- package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
- package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
- package/dist/_chunks/tab-bar-Xetknddo.js +105 -0
- package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
- package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
- package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
- package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-CuXCXJhK.js} +46 -40
- package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
- package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
- package/dist/components/_shared/calendar-class-names.d.ts +8 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/insert-result.d.ts +78 -6
- package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
- package/dist/components/address-autocomplete/index.d.ts +4 -0
- package/dist/components/address-autocomplete/index.js +6 -0
- package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +10 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
- package/dist/components/patient-search/index.js +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.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-document/sign-document.d.ts +12 -0
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/tab-bar/index.d.ts +3 -0
- package/dist/components/tab-bar/index.js +5 -0
- package/dist/components/tab-bar/tab-bar.d.ts +104 -0
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +11 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +17 -0
- package/dist/i18n/locales/ar.js +18 -1
- package/dist/i18n/locales/de.d.ts +17 -0
- package/dist/i18n/locales/de.js +18 -1
- package/dist/i18n/locales/el.d.ts +17 -0
- package/dist/i18n/locales/el.js +18 -1
- package/dist/i18n/locales/en.d.ts +17 -0
- package/dist/i18n/locales/en.js +18 -1
- package/dist/i18n/locales/es.d.ts +17 -0
- package/dist/i18n/locales/es.js +18 -1
- package/dist/i18n/locales/fr.d.ts +17 -0
- package/dist/i18n/locales/fr.js +18 -1
- package/dist/i18n/locales/hi.d.ts +17 -0
- package/dist/i18n/locales/hi.js +18 -1
- package/dist/i18n/locales/it.d.ts +17 -0
- package/dist/i18n/locales/it.js +18 -1
- package/dist/i18n/locales/ja.d.ts +17 -0
- package/dist/i18n/locales/ja.js +18 -1
- package/dist/i18n/locales/nl.d.ts +17 -0
- package/dist/i18n/locales/nl.js +18 -1
- package/dist/i18n/locales/pl.d.ts +17 -0
- package/dist/i18n/locales/pl.js +18 -1
- package/dist/i18n/locales/pt.d.ts +17 -0
- package/dist/i18n/locales/pt.js +18 -1
- package/dist/i18n/locales/ro.d.ts +17 -0
- package/dist/i18n/locales/ro.js +18 -1
- package/dist/i18n/locales/ru.d.ts +17 -0
- package/dist/i18n/locales/ru.js +18 -1
- package/dist/i18n/locales/sq.d.ts +17 -0
- package/dist/i18n/locales/sq.js +18 -1
- package/dist/i18n/locales/sv.d.ts +17 -0
- package/dist/i18n/locales/sv.js +18 -1
- package/dist/i18n/locales/tr.d.ts +17 -0
- package/dist/i18n/locales/tr.js +18 -1
- package/dist/i18n/locales/zh.d.ts +17 -0
- package/dist/i18n/locales/zh.js +18 -1
- package/dist/index.js +605 -599
- package/dist/locales/ar.json +18 -1
- package/dist/locales/de.json +18 -1
- package/dist/locales/el.json +18 -1
- package/dist/locales/en.json +18 -1
- package/dist/locales/es.json +18 -1
- package/dist/locales/fr.json +18 -1
- package/dist/locales/hi.json +18 -1
- package/dist/locales/it.json +18 -1
- package/dist/locales/ja.json +18 -1
- package/dist/locales/nl.json +18 -1
- package/dist/locales/pl.json +18 -1
- package/dist/locales/pt.json +18 -1
- package/dist/locales/ro.json +18 -1
- package/dist/locales/ru.json +18 -1
- package/dist/locales/sq.json +18 -1
- package/dist/locales/sv.json +18 -1
- package/dist/locales/tr.json +18 -1
- package/dist/locales/zh.json +18 -1
- 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 +87 -4
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1411 -2
- package/package.json +16 -1
- package/dist/_chunks/bmi-calculator-DnEr513I.js +0 -213
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
- package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
- package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
- package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
- package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
- package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
- package/dist/_chunks/sign-document-CpLDZ6Db.js +0 -316
- package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
|
@@ -165,7 +165,7 @@ const Q = [
|
|
|
165
165
|
S.displayName = "BreadcrumbList";
|
|
166
166
|
const U = [
|
|
167
167
|
"ds:inline-flex ds:items-center",
|
|
168
|
-
"ds:max-inline-size
|
|
168
|
+
"ds:[max-inline-size:16rem]",
|
|
169
169
|
"ds:min-h-[var(--min-target-size)]",
|
|
170
170
|
"ds:py-[var(--spacing-xs)]"
|
|
171
171
|
].join(" "), N = y(
|
|
@@ -199,7 +199,7 @@ const U = [
|
|
|
199
199
|
N.displayName = "BreadcrumbItem";
|
|
200
200
|
const P = [
|
|
201
201
|
"ds:inline-flex ds:items-center",
|
|
202
|
-
"ds:max-inline-size
|
|
202
|
+
"ds:[max-inline-size:16rem]",
|
|
203
203
|
"ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap",
|
|
204
204
|
"ds:break-normal",
|
|
205
205
|
"ds:text-[var(--muted-foreground)] ds:no-underline",
|
|
@@ -211,7 +211,7 @@ const P = [
|
|
|
211
211
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]"
|
|
212
212
|
].join(" "), W = [
|
|
213
213
|
"ds:inline-flex ds:items-center",
|
|
214
|
-
"ds:max-inline-size
|
|
214
|
+
"ds:[max-inline-size:16rem]",
|
|
215
215
|
"ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap",
|
|
216
216
|
"ds:break-normal",
|
|
217
217
|
"ds:text-[var(--foreground)] ds:font-[var(--font-weight-semibold)]",
|
|
@@ -376,4 +376,4 @@ export {
|
|
|
376
376
|
T as e,
|
|
377
377
|
G as f
|
|
378
378
|
};
|
|
379
|
-
//# sourceMappingURL=breadcrumb-
|
|
379
|
+
//# sourceMappingURL=breadcrumb-OTbaY70e.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { D as r } from "./dialog-
|
|
3
|
+
import { D as r } from "./dialog-DOYgd75U.js";
|
|
4
4
|
const u = p(
|
|
5
5
|
({
|
|
6
6
|
trigger: i,
|
|
@@ -37,4 +37,4 @@ u.displayName = "CalculatorDialog";
|
|
|
37
37
|
export {
|
|
38
38
|
u as C
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=calculator-dialog-
|
|
40
|
+
//# sourceMappingURL=calculator-dialog-DdexHrTP.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as x, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as X, useId as tt, useMemo as d, useRef as et, useState as $, useEffect as k, useImperativeHandle as ot } from "react";
|
|
3
|
+
import { c as at } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as rt } from "react-i18next";
|
|
5
|
+
import nt from "react-apexcharts";
|
|
6
|
+
import G from "apexcharts";
|
|
7
|
+
import { u as st, g as H } from "./apexcharts-theme-BJigns_V.js";
|
|
8
|
+
import { u as it } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
+
import { u as ct } from "./registry-nPAVE19X.js";
|
|
10
|
+
const dt = {
|
|
11
11
|
id: "chart",
|
|
12
12
|
capabilities: [],
|
|
13
13
|
state: {},
|
|
@@ -34,7 +34,7 @@ const ct = {
|
|
|
34
34
|
description: "Sourced from the id prop."
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, lt = at("ds:relative ds:block ds:w-full", {
|
|
38
38
|
variants: {
|
|
39
39
|
density: {
|
|
40
40
|
compact: "ds:min-h-[var(--chart-min-height-compact)]",
|
|
@@ -46,65 +46,66 @@ const ct = {
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
defaultVariants: { density: "comfortable" }
|
|
49
|
-
}),
|
|
49
|
+
}), mt = [
|
|
50
50
|
"verticalLines",
|
|
51
51
|
"horizontalLines",
|
|
52
52
|
"slantedLines",
|
|
53
53
|
"squares",
|
|
54
54
|
"circles"
|
|
55
|
-
],
|
|
56
|
-
function
|
|
57
|
-
return
|
|
55
|
+
], ut = ["line", "bar", "area"], ht = ["pie", "donut", "radialBar"];
|
|
56
|
+
function R(r) {
|
|
57
|
+
return ht.includes(r);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
59
|
+
function pt(r) {
|
|
60
|
+
return ut.includes(r);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
62
|
+
function ft(r, l) {
|
|
63
|
+
return R(l) ? [
|
|
64
64
|
{
|
|
65
65
|
name: "",
|
|
66
66
|
data: r
|
|
67
67
|
}
|
|
68
68
|
] : r;
|
|
69
69
|
}
|
|
70
|
-
const
|
|
70
|
+
const bt = X(
|
|
71
71
|
({
|
|
72
72
|
title: r,
|
|
73
73
|
id: l,
|
|
74
74
|
type: o,
|
|
75
75
|
series: p,
|
|
76
|
-
categories:
|
|
77
|
-
labels:
|
|
78
|
-
height:
|
|
79
|
-
width:
|
|
80
|
-
patterns:
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
categories: g,
|
|
77
|
+
labels: v,
|
|
78
|
+
height: O,
|
|
79
|
+
width: _,
|
|
80
|
+
patterns: A = !1,
|
|
81
|
+
colors: T,
|
|
82
|
+
toolbar: S = !1,
|
|
83
|
+
locale: M,
|
|
83
84
|
radialValueFormatter: m,
|
|
84
|
-
density:
|
|
85
|
-
className:
|
|
86
|
-
},
|
|
87
|
-
const { t: a, i18n:
|
|
88
|
-
() => `chart-${
|
|
89
|
-
[
|
|
90
|
-
),
|
|
91
|
-
|
|
92
|
-
const h =
|
|
85
|
+
density: U,
|
|
86
|
+
className: D
|
|
87
|
+
}, W) => {
|
|
88
|
+
const { t: a, i18n: Y } = rt(), z = tt(), u = d(
|
|
89
|
+
() => `chart-${z.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
90
|
+
[z]
|
|
91
|
+
), y = `${u}-summary`, I = et(null), [N, Z] = $(0);
|
|
92
|
+
st(I);
|
|
93
|
+
const h = M ?? Y.language ?? "en", [B, j] = $(
|
|
93
94
|
() => {
|
|
94
95
|
try {
|
|
95
|
-
return
|
|
96
|
+
return H();
|
|
96
97
|
} catch {
|
|
97
98
|
return {};
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
);
|
|
101
|
-
|
|
102
|
+
k(() => {
|
|
102
103
|
if (typeof document > "u") return;
|
|
103
104
|
let t;
|
|
104
105
|
const e = new MutationObserver(() => {
|
|
105
106
|
clearTimeout(t), t = setTimeout(() => {
|
|
106
107
|
try {
|
|
107
|
-
|
|
108
|
+
j(H());
|
|
108
109
|
} catch {
|
|
109
110
|
}
|
|
110
111
|
}, 50);
|
|
@@ -115,36 +116,36 @@ const ft = Q(
|
|
|
115
116
|
}), () => {
|
|
116
117
|
clearTimeout(t), e.disconnect();
|
|
117
118
|
};
|
|
118
|
-
}, []),
|
|
119
|
-
const t =
|
|
119
|
+
}, []), k(() => {
|
|
120
|
+
const t = I.current;
|
|
120
121
|
if (!t || typeof ResizeObserver > "u") return;
|
|
121
122
|
const e = new ResizeObserver((n) => {
|
|
122
123
|
const s = n[0];
|
|
123
|
-
s &&
|
|
124
|
+
s && Z(Math.floor(s.contentRect.width));
|
|
124
125
|
});
|
|
125
126
|
return e.observe(t), () => e.disconnect();
|
|
126
127
|
}, []);
|
|
127
|
-
const
|
|
128
|
+
const C = d(
|
|
128
129
|
() => ({
|
|
129
130
|
async dataURI() {
|
|
130
|
-
const t =
|
|
131
|
+
const t = G.getChartByID(u);
|
|
131
132
|
return t ? (await t.dataURI()).imgURI : "";
|
|
132
133
|
},
|
|
133
134
|
updateSeries(t) {
|
|
134
|
-
const e =
|
|
135
|
-
e && (
|
|
135
|
+
const e = G.getChartByID(u);
|
|
136
|
+
e && (R(o), e.updateSeries(t));
|
|
136
137
|
}
|
|
137
138
|
}),
|
|
138
139
|
[u, o]
|
|
139
140
|
);
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
() =>
|
|
141
|
+
ot(W, () => C, [C]), ct(dt, C, l);
|
|
142
|
+
const w = typeof document < "u" && document.documentElement.dir === "rtl", E = d(
|
|
143
|
+
() => ft(p, o),
|
|
143
144
|
[p, o]
|
|
144
145
|
), f = d(
|
|
145
146
|
() => new Intl.NumberFormat(h),
|
|
146
147
|
[h]
|
|
147
|
-
),
|
|
148
|
+
), P = d(
|
|
148
149
|
() => ({
|
|
149
150
|
name: h,
|
|
150
151
|
options: {
|
|
@@ -163,24 +164,24 @@ const ft = Q(
|
|
|
163
164
|
}
|
|
164
165
|
}),
|
|
165
166
|
[h, a]
|
|
166
|
-
),
|
|
167
|
+
), L = it(), q = d(() => {
|
|
167
168
|
var n, s, b;
|
|
168
|
-
const t =
|
|
169
|
+
const t = B, e = {
|
|
169
170
|
...t,
|
|
170
171
|
chart: {
|
|
171
172
|
...t.chart,
|
|
172
173
|
id: u,
|
|
173
|
-
toolbar: { show:
|
|
174
|
-
zoom: { enabled:
|
|
174
|
+
toolbar: { show: S },
|
|
175
|
+
zoom: { enabled: S },
|
|
175
176
|
animations: {
|
|
176
|
-
enabled: !
|
|
177
|
-
dynamicAnimation: { enabled: !
|
|
177
|
+
enabled: !L,
|
|
178
|
+
dynamicAnimation: { enabled: !L }
|
|
178
179
|
},
|
|
179
|
-
locales: [
|
|
180
|
+
locales: [P],
|
|
180
181
|
defaultLocale: h,
|
|
181
182
|
parentHeightOffset: 0
|
|
182
183
|
},
|
|
183
|
-
labels:
|
|
184
|
+
labels: v,
|
|
184
185
|
legend: {
|
|
185
186
|
...t.legend,
|
|
186
187
|
position: "bottom",
|
|
@@ -188,7 +189,7 @@ const ft = Q(
|
|
|
188
189
|
// to the chart's own text flow. For RTL we flip via `yaxis.opposite`
|
|
189
190
|
// and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
|
|
190
191
|
// to the inline-start by asking for 'left' on LTR and 'right' on RTL.
|
|
191
|
-
horizontalAlign:
|
|
192
|
+
horizontalAlign: w ? "right" : "left",
|
|
192
193
|
fontFamily: "inherit"
|
|
193
194
|
},
|
|
194
195
|
tooltip: {
|
|
@@ -201,12 +202,12 @@ const ft = Q(
|
|
|
201
202
|
text: a("chart.noData")
|
|
202
203
|
}
|
|
203
204
|
};
|
|
204
|
-
if (
|
|
205
|
+
if (T && T.length > 0 && (e.colors = T), pt(o) && (e.xaxis = {
|
|
205
206
|
...t.xaxis,
|
|
206
|
-
categories:
|
|
207
|
+
categories: g ?? []
|
|
207
208
|
}, e.yaxis = {
|
|
208
209
|
...t.yaxis,
|
|
209
|
-
opposite:
|
|
210
|
+
opposite: w,
|
|
210
211
|
labels: {
|
|
211
212
|
formatter: (i) => f.format(i)
|
|
212
213
|
}
|
|
@@ -223,17 +224,17 @@ const ft = Q(
|
|
|
223
224
|
...((n = i.radialBar) == null ? void 0 : n.dataLabels) ?? {},
|
|
224
225
|
value: {
|
|
225
226
|
...((b = (s = i.radialBar) == null ? void 0 : s.dataLabels) == null ? void 0 : b.value) ?? {},
|
|
226
|
-
formatter: (
|
|
227
|
+
formatter: (Q) => m(Number(Q))
|
|
227
228
|
}
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
231
|
};
|
|
231
232
|
}
|
|
232
|
-
return
|
|
233
|
+
return A ? e.fill = {
|
|
233
234
|
type: "pattern",
|
|
234
235
|
opacity: o === "area" ? 0.3 : 1,
|
|
235
236
|
pattern: {
|
|
236
|
-
style: [...
|
|
237
|
+
style: [...mt],
|
|
237
238
|
strokeWidth: 2
|
|
238
239
|
}
|
|
239
240
|
} : o === "area" && (e.fill = {
|
|
@@ -241,69 +242,70 @@ const ft = Q(
|
|
|
241
242
|
opacity: 0.3
|
|
242
243
|
}), e;
|
|
243
244
|
}, [
|
|
244
|
-
|
|
245
|
+
B,
|
|
245
246
|
u,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
S,
|
|
248
|
+
L,
|
|
249
|
+
P,
|
|
249
250
|
h,
|
|
250
|
-
|
|
251
|
+
v,
|
|
251
252
|
f,
|
|
252
253
|
a,
|
|
253
254
|
o,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
g,
|
|
256
|
+
w,
|
|
257
|
+
A,
|
|
258
|
+
T,
|
|
257
259
|
m
|
|
258
|
-
]),
|
|
259
|
-
const t =
|
|
260
|
-
return /* @__PURE__ */
|
|
260
|
+
]), V = _ ?? (N > 0 ? N : "100%"), F = O ?? 320, J = d(() => {
|
|
261
|
+
const t = R(o) ? v ?? [] : g ?? [], e = E;
|
|
262
|
+
return /* @__PURE__ */ x("table", { id: y, className: "ds:sr-only", children: [
|
|
261
263
|
/* @__PURE__ */ c("caption", { children: r }),
|
|
262
|
-
/* @__PURE__ */ c("thead", { children: /* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ x("tr", { children: [
|
|
263
265
|
/* @__PURE__ */ c("th", { scope: "col", children: a("chart.table.series") }),
|
|
264
266
|
t.map((n, s) => /* @__PURE__ */ c("th", { scope: "col", children: n }, `${n}-${s}`))
|
|
265
267
|
] }) }),
|
|
266
|
-
/* @__PURE__ */ c("tbody", { children: e.map((n, s) => /* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ c("tbody", { children: e.map((n, s) => /* @__PURE__ */ x("tr", { children: [
|
|
267
269
|
/* @__PURE__ */ c("th", { scope: "row", children: n.name || a("chart.table.value") }),
|
|
268
270
|
n.data.map((b, i) => /* @__PURE__ */ c("td", { children: o === "radialBar" && m ? m(b) : f.format(b) }, `${s}-${i}`))
|
|
269
271
|
] }, `${n.name}-${s}`)) })
|
|
270
272
|
] });
|
|
271
273
|
}, [
|
|
272
274
|
o,
|
|
273
|
-
|
|
274
|
-
g,
|
|
275
|
+
E,
|
|
275
276
|
v,
|
|
276
|
-
|
|
277
|
+
g,
|
|
278
|
+
y,
|
|
277
279
|
r,
|
|
278
280
|
a,
|
|
279
281
|
f,
|
|
280
282
|
m
|
|
281
|
-
]),
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
+
]), K = d(() => (R(o), p), [p, o]);
|
|
284
|
+
return /* @__PURE__ */ x(
|
|
283
285
|
"div",
|
|
284
286
|
{
|
|
285
|
-
ref:
|
|
287
|
+
ref: I,
|
|
286
288
|
role: "img",
|
|
287
289
|
"aria-label": r,
|
|
288
|
-
"aria-describedby":
|
|
289
|
-
className:
|
|
290
|
+
"aria-describedby": y,
|
|
291
|
+
className: lt({
|
|
290
292
|
// Explicit height wins over the density min-height unless the
|
|
291
293
|
// caller also asked for a density explicitly.
|
|
292
|
-
density:
|
|
293
|
-
className:
|
|
294
|
+
density: U ?? (O !== void 0 ? "none" : void 0),
|
|
295
|
+
className: D
|
|
294
296
|
}),
|
|
295
297
|
"data-component": "chart",
|
|
296
298
|
"data-component-id": l,
|
|
297
299
|
children: [
|
|
298
|
-
|
|
300
|
+
J,
|
|
299
301
|
/* @__PURE__ */ c(
|
|
300
|
-
|
|
302
|
+
nt,
|
|
301
303
|
{
|
|
302
304
|
type: o,
|
|
303
|
-
series:
|
|
304
|
-
options:
|
|
305
|
-
width:
|
|
306
|
-
height:
|
|
305
|
+
series: K,
|
|
306
|
+
options: q,
|
|
307
|
+
width: V,
|
|
308
|
+
height: F,
|
|
307
309
|
"aria-hidden": "true"
|
|
308
310
|
}
|
|
309
311
|
)
|
|
@@ -312,10 +314,10 @@ const ft = Q(
|
|
|
312
314
|
);
|
|
313
315
|
}
|
|
314
316
|
);
|
|
315
|
-
|
|
317
|
+
bt.displayName = "Chart";
|
|
316
318
|
export {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
bt as C,
|
|
320
|
+
lt as a,
|
|
321
|
+
dt as c
|
|
320
322
|
};
|
|
321
|
-
//# sourceMappingURL=chart-
|
|
323
|
+
//# sourceMappingURL=chart-Cg3e9EH9.js.map
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as A, useState as L, useMemo as v, useEffect as S } from "react";
|
|
3
|
+
import { c as T } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as W } from "react-i18next";
|
|
5
|
+
import { F as P } from "./form-field-BOm9hK35.js";
|
|
6
|
+
import { D as $ } from "./date-picker-Bq7xhMA-.js";
|
|
7
|
+
import { N as H } from "./number-input-Dj5L3pXK.js";
|
|
8
|
+
import { C as w } from "./card-DPmk26CL.js";
|
|
9
|
+
import { B as x } from "./badge-zsf5i5bH.js";
|
|
10
|
+
import { I } from "./insert-result-DisOY2G-.js";
|
|
11
|
+
import { a as i } from "./date-picker-variants-DLi1Va_e.js";
|
|
12
|
+
import { C as z } from "./check-DPdL_Sm7.js";
|
|
13
|
+
import { H as B } from "./heart-C0faivFf.js";
|
|
14
|
+
import { c as k } from "./createLucideIcon-CrFbzy84.js";
|
|
15
|
+
/**
|
|
16
|
+
* @license lucide-react v1.8.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 Y = [
|
|
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
|
+
], j = k("droplet", Y), h = 28, M = 14, U = 1;
|
|
30
|
+
function G(n, c = 3) {
|
|
31
|
+
const d = n.cycleLength ?? h, { lastPeriodStart: s } = n, o = i(s, d - M), u = {
|
|
32
|
+
start: i(o, -5),
|
|
33
|
+
end: i(o, U)
|
|
34
|
+
}, f = i(s, d), p = Array.from(
|
|
35
|
+
{ length: c },
|
|
36
|
+
(C, g) => i(s, d * (g + 1))
|
|
37
|
+
);
|
|
38
|
+
return { nextPeriod: f, ovulation: o, fertileWindow: u, upcomingPeriods: p };
|
|
39
|
+
}
|
|
40
|
+
const V = T("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
41
|
+
variants: {
|
|
42
|
+
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: { width: "full" }
|
|
45
|
+
}), q = A(
|
|
46
|
+
({
|
|
47
|
+
defaultCycleLength: n = h,
|
|
48
|
+
onResultChange: c,
|
|
49
|
+
onInsert: d,
|
|
50
|
+
insertVariant: s = "insert",
|
|
51
|
+
onCopy: o,
|
|
52
|
+
onError: u,
|
|
53
|
+
id: f,
|
|
54
|
+
width: p,
|
|
55
|
+
className: C
|
|
56
|
+
}, g) => {
|
|
57
|
+
const { t: a, i18n: N } = W(), [m, b] = L(void 0), [y, D] = L(
|
|
58
|
+
n
|
|
59
|
+
), t = v(() => m ? G({
|
|
60
|
+
lastPeriodStart: m,
|
|
61
|
+
cycleLength: y ?? h
|
|
62
|
+
}) : null, [m, y]), E = v(
|
|
63
|
+
() => new Intl.DateTimeFormat(N.language, { dateStyle: "medium" }),
|
|
64
|
+
[N.language]
|
|
65
|
+
);
|
|
66
|
+
S(() => {
|
|
67
|
+
c == null || c(t);
|
|
68
|
+
}, [t, c]);
|
|
69
|
+
const _ = v(() => /* @__PURE__ */ new Date(), []), l = (F) => E.format(F);
|
|
70
|
+
return /* @__PURE__ */ r(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
ref: g,
|
|
74
|
+
"data-component": "cycle-calculator",
|
|
75
|
+
"data-component-id": f,
|
|
76
|
+
className: V({ width: p, className: C }),
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ r("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
79
|
+
/* @__PURE__ */ e(P, { label: a("cycleCalculator.lastPeriod"), children: /* @__PURE__ */ e(
|
|
80
|
+
$,
|
|
81
|
+
{
|
|
82
|
+
value: m,
|
|
83
|
+
onChange: b,
|
|
84
|
+
maxDate: _
|
|
85
|
+
}
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ e(
|
|
88
|
+
P,
|
|
89
|
+
{
|
|
90
|
+
label: a("cycleCalculator.cycleLength"),
|
|
91
|
+
description: a("cycleCalculator.cycleLengthHint"),
|
|
92
|
+
children: /* @__PURE__ */ e(
|
|
93
|
+
H,
|
|
94
|
+
{
|
|
95
|
+
mode: "integer",
|
|
96
|
+
min: 20,
|
|
97
|
+
max: 45,
|
|
98
|
+
value: y,
|
|
99
|
+
onChange: D
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t ? `${a("cycleCalculator.ovulation")}: ${l(t.ovulation)}. ${a(
|
|
106
|
+
"cycleCalculator.nextPeriod"
|
|
107
|
+
)}: ${l(t.nextPeriod)}.` : "" }),
|
|
108
|
+
t ? /* @__PURE__ */ e(w, { variant: "elevated", children: /* @__PURE__ */ r(w.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
109
|
+
/* @__PURE__ */ r("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
110
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
111
|
+
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.ovulation") }),
|
|
112
|
+
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
|
|
113
|
+
x,
|
|
114
|
+
{
|
|
115
|
+
variant: "success",
|
|
116
|
+
size: "lg",
|
|
117
|
+
leading: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
|
|
118
|
+
children: l(t.ovulation)
|
|
119
|
+
}
|
|
120
|
+
) })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
123
|
+
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.fertileWindow") }),
|
|
124
|
+
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ r(
|
|
125
|
+
x,
|
|
126
|
+
{
|
|
127
|
+
variant: "accent",
|
|
128
|
+
size: "lg",
|
|
129
|
+
leading: /* @__PURE__ */ e(B, { "aria-hidden": !0 }),
|
|
130
|
+
children: [
|
|
131
|
+
l(t.fertileWindow.start),
|
|
132
|
+
" –",
|
|
133
|
+
" ",
|
|
134
|
+
l(t.fertileWindow.end)
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
) })
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
140
|
+
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.nextPeriod") }),
|
|
141
|
+
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
|
|
142
|
+
x,
|
|
143
|
+
{
|
|
144
|
+
variant: "error",
|
|
145
|
+
size: "lg",
|
|
146
|
+
leading: /* @__PURE__ */ e(j, { "aria-hidden": !0 }),
|
|
147
|
+
children: l(t.nextPeriod)
|
|
148
|
+
}
|
|
149
|
+
) })
|
|
150
|
+
] })
|
|
151
|
+
] }),
|
|
152
|
+
s === "copy" || d ? /* @__PURE__ */ e(
|
|
153
|
+
I,
|
|
154
|
+
{
|
|
155
|
+
onInsert: d,
|
|
156
|
+
variant: s,
|
|
157
|
+
onCopy: o,
|
|
158
|
+
onError: u,
|
|
159
|
+
card: {
|
|
160
|
+
title: a("insert.title.cycle"),
|
|
161
|
+
fields: [
|
|
162
|
+
{
|
|
163
|
+
label: a("cycleCalculator.ovulation"),
|
|
164
|
+
value: l(t.ovulation)
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: a("cycleCalculator.fertileWindow"),
|
|
168
|
+
value: `${l(t.fertileWindow.start)} – ${l(
|
|
169
|
+
t.fertileWindow.end
|
|
170
|
+
)}`
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
label: a("cycleCalculator.nextPeriod"),
|
|
174
|
+
value: l(t.nextPeriod)
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
) : null
|
|
180
|
+
] }) }) : /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: a("cycleCalculator.empty") })
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
q.displayName = "CycleCalculator";
|
|
187
|
+
export {
|
|
188
|
+
q as C,
|
|
189
|
+
M as L,
|
|
190
|
+
G as p
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=cycle-calculator-Dln-y1k_.js.map
|