@alfadocs/ui-kit 1.4.12 → 1.4.13

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 (100) hide show
  1. package/dist/_chunks/actions-cell-renderer-BD-jruqA.js +1784 -0
  2. package/dist/_chunks/{anamnesis-summary-rows-DAIpD0Or.js → anamnesis-summary-rows-B5MAYkJ-.js} +2150 -2092
  3. package/dist/_chunks/{bmi-calculator-CxPn0T0s.js → bmi-calculator-DC5SaqXT.js} +2 -2
  4. package/dist/_chunks/{cycle-calculator-D9M7IKfh.js → cycle-calculator-B_NlctlQ.js} +2 -2
  5. package/dist/_chunks/{due-date-calculator-BkqZEvL4.js → due-date-calculator-le1z3KpW.js} +2 -2
  6. package/dist/_chunks/{fetal-weight-C7JXGg6E.js → fetal-weight-DXA6ZpMq.js} +2 -2
  7. package/dist/_chunks/{file-manager-DzWYcRpE.js → file-manager-BjCM2fZB.js} +2 -2
  8. package/dist/_chunks/{hcg-doubling-CFJlMH7Z.js → hcg-doubling-BT6lki_i.js} +2 -2
  9. package/dist/_chunks/{link-cell-renderer-DCCca2m3.js → link-cell-renderer-C7GvyK66.js} +2 -2
  10. package/dist/_chunks/number-input-CM1q9zvH.js +414 -0
  11. package/dist/_chunks/{optical-prescription-Brs0CeP3.js → optical-prescription-CQR_WJiS.js} +2 -2
  12. package/dist/_chunks/{patient-details-CGhnfdUB.js → patient-details-CnFgF3MU.js} +2 -2
  13. package/dist/_chunks/{patient-table-D2fhV4mV.js → patient-table-BXzcrC79.js} +3 -3
  14. package/dist/_chunks/{pregnancy-dating-iI6_j2K2.js → pregnancy-dating-4tPV_Yko.js} +2 -2
  15. package/dist/_chunks/{pregnancy-weight-gain-Co-YFMJZ.js → pregnancy-weight-gain-BBgbWBGe.js} +2 -2
  16. package/dist/_chunks/{signature-status-chip-DUcTgQ0E.js → signature-status-chip-DlLJk1VA.js} +16 -14
  17. package/dist/_chunks/{unit-converter-BeTicruA.js → unit-converter-Dsk__pjA.js} +2 -2
  18. package/dist/agent-catalog.json +14 -8
  19. package/dist/agent-i18n/en.json +3 -2
  20. package/dist/components/bmi-calculator/index.js +1 -1
  21. package/dist/components/cycle-calculator/index.js +1 -1
  22. package/dist/components/data-table/data-table.d.ts +19 -0
  23. package/dist/components/data-table/expanded-row-renderer.d.ts +47 -0
  24. package/dist/components/data-table/index.d.ts +2 -0
  25. package/dist/components/data-table/index.js +31 -27
  26. package/dist/components/due-date-calculator/index.js +1 -1
  27. package/dist/components/fetal-weight/index.js +1 -1
  28. package/dist/components/file-manager/index.js +1 -1
  29. package/dist/components/hcg-doubling/index.js +1 -1
  30. package/dist/components/number-input/index.js +1 -1
  31. package/dist/components/number-input/number-input.d.ts +11 -0
  32. package/dist/components/optical-prescription/index.js +1 -1
  33. package/dist/components/patient-details/index.js +1 -1
  34. package/dist/components/patient-table/index.js +1 -1
  35. package/dist/components/pregnancy-dating/index.js +1 -1
  36. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  37. package/dist/components/signature-status-chip/index.js +1 -1
  38. package/dist/components/unit-converter/index.js +1 -1
  39. package/dist/host-compat.css +4 -1
  40. package/dist/i18n/locales/ar.d.ts +1 -0
  41. package/dist/i18n/locales/ar.js +1 -0
  42. package/dist/i18n/locales/de.d.ts +1 -0
  43. package/dist/i18n/locales/de.js +1 -0
  44. package/dist/i18n/locales/el.d.ts +1 -0
  45. package/dist/i18n/locales/el.js +1 -0
  46. package/dist/i18n/locales/en.d.ts +1 -0
  47. package/dist/i18n/locales/en.js +1 -0
  48. package/dist/i18n/locales/es.d.ts +1 -0
  49. package/dist/i18n/locales/es.js +1 -0
  50. package/dist/i18n/locales/fr.d.ts +1 -0
  51. package/dist/i18n/locales/fr.js +1 -0
  52. package/dist/i18n/locales/hi.d.ts +1 -0
  53. package/dist/i18n/locales/hi.js +1 -0
  54. package/dist/i18n/locales/it.d.ts +1 -0
  55. package/dist/i18n/locales/it.js +1 -0
  56. package/dist/i18n/locales/ja.d.ts +1 -0
  57. package/dist/i18n/locales/ja.js +1 -0
  58. package/dist/i18n/locales/nl.d.ts +1 -0
  59. package/dist/i18n/locales/nl.js +1 -0
  60. package/dist/i18n/locales/pl.d.ts +1 -0
  61. package/dist/i18n/locales/pl.js +1 -0
  62. package/dist/i18n/locales/pt.d.ts +1 -0
  63. package/dist/i18n/locales/pt.js +1 -0
  64. package/dist/i18n/locales/ro.d.ts +1 -0
  65. package/dist/i18n/locales/ro.js +1 -0
  66. package/dist/i18n/locales/ru.d.ts +1 -0
  67. package/dist/i18n/locales/ru.js +1 -0
  68. package/dist/i18n/locales/sq.d.ts +1 -0
  69. package/dist/i18n/locales/sq.js +1 -0
  70. package/dist/i18n/locales/sv.d.ts +1 -0
  71. package/dist/i18n/locales/sv.js +1 -0
  72. package/dist/i18n/locales/tr.d.ts +1 -0
  73. package/dist/i18n/locales/tr.js +1 -0
  74. package/dist/i18n/locales/zh.d.ts +1 -0
  75. package/dist/i18n/locales/zh.js +1 -0
  76. package/dist/index.js +779 -775
  77. package/dist/locales/ar.json +1 -0
  78. package/dist/locales/de.json +1 -0
  79. package/dist/locales/el.json +1 -0
  80. package/dist/locales/en.json +1 -0
  81. package/dist/locales/es.json +1 -0
  82. package/dist/locales/fr.json +1 -0
  83. package/dist/locales/hi.json +1 -0
  84. package/dist/locales/it.json +1 -0
  85. package/dist/locales/ja.json +1 -0
  86. package/dist/locales/nl.json +1 -0
  87. package/dist/locales/pl.json +1 -0
  88. package/dist/locales/pt.json +1 -0
  89. package/dist/locales/ro.json +1 -0
  90. package/dist/locales/ru.json +1 -0
  91. package/dist/locales/sq.json +1 -0
  92. package/dist/locales/sv.json +1 -0
  93. package/dist/locales/tr.json +1 -0
  94. package/dist/locales/zh.json +1 -0
  95. package/dist/patterns/anamnesis/anamnesis-intake.d.ts +5 -1
  96. package/dist/patterns/anamnesis/index.js +1 -1
  97. package/dist/tokens.css +5 -2
  98. package/package.json +1 -1
  99. package/dist/_chunks/actions-cell-renderer-C67oj7mR.js +0 -1581
  100. package/dist/_chunks/number-input-DOe5VYei.js +0 -370
@@ -6,7 +6,7 @@ import { u as ce } from "./registry-DvAUVLHh.js";
6
6
  import { R as E } from "./radio-TWf9Q-mp.js";
7
7
  import { R as ue } from "./radio-group-BmIqhIT2.js";
8
8
  import { F as G } from "./form-field-D1oqYisL.js";
9
- import { N as L } from "./number-input-DOe5VYei.js";
9
+ import { N as L } from "./number-input-CM1q9zvH.js";
10
10
  import { C as j } from "./card-DPmk26CL.js";
11
11
  import { B as me } from "./badge-CIt-UFEx.js";
12
12
  import { B as de, I as ge, b as pe } from "./insert-result-98J1QEp7.js";
@@ -431,4 +431,4 @@ we.displayName = "BmiCalculator";
431
431
  export {
432
432
  we as B
433
433
  };
434
- //# sourceMappingURL=bmi-calculator-CxPn0T0s.js.map
434
+ //# sourceMappingURL=bmi-calculator-DC5SaqXT.js.map
@@ -5,7 +5,7 @@ import { useTranslation as z } from "react-i18next";
5
5
  import { u as B } from "./registry-DvAUVLHh.js";
6
6
  import { F as S } from "./form-field-D1oqYisL.js";
7
7
  import { D as Y } from "./date-picker-Bp64zk2p.js";
8
- import { N as H } from "./number-input-DOe5VYei.js";
8
+ import { N as H } from "./number-input-CM1q9zvH.js";
9
9
  import { C as M } from "./card-DPmk26CL.js";
10
10
  import { B as T } from "./badge-CIt-UFEx.js";
11
11
  import { I as U } from "./insert-result-98J1QEp7.js";
@@ -422,4 +422,4 @@ export {
422
422
  ie as L,
423
423
  se as p
424
424
  };
425
- //# sourceMappingURL=cycle-calculator-D9M7IKfh.js.map
425
+ //# sourceMappingURL=cycle-calculator-B_NlctlQ.js.map
@@ -7,7 +7,7 @@ import { R as C } from "./radio-TWf9Q-mp.js";
7
7
  import { R as z } from "./radio-group-BmIqhIT2.js";
8
8
  import { F as w } from "./form-field-D1oqYisL.js";
9
9
  import { D as T } from "./date-picker-Bp64zk2p.js";
10
- import { N as Y } from "./number-input-DOe5VYei.js";
10
+ import { N as Y } from "./number-input-CM1q9zvH.js";
11
11
  import { C as U } from "./card-DPmk26CL.js";
12
12
  import { B as W } from "./badge-CIt-UFEx.js";
13
13
  import { I as ce } from "./insert-result-98J1QEp7.js";
@@ -568,4 +568,4 @@ Ae.displayName = "DueDateCalculator";
568
568
  export {
569
569
  Ae as D
570
570
  };
571
- //# sourceMappingURL=due-date-calculator-BkqZEvL4.js.map
571
+ //# sourceMappingURL=due-date-calculator-le1z3KpW.js.map
@@ -4,7 +4,7 @@ import { c as P } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as V } from "react-i18next";
5
5
  import { u as _ } from "./registry-DvAUVLHh.js";
6
6
  import { F as D } from "./form-field-D1oqYisL.js";
7
- import { N as q } from "./number-input-DOe5VYei.js";
7
+ import { N as q } from "./number-input-CM1q9zvH.js";
8
8
  import { C } from "./card-DPmk26CL.js";
9
9
  import { B as z } from "./badge-CIt-UFEx.js";
10
10
  import { I as G } from "./insert-result-98J1QEp7.js";
@@ -220,4 +220,4 @@ export {
220
220
  Y as F,
221
221
  Q as e
222
222
  };
223
- //# sourceMappingURL=fetal-weight-C7JXGg6E.js.map
223
+ //# sourceMappingURL=fetal-weight-DXA6ZpMq.js.map
@@ -16,7 +16,7 @@ import { F as Nt, a as Tt } from "./file-Cwe9VC1A.js";
16
16
  import { F as Ft } from "./file-text-5yv6r2ls.js";
17
17
  import { F as At } from "./file-spreadsheet-DmwyfV4O.js";
18
18
  import { C as Dt } from "./chevron-right-I9AeSxH2.js";
19
- import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-C67oj7mR.js";
19
+ import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-BD-jruqA.js";
20
20
  import { B as $e } from "./badge-CIt-UFEx.js";
21
21
  import { D as Ge } from "./download-CfYKJO_j.js";
22
22
  import { P as zt } from "./pen-line-D0De5zdl.js";
@@ -1756,4 +1756,4 @@ export {
1756
1756
  yn as F,
1757
1757
  Gt as f
1758
1758
  };
1759
- //# sourceMappingURL=file-manager-DzWYcRpE.js.map
1759
+ //# sourceMappingURL=file-manager-BjCM2fZB.js.map
@@ -4,7 +4,7 @@ import { c as q } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as J } from "react-i18next";
5
5
  import { u as Q } from "./registry-DvAUVLHh.js";
6
6
  import { F as S } from "./form-field-D1oqYisL.js";
7
- import { N as P } from "./number-input-DOe5VYei.js";
7
+ import { N as P } from "./number-input-CM1q9zvH.js";
8
8
  import { D as G } from "./date-time-picker-DVETwpzc.js";
9
9
  import { C as B } from "./card-DPmk26CL.js";
10
10
  import { B as X } from "./badge-CIt-UFEx.js";
@@ -309,4 +309,4 @@ export {
309
309
  re as M,
310
310
  oe as a
311
311
  };
312
- //# sourceMappingURL=hcg-doubling-CFJlMH7Z.js.map
312
+ //# sourceMappingURL=hcg-doubling-BT6lki_i.js.map
@@ -8,7 +8,7 @@ import { B as P } from "./button-BvNtqHAS.js";
8
8
  import { M as W } from "./multi-select-DqL4o0qV.js";
9
9
  import { S as X } from "./scroll-area-BZOvUhwQ.js";
10
10
  import { A as $ } from "./autocomplete-BrONKN8l.js";
11
- import { N as D } from "./number-input-DOe5VYei.js";
11
+ import { N as D } from "./number-input-CM1q9zvH.js";
12
12
  import { S as Y } from "./select-BW5ecXlX.js";
13
13
  import { B as ee } from "./badge-CIt-UFEx.js";
14
14
  import { A as G } from "./avatar-BNQNhoyL.js";
@@ -769,4 +769,4 @@ export {
769
769
  Ae as f,
770
770
  qe as g
771
771
  };
772
- //# sourceMappingURL=link-cell-renderer-DCCca2m3.js.map
772
+ //# sourceMappingURL=link-cell-renderer-C7GvyK66.js.map
@@ -0,0 +1,414 @@
1
+ import { jsxs as Se, jsx as x } from "react/jsx-runtime";
2
+ import { useMemo as te, forwardRef as ke, useId as ze, useRef as q, useCallback as P, useState as H, useEffect as Me } from "react";
3
+ import { c as W } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Te } from "react-i18next";
5
+ import { u as Pe } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { u as Ue } from "./form-field-context-B3APVHKx.js";
7
+ import { c as Be } from "./compose-refs-C0k0tdqF.js";
8
+ import { u as Re } from "./registry-DvAUVLHh.js";
9
+ import { C as Ae } from "./chevron-down-DWE7GSq9.js";
10
+ import { C as je } from "./chevron-up-umRGgtJA.js";
11
+ const Ee = {
12
+ id: "number-input",
13
+ capabilities: ["set_value"],
14
+ state: {
15
+ value: {
16
+ type: "number | null",
17
+ descriptionKey: "ui.agent.numberInput.state.value",
18
+ description: "Current numeric value, or null when empty.",
19
+ read: (n) => n.getValue()
20
+ },
21
+ isEmpty: {
22
+ type: "boolean",
23
+ descriptionKey: "ui.agent.numberInput.state.isEmpty",
24
+ description: "Whether the input has no value.",
25
+ read: (n) => n.getValue() === null
26
+ }
27
+ },
28
+ actions: {
29
+ set_value: {
30
+ safety: "write",
31
+ argsType: "{ value: number | null }",
32
+ argsSchema: {
33
+ type: "object",
34
+ properties: { value: { type: ["number", "null"] } },
35
+ required: ["value"]
36
+ },
37
+ idempotent: !0,
38
+ examples: [{ args: { value: 42 } }, { args: { value: null } }],
39
+ descriptionKey: "ui.agent.numberInput.actions.setValue",
40
+ description: "Replace the numeric value, or pass null to clear.",
41
+ invoke: (n, s) => {
42
+ n.setValue(s.value);
43
+ }
44
+ },
45
+ clear: {
46
+ safety: "destructive",
47
+ idempotent: !0,
48
+ descriptionKey: "ui.agent.numberInput.actions.clear",
49
+ description: "Empty the input. Loses any typed value.",
50
+ invoke: (n) => {
51
+ n.clear();
52
+ }
53
+ },
54
+ focus: {
55
+ safety: "read",
56
+ idempotent: !0,
57
+ descriptionKey: "ui.agent.numberInput.actions.focus",
58
+ description: "Move keyboard focus to the input.",
59
+ invoke: (n) => {
60
+ n.focus();
61
+ }
62
+ }
63
+ },
64
+ domHooks: {
65
+ root: {
66
+ attr: "data-component",
67
+ value: "number-input",
68
+ description: "Marks the NumberInput wrapper."
69
+ },
70
+ instanceId: {
71
+ attr: "data-component-id",
72
+ sourceProp: "id",
73
+ description: "Sourced from the id prop."
74
+ }
75
+ }
76
+ };
77
+ function Le(n) {
78
+ let s = "";
79
+ for (const l of n) {
80
+ const r = l.codePointAt(0);
81
+ r !== void 0 && (r >= 1632 && r <= 1641 ? s += String.fromCodePoint(48 + (r - 1632)) : r >= 1776 && r <= 1785 ? s += String.fromCodePoint(48 + (r - 1776)) : s += l);
82
+ }
83
+ return s;
84
+ }
85
+ function Ke(n, s, l) {
86
+ return te(() => {
87
+ var k, m;
88
+ const r = new Intl.NumberFormat(n).formatToParts(1234.5), u = ((k = r.find((o) => o.type === "decimal")) == null ? void 0 : k.value) ?? ".", S = ((m = r.find((o) => o.type === "group")) == null ? void 0 : m.value) ?? ",", p = s === "currency" ? new Intl.NumberFormat(n, {
89
+ style: "currency",
90
+ currency: l ?? "USD"
91
+ }) : s === "percentage" ? new Intl.NumberFormat(n, {
92
+ style: "percent",
93
+ maximumFractionDigits: 4
94
+ }) : s === "integer" ? new Intl.NumberFormat(n, { maximumFractionDigits: 0 }) : new Intl.NumberFormat(n, { maximumFractionDigits: 10 }), U = (o) => Number.isFinite(o) ? p.format(o) : "", B = (o) => {
95
+ if (!o) return NaN;
96
+ const y = Le(o), z = y.trim(), D = z.startsWith("-") || z.startsWith("−");
97
+ let g = "";
98
+ for (const v of y)
99
+ v >= "0" && v <= "9" ? g += v : v === u && (g += ".");
100
+ if (!g || g === ".") return NaN;
101
+ let d = Number(g);
102
+ return Number.isFinite(d) ? (D && (d = -d), s === "percentage" && (d = d / 100), d) : NaN;
103
+ };
104
+ let N = "decimal";
105
+ if (s === "integer")
106
+ N = "numeric";
107
+ else if (s === "currency")
108
+ try {
109
+ const { maximumFractionDigits: o } = new Intl.NumberFormat(n, {
110
+ style: "currency",
111
+ currency: l ?? "USD"
112
+ }).resolvedOptions();
113
+ N = o === 0 ? "numeric" : "decimal";
114
+ } catch {
115
+ N = "decimal";
116
+ }
117
+ return {
118
+ format: U,
119
+ parse: B,
120
+ decimalSeparator: u,
121
+ groupingSeparator: S,
122
+ inputMode: N
123
+ };
124
+ }, [n, s, l]);
125
+ }
126
+ const qe = W(
127
+ [
128
+ "ds:flex ds:items-center ds:rounded-[var(--radius-sm)]",
129
+ "ds:border ds:bg-input ds:text-foreground",
130
+ "ds:shadow-[var(--shadow-input)]",
131
+ "ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
132
+ "ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
133
+ "ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
134
+ "ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50"
135
+ ].join(" "),
136
+ {
137
+ variants: {
138
+ size: {
139
+ sm: "ds:h-8 ds:text-[length:var(--font-size-sm)]",
140
+ md: "ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]",
141
+ lg: "ds:h-12 ds:text-[length:var(--font-size-lg)]"
142
+ },
143
+ tone: {
144
+ default: "ds:border-border",
145
+ error: "ds:border-destructive ds:focus-within:outline-destructive"
146
+ },
147
+ // Intrinsic sizes shrink-wrap the frame around field, unit and paddings;
148
+ // the floor keeps a bare 'sm' field a valid tap target.
149
+ inline: {
150
+ full: "ds:w-full",
151
+ sm: "ds:w-fit ds:min-w-[var(--min-target-size)]",
152
+ md: "ds:w-fit ds:min-w-[var(--min-target-size)]",
153
+ lg: "ds:w-fit ds:min-w-[var(--min-target-size)]"
154
+ }
155
+ },
156
+ defaultVariants: { size: "md", tone: "default", inline: "full" }
157
+ }
158
+ ), He = W(
159
+ "ds:min-w-0 ds:bg-transparent ds:outline-none ds:text-start ds:tabular-nums ds:disabled:cursor-not-allowed",
160
+ {
161
+ variants: {
162
+ variant: { stepper: "ds:ps-2", plain: "ds:ps-3" },
163
+ hasUnit: { true: "ds:pe-1", false: "" },
164
+ // `ch` is the advance of "0", so with tabular numerals N digits fit
165
+ // exactly; box-content keeps the paddings outside that count.
166
+ inline: {
167
+ full: "ds:flex-1 ds:w-full",
168
+ sm: "ds:box-content ds:w-[8ch]",
169
+ md: "ds:box-content ds:w-[12ch]",
170
+ lg: "ds:box-content ds:w-[16ch]"
171
+ }
172
+ },
173
+ compoundVariants: [
174
+ { variant: "stepper", hasUnit: !1, class: "ds:pe-2" },
175
+ { variant: "plain", hasUnit: !1, class: "ds:pe-3" }
176
+ ],
177
+ defaultVariants: { variant: "stepper", hasUnit: !1, inline: "full" }
178
+ }
179
+ ), We = W(
180
+ "ds:shrink-0 ds:select-none ds:whitespace-nowrap ds:text-muted-foreground",
181
+ {
182
+ variants: {
183
+ variant: { stepper: "ds:pe-1", plain: "ds:pe-3" }
184
+ },
185
+ defaultVariants: { variant: "stepper" }
186
+ }
187
+ ), ee = [
188
+ "ds:inline-flex ds:items-center ds:justify-center",
189
+ "ds:h-full ds:shrink-0",
190
+ "ds:text-muted-foreground ds:hover:text-foreground",
191
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
192
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
193
+ ].join(" "), Oe = () => typeof navigator < "u" && navigator.language ? navigator.language : "en-US", _e = (n) => typeof n == "string" && n.trim() !== "" ? n : void 0;
194
+ function $e(n) {
195
+ if (!Number.isFinite(n)) return 0;
196
+ const s = String(n), l = s.indexOf(".");
197
+ return l === -1 ? 0 : s.length - l - 1;
198
+ }
199
+ function Ge(n, s) {
200
+ if (s <= 0 || !Number.isFinite(s)) return n;
201
+ const r = 10 ** $e(s);
202
+ return Math.round(n * r) / r;
203
+ }
204
+ const Je = ke(
205
+ ({
206
+ value: n,
207
+ defaultValue: s,
208
+ onChange: l,
209
+ min: r,
210
+ max: u,
211
+ step: S = 1,
212
+ mode: p = "integer",
213
+ currency: U,
214
+ locale: B,
215
+ size: N = "md",
216
+ tone: k,
217
+ variant: m = "stepper",
218
+ unit: o,
219
+ inline: y = "full",
220
+ className: z,
221
+ id: D,
222
+ disabled: g,
223
+ onFocus: d,
224
+ onBlur: v,
225
+ onKeyDown: R,
226
+ ...ne
227
+ }, re) => {
228
+ const { t: O, i18n: se } = Te(), V = Ue(), ie = D ?? V.id, M = !!(V.disabled || g), _ = ze(), ae = [V.describedBy, o ? _ : void 0].filter(Boolean).join(" ") || void 0, oe = B ?? _e(se.language) ?? Oe(), A = Ke(oe, p, U), {
229
+ decimalSeparator: T,
230
+ groupingSeparator: $,
231
+ format: j,
232
+ parse: G
233
+ } = A, J = q(null), ue = Be(re, J), [le, de] = Pe({
234
+ value: n,
235
+ defaultValue: s ?? null,
236
+ onChange: l
237
+ }), a = le ?? null, Q = q(a);
238
+ Q.current = a;
239
+ const C = P(
240
+ (e) => {
241
+ const t = p === "percentage" ? e * 100 : e;
242
+ return (Number.isInteger(t) ? String(t) : t.toString()).replace(".", T);
243
+ },
244
+ [p, T]
245
+ ), b = P(
246
+ (e) => e == null || Number.isNaN(e) ? "" : j(e),
247
+ [j]
248
+ ), [E, c] = H(
249
+ () => b(a)
250
+ ), w = q(!1), [ce, h] = H(!1), [L, F] = H(!1), K = P(
251
+ (e) => {
252
+ if (e >= "0" && e <= "9") return !0;
253
+ const t = e.codePointAt(0) ?? 0;
254
+ return t >= 1632 && t <= 1641 || t >= 1776 && t <= 1785 ? !0 : e === T || e === $ || e === "-" || e === "−";
255
+ },
256
+ [T, $]
257
+ ), fe = P(
258
+ (e) => {
259
+ let t = "";
260
+ for (const i of e)
261
+ K(i) && (t += i);
262
+ return t;
263
+ },
264
+ [K]
265
+ );
266
+ Me(() => {
267
+ !w.current && !L && c(b(a));
268
+ }, [a, b, L]);
269
+ const pe = ce || L || a !== null && (r !== void 0 && a < r || u !== void 0 && a > u), X = V.invalid || pe, me = X ? "error" : k ?? "default", f = (e) => {
270
+ de(e);
271
+ }, I = (e) => {
272
+ let i = (a ?? 0) + S * e;
273
+ r !== void 0 && (i = Math.max(r, i)), u !== void 0 && (i = Math.min(u, i)), i = Ge(i, S), f(i), h(!1), c(
274
+ w.current ? C(i) : b(i)
275
+ );
276
+ }, Y = (e) => {
277
+ f(e), h(!1), c(
278
+ w.current ? C(e) : b(e)
279
+ );
280
+ }, ve = (e) => {
281
+ if (R == null || R(e), e.defaultPrevented || M) return;
282
+ const { key: t, shiftKey: i } = e;
283
+ t === "ArrowUp" ? (e.preventDefault(), I(i ? 10 : 1)) : t === "ArrowDown" ? (e.preventDefault(), I(i ? -10 : -1)) : t === "PageUp" ? (e.preventDefault(), I(100)) : t === "PageDown" ? (e.preventDefault(), I(-100)) : t === "Home" && r !== void 0 ? (e.preventDefault(), Y(r)) : t === "End" && u !== void 0 && (e.preventDefault(), Y(u));
284
+ }, be = (e) => {
285
+ const t = fe(e.target.value);
286
+ if (c(t), t.trim() === "") {
287
+ f(null), h(!1), F(!1);
288
+ return;
289
+ }
290
+ const i = G(t);
291
+ Number.isNaN(i) || (f(i), F(!1));
292
+ }, ge = (e) => {
293
+ const { data: t } = e.nativeEvent;
294
+ typeof t != "string" || t.length !== 1 || K(t) || e.preventDefault();
295
+ }, he = (e) => {
296
+ d == null || d(e), w.current = !0, a != null && c(C(a));
297
+ }, Ne = (e) => {
298
+ if (v == null || v(e), w.current = !1, E.trim() === "") {
299
+ f(null), h(!1), F(!1), c("");
300
+ return;
301
+ }
302
+ const t = G(E);
303
+ if (Number.isNaN(t)) {
304
+ F(!0), h(!1), f(null);
305
+ return;
306
+ }
307
+ const i = r !== void 0 && t < r || u !== void 0 && t > u;
308
+ h(i), F(!1), f(t), c(b(t));
309
+ }, Z = (e) => {
310
+ e.preventDefault();
311
+ }, ye = () => I(1), we = () => I(-1), Ie = te(
312
+ () => ({
313
+ getValue: () => Q.current,
314
+ setValue: (e) => {
315
+ f(e), c(
316
+ e === null ? "" : w.current ? C(e) : b(e)
317
+ );
318
+ },
319
+ clear: () => {
320
+ f(null), c(""), h(!1);
321
+ },
322
+ focus: () => {
323
+ var e;
324
+ return (e = J.current) == null ? void 0 : e.focus();
325
+ }
326
+ }),
327
+ // The handle is reconstructed per render; consumers (the agent runtime)
328
+ // re-register only when the identity changes, which is a cheap no-op.
329
+ // eslint-disable-next-line react-hooks/exhaustive-deps
330
+ [C, b]
331
+ );
332
+ Re(Ee, Ie, D);
333
+ const xe = M || r !== void 0 && a !== null && a <= r, De = M || u !== void 0 && a !== null && a >= u, Ve = a ?? void 0, Ce = (p === "currency" || p === "percentage") && a !== null && a !== null ? j(a) : void 0, Fe = A.inputMode === "numeric" ? "[0-9]*" : void 0;
334
+ return /* @__PURE__ */ Se(
335
+ "div",
336
+ {
337
+ className: qe({
338
+ size: N,
339
+ tone: me,
340
+ inline: y,
341
+ className: z
342
+ }),
343
+ "data-component": "number-input",
344
+ "data-component-id": D,
345
+ "data-mode": p,
346
+ "data-variant": m,
347
+ "data-inline": y,
348
+ children: [
349
+ m === "stepper" ? /* @__PURE__ */ x(
350
+ "button",
351
+ {
352
+ type: "button",
353
+ tabIndex: -1,
354
+ "aria-label": O("inputs.number.decrement", "Decrement"),
355
+ onClick: we,
356
+ onMouseDown: Z,
357
+ disabled: xe,
358
+ className: `${ee} ds:ps-2 ds:pe-1`,
359
+ children: /* @__PURE__ */ x(Ae, { "aria-hidden": "true", className: "ds:size-4" })
360
+ }
361
+ ) : null,
362
+ /* @__PURE__ */ x(
363
+ "input",
364
+ {
365
+ ref: ue,
366
+ id: ie,
367
+ type: "text",
368
+ role: "spinbutton",
369
+ inputMode: A.inputMode,
370
+ pattern: Fe,
371
+ autoComplete: "off",
372
+ value: E,
373
+ disabled: M,
374
+ "aria-valuemin": r,
375
+ "aria-valuemax": u,
376
+ "aria-valuenow": Ve,
377
+ "aria-valuetext": Ce,
378
+ "aria-invalid": X || void 0,
379
+ "aria-required": V.required || void 0,
380
+ "aria-describedby": ae,
381
+ onBeforeInput: ge,
382
+ onChange: be,
383
+ onFocus: he,
384
+ onBlur: Ne,
385
+ onKeyDown: ve,
386
+ className: He({ variant: m, hasUnit: !!o, inline: y }),
387
+ ...ne
388
+ }
389
+ ),
390
+ o ? /* @__PURE__ */ x("span", { id: _, className: We({ variant: m }), children: o }) : null,
391
+ m === "stepper" ? /* @__PURE__ */ x(
392
+ "button",
393
+ {
394
+ type: "button",
395
+ tabIndex: -1,
396
+ "aria-label": O("inputs.number.increment", "Increment"),
397
+ onClick: ye,
398
+ onMouseDown: Z,
399
+ disabled: De,
400
+ className: `${ee} ds:ps-1 ds:pe-2`,
401
+ children: /* @__PURE__ */ x(je, { "aria-hidden": "true", className: "ds:size-4" })
402
+ }
403
+ ) : null
404
+ ]
405
+ }
406
+ );
407
+ }
408
+ );
409
+ Je.displayName = "NumberInput";
410
+ export {
411
+ Je as N,
412
+ Ke as u
413
+ };
414
+ //# sourceMappingURL=number-input-CM1q9zvH.js.map
@@ -3,7 +3,7 @@ import { forwardRef as We, useId as je, useRef as ue, useState as Xe, useCallbac
3
3
  import { c as He } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Fe } from "react-i18next";
5
5
  import { u as qe } from "./registry-DvAUVLHh.js";
6
- import { N as se } from "./number-input-DOe5VYei.js";
6
+ import { N as se } from "./number-input-CM1q9zvH.js";
7
7
  import { S as he } from "./select-BW5ecXlX.js";
8
8
  import { T as Ke } from "./text-area-Bt3p7Pt0.js";
9
9
  import { D as v } from "./description-list-Ck7fKdt5.js";
@@ -1257,4 +1257,4 @@ export {
1257
1257
  yt as y,
1258
1258
  Re as z
1259
1259
  };
1260
- //# sourceMappingURL=optical-prescription-Brs0CeP3.js.map
1260
+ //# sourceMappingURL=optical-prescription-CQR_WJiS.js.map
@@ -10,7 +10,7 @@ import { D as de } from "./date-picker-Bp64zk2p.js";
10
10
  import { D as S } from "./description-list-Ck7fKdt5.js";
11
11
  import { E as ce } from "./email-input-Dpe63k0K.js";
12
12
  import { F as pe } from "./fiscal-code-input-Nx1N9r72.js";
13
- import { N as ue } from "./number-input-DOe5VYei.js";
13
+ import { N as ue } from "./number-input-CM1q9zvH.js";
14
14
  import { P as me } from "./panel-header-D313n_9-.js";
15
15
  import { P as fe } from "./phone-input-BsZIoE36.js";
16
16
  import { S as ge } from "./select-BW5ecXlX.js";
@@ -775,4 +775,4 @@ export {
775
775
  Ae as P,
776
776
  je as p
777
777
  };
778
- //# sourceMappingURL=patient-details-CGhnfdUB.js.map
778
+ //# sourceMappingURL=patient-details-CnFgF3MU.js.map
@@ -1,10 +1,10 @@
1
1
  import { jsxs as O, jsx as g } from "react/jsx-runtime";
2
2
  import { createElement as x, useRef as k, useEffect as ee, useCallback as z, forwardRef as he, useState as te, useImperativeHandle as pe, useMemo as Y } from "react";
3
3
  import { useTranslation as $ } from "react-i18next";
4
- import { a as p, T as b, A as be, d as ne, D as P, e as ge } from "./actions-cell-renderer-C67oj7mR.js";
4
+ import { a as p, T as b, A as be, d as ne, D as P, e as ge } from "./actions-cell-renderer-BD-jruqA.js";
5
5
  import { S as Ce } from "./select-BW5ecXlX.js";
6
6
  import { u as ve } from "./registry-DvAUVLHh.js";
7
- import { I as Ne, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ie, D as K, C as Te, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-DCCca2m3.js";
7
+ import { I as Ne, L as we, b as L, a as _, c as U, N as H, d as F, S as R, T as ie, D as K, C as Te, g as Fe, f as Re, U as Ie, e as ye } from "./link-cell-renderer-C7GvyK66.js";
8
8
  import { B as ae } from "./badge-CIt-UFEx.js";
9
9
  import { c as Pe } from "./index-D2ZczOXr.js";
10
10
  import { T as We } from "./timestamp-BV2lC-wV.js";
@@ -1101,4 +1101,4 @@ export {
1101
1101
  q as g,
1102
1102
  tt as u
1103
1103
  };
1104
- //# sourceMappingURL=patient-table-D2fhV4mV.js.map
1104
+ //# sourceMappingURL=patient-table-BXzcrC79.js.map
@@ -7,7 +7,7 @@ import { R as u } from "./radio-TWf9Q-mp.js";
7
7
  import { R as j } from "./radio-group-BmIqhIT2.js";
8
8
  import { F as f } from "./form-field-D1oqYisL.js";
9
9
  import { D as V } from "./date-picker-Bp64zk2p.js";
10
- import { N as H } from "./number-input-DOe5VYei.js";
10
+ import { N as H } from "./number-input-CM1q9zvH.js";
11
11
  import { S as Ce } from "./select-BW5ecXlX.js";
12
12
  import { S as je } from "./switch-OILsBLWo.js";
13
13
  import { C as ie } from "./card-DPmk26CL.js";
@@ -767,4 +767,4 @@ Ue.displayName = "PregnancyDating";
767
767
  export {
768
768
  Ue as P
769
769
  };
770
- //# sourceMappingURL=pregnancy-dating-iI6_j2K2.js.map
770
+ //# sourceMappingURL=pregnancy-dating-4tPV_Yko.js.map
@@ -6,7 +6,7 @@ import { u as Z } from "./registry-DvAUVLHh.js";
6
6
  import { R as M } from "./radio-TWf9Q-mp.js";
7
7
  import { R as ee } from "./radio-group-BmIqhIT2.js";
8
8
  import { F as P } from "./form-field-D1oqYisL.js";
9
- import { N as I } from "./number-input-DOe5VYei.js";
9
+ import { N as I } from "./number-input-CM1q9zvH.js";
10
10
  import { C as B } from "./card-DPmk26CL.js";
11
11
  import { B as E } from "./badge-CIt-UFEx.js";
12
12
  import { I as te } from "./insert-result-98J1QEp7.js";
@@ -550,4 +550,4 @@ export {
550
550
  ie as p,
551
551
  oe as r
552
552
  };
553
- //# sourceMappingURL=pregnancy-weight-gain-Co-YFMJZ.js.map
553
+ //# sourceMappingURL=pregnancy-weight-gain-BBgbWBGe.js.map
@@ -8,15 +8,17 @@ function T(e, n) {
8
8
  const s = t.filter((i) => i === "signed").length;
9
9
  return s === 0 ? "unsigned" : s === t.length ? "signed" : "partial";
10
10
  }
11
- const w = {
11
+ const A = {
12
+ // Traffic light: green when everyone required has signed, amber when one
13
+ // party is still missing, red when nobody has.
12
14
  signed: "success",
13
15
  partial: "warning",
14
- unsigned: "warning",
16
+ unsigned: "error",
15
17
  notRequired: "neutral"
16
- }, A = {
18
+ }, b = {
17
19
  operator: "Operator",
18
20
  patient: "Patient"
19
- }, b = {
21
+ }, w = {
20
22
  signed: "signed",
21
23
  pending: "pending"
22
24
  };
@@ -36,8 +38,8 @@ const N = C(
36
38
  title: f,
37
39
  ...m
38
40
  }, h) => {
39
- const { t: a } = R(), d = T(e, n), r = (() => {
40
- switch (d) {
41
+ const { t: a } = R(), o = T(e, n), r = (() => {
42
+ switch (o) {
41
43
  case "signed":
42
44
  return a("signatureStatusChip.signed", { defaultValue: "Signed" });
43
45
  case "unsigned":
@@ -59,25 +61,25 @@ const N = C(
59
61
  ({ party: g, standing: l }) => a("signatureStatusChip.breakdownItem", {
60
62
  defaultValue: "{{party}} {{state}}",
61
63
  party: a(`signatureStatusChip.party.${g}`, {
62
- defaultValue: A[g]
64
+ defaultValue: b[g]
63
65
  }),
64
66
  state: a(`signatureStatusChip.state.${l}`, {
65
- defaultValue: b[l]
67
+ defaultValue: w[l]
66
68
  })
67
69
  })
68
- ).join(" · "), o = u ? `${r}, ${u}` : r, S = s && u ? `${r} · ${u}` : r;
70
+ ).join(" · "), d = u ? `${r}, ${u}` : r, S = s && u ? `${r} · ${u}` : r;
69
71
  return /* @__PURE__ */ q(
70
72
  V,
71
73
  {
72
74
  ref: h,
73
- variant: w[d],
75
+ variant: A[o],
74
76
  size: t,
75
77
  withDot: !0,
76
78
  role: "img",
77
- "aria-label": c ?? o,
78
- title: f ?? o,
79
+ "aria-label": c ?? d,
80
+ title: f ?? d,
79
81
  "data-component": "signature-status-chip",
80
- "data-status": d,
82
+ "data-status": o,
81
83
  "data-component-id": i,
82
84
  id: i,
83
85
  className: p,
@@ -92,4 +94,4 @@ export {
92
94
  N as S,
93
95
  T as s
94
96
  };
95
- //# sourceMappingURL=signature-status-chip-DUcTgQ0E.js.map
97
+ //# sourceMappingURL=signature-status-chip-DlLJk1VA.js.map