@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.
Files changed (199) hide show
  1. package/dist/_chunks/address-autocomplete-CSjMrBvu.js +358 -0
  2. package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
  3. package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
  4. package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
  5. package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
  6. package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
  7. package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
  8. package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
  9. package/dist/_chunks/cycle-calculator-Dln-y1k_.js +192 -0
  10. package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
  11. package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
  12. package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
  13. package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
  14. package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
  15. package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
  16. package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
  17. package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
  18. package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-Cc4dRqTI.js} +62 -41
  19. package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-9jqwDv5x.js} +3 -3
  20. package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
  21. package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
  22. package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
  23. package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
  24. package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
  25. package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-ZMSrzkRW.js} +59 -45
  26. package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
  27. package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
  28. package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
  29. package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
  30. package/dist/_chunks/insert-result-DisOY2G-.js +243 -0
  31. package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
  32. package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
  33. package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
  34. package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
  35. package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
  36. package/dist/_chunks/marketplace-app-shell-Dc5cTIt8.js +428 -0
  37. package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
  38. package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
  39. package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-CnT4L8gn.js} +3 -3
  40. package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
  41. package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
  42. package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
  43. package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
  44. package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js +224 -0
  45. package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
  46. package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
  47. package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
  48. package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
  49. package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
  50. package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
  51. package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
  52. package/dist/_chunks/sign-document-B-3k_0LO.js +344 -0
  53. package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
  54. package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
  55. package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
  56. package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
  57. package/dist/_chunks/tab-bar-Xetknddo.js +105 -0
  58. package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
  59. package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
  60. package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
  61. package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-CuXCXJhK.js} +46 -40
  62. package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
  63. package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
  64. package/dist/agent-catalog.json +1 -1
  65. package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
  66. package/dist/components/_shared/calendar-class-names.d.ts +8 -0
  67. package/dist/components/_shared/index.d.ts +2 -0
  68. package/dist/components/_shared/insert-result.d.ts +78 -6
  69. package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
  70. package/dist/components/address-autocomplete/index.d.ts +4 -0
  71. package/dist/components/address-autocomplete/index.js +6 -0
  72. package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
  73. package/dist/components/badge/badge.d.ts +1 -1
  74. package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
  75. package/dist/components/bmi-calculator/index.js +1 -1
  76. package/dist/components/booking/index.js +1 -1
  77. package/dist/components/breadcrumb/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/card/card.d.ts +1 -1
  80. package/dist/components/chart/chart.d.ts +10 -0
  81. package/dist/components/chart/index.js +1 -1
  82. package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
  83. package/dist/components/cycle-calculator/index.js +1 -1
  84. package/dist/components/data-table/index.js +1 -1
  85. package/dist/components/date-picker/date-picker.d.ts +0 -1
  86. package/dist/components/date-picker/index.js +1 -1
  87. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  88. package/dist/components/date-range-picker/index.js +1 -1
  89. package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/dialog/index.js +1 -1
  92. package/dist/components/document-scanner/index.js +1 -1
  93. package/dist/components/dropdown-menu/index.js +1 -1
  94. package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/freemium-paywall/index.js +1 -1
  97. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
  98. package/dist/components/gestational-age-calculator/index.js +1 -1
  99. package/dist/components/header/header.d.ts +8 -0
  100. package/dist/components/header/index.js +1 -1
  101. package/dist/components/header-settings/index.js +1 -1
  102. package/dist/components/index.d.ts +3 -1
  103. package/dist/components/kbd/index.js +1 -1
  104. package/dist/components/map-view/index.js +1 -1
  105. package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
  106. package/dist/components/patient-search/index.js +1 -1
  107. package/dist/components/payment-form/index.js +1 -1
  108. package/dist/components/pdf-viewer/index.js +1 -1
  109. package/dist/components/practice-results/index.js +1 -1
  110. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  111. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
  112. package/dist/components/public-header/index.js +1 -1
  113. package/dist/components/public-header/public-header.d.ts +1 -1
  114. package/dist/components/radio-group/index.js +1 -1
  115. package/dist/components/rich-text-editor/index.js +1 -1
  116. package/dist/components/sheet/index.js +1 -1
  117. package/dist/components/sign-document/index.js +1 -1
  118. package/dist/components/sign-document/sign-document.d.ts +12 -0
  119. package/dist/components/signature-capture/index.js +1 -1
  120. package/dist/components/stat/stat.d.ts +1 -1
  121. package/dist/components/tab-bar/index.d.ts +3 -0
  122. package/dist/components/tab-bar/index.js +5 -0
  123. package/dist/components/tab-bar/tab-bar.d.ts +104 -0
  124. package/dist/components/theme-toggle/index.js +1 -1
  125. package/dist/components/toast/index.js +1 -1
  126. package/dist/components/unit-converter/index.js +1 -1
  127. package/dist/components/unit-converter/unit-converter.d.ts +11 -1
  128. package/dist/components/workflow/index.js +1 -1
  129. package/dist/i18n/locales/ar.d.ts +17 -0
  130. package/dist/i18n/locales/ar.js +18 -1
  131. package/dist/i18n/locales/de.d.ts +17 -0
  132. package/dist/i18n/locales/de.js +18 -1
  133. package/dist/i18n/locales/el.d.ts +17 -0
  134. package/dist/i18n/locales/el.js +18 -1
  135. package/dist/i18n/locales/en.d.ts +17 -0
  136. package/dist/i18n/locales/en.js +18 -1
  137. package/dist/i18n/locales/es.d.ts +17 -0
  138. package/dist/i18n/locales/es.js +18 -1
  139. package/dist/i18n/locales/fr.d.ts +17 -0
  140. package/dist/i18n/locales/fr.js +18 -1
  141. package/dist/i18n/locales/hi.d.ts +17 -0
  142. package/dist/i18n/locales/hi.js +18 -1
  143. package/dist/i18n/locales/it.d.ts +17 -0
  144. package/dist/i18n/locales/it.js +18 -1
  145. package/dist/i18n/locales/ja.d.ts +17 -0
  146. package/dist/i18n/locales/ja.js +18 -1
  147. package/dist/i18n/locales/nl.d.ts +17 -0
  148. package/dist/i18n/locales/nl.js +18 -1
  149. package/dist/i18n/locales/pl.d.ts +17 -0
  150. package/dist/i18n/locales/pl.js +18 -1
  151. package/dist/i18n/locales/pt.d.ts +17 -0
  152. package/dist/i18n/locales/pt.js +18 -1
  153. package/dist/i18n/locales/ro.d.ts +17 -0
  154. package/dist/i18n/locales/ro.js +18 -1
  155. package/dist/i18n/locales/ru.d.ts +17 -0
  156. package/dist/i18n/locales/ru.js +18 -1
  157. package/dist/i18n/locales/sq.d.ts +17 -0
  158. package/dist/i18n/locales/sq.js +18 -1
  159. package/dist/i18n/locales/sv.d.ts +17 -0
  160. package/dist/i18n/locales/sv.js +18 -1
  161. package/dist/i18n/locales/tr.d.ts +17 -0
  162. package/dist/i18n/locales/tr.js +18 -1
  163. package/dist/i18n/locales/zh.d.ts +17 -0
  164. package/dist/i18n/locales/zh.js +18 -1
  165. package/dist/index.js +605 -599
  166. package/dist/locales/ar.json +18 -1
  167. package/dist/locales/de.json +18 -1
  168. package/dist/locales/el.json +18 -1
  169. package/dist/locales/en.json +18 -1
  170. package/dist/locales/es.json +18 -1
  171. package/dist/locales/fr.json +18 -1
  172. package/dist/locales/hi.json +18 -1
  173. package/dist/locales/it.json +18 -1
  174. package/dist/locales/ja.json +18 -1
  175. package/dist/locales/nl.json +18 -1
  176. package/dist/locales/pl.json +18 -1
  177. package/dist/locales/pt.json +18 -1
  178. package/dist/locales/ro.json +18 -1
  179. package/dist/locales/ru.json +18 -1
  180. package/dist/locales/sq.json +18 -1
  181. package/dist/locales/sv.json +18 -1
  182. package/dist/locales/tr.json +18 -1
  183. package/dist/locales/zh.json +18 -1
  184. package/dist/patterns/alia-assistant/index.js +1 -1
  185. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  186. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +87 -4
  187. package/dist/patterns/patient-shell/index.js +1 -1
  188. package/dist/tokens.css +1411 -2
  189. package/package.json +16 -1
  190. package/dist/_chunks/bmi-calculator-DnEr513I.js +0 -213
  191. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
  192. package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
  193. package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
  194. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
  195. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
  196. package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
  197. package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
  198. package/dist/_chunks/sign-document-CpLDZ6Db.js +0 -316
  199. 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-[16rem]",
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-[16rem]",
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-[16rem]",
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-CLlhx7qo.js.map
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-Cee13rHU.js";
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-B74fqpFZ.js.map
40
+ //# sourceMappingURL=calculator-dialog-DdexHrTP.js.map
@@ -1,13 +1,13 @@
1
- import { jsxs as T, jsx as c } from "react/jsx-runtime";
2
- import { forwardRef as Q, useId as X, useMemo as d, useRef as tt, useState as P, useEffect as $, useImperativeHandle as et } from "react";
3
- import { c as ot } from "./index-D2ZczOXr.js";
4
- import { useTranslation as at } from "react-i18next";
5
- import rt from "react-apexcharts";
6
- import k from "apexcharts";
7
- import { u as nt, g as G } from "./apexcharts-theme-BJigns_V.js";
8
- import { u as st } from "./use-prefers-reduced-motion-BMwIQRjB.js";
9
- import { u as it } from "./registry-nPAVE19X.js";
10
- const ct = {
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
- }, dt = ot("ds:relative ds:block ds:w-full", {
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
- }), lt = [
49
+ }), mt = [
50
50
  "verticalLines",
51
51
  "horizontalLines",
52
52
  "slantedLines",
53
53
  "squares",
54
54
  "circles"
55
- ], mt = ["line", "bar", "area"], ut = ["pie", "donut", "radialBar"];
56
- function x(r) {
57
- return ut.includes(r);
55
+ ], ut = ["line", "bar", "area"], ht = ["pie", "donut", "radialBar"];
56
+ function R(r) {
57
+ return ht.includes(r);
58
58
  }
59
- function ht(r) {
60
- return mt.includes(r);
59
+ function pt(r) {
60
+ return ut.includes(r);
61
61
  }
62
- function pt(r, l) {
63
- return x(l) ? [
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 ft = Q(
70
+ const bt = X(
71
71
  ({
72
72
  title: r,
73
73
  id: l,
74
74
  type: o,
75
75
  series: p,
76
- categories: v,
77
- labels: g,
78
- height: L,
79
- width: H,
80
- patterns: O = !1,
81
- toolbar: R = !1,
82
- locale: _,
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: M,
85
- className: U
86
- }, D) => {
87
- const { t: a, i18n: W } = at(), A = X(), u = d(
88
- () => `chart-${A.replace(/[^a-zA-Z0-9-_]/g, "")}`,
89
- [A]
90
- ), S = `${u}-summary`, y = tt(null), [z, Y] = P(0);
91
- nt(y);
92
- const h = _ ?? W.language ?? "en", [N, Z] = P(
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 G();
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
- Z(G());
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 = y.current;
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 && Y(Math.floor(s.contentRect.width));
124
+ s && Z(Math.floor(s.contentRect.width));
124
125
  });
125
126
  return e.observe(t), () => e.disconnect();
126
127
  }, []);
127
- const I = d(
128
+ const C = d(
128
129
  () => ({
129
130
  async dataURI() {
130
- const t = k.getChartByID(u);
131
+ const t = G.getChartByID(u);
131
132
  return t ? (await t.dataURI()).imgURI : "";
132
133
  },
133
134
  updateSeries(t) {
134
- const e = k.getChartByID(u);
135
- e && (x(o), e.updateSeries(t));
135
+ const e = G.getChartByID(u);
136
+ e && (R(o), e.updateSeries(t));
136
137
  }
137
138
  }),
138
139
  [u, o]
139
140
  );
140
- et(D, () => I, [I]), it(ct, I, l);
141
- const C = typeof document < "u" && document.documentElement.dir === "rtl", B = d(
142
- () => pt(p, o),
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
- ), E = d(
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
- ), w = st(), j = d(() => {
167
+ ), L = it(), q = d(() => {
167
168
  var n, s, b;
168
- const t = N, e = {
169
+ const t = B, e = {
169
170
  ...t,
170
171
  chart: {
171
172
  ...t.chart,
172
173
  id: u,
173
- toolbar: { show: R },
174
- zoom: { enabled: R },
174
+ toolbar: { show: S },
175
+ zoom: { enabled: S },
175
176
  animations: {
176
- enabled: !w,
177
- dynamicAnimation: { enabled: !w }
177
+ enabled: !L,
178
+ dynamicAnimation: { enabled: !L }
178
179
  },
179
- locales: [E],
180
+ locales: [P],
180
181
  defaultLocale: h,
181
182
  parentHeightOffset: 0
182
183
  },
183
- labels: g,
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: C ? "right" : "left",
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 (ht(o) && (e.xaxis = {
205
+ if (T && T.length > 0 && (e.colors = T), pt(o) && (e.xaxis = {
205
206
  ...t.xaxis,
206
- categories: v ?? []
207
+ categories: g ?? []
207
208
  }, e.yaxis = {
208
209
  ...t.yaxis,
209
- opposite: C,
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: (K) => m(Number(K))
227
+ formatter: (Q) => m(Number(Q))
227
228
  }
228
229
  }
229
230
  }
230
231
  };
231
232
  }
232
- return O ? e.fill = {
233
+ return A ? e.fill = {
233
234
  type: "pattern",
234
235
  opacity: o === "area" ? 0.3 : 1,
235
236
  pattern: {
236
- style: [...lt],
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
- N,
245
+ B,
245
246
  u,
246
- R,
247
- w,
248
- E,
247
+ S,
248
+ L,
249
+ P,
249
250
  h,
250
- g,
251
+ v,
251
252
  f,
252
253
  a,
253
254
  o,
254
- v,
255
- C,
256
- O,
255
+ g,
256
+ w,
257
+ A,
258
+ T,
257
259
  m
258
- ]), q = H ?? (z > 0 ? z : "100%"), V = L ?? 320, F = d(() => {
259
- const t = x(o) ? g ?? [] : v ?? [], e = B;
260
- return /* @__PURE__ */ T("table", { id: S, className: "ds:sr-only", children: [
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__ */ T("tr", { children: [
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__ */ T("tr", { children: [
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
- B,
274
- g,
275
+ E,
275
276
  v,
276
- S,
277
+ g,
278
+ y,
277
279
  r,
278
280
  a,
279
281
  f,
280
282
  m
281
- ]), J = d(() => (x(o), p), [p, o]);
282
- return /* @__PURE__ */ T(
283
+ ]), K = d(() => (R(o), p), [p, o]);
284
+ return /* @__PURE__ */ x(
283
285
  "div",
284
286
  {
285
- ref: y,
287
+ ref: I,
286
288
  role: "img",
287
289
  "aria-label": r,
288
- "aria-describedby": S,
289
- className: dt({
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: M ?? (L !== void 0 ? "none" : void 0),
293
- className: U
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
- F,
300
+ J,
299
301
  /* @__PURE__ */ c(
300
- rt,
302
+ nt,
301
303
  {
302
304
  type: o,
303
- series: J,
304
- options: j,
305
- width: q,
306
- height: V,
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
- ft.displayName = "Chart";
317
+ bt.displayName = "Chart";
316
318
  export {
317
- ft as C,
318
- dt as a,
319
- ct as c
319
+ bt as C,
320
+ lt as a,
321
+ dt as c
320
322
  };
321
- //# sourceMappingURL=chart-Cbt0_sKv.js.map
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