@alfadocs/ui-kit 0.41.1 → 0.42.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 (147) 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/{bmi-calculator-DnEr513I.js → bmi-calculator-D4juUcyF.js} +57 -51
  4. package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
  5. package/dist/_chunks/cycle-calculator-DsZbyzX6.js +191 -0
  6. package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
  7. package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
  8. package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-s_CBgaFs.js} +53 -40
  9. package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-BhUkRiPZ.js} +2 -2
  10. package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
  11. package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-CWOG3bkI.js} +56 -43
  12. package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
  13. package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
  14. package/dist/_chunks/insert-result-DtQQeSSf.js +227 -0
  15. package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
  16. package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
  17. package/dist/_chunks/marketplace-app-shell-kVAVycz_.js +391 -0
  18. package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
  19. package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-lDX3wwu6.js} +2 -2
  20. package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
  21. package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
  22. package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
  23. package/dist/_chunks/pregnancy-weight-gain-B7kBK-ZR.js +223 -0
  24. package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
  25. package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
  26. package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
  27. package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
  28. package/dist/_chunks/{sign-document-CpLDZ6Db.js → sign-document-QHfcNKFj.js} +5 -5
  29. package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
  30. package/dist/_chunks/tab-bar-C4II-7ej.js +86 -0
  31. package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
  32. package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
  33. package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-D1UrEUxa.js} +46 -40
  34. package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
  35. package/dist/agent-catalog.json +1 -1
  36. package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
  37. package/dist/components/_shared/insert-result.d.ts +21 -4
  38. package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
  39. package/dist/components/address-autocomplete/index.d.ts +4 -0
  40. package/dist/components/address-autocomplete/index.js +6 -0
  41. package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
  42. package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
  43. package/dist/components/bmi-calculator/index.js +1 -1
  44. package/dist/components/breadcrumb/index.js +1 -1
  45. package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
  46. package/dist/components/cycle-calculator/index.js +1 -1
  47. package/dist/components/data-table/index.js +1 -1
  48. package/dist/components/document-scanner/index.js +1 -1
  49. package/dist/components/dropdown-menu/index.js +1 -1
  50. package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
  51. package/dist/components/due-date-calculator/index.js +1 -1
  52. package/dist/components/freemium-paywall/index.js +1 -1
  53. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
  54. package/dist/components/gestational-age-calculator/index.js +1 -1
  55. package/dist/components/header-settings/index.js +1 -1
  56. package/dist/components/index.d.ts +3 -1
  57. package/dist/components/kbd/index.js +1 -1
  58. package/dist/components/map-view/index.js +1 -1
  59. package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
  60. package/dist/components/patient-search/index.js +1 -1
  61. package/dist/components/payment-form/index.js +1 -1
  62. package/dist/components/pdf-viewer/index.js +1 -1
  63. package/dist/components/practice-results/index.js +1 -1
  64. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  65. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
  66. package/dist/components/public-header/index.js +1 -1
  67. package/dist/components/radio-group/index.js +1 -1
  68. package/dist/components/rich-text-editor/index.js +1 -1
  69. package/dist/components/sheet/index.js +1 -1
  70. package/dist/components/sign-document/index.js +1 -1
  71. package/dist/components/signature-capture/index.js +1 -1
  72. package/dist/components/tab-bar/index.d.ts +3 -0
  73. package/dist/components/tab-bar/index.js +5 -0
  74. package/dist/components/tab-bar/tab-bar.d.ts +61 -0
  75. package/dist/components/theme-toggle/index.js +1 -1
  76. package/dist/components/toast/index.js +1 -1
  77. package/dist/components/unit-converter/index.js +1 -1
  78. package/dist/components/unit-converter/unit-converter.d.ts +11 -1
  79. package/dist/components/workflow/index.js +1 -1
  80. package/dist/i18n/config.js +39 -24
  81. package/dist/i18n/locales/ar.d.ts +17 -0
  82. package/dist/i18n/locales/ar.js +18 -1
  83. package/dist/i18n/locales/de.d.ts +17 -0
  84. package/dist/i18n/locales/de.js +18 -1
  85. package/dist/i18n/locales/el.d.ts +17 -0
  86. package/dist/i18n/locales/el.js +18 -1
  87. package/dist/i18n/locales/en.d.ts +17 -0
  88. package/dist/i18n/locales/en.js +18 -1
  89. package/dist/i18n/locales/es.d.ts +17 -0
  90. package/dist/i18n/locales/es.js +18 -1
  91. package/dist/i18n/locales/fr.d.ts +17 -0
  92. package/dist/i18n/locales/fr.js +18 -1
  93. package/dist/i18n/locales/hi.d.ts +17 -0
  94. package/dist/i18n/locales/hi.js +18 -1
  95. package/dist/i18n/locales/it.d.ts +17 -0
  96. package/dist/i18n/locales/it.js +18 -1
  97. package/dist/i18n/locales/ja.d.ts +17 -0
  98. package/dist/i18n/locales/ja.js +18 -1
  99. package/dist/i18n/locales/nl.d.ts +17 -0
  100. package/dist/i18n/locales/nl.js +18 -1
  101. package/dist/i18n/locales/pl.d.ts +17 -0
  102. package/dist/i18n/locales/pl.js +18 -1
  103. package/dist/i18n/locales/pt.d.ts +17 -0
  104. package/dist/i18n/locales/pt.js +18 -1
  105. package/dist/i18n/locales/ro.d.ts +17 -0
  106. package/dist/i18n/locales/ro.js +18 -1
  107. package/dist/i18n/locales/ru.d.ts +17 -0
  108. package/dist/i18n/locales/ru.js +18 -1
  109. package/dist/i18n/locales/sq.d.ts +17 -0
  110. package/dist/i18n/locales/sq.js +18 -1
  111. package/dist/i18n/locales/sv.d.ts +17 -0
  112. package/dist/i18n/locales/sv.js +18 -1
  113. package/dist/i18n/locales/tr.d.ts +17 -0
  114. package/dist/i18n/locales/tr.js +18 -1
  115. package/dist/i18n/locales/zh.d.ts +17 -0
  116. package/dist/i18n/locales/zh.js +18 -1
  117. package/dist/index.js +604 -599
  118. package/dist/locales/ar.json +18 -1
  119. package/dist/locales/de.json +18 -1
  120. package/dist/locales/el.json +18 -1
  121. package/dist/locales/en.json +18 -1
  122. package/dist/locales/es.json +18 -1
  123. package/dist/locales/fr.json +18 -1
  124. package/dist/locales/hi.json +18 -1
  125. package/dist/locales/it.json +18 -1
  126. package/dist/locales/ja.json +18 -1
  127. package/dist/locales/nl.json +18 -1
  128. package/dist/locales/pl.json +18 -1
  129. package/dist/locales/pt.json +18 -1
  130. package/dist/locales/ro.json +18 -1
  131. package/dist/locales/ru.json +18 -1
  132. package/dist/locales/sq.json +18 -1
  133. package/dist/locales/sv.json +18 -1
  134. package/dist/locales/tr.json +18 -1
  135. package/dist/locales/zh.json +18 -1
  136. package/dist/patterns/alia-assistant/index.js +1 -1
  137. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  138. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +30 -3
  139. package/dist/patterns/patient-shell/index.js +1 -1
  140. package/dist/tokens.css +1 -1
  141. package/package.json +16 -1
  142. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
  143. package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
  144. package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
  145. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
  146. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
  147. package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
@@ -0,0 +1,191 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as F, useState as L, useMemo as x, useEffect as A } from "react";
3
+ import { c as S } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as T } from "react-i18next";
5
+ import { F as P } from "./form-field-BOm9hK35.js";
6
+ import { D as W } from "./date-picker-CvQfs6Xh.js";
7
+ import { N as $ } from "./number-input-Dj5L3pXK.js";
8
+ import { B as v } from "./badge-zsf5i5bH.js";
9
+ import { I as H } from "./insert-result-DtQQeSSf.js";
10
+ import { a as i } from "./react-day-picker-CdtIiKjx.js";
11
+ import { C as I } from "./check-DPdL_Sm7.js";
12
+ import { H as z } from "./heart-C0faivFf.js";
13
+ import { c as k } from "./createLucideIcon-CrFbzy84.js";
14
+ /**
15
+ * @license lucide-react v1.8.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */
20
+ const B = [
21
+ [
22
+ "path",
23
+ {
24
+ 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",
25
+ key: "c7niix"
26
+ }
27
+ ]
28
+ ], Y = k("droplet", B), h = 28, j = 14, M = 1;
29
+ function U(n, c = 3) {
30
+ const d = n.cycleLength ?? h, { lastPeriodStart: s } = n, o = i(s, d - j), u = {
31
+ start: i(o, -5),
32
+ end: i(o, M)
33
+ }, f = i(s, d), p = Array.from(
34
+ { length: c },
35
+ (C, g) => i(s, d * (g + 1))
36
+ );
37
+ return { nextPeriod: f, ovulation: o, fertileWindow: u, upcomingPeriods: p };
38
+ }
39
+ const G = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
40
+ variants: {
41
+ width: { full: "ds:w-full", auto: "ds:inline-flex" }
42
+ },
43
+ defaultVariants: { width: "full" }
44
+ }), V = F(
45
+ ({
46
+ defaultCycleLength: n = h,
47
+ onResultChange: c,
48
+ onInsert: d,
49
+ insertVariant: s = "insert",
50
+ onCopy: o,
51
+ onError: u,
52
+ id: f,
53
+ width: p,
54
+ className: C
55
+ }, g) => {
56
+ const { t: a, i18n: N } = T(), [m, w] = L(void 0), [y, b] = L(
57
+ n
58
+ ), t = x(() => m ? U({
59
+ lastPeriodStart: m,
60
+ cycleLength: y ?? h
61
+ }) : null, [m, y]), D = x(
62
+ () => new Intl.DateTimeFormat(N.language, { dateStyle: "medium" }),
63
+ [N.language]
64
+ );
65
+ A(() => {
66
+ c == null || c(t);
67
+ }, [t, c]);
68
+ const E = x(() => /* @__PURE__ */ new Date(), []), l = (_) => D.format(_);
69
+ return /* @__PURE__ */ r(
70
+ "div",
71
+ {
72
+ ref: g,
73
+ "data-component": "cycle-calculator",
74
+ "data-component-id": f,
75
+ className: G({ width: p, className: C }),
76
+ children: [
77
+ /* @__PURE__ */ r("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
78
+ /* @__PURE__ */ e(P, { label: a("cycleCalculator.lastPeriod"), children: /* @__PURE__ */ e(
79
+ W,
80
+ {
81
+ value: m,
82
+ onChange: w,
83
+ maxDate: E
84
+ }
85
+ ) }),
86
+ /* @__PURE__ */ e(
87
+ P,
88
+ {
89
+ label: a("cycleCalculator.cycleLength"),
90
+ description: a("cycleCalculator.cycleLengthHint"),
91
+ children: /* @__PURE__ */ e(
92
+ $,
93
+ {
94
+ mode: "integer",
95
+ min: 20,
96
+ max: 45,
97
+ value: y,
98
+ onChange: b
99
+ }
100
+ )
101
+ }
102
+ )
103
+ ] }),
104
+ /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t ? `${a("cycleCalculator.ovulation")}: ${l(t.ovulation)}. ${a(
105
+ "cycleCalculator.nextPeriod"
106
+ )}: ${l(t.nextPeriod)}.` : "" }),
107
+ t ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
108
+ /* @__PURE__ */ r("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
109
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
110
+ /* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.ovulation") }),
111
+ /* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
112
+ v,
113
+ {
114
+ variant: "success",
115
+ size: "lg",
116
+ leading: /* @__PURE__ */ e(I, { "aria-hidden": !0 }),
117
+ children: l(t.ovulation)
118
+ }
119
+ ) })
120
+ ] }),
121
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
122
+ /* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.fertileWindow") }),
123
+ /* @__PURE__ */ e("dd", { children: /* @__PURE__ */ r(
124
+ v,
125
+ {
126
+ variant: "accent",
127
+ size: "lg",
128
+ leading: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
129
+ children: [
130
+ l(t.fertileWindow.start),
131
+ " –",
132
+ " ",
133
+ l(t.fertileWindow.end)
134
+ ]
135
+ }
136
+ ) })
137
+ ] }),
138
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
139
+ /* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.nextPeriod") }),
140
+ /* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
141
+ v,
142
+ {
143
+ variant: "error",
144
+ size: "lg",
145
+ leading: /* @__PURE__ */ e(Y, { "aria-hidden": !0 }),
146
+ children: l(t.nextPeriod)
147
+ }
148
+ ) })
149
+ ] })
150
+ ] }),
151
+ s === "copy" || d ? /* @__PURE__ */ e(
152
+ H,
153
+ {
154
+ onInsert: d,
155
+ variant: s,
156
+ onCopy: o,
157
+ onError: u,
158
+ card: {
159
+ title: a("insert.title.cycle"),
160
+ fields: [
161
+ {
162
+ label: a("cycleCalculator.ovulation"),
163
+ value: l(t.ovulation)
164
+ },
165
+ {
166
+ label: a("cycleCalculator.fertileWindow"),
167
+ value: `${l(t.fertileWindow.start)} – ${l(
168
+ t.fertileWindow.end
169
+ )}`
170
+ },
171
+ {
172
+ label: a("cycleCalculator.nextPeriod"),
173
+ value: l(t.nextPeriod)
174
+ }
175
+ ]
176
+ }
177
+ }
178
+ ) : null
179
+ ] }) : /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: a("cycleCalculator.empty") })
180
+ ]
181
+ }
182
+ );
183
+ }
184
+ );
185
+ V.displayName = "CycleCalculator";
186
+ export {
187
+ V as C,
188
+ j as L,
189
+ U as p
190
+ };
191
+ //# sourceMappingURL=cycle-calculator-DsZbyzX6.js.map
@@ -114,9 +114,9 @@ const rr = [
114
114
  {
115
115
  variants: {
116
116
  size: {
117
- sm: "ds:max-inline-size-[20rem]",
118
- md: "ds:max-inline-size-[28rem]",
119
- lg: "ds:max-inline-size-[36rem]"
117
+ sm: "ds:[max-inline-size:20rem]",
118
+ md: "ds:[max-inline-size:28rem]",
119
+ lg: "ds:[max-inline-size:36rem]"
120
120
  }
121
121
  },
122
122
  defaultVariants: { size: "md" }
@@ -520,7 +520,7 @@ const lr = {
520
520
  {
521
521
  intent: "secondary",
522
522
  size: "md",
523
- className: "ds:min-block-size-[var(--min-target-size)] ds:min-inline-size-[var(--min-target-size)]",
523
+ className: "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
524
524
  startIcon: /* @__PURE__ */ n(Je, { "aria-hidden": "true" }),
525
525
  onClick: te,
526
526
  disabled: g,
@@ -533,7 +533,7 @@ const lr = {
533
533
  ref: me,
534
534
  intent: "primary",
535
535
  size: "md",
536
- className: "ds:min-block-size-[var(--min-target-size)] ds:min-inline-size-[var(--min-target-size)]",
536
+ className: "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
537
537
  startIcon: /* @__PURE__ */ n(Qe, { "aria-hidden": "true" }),
538
538
  onClick: ee,
539
539
  disabled: g || b == null,
@@ -664,7 +664,7 @@ const lr = {
664
664
  ref: pe,
665
665
  intent: "primary",
666
666
  size: "md",
667
- className: "ds:min-block-size-[var(--min-target-size)] ds:min-inline-size-[var(--min-target-size)]",
667
+ className: "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
668
668
  loading: t === "requesting",
669
669
  startIcon: /* @__PURE__ */ n(ye, { "aria-hidden": "true" }),
670
670
  onClick: () => {
@@ -700,4 +700,4 @@ export {
700
700
  ur as D,
701
701
  nr as d
702
702
  };
703
- //# sourceMappingURL=document-scanner-CqS_klIr.js.map
703
+ //# sourceMappingURL=document-scanner-BqLsGs4Y.js.map
@@ -3,7 +3,7 @@ import { forwardRef as d, useContext as O, useRef as G, useEffect as P, useMemo
3
3
  import * as n from "@radix-ui/react-dropdown-menu";
4
4
  import { c as h } from "./index-D2ZczOXr.js";
5
5
  import { S as E } from "./separator-CYU_bGFn.js";
6
- import { K as g } from "./kbd-Cglkd7CY.js";
6
+ import { K as g } from "./kbd-D855ZXIW.js";
7
7
  import { u as K } from "./use-controllable-state-BiY4xTzM.js";
8
8
  import { C as V } from "./chevron-right-BrpYejk0.js";
9
9
  import { C as x } from "./check-DPdL_Sm7.js";
@@ -296,4 +296,4 @@ export {
296
296
  re as D,
297
297
  q as d
298
298
  };
299
- //# sourceMappingURL=dropdown-menu-BC5ZdOMo.js.map
299
+ //# sourceMappingURL=dropdown-menu-CUEXqKis.js.map
@@ -1,65 +1,75 @@
1
1
  import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as $, useState as i, useMemo as g, useEffect as F } from "react";
3
- import { c as k } from "./index-D2ZczOXr.js";
4
- import { useTranslation as B } from "react-i18next";
2
+ import { forwardRef as B, useState as i, useMemo as g, useEffect as _ } from "react";
3
+ import { c as I } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as S } from "react-i18next";
5
5
  import { R as s } from "./radio-TWf9Q-mp.js";
6
- import { R as f } from "./radio-group-BcF92GEF.js";
7
- import { F as h } from "./form-field-BOm9hK35.js";
8
- import { D as _ } from "./date-picker-CvQfs6Xh.js";
9
- import { N as I } from "./number-input-Dj5L3pXK.js";
10
- import { B as S } from "./badge-zsf5i5bH.js";
11
- import { I as V } from "./insert-result-yJ0QavoN.js";
12
- import { D as v, c as z } from "./gestation-BXEgDGmP.js";
13
- const G = k("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
6
+ import { R as h } from "./radio-group-CLjK-SlK.js";
7
+ import { F as v } from "./form-field-BOm9hK35.js";
8
+ import { D as z } from "./date-picker-CvQfs6Xh.js";
9
+ import { N as G } from "./number-input-Dj5L3pXK.js";
10
+ import { B as M } from "./badge-zsf5i5bH.js";
11
+ import { I as R } from "./insert-result-DtQQeSSf.js";
12
+ import { D as b, c as V } from "./gestation-BXEgDGmP.js";
13
+ const j = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
14
14
  variants: {
15
15
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
16
16
  },
17
17
  defaultVariants: { width: "full" }
18
- }), M = {
18
+ }), H = {
19
19
  preconception: "neutral",
20
20
  first: "info",
21
21
  second: "success",
22
22
  third: "warning",
23
23
  postterm: "error"
24
- }, R = {
24
+ }, Y = {
25
25
  lmp: "dueDateCalculator.lmpDate",
26
26
  conception: "dueDateCalculator.conceptionDate",
27
27
  ivf: "dueDateCalculator.transferDate"
28
- }, j = $(
29
- ({ defaultMethod: b = "lmp", onResultChange: d, onInsert: p, id: C, width: y, className: x }, N) => {
30
- const { t: e, i18n: D } = B(), [r, L] = i(b), [o, A] = i(void 0), [u, w] = i(
31
- v
32
- ), [n, E] = i(5), t = g(() => o ? z(
28
+ }, K = B(
29
+ ({
30
+ defaultMethod: C = "lmp",
31
+ onResultChange: d,
32
+ onInsert: p,
33
+ insertVariant: D = "insert",
34
+ onCopy: y,
35
+ onError: x,
36
+ id: N,
37
+ width: L,
38
+ className: A
39
+ }, w) => {
40
+ const { t: e, i18n: f } = S(), [r, E] = i(C), [o, T] = i(void 0), [u, $] = i(
41
+ b
42
+ ), [n, F] = i(5), t = g(() => o ? V(
33
43
  {
34
44
  method: r,
35
45
  date: o,
36
- cycleLength: u ?? v,
46
+ cycleLength: u ?? b,
37
47
  embryoAge: n
38
48
  },
39
49
  /* @__PURE__ */ new Date()
40
50
  ) : null, [r, o, u, n]), c = g(
41
- () => new Intl.DateTimeFormat(D.language, { dateStyle: "long" }),
42
- [D.language]
51
+ () => new Intl.DateTimeFormat(f.language, { dateStyle: "long" }),
52
+ [f.language]
43
53
  );
44
- F(() => {
54
+ _(() => {
45
55
  d == null || d(t);
46
56
  }, [t, d]);
47
- const T = g(() => /* @__PURE__ */ new Date(), []);
57
+ const k = g(() => /* @__PURE__ */ new Date(), []);
48
58
  return /* @__PURE__ */ l(
49
59
  "div",
50
60
  {
51
- ref: N,
61
+ ref: w,
52
62
  "data-component": "due-date-calculator",
53
- "data-component-id": C,
54
- className: G({ width: y, className: x }),
63
+ "data-component-id": N,
64
+ className: j({ width: L, className: A }),
55
65
  children: [
56
66
  /* @__PURE__ */ l(
57
- f,
67
+ h,
58
68
  {
59
69
  label: e("dueDateCalculator.method.label"),
60
70
  variant: "horizontal",
61
71
  value: r,
62
- onValueChange: (m) => L(m),
72
+ onValueChange: (m) => E(m),
63
73
  children: [
64
74
  /* @__PURE__ */ a(s, { label: e("dueDateCalculator.method.lmp"), value: "lmp" }),
65
75
  /* @__PURE__ */ a(
@@ -74,31 +84,31 @@ const G = k("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
74
84
  }
75
85
  ),
76
86
  /* @__PURE__ */ l("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
77
- /* @__PURE__ */ a(h, { label: e(R[r]), children: /* @__PURE__ */ a(_, { value: o, onChange: A, maxDate: T }) }),
87
+ /* @__PURE__ */ a(v, { label: e(Y[r]), children: /* @__PURE__ */ a(z, { value: o, onChange: T, maxDate: k }) }),
78
88
  r === "lmp" && /* @__PURE__ */ a(
79
- h,
89
+ v,
80
90
  {
81
91
  label: e("dueDateCalculator.cycleLength"),
82
92
  description: e("dueDateCalculator.cycleLengthHint"),
83
93
  children: /* @__PURE__ */ a(
84
- I,
94
+ G,
85
95
  {
86
96
  mode: "integer",
87
97
  min: 20,
88
98
  max: 45,
89
99
  value: u,
90
- onChange: w
100
+ onChange: $
91
101
  }
92
102
  )
93
103
  }
94
104
  ),
95
105
  r === "ivf" && /* @__PURE__ */ l(
96
- f,
106
+ h,
97
107
  {
98
108
  label: e("dueDateCalculator.embryoAge"),
99
109
  variant: "horizontal",
100
110
  value: String(n),
101
- onValueChange: (m) => E(Number(m)),
111
+ onValueChange: (m) => F(Number(m)),
102
112
  children: [
103
113
  /* @__PURE__ */ a(s, { label: e("dueDateCalculator.day3"), value: "3" }),
104
114
  /* @__PURE__ */ a(s, { label: e("dueDateCalculator.day5"), value: "5" })
@@ -115,7 +125,7 @@ const G = k("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
115
125
  /* @__PURE__ */ l("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
116
126
  /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
117
127
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.trimesterLabel") }),
118
- /* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(S, { variant: M[t.trimester], size: "lg", children: e(`dueDateCalculator.trimester.${t.trimester}`) }) })
128
+ /* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(M, { variant: H[t.trimester], size: "lg", children: e(`dueDateCalculator.trimester.${t.trimester}`) }) })
119
129
  ] }),
120
130
  /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
121
131
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.gestationLabel") }),
@@ -129,10 +139,13 @@ const G = k("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
129
139
  /* @__PURE__ */ a("dd", { className: "type-metric ds:text-foreground", children: c.format(t.dueDate) })
130
140
  ] })
131
141
  ] }),
132
- p ? /* @__PURE__ */ a(
133
- V,
142
+ D === "copy" || p ? /* @__PURE__ */ a(
143
+ R,
134
144
  {
145
+ variant: D,
135
146
  onInsert: p,
147
+ onCopy: y,
148
+ onError: x,
136
149
  card: {
137
150
  title: e("insert.title.dueDate"),
138
151
  highlight: c.format(t.dueDate),
@@ -164,8 +177,8 @@ const G = k("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
164
177
  );
165
178
  }
166
179
  );
167
- j.displayName = "DueDateCalculator";
180
+ K.displayName = "DueDateCalculator";
168
181
  export {
169
- j as D
182
+ K as D
170
183
  };
171
- //# sourceMappingURL=due-date-calculator-CUspKSTw.js.map
184
+ //# sourceMappingURL=due-date-calculator-s_CBgaFs.js.map
@@ -12,7 +12,7 @@ import { P as Z } from "./popover-Devce-tT.js";
12
12
  import { C as Re } from "./checkbox-DRcOdmXv.js";
13
13
  import { T as fe } from "./text-input-BaClJL8Y.js";
14
14
  import { T as ae } from "./tag-CdA0s_VV.js";
15
- import { D as Y } from "./dropdown-menu-BC5ZdOMo.js";
15
+ import { D as Y } from "./dropdown-menu-CUEXqKis.js";
16
16
  import { X as De } from "./x-CCcI3eJp.js";
17
17
  import { R as Rt } from "./refresh-cw-CC8jSKMr.js";
18
18
  import { S as pe } from "./search-BonnQsHv.js";
@@ -2332,4 +2332,4 @@ export {
2332
2332
  Be as q,
2333
2333
  xn as u
2334
2334
  };
2335
- //# sourceMappingURL=editable-currency-cell-renderer-DgkCIIcO.js.map
2335
+ //# sourceMappingURL=editable-currency-cell-renderer-BhUkRiPZ.js.map
@@ -8,7 +8,7 @@ import { u as X } from "./use-controllable-state-BiY4xTzM.js";
8
8
  import { u as Y } from "./registry-nPAVE19X.js";
9
9
  import { B as I } from "./button-DD_0Xdmr.js";
10
10
  import { P as Z } from "./progress-kzIRcdaq.js";
11
- import { f as $ } from "./payment-form-Dy3WIIsC.js";
11
+ import { f as $ } from "./payment-form-BzVsG6Ks.js";
12
12
  import { T as ee } from "./triangle-alert-CBPUIzQo.js";
13
13
  import { C as se } from "./check-DPdL_Sm7.js";
14
14
  const ae = {
@@ -265,4 +265,4 @@ export {
265
265
  te as F,
266
266
  ae as f
267
267
  };
268
- //# sourceMappingURL=freemium-paywall-BAk3a6er.js.map
268
+ //# sourceMappingURL=freemium-paywall-BLXESpH4.js.map
@@ -1,45 +1,55 @@
1
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)]", {
2
+ import { forwardRef as L, useState as f, useMemo as m, useEffect as T } from "react";
3
+ import { c as S } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as k } from "react-i18next";
5
+ import { R as h } from "./radio-TWf9Q-mp.js";
6
+ import { R as E } from "./radio-group-CLjK-SlK.js";
7
+ import { F } from "./form-field-BOm9hK35.js";
8
+ import { D as B } from "./date-picker-CvQfs6Xh.js";
9
+ import { B as x } from "./badge-zsf5i5bH.js";
10
+ import { I } from "./insert-result-DtQQeSSf.js";
11
+ import { c as M, g as j, G as R } from "./gestation-BXEgDGmP.js";
12
+ import { s as z } from "./subDays-_T9YeKPX.js";
13
+ import { i as V } from "./react-day-picker-CdtIiKjx.js";
14
+ const _ = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
15
15
  variants: {
16
16
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
17
17
  },
18
18
  defaultVariants: { width: "full" }
19
- }), V = {
19
+ }), O = {
20
20
  preconception: "neutral",
21
21
  first: "info",
22
22
  second: "success",
23
23
  third: "warning",
24
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(() => {
25
+ }, P = L(
26
+ ({
27
+ defaultMethod: A = "lmp",
28
+ onResultChange: d,
29
+ onInsert: g,
30
+ insertVariant: u = "insert",
31
+ onCopy: v,
32
+ onError: b,
33
+ id: y,
34
+ width: C,
35
+ className: N
36
+ }, D) => {
37
+ const { t: e, i18n: p } = k(), [o, w] = f(A), [i, $] = f(void 0), n = m(() => /* @__PURE__ */ new Date(), []), t = m(() => {
28
38
  if (!i) return null;
29
- const l = o === "lmp" ? i : M(i, I), r = F({ method: "lmp", date: l }, n);
39
+ const l = o === "lmp" ? i : z(i, R), r = M({ method: "lmp", date: l }, n);
30
40
  return {
31
41
  result: {
32
42
  gestationalAge: r.gestationalAge,
33
43
  trimester: r.trimester,
34
44
  dueDate: r.dueDate
35
45
  },
36
- milestones: B(r.gestationalStart)
46
+ milestones: j(r.gestationalStart)
37
47
  };
38
- }, [o, i, n]), D = m(
39
- () => new Intl.DateTimeFormat(u.language, { dateStyle: "medium" }),
40
- [u.language]
48
+ }, [o, i, n]), G = m(
49
+ () => new Intl.DateTimeFormat(p.language, { dateStyle: "medium" }),
50
+ [p.language]
41
51
  );
42
- $(() => {
52
+ T(() => {
43
53
  d == null || d((t == null ? void 0 : t.result) ?? null);
44
54
  }, [t, d]);
45
55
  const c = (l) => l ? e("gestationalAgeCalculator.gestation", {
@@ -49,35 +59,35 @@ const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
49
59
  return /* @__PURE__ */ s(
50
60
  "div",
51
61
  {
52
- ref: y,
62
+ ref: D,
53
63
  "data-component": "gestational-age-calculator",
54
- "data-component-id": A,
55
- className: R({ width: v, className: b }),
64
+ "data-component-id": y,
65
+ className: _({ width: C, className: N }),
56
66
  children: [
57
67
  /* @__PURE__ */ s(
58
- T,
68
+ E,
59
69
  {
60
70
  label: e("gestationalAgeCalculator.method.label"),
61
71
  variant: "horizontal",
62
72
  value: o,
63
- onValueChange: (l) => C(l),
73
+ onValueChange: (l) => w(l),
64
74
  children: [
65
- /* @__PURE__ */ a(f, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
66
- /* @__PURE__ */ a(f, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
75
+ /* @__PURE__ */ a(h, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
76
+ /* @__PURE__ */ a(h, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
67
77
  ]
68
78
  }
69
79
  ),
70
80
  /* @__PURE__ */ a(
71
- S,
81
+ F,
72
82
  {
73
83
  label: e(
74
84
  o === "lmp" ? "gestationalAgeCalculator.lmpDate" : "gestationalAgeCalculator.eddDate"
75
85
  ),
76
86
  children: /* @__PURE__ */ a(
77
- k,
87
+ B,
78
88
  {
79
89
  value: i,
80
- onChange: N,
90
+ onChange: $,
81
91
  maxDate: o === "lmp" ? n : void 0
82
92
  }
83
93
  )
@@ -93,9 +103,9 @@ const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
93
103
  /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
94
104
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.trimesterLabel") }),
95
105
  /* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
96
- h,
106
+ x,
97
107
  {
98
- variant: V[t.result.trimester],
108
+ variant: O[t.result.trimester],
99
109
  size: "lg",
100
110
  children: e(
101
111
  `gestationalAgeCalculator.trimester.${t.result.trimester}`
@@ -111,7 +121,7 @@ const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
111
121
  /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
112
122
  /* @__PURE__ */ a("span", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.milestonesLabel") }),
113
123
  /* @__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);
124
+ const r = V(n, l.date);
115
125
  return /* @__PURE__ */ s(
116
126
  "li",
117
127
  {
@@ -119,8 +129,8 @@ const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
119
129
  children: [
120
130
  /* @__PURE__ */ a("span", { className: "type-body ds:text-foreground", children: e(`gestationalAgeCalculator.milestone.${l.key}`) }),
121
131
  /* @__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
132
+ /* @__PURE__ */ a("span", { className: "type-body ds:text-muted-foreground", children: G.format(l.date) }),
133
+ r ? /* @__PURE__ */ a(x, { variant: "success", children: e("gestationalAgeCalculator.reached") }) : null
124
134
  ] })
125
135
  ]
126
136
  },
@@ -128,10 +138,13 @@ const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
128
138
  );
129
139
  }) })
130
140
  ] }),
131
- g ? /* @__PURE__ */ a(
132
- E,
141
+ u === "copy" || g ? /* @__PURE__ */ a(
142
+ I,
133
143
  {
134
144
  onInsert: g,
145
+ variant: u,
146
+ onCopy: v,
147
+ onError: b,
135
148
  card: {
136
149
  title: e("insert.title.gestationalAge"),
137
150
  highlight: e(
@@ -158,8 +171,8 @@ const R = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
158
171
  );
159
172
  }
160
173
  );
161
- z.displayName = "GestationalAgeCalculator";
174
+ P.displayName = "GestationalAgeCalculator";
162
175
  export {
163
- z as G
176
+ P as G
164
177
  };
165
- //# sourceMappingURL=gestational-age-calculator-CsQ05qDy.js.map
178
+ //# sourceMappingURL=gestational-age-calculator-CWOG3bkI.js.map
@@ -4,7 +4,7 @@ import { c as N } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as E } from "react-i18next";
5
5
  import { I as o } from "./icon-button-CKEOrN37.js";
6
6
  import { I as M } from "./icon-button-group-C48khLE0.js";
7
- import { D as r } from "./dropdown-menu-BC5ZdOMo.js";
7
+ import { D as r } from "./dropdown-menu-CUEXqKis.js";
8
8
  import { S as R } from "./switch-BJ6HD3Mn.js";
9
9
  import { c as v, a as H, L as _ } from "./locale-picker-D99UyZVJ.js";
10
10
  import { u as O } from "./use-locale-BkCIHujH.js";
@@ -241,4 +241,4 @@ Y.displayName = "HeaderSettings";
241
241
  export {
242
242
  Y as H
243
243
  };
244
- //# sourceMappingURL=header-settings-CBLwUK6t.js.map
244
+ //# sourceMappingURL=header-settings-Bx0Biimh.js.map