@alfadocs/ui-kit 1.139.0 → 1.140.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 (130) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-BgfBnjp0.js → anamnesis-summary-rows-YJGs2uWD.js} +2 -2
  2. package/dist/_chunks/{balance-badge-cell-CRrIv2hy.js → balance-badge-cell-CRStPNDd.js} +2 -2
  3. package/dist/_chunks/{bill-line-table-DCqxhode.js → bill-line-table-DTqXdBED.js} +2 -2
  4. package/dist/_chunks/{bmi-calculator-rri5vvMt.js → bmi-calculator-rq3ZsKp0.js} +2 -2
  5. package/dist/_chunks/{calendar-appointment-editor-dialog-GdnaPIOV.js → calendar-appointment-editor-dialog-BBrJlmyd.js} +4 -4
  6. package/dist/_chunks/{calendar-waiting-list-panel-CkZBAv_E.js → calendar-waiting-list-panel-Cdg9YssA.js} +2 -2
  7. package/dist/_chunks/{calendar.sheets-B0jP2Yt0.js → calendar.sheets-DbMOO7YV.js} +2 -2
  8. package/dist/_chunks/{cycle-calculator-WFhMfJHt.js → cycle-calculator-Cb66X2Pf.js} +2 -2
  9. package/dist/_chunks/{data-grid-bQ6iFm10.js → data-grid-CRUSZcVT.js} +2 -2
  10. package/dist/_chunks/{default-tabs-Dm_vk6hd.js → default-tabs-CRbVCDSU.js} +3 -3
  11. package/dist/_chunks/{due-date-calculator-CALlODZe.js → due-date-calculator-Dlqegxx9.js} +2 -2
  12. package/dist/_chunks/{fetal-weight-D0KofJJw.js → fetal-weight-DWj-_ME8.js} +2 -2
  13. package/dist/_chunks/{hcg-doubling-Dhdt3Jyd.js → hcg-doubling-Dqbj6PQj.js} +2 -2
  14. package/dist/_chunks/{invoice-upload-list-Dz3CXHPP.js → invoice-upload-list-BR6vycF7.js} +3 -3
  15. package/dist/_chunks/{kit-extensions-BB_ksnVl.js → kit-extensions-QddOSnIq.js} +6 -6
  16. package/dist/_chunks/{link-cell-renderer-CSA0KKPe.js → link-cell-renderer-hAJplRFF.js} +2 -2
  17. package/dist/_chunks/medication-line-BohqbCYD.js +238 -0
  18. package/dist/_chunks/{number-input-DUSvP7Dq.js → number-input-Bi5Yk6PX.js} +135 -133
  19. package/dist/_chunks/{optical-prescription-C4jpDFOE.js → optical-prescription-GzeK_2cf.js} +2 -2
  20. package/dist/_chunks/{patient-details-DQTxSWY4.js → patient-details-D0PjzALT.js} +2 -2
  21. package/dist/_chunks/{patient-field-row-CXuWQeQJ.js → patient-field-row-DlpIModg.js} +2 -2
  22. package/dist/_chunks/{patient-summary-card-j5u7c5Us.js → patient-summary-card-BP_K7g_q.js} +2 -2
  23. package/dist/_chunks/{pregnancy-dating-C-3NLI6K.js → pregnancy-dating-a6WIg4oy.js} +2 -2
  24. package/dist/_chunks/{pregnancy-weight-gain-DkGcEc_l.js → pregnancy-weight-gain-DmrVHk9y.js} +2 -2
  25. package/dist/_chunks/prescription-history-Bp_JHhdF.js +1719 -0
  26. package/dist/_chunks/{print-sheet-CSeqkM3_.js → print-sheet-gaxObGcm.js} +110 -100
  27. package/dist/_chunks/{toolbar-Dz_hAUIZ.js → toolbar-B7UHCMSr.js} +2 -2
  28. package/dist/_chunks/{unit-converter-CBy7S4Tl.js → unit-converter-OBhSDXee.js} +2 -2
  29. package/dist/_chunks/{use-appointment-details-read-CBSpX4DI.js → use-appointment-details-read-DeQnmmZw.js} +2 -2
  30. package/dist/agent-catalog.json +8 -14
  31. package/dist/agent-i18n/en.json +3 -3
  32. package/dist/appointment-editor-panel/index.js +1 -1
  33. package/dist/browser-support.js +1 -1
  34. package/dist/components/appointment-details-panel/index.js +1 -1
  35. package/dist/components/bill-line-table/index.js +1 -1
  36. package/dist/components/bill-table/index.js +1 -1
  37. package/dist/components/bmi-calculator/index.js +1 -1
  38. package/dist/components/cycle-calculator/index.js +1 -1
  39. package/dist/components/data-grid/index.js +2 -2
  40. package/dist/components/data-table/index.js +1 -1
  41. package/dist/components/due-date-calculator/index.js +1 -1
  42. package/dist/components/fetal-weight/index.js +1 -1
  43. package/dist/components/hcg-doubling/index.js +1 -1
  44. package/dist/components/invoice-upload-list/index.js +1 -1
  45. package/dist/components/medication-line/index.js +1 -1
  46. package/dist/components/medication-line/medication-line.d.ts +6 -0
  47. package/dist/components/number-input/index.js +1 -1
  48. package/dist/components/optical-prescription/index.js +1 -1
  49. package/dist/components/patient-details/index.js +1 -1
  50. package/dist/components/patient-summary-card/index.js +1 -1
  51. package/dist/components/patient-table/index.js +1 -1
  52. package/dist/components/pregnancy-dating/index.js +1 -1
  53. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  54. package/dist/components/print-sheet/index.js +1 -1
  55. package/dist/components/print-sheet/print-sheet.d.ts +7 -0
  56. package/dist/components/rich-text-editor/index.js +1 -1
  57. package/dist/components/unit-converter/index.js +1 -1
  58. package/dist/core.css +1 -1
  59. package/dist/find-free-slots-panel/index.js +1 -1
  60. package/dist/host-compat.css +6 -1
  61. package/dist/i18n/locales/ar.d.ts +27 -10
  62. package/dist/i18n/locales/ar.js +32 -15
  63. package/dist/i18n/locales/de.d.ts +27 -10
  64. package/dist/i18n/locales/de.js +32 -15
  65. package/dist/i18n/locales/el.d.ts +27 -10
  66. package/dist/i18n/locales/el.js +32 -15
  67. package/dist/i18n/locales/en.d.ts +27 -10
  68. package/dist/i18n/locales/en.js +32 -15
  69. package/dist/i18n/locales/es.d.ts +27 -10
  70. package/dist/i18n/locales/es.js +32 -15
  71. package/dist/i18n/locales/fr.d.ts +27 -10
  72. package/dist/i18n/locales/fr.js +32 -15
  73. package/dist/i18n/locales/hi.d.ts +27 -10
  74. package/dist/i18n/locales/hi.js +32 -15
  75. package/dist/i18n/locales/it.d.ts +27 -10
  76. package/dist/i18n/locales/it.js +32 -15
  77. package/dist/i18n/locales/ja.d.ts +27 -10
  78. package/dist/i18n/locales/ja.js +32 -15
  79. package/dist/i18n/locales/nl.d.ts +27 -10
  80. package/dist/i18n/locales/nl.js +32 -15
  81. package/dist/i18n/locales/pl.d.ts +27 -10
  82. package/dist/i18n/locales/pl.js +32 -15
  83. package/dist/i18n/locales/pt.d.ts +27 -10
  84. package/dist/i18n/locales/pt.js +32 -15
  85. package/dist/i18n/locales/ro.d.ts +27 -10
  86. package/dist/i18n/locales/ro.js +32 -15
  87. package/dist/i18n/locales/ru.d.ts +27 -10
  88. package/dist/i18n/locales/ru.js +32 -15
  89. package/dist/i18n/locales/sq.d.ts +27 -10
  90. package/dist/i18n/locales/sq.js +32 -15
  91. package/dist/i18n/locales/sv.d.ts +27 -10
  92. package/dist/i18n/locales/sv.js +32 -15
  93. package/dist/i18n/locales/tr.d.ts +27 -10
  94. package/dist/i18n/locales/tr.js +32 -15
  95. package/dist/i18n/locales/zh.d.ts +27 -10
  96. package/dist/i18n/locales/zh.js +32 -15
  97. package/dist/index.js +27 -27
  98. package/dist/locales/ar.json +32 -15
  99. package/dist/locales/de.json +32 -15
  100. package/dist/locales/el.json +32 -15
  101. package/dist/locales/en.json +32 -15
  102. package/dist/locales/es.json +32 -15
  103. package/dist/locales/fr.json +32 -15
  104. package/dist/locales/hi.json +32 -15
  105. package/dist/locales/it.json +32 -15
  106. package/dist/locales/ja.json +32 -15
  107. package/dist/locales/nl.json +32 -15
  108. package/dist/locales/pl.json +32 -15
  109. package/dist/locales/pt.json +32 -15
  110. package/dist/locales/ro.json +32 -15
  111. package/dist/locales/ru.json +32 -15
  112. package/dist/locales/sq.json +32 -15
  113. package/dist/locales/sv.json +32 -15
  114. package/dist/locales/tr.json +32 -15
  115. package/dist/locales/zh.json +32 -15
  116. package/dist/online-bookings-panel/index.js +1 -1
  117. package/dist/patterns/anamnesis/index.js +1 -1
  118. package/dist/patterns/calendar/index.js +2 -2
  119. package/dist/patterns/prescription/index.d.ts +1 -1
  120. package/dist/patterns/prescription/index.js +1 -1
  121. package/dist/patterns/prescription/prescription-composer-item.d.ts +8 -1
  122. package/dist/patterns/prescription/prescription-composer.d.ts +14 -9
  123. package/dist/patterns/prescription/prescription-sheet.d.ts +23 -4
  124. package/dist/patterns/prescription/prescription-types.d.ts +35 -10
  125. package/dist/patterns/prescription/prescription-validation.d.ts +17 -11
  126. package/dist/tokens.css +1 -1
  127. package/dist/waiting-list-panel/index.js +2 -2
  128. package/package.json +1 -1
  129. package/dist/_chunks/medication-line-CHdlh-F7.js +0 -222
  130. package/dist/_chunks/prescription-history-748qDVwZ.js +0 -1544
@@ -1,6 +1,6 @@
1
- import { jsxs as ot, jsx as U } from "react/jsx-runtime";
2
- import { useMemo as ce, forwardRef as ut, useId as lt, useRef as q, useCallback as E, useState as ue, useEffect as le } from "react";
3
- import { c as fe } from "./index-D2ZczOXr.js";
1
+ import { jsxs as ot, jsx as E } from "react/jsx-runtime";
2
+ import { useMemo as de, forwardRef as ut, useId as lt, useRef as q, useCallback as L, useState as le, useEffect as ce } from "react";
3
+ import { c as me } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as ct } from "react-i18next";
5
5
  import { u as dt } from "./use-controllable-state-BiY4xTzM.js";
6
6
  import { u as ft, a as mt } from "./form-field-context-DtiROUJV.js";
@@ -76,7 +76,7 @@ const yt = {
76
76
  }
77
77
  }
78
78
  }, wt = 20;
79
- function de(e) {
79
+ function fe(e) {
80
80
  if (!(e === void 0 || !Number.isFinite(e)))
81
81
  return Math.min(wt, Math.max(0, Math.floor(e)));
82
82
  }
@@ -101,7 +101,7 @@ function xt(e, n, i) {
101
101
  }
102
102
  function Dt(e, n, i, s) {
103
103
  if (!ke(n)) return;
104
- const o = de(s == null ? void 0 : s.minimumFractionDigits), c = de(s == null ? void 0 : s.maximumFractionDigits);
104
+ const o = fe(s == null ? void 0 : s.minimumFractionDigits), c = fe(s == null ? void 0 : s.maximumFractionDigits);
105
105
  if (o === void 0 && c === void 0) return;
106
106
  const m = xt(e, n, i);
107
107
  if (c !== void 0)
@@ -111,8 +111,8 @@ function Dt(e, n, i, s) {
111
111
  }
112
112
  const Ft = 12345678905e-1;
113
113
  function It(e) {
114
- var d, g, D;
115
- const n = new Intl.NumberFormat(e).formatToParts(Ft), i = ((d = n.find((p) => p.type === "decimal")) == null ? void 0 : d.value) ?? ".", s = (g = n.find((p) => p.type === "group")) == null ? void 0 : g.value, o = s !== void 0 && s !== i ? s : i === "," ? "." : ",", m = ((D = n.filter((p) => p.type === "integer").at(-1)) == null ? void 0 : D.value.length) ?? 3;
114
+ var d, g, F;
115
+ const n = new Intl.NumberFormat(e).formatToParts(Ft), i = ((d = n.find((p) => p.type === "decimal")) == null ? void 0 : d.value) ?? ".", s = (g = n.find((p) => p.type === "group")) == null ? void 0 : g.value, o = s !== void 0 && s !== i ? s : i === "," ? "." : ",", m = ((F = n.filter((p) => p.type === "integer").at(-1)) == null ? void 0 : F.value.length) ?? 3;
116
116
  return { decimal: i, group: o, primaryGroupSize: m };
117
117
  }
118
118
  const St = /[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g;
@@ -125,32 +125,32 @@ const Se = /* @__PURE__ */ new Set([".", ",", "'", "’", "٫", "٬"]), Tt = (e)
125
125
  function Rt(e, n, i) {
126
126
  if (!e) return NaN;
127
127
  const { decimal: s, group: o, primaryGroupSize: c } = n, m = (f) => Me(f) || f === o || Se.has(f) && f !== s, d = (f) => f !== s && (Se.has(f) || f === o);
128
- let g = "", D = !1, p = !1, T = !1, h = "", y = !1, b = !1, v = 0, R = 0;
128
+ let g = "", F = !1, p = !1, T = !1, h = "", w = !1, b = !1, v = 0, R = 0;
129
129
  for (const f of e.replace(St, "")) {
130
- const k = Mt(f);
131
- if (k !== null) {
130
+ const B = Mt(f);
131
+ if (B !== null) {
132
132
  if (!T && d(h)) return NaN;
133
- if (y) {
133
+ if (w) {
134
134
  if (b || p) return NaN;
135
135
  if (R === 0 ? v > c : v < 2 || v > c)
136
136
  return NaN;
137
137
  R += 1, v = 0;
138
138
  }
139
- y = !1, b = !1, T = !0, g += k, p || (v += 1);
139
+ w = !1, b = !1, T = !0, g += B, p || (v += 1);
140
140
  } else if (f === s) {
141
- if (p || y) return NaN;
141
+ if (p || w) return NaN;
142
142
  if (R > 0 && v !== c) return NaN;
143
143
  p = !0, g += ".";
144
144
  } else if (Tt(f)) {
145
- if (T || p || D || d(h))
145
+ if (T || p || F || d(h))
146
146
  return NaN;
147
- D = !0, h = f;
148
- } else T ? (y = !0, m(f) || (b = !0)) : Me(f) || (h = f);
147
+ F = !0, h = f;
148
+ } else T ? (w = !0, m(f) || (b = !0)) : Me(f) || (h = f);
149
149
  }
150
150
  if (!p && R > 0 && v !== c) return NaN;
151
151
  if (!g || g === ".") return NaN;
152
152
  let A = Number(g);
153
- return Number.isFinite(A) ? (D && (A = -A), i === "percentage" && (A = J(A, -2)), A) : NaN;
153
+ return Number.isFinite(A) ? (F && (A = -A), i === "percentage" && (A = J(A, -2)), A) : NaN;
154
154
  }
155
155
  function At(e, n) {
156
156
  let i;
@@ -167,14 +167,14 @@ function At(e, n) {
167
167
  }
168
168
  function Ct(e, n, i, s) {
169
169
  const o = s == null ? void 0 : s.minimumFractionDigits, c = s == null ? void 0 : s.maximumFractionDigits;
170
- return ce(() => {
170
+ return de(() => {
171
171
  const m = Dt(e, n, i, {
172
172
  minimumFractionDigits: o,
173
173
  maximumFractionDigits: c
174
174
  }), d = m ? {
175
175
  minimumFractionDigits: m.min,
176
176
  maximumFractionDigits: m.max
177
- } : {}, g = It(e), D = g.decimal, p = g.group, T = n === "currency" ? new Intl.NumberFormat(e, {
177
+ } : {}, g = It(e), F = g.decimal, p = g.group, T = n === "currency" ? new Intl.NumberFormat(e, {
178
178
  style: "currency",
179
179
  currency: i ?? "USD",
180
180
  ...d
@@ -184,7 +184,7 @@ function Ct(e, n, i, s) {
184
184
  }) : n === "integer" ? new Intl.NumberFormat(e, { maximumFractionDigits: 0 }) : new Intl.NumberFormat(e, {
185
185
  maximumFractionDigits: 10,
186
186
  ...d
187
- }), h = (v) => Number.isFinite(v) ? T.format(v) : "", y = (v) => Rt(v, g, n);
187
+ }), h = (v) => Number.isFinite(v) ? T.format(v) : "", w = (v) => Rt(v, g, n);
188
188
  let b = "decimal";
189
189
  if (n === "integer")
190
190
  b = "numeric";
@@ -202,14 +202,14 @@ function Ct(e, n, i, s) {
202
202
  }
203
203
  return {
204
204
  format: h,
205
- parse: y,
206
- decimalSeparator: D,
205
+ parse: w,
206
+ decimalSeparator: F,
207
207
  groupingSeparator: p,
208
208
  inputMode: b
209
209
  };
210
210
  }, [e, n, i, o, c]);
211
211
  }
212
- const kt = fe(
212
+ const kt = me(
213
213
  [
214
214
  "ds:flex ds:items-center ds:rounded-[var(--radius-sm)]",
215
215
  "ds:border ds:bg-input ds:text-foreground",
@@ -248,7 +248,7 @@ const kt = fe(
248
248
  },
249
249
  defaultVariants: { size: "md", tone: "default", inline: "full" }
250
250
  }
251
- ), Bt = fe(
251
+ ), Bt = me(
252
252
  "ds:min-w-0 ds:bg-transparent ds:outline-none ds:tabular-nums ds:disabled:cursor-not-allowed ds:read-only:cursor-default",
253
253
  {
254
254
  variants: {
@@ -278,7 +278,7 @@ const kt = fe(
278
278
  ],
279
279
  defaultVariants: { variant: "stepper", hasUnit: !1, inline: "full" }
280
280
  }
281
- ), Vt = fe(
281
+ ), Vt = me(
282
282
  "ds:shrink-0 ds:select-none ds:whitespace-nowrap ds:text-muted-foreground",
283
283
  {
284
284
  variants: {
@@ -303,21 +303,21 @@ function Ae(e) {
303
303
  const n = Ce(e), i = n.indexOf(".");
304
304
  return i === -1 ? 0 : n.length - i - 1;
305
305
  }
306
- function S(e, n) {
306
+ function M(e, n) {
307
307
  if (!Number.isFinite(e)) return e;
308
308
  const i = e < 0 ? -1 : 1, s = Math.abs(e), o = J(s, n);
309
309
  return Number.isFinite(o) ? i * J(Math.round(o), -n) || 0 : e;
310
310
  }
311
311
  function Ut(e, n) {
312
- const i = S(e, n);
313
- return i > e ? S(i - 10 ** -n, n) : i;
312
+ const i = M(e, n);
313
+ return i > e ? M(i - 10 ** -n, n) : i;
314
314
  }
315
315
  function Et(e, n) {
316
- const i = S(e, n);
317
- return i < e ? S(i + 10 ** -n, n) : i;
316
+ const i = M(e, n);
317
+ return i < e ? M(i + 10 ** -n, n) : i;
318
318
  }
319
319
  function Lt(e, n, i) {
320
- return i <= 0 || !Number.isFinite(i) ? e : S(
320
+ return i <= 0 || !Number.isFinite(i) ? e : M(
321
321
  e,
322
322
  Math.max(Ae(i), Ae(n))
323
323
  );
@@ -333,199 +333,201 @@ const Ot = ut(
333
333
  step: m = 1,
334
334
  mode: d = "integer",
335
335
  currency: g,
336
- locale: D,
336
+ locale: F,
337
337
  size: p = "md",
338
338
  tone: T,
339
339
  variant: h = "stepper",
340
- unit: y,
340
+ unit: w,
341
341
  inline: b = "full",
342
342
  className: v,
343
343
  id: R,
344
344
  disabled: A,
345
345
  readOnly: f,
346
- maximumFractionDigits: k,
347
- minimumFractionDigits: me,
346
+ maximumFractionDigits: B,
347
+ minimumFractionDigits: pe,
348
348
  onFocus: Q,
349
349
  onBlur: Y,
350
350
  onKeyDown: Z,
351
- "aria-invalid": pe,
351
+ "aria-invalid": ve,
352
352
  "aria-describedby": Be,
353
353
  ...Ve
354
354
  }, Pe) => {
355
- const { t: ve, i18n: ze } = ct("ui"), L = ft(), Ue = mt(L, R), O = !!(L.disabled || A), ge = lt(), Ee = [Be, L.describedBy, y ? ge : void 0].filter(Boolean).join(" ") || void 0, ee = zt(ze.language), Le = ce(
355
+ const { t: ge, i18n: ze } = ct("ui"), O = ft(), Ue = mt(O, R), j = !!(O.disabled || A), be = lt(), Ee = [Be, O.describedBy, w ? be : void 0].filter(Boolean).join(" ") || void 0, ee = zt(ze.language), Le = de(
356
356
  () => ee ? vt(gt(ee)) : void 0,
357
357
  [ee]
358
- ), te = D ?? Le ?? Pt(), ne = Ct(te, d, g, {
359
- minimumFractionDigits: me,
360
- maximumFractionDigits: k
361
- }), u = ke(d) ? de(k) : void 0, N = !!f, {
362
- decimalSeparator: w,
363
- groupingSeparator: be,
358
+ ), te = F ?? Le ?? Pt(), ne = Ct(te, d, g, {
359
+ minimumFractionDigits: pe,
360
+ maximumFractionDigits: B
361
+ }), u = ke(d) ? fe(B) : void 0, N = !!f, {
362
+ decimalSeparator: x,
363
+ groupingSeparator: he,
364
364
  format: re,
365
- parse: he
365
+ parse: ie
366
366
  } = ne, Ne = q(null), Oe = pt(Pe, Ne), [je, _e] = dt({
367
367
  value: e,
368
368
  defaultValue: n ?? null,
369
369
  onChange: i
370
- }), l = je ?? null, ie = q(l);
371
- ie.current = l;
372
- const j = E(
370
+ }), l = je ?? null, se = q(l);
371
+ se.current = l;
372
+ const _ = L(
373
373
  (t) => {
374
374
  let r = d === "percentage" ? J(t, 2) : t;
375
- return u !== void 0 && (r = S(r, u)), At(
376
- Ce(r).replace(".", w),
375
+ return u !== void 0 && (r = M(r, u)), At(
376
+ Ce(r).replace(".", x),
377
377
  te
378
378
  );
379
379
  },
380
- [d, w, u, te]
381
- ), F = E(
380
+ [d, x, u, te]
381
+ ), I = L(
382
382
  (t) => t == null || Number.isNaN(t) ? "" : re(t),
383
383
  [re]
384
- ), [_, x] = ue(
385
- () => F(l)
386
- ), B = q(!1), H = q(null), [Ke, C] = ue(!1), [se, K] = ue(!1), ae = E(
384
+ ), [K, D] = le(
385
+ () => I(l)
386
+ ), V = q(!1), H = q(null), [Ke, k] = le(!1), [ae, G] = le(!1), oe = L(
387
387
  (t) => {
388
388
  if (t >= "0" && t <= "9") return !0;
389
389
  const r = t.codePointAt(0) ?? 0;
390
- return r >= 1632 && r <= 1641 || r >= 1776 && r <= 1785 ? !0 : t === w || t === be || t === "-" || t === "−";
390
+ return r >= 1632 && r <= 1641 || r >= 1776 && r <= 1785 ? !0 : t === x || t === he || t === "-" || t === "−";
391
391
  },
392
- [w, be]
393
- ), Ge = E(
392
+ [x, he]
393
+ ), Ge = L(
394
394
  (t) => {
395
395
  let r = "";
396
396
  for (const a of t)
397
- ae(a) && (r += a);
397
+ oe(a) && (r += a);
398
398
  return r;
399
399
  },
400
- [ae]
401
- ), oe = E(
400
+ [oe]
401
+ ), ue = L(
402
402
  (t) => {
403
- const r = t.indexOf(w);
403
+ const r = t.indexOf(x);
404
404
  if (r === -1) return 0;
405
405
  let a = 0;
406
- for (const M of t.slice(r + w.length))
407
- Re(M) && (a += 1);
406
+ for (const y of t.slice(r + x.length))
407
+ Re(y) && (a += 1);
408
408
  return a;
409
409
  },
410
- [w]
411
- ), qe = E(
410
+ [x]
411
+ ), qe = L(
412
412
  (t) => {
413
413
  if (u === void 0) return t;
414
- const r = t.indexOf(w);
414
+ const r = t.indexOf(x);
415
415
  if (r === -1) return t;
416
- const a = t.slice(0, r + w.length);
417
- let M = 0, G = "";
418
- for (const X of t.slice(r + w.length)) {
416
+ const a = t.slice(0, r + x.length);
417
+ let y = 0, C = "";
418
+ for (const X of t.slice(r + x.length)) {
419
419
  if (Re(X)) {
420
- if (M >= u) continue;
421
- M += 1;
420
+ if (y >= u) continue;
421
+ y += 1;
422
422
  }
423
- G += X;
423
+ C += X;
424
424
  }
425
- return a + G;
425
+ return a + C;
426
426
  },
427
- [w, u]
427
+ [x, u]
428
428
  );
429
- le(() => {
430
- !B.current && !se && x(F(l));
431
- }, [l, F, se]);
432
- const ye = (t) => t === null ? !1 : o !== void 0 && t < o ? "below-min" : c !== void 0 && t > c ? "above-max" : !1, $ = se ? "format" : ye(l) || Ke || null, He = $ !== null, W = q(s);
433
- le(() => {
429
+ ce(() => {
430
+ !V.current && !ae && D(I(l));
431
+ }, [l, I, ae]);
432
+ const ye = (t) => t === null ? !1 : o !== void 0 && t < o ? "below-min" : c !== void 0 && t > c ? "above-max" : !1, $ = ae ? "format" : ye(l) || Ke || null, He = $ !== null, W = q(s);
433
+ ce(() => {
434
434
  W.current = s;
435
- }, [s]), le(() => {
435
+ }, [s]), ce(() => {
436
436
  var t;
437
437
  (t = W.current) == null || t.call(W, {
438
438
  valid: $ === null,
439
439
  reason: $
440
440
  });
441
441
  }, [$]);
442
- const we = L.invalid || He || pe === !0 || pe === "true", $e = we ? "error" : T ?? "default", I = (t) => {
442
+ const we = O.invalid || He || ve === !0 || ve === "true", $e = we ? "error" : T ?? "default", S = (t) => {
443
443
  _e(
444
- t !== null && u !== void 0 ? S(t, u) : t
444
+ t !== null && u !== void 0 ? M(t, u) : t
445
445
  );
446
- }, V = o !== void 0 && u !== void 0 ? Et(o, u) : o, P = c !== void 0 && u !== void 0 ? Ut(c, u) : c, xe = u !== void 0 ? Math.max(m, 10 ** -u) : m, z = (t) => {
447
- if (O || N) return;
448
- const r = l === null ? 0 : u !== void 0 ? S(l, u) : l;
446
+ }, P = o !== void 0 && u !== void 0 ? Et(o, u) : o, z = c !== void 0 && u !== void 0 ? Ut(c, u) : c, xe = u !== void 0 ? Math.max(m, 10 ** -u) : m, U = (t) => {
447
+ if (j || N) return;
448
+ const r = l === null ? 0 : u !== void 0 ? M(l, u) : l;
449
449
  let a = Lt(
450
450
  r + xe * t,
451
451
  r,
452
452
  xe
453
453
  );
454
- V !== void 0 && (a = Math.max(V, a)), P !== void 0 && (a = Math.min(P, a)), u !== void 0 && (a = S(a, u)), I(a), C(!1), x(
455
- B.current ? j(a) : F(a)
454
+ P !== void 0 && (a = Math.max(P, a)), z !== void 0 && (a = Math.min(z, a)), u !== void 0 && (a = M(a, u)), S(a), k(!1), D(
455
+ V.current ? _(a) : I(a)
456
456
  );
457
457
  }, De = (t) => {
458
- const r = u === void 0 ? t : S(t, u);
459
- I(r), C(!1), x(
460
- B.current ? j(r) : F(r)
458
+ const r = u === void 0 ? t : M(t, u);
459
+ S(r), k(!1), D(
460
+ V.current ? _(r) : I(r)
461
461
  );
462
462
  }, We = (t) => {
463
- if (Z == null || Z(t), t.defaultPrevented || O || N) return;
463
+ if (Z == null || Z(t), t.defaultPrevented || j || N) return;
464
464
  const { key: r, shiftKey: a } = t;
465
- r === "ArrowUp" ? (t.preventDefault(), z(a ? 10 : 1)) : r === "ArrowDown" ? (t.preventDefault(), z(a ? -10 : -1)) : r === "PageUp" ? (t.preventDefault(), z(100)) : r === "PageDown" ? (t.preventDefault(), z(-100)) : r === "Home" && V !== void 0 ? (t.preventDefault(), De(V)) : r === "End" && P !== void 0 && (t.preventDefault(), De(P));
465
+ r === "ArrowUp" ? (t.preventDefault(), U(a ? 10 : 1)) : r === "ArrowDown" ? (t.preventDefault(), U(a ? -10 : -1)) : r === "PageUp" ? (t.preventDefault(), U(100)) : r === "PageDown" ? (t.preventDefault(), U(-100)) : r === "Home" && P !== void 0 ? (t.preventDefault(), De(P)) : r === "End" && z !== void 0 && (t.preventDefault(), De(z));
466
466
  }, Xe = (t) => {
467
467
  if (N) return;
468
468
  const r = qe(Ge(t.target.value));
469
- if (x(r), r.trim() === "") {
470
- I(null), C(!1), K(!1);
469
+ if (D(r), r.trim() === "") {
470
+ S(null), k(!1), G(!1);
471
471
  return;
472
472
  }
473
- const a = he(r);
473
+ const a = ie(r);
474
474
  if (Number.isNaN(a)) {
475
- ie.current !== null && I(null);
475
+ se.current !== null && S(null);
476
476
  return;
477
477
  }
478
- I(a), K(!1);
478
+ S(a), G(!1);
479
479
  }, Je = (t) => {
480
480
  const { data: r } = t;
481
481
  if (typeof r != "string" || r.length !== 1 || r < " " || r === "") return;
482
- if (!ae(r)) {
482
+ if (!oe(r)) {
483
483
  t.preventDefault();
484
484
  return;
485
485
  }
486
486
  if (u === void 0) return;
487
- const a = t.currentTarget, M = a.value, G = a.selectionStart ?? M.length, X = a.selectionEnd ?? G, Ie = M.slice(0, G) + r + M.slice(X);
488
- oe(Ie) > u && oe(Ie) > oe(M) && t.preventDefault();
487
+ const a = t.currentTarget, y = a.value, C = a.selectionStart ?? y.length, X = a.selectionEnd ?? C, Ie = y.slice(0, C) + r + y.slice(X);
488
+ ue(Ie) > u && ue(Ie) > ue(y) && t.preventDefault();
489
489
  }, Qe = (t) => {
490
- if (Q == null || Q(t), B.current = !0, !N)
490
+ if (Q == null || Q(t), V.current = !0, !N)
491
491
  if (l != null) {
492
- const r = j(l);
493
- H.current = r, x(r);
492
+ const r = _(l);
493
+ H.current = r, D(r);
494
494
  } else
495
- H.current = _;
495
+ H.current = K;
496
496
  }, Ye = (t) => {
497
- if (Y == null || Y(t), B.current = !1, N) {
498
- x(F(l));
497
+ if (Y == null || Y(t), V.current = !1, N) {
498
+ D(I(l));
499
499
  return;
500
500
  }
501
501
  const r = H.current;
502
- if (H.current = null, u !== void 0 && r !== null && _ === r) {
503
- l !== null && x(F(l));
502
+ if (H.current = null, u !== void 0 && r !== null && K === r) {
503
+ l !== null && D(I(l));
504
504
  return;
505
505
  }
506
- if (_.trim() === "") {
507
- I(null), C(!1), K(!1), x("");
506
+ if (K.trim() === "") {
507
+ S(null), k(!1), G(!1), D("");
508
508
  return;
509
509
  }
510
- const a = he(_);
510
+ const a = ie(K);
511
511
  if (Number.isNaN(a)) {
512
- K(!0), C(!1), I(null);
512
+ G(!0), k(!1), S(null);
513
513
  return;
514
514
  }
515
- C(ye(a)), K(!1), I(a), x(F(a));
515
+ k(ye(a)), G(!1);
516
+ const y = I(a), C = ie(y);
517
+ S(Number.isNaN(C) ? a : C), D(y);
516
518
  }, Fe = (t) => {
517
519
  t.preventDefault();
518
- }, Ze = () => z(1), et = () => z(-1), tt = ce(
520
+ }, Ze = () => U(1), et = () => U(-1), tt = de(
519
521
  () => ({
520
- getValue: () => ie.current,
522
+ getValue: () => se.current,
521
523
  // Read-only binds the agent too: it is the host's lock on the value.
522
524
  setValue: (t) => {
523
- N || (I(t), x(
524
- t === null ? "" : B.current ? j(t) : F(t)
525
+ N || (S(t), D(
526
+ t === null ? "" : V.current ? _(t) : I(t)
525
527
  ));
526
528
  },
527
529
  clear: () => {
528
- N || (I(null), x(""), C(!1));
530
+ N || (S(null), D(""), k(!1));
529
531
  },
530
532
  focus: () => {
531
533
  var t;
@@ -535,10 +537,10 @@ const Ot = ut(
535
537
  // The handle is reconstructed per render; consumers (the agent runtime)
536
538
  // re-register only when the identity changes, which is a cheap no-op.
537
539
  // eslint-disable-next-line react-hooks/exhaustive-deps
538
- [j, F, N]
540
+ [_, I, N]
539
541
  );
540
542
  bt(yt, tt, R);
541
- const nt = O || N || V !== void 0 && l !== null && l <= V, rt = O || N || P !== void 0 && l !== null && l >= P, it = l ?? void 0, st = (d === "currency" || d === "percentage" || d === "decimal" && (k !== void 0 || me !== void 0)) && l !== null && l !== null ? re(l) : void 0, at = ne.inputMode === "numeric" ? "[0-9]*" : void 0;
543
+ const nt = j || N || P !== void 0 && l !== null && l <= P, rt = j || N || z !== void 0 && l !== null && l >= z, it = l ?? void 0, st = (d === "currency" || d === "percentage" || d === "decimal" && (B !== void 0 || pe !== void 0)) && l !== null && l !== null ? re(l) : void 0, at = ne.inputMode === "numeric" ? "[0-9]*" : void 0;
542
544
  return /* @__PURE__ */ ot(
543
545
  "div",
544
546
  {
@@ -555,20 +557,20 @@ const Ot = ut(
555
557
  "data-inline": b,
556
558
  "data-read-only": N ? "" : void 0,
557
559
  children: [
558
- h === "stepper" ? /* @__PURE__ */ U(
560
+ h === "stepper" ? /* @__PURE__ */ E(
559
561
  "button",
560
562
  {
561
563
  type: "button",
562
564
  tabIndex: -1,
563
- "aria-label": ve("inputs.number.decrement", "Decrement"),
565
+ "aria-label": ge("inputs.number.decrement", "Decrement"),
564
566
  onClick: et,
565
567
  onMouseDown: Fe,
566
568
  disabled: nt,
567
569
  className: `${Te} ds:ps-2 ds:pe-1`,
568
- children: /* @__PURE__ */ U(ht, { "aria-hidden": "true", className: "ds:size-4" })
570
+ children: /* @__PURE__ */ E(ht, { "aria-hidden": "true", className: "ds:size-4" })
569
571
  }
570
572
  ) : null,
571
- /* @__PURE__ */ U(
573
+ /* @__PURE__ */ E(
572
574
  "input",
573
575
  {
574
576
  ref: Oe,
@@ -578,8 +580,8 @@ const Ot = ut(
578
580
  inputMode: ne.inputMode,
579
581
  pattern: at,
580
582
  autoComplete: "off",
581
- value: _,
582
- disabled: O,
583
+ value: K,
584
+ disabled: j,
583
585
  readOnly: f,
584
586
  "aria-readonly": N || void 0,
585
587
  "aria-valuemin": o,
@@ -587,29 +589,29 @@ const Ot = ut(
587
589
  "aria-valuenow": it,
588
590
  "aria-valuetext": st,
589
591
  "aria-invalid": we || void 0,
590
- "aria-required": L.required || void 0,
592
+ "aria-required": O.required || void 0,
591
593
  "aria-describedby": Ee,
592
594
  onBeforeInput: Je,
593
595
  onChange: Xe,
594
596
  onFocus: Qe,
595
597
  onBlur: Ye,
596
598
  onKeyDown: We,
597
- className: Bt({ variant: h, hasUnit: !!y, inline: b }),
599
+ className: Bt({ variant: h, hasUnit: !!w, inline: b }),
598
600
  ...Ve
599
601
  }
600
602
  ),
601
- y ? /* @__PURE__ */ U("span", { id: ge, className: Vt({ variant: h }), children: y }) : null,
602
- h === "stepper" ? /* @__PURE__ */ U(
603
+ w ? /* @__PURE__ */ E("span", { id: be, className: Vt({ variant: h }), children: w }) : null,
604
+ h === "stepper" ? /* @__PURE__ */ E(
603
605
  "button",
604
606
  {
605
607
  type: "button",
606
608
  tabIndex: -1,
607
- "aria-label": ve("inputs.number.increment", "Increment"),
609
+ "aria-label": ge("inputs.number.increment", "Increment"),
608
610
  onClick: Ze,
609
611
  onMouseDown: Fe,
610
612
  disabled: rt,
611
613
  className: `${Te} ds:ps-1 ds:pe-2`,
612
- children: /* @__PURE__ */ U(Nt, { "aria-hidden": "true", className: "ds:size-4" })
614
+ children: /* @__PURE__ */ E(Nt, { "aria-hidden": "true", className: "ds:size-4" })
613
615
  }
614
616
  ) : null
615
617
  ]
@@ -622,4 +624,4 @@ export {
622
624
  Ot as N,
623
625
  Ct as u
624
626
  };
625
- //# sourceMappingURL=number-input-DUSvP7Dq.js.map
627
+ //# sourceMappingURL=number-input-Bi5Yk6PX.js.map
@@ -3,7 +3,7 @@ import { forwardRef as Ye, useId as He, useRef as fe, useState as qe, useCallbac
3
3
  import { c as Ke } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Ge } from "react-i18next";
5
5
  import { u as Ue } from "./registry-DvAUVLHh.js";
6
- import { N as ae } from "./number-input-DUSvP7Dq.js";
6
+ import { N as ae } from "./number-input-Bi5Yk6PX.js";
7
7
  import { S as ye } from "./select-Bm8s3q-X.js";
8
8
  import { T as Je } from "./text-area-COMVJ1yE.js";
9
9
  import { D as v } from "./description-list-BxzDN9o2.js";
@@ -1273,4 +1273,4 @@ export {
1273
1273
  gt as y,
1274
1274
  _e as z
1275
1275
  };
1276
- //# sourceMappingURL=optical-prescription-C4jpDFOE.js.map
1276
+ //# sourceMappingURL=optical-prescription-GzeK_2cf.js.map
@@ -8,7 +8,7 @@ import { C as ie, b as te, a as se } from "./collapsible-DVPM46bq.js";
8
8
  import { D as ae } from "./description-list-BxzDN9o2.js";
9
9
  import { P as de } from "./panel-header-CbtlTe85.js";
10
10
  import { u as re } from "./registry-DvAUVLHh.js";
11
- import { u as ne, F as le, r as oe, P as ce } from "./patient-field-row-CXuWQeQJ.js";
11
+ import { u as ne, F as le, r as oe, P as ce } from "./patient-field-row-DlpIModg.js";
12
12
  import { C as pe } from "./clipboard-list-rSzfIYZB.js";
13
13
  const me = {
14
14
  id: "patient-details",
@@ -368,4 +368,4 @@ export {
368
368
  ue as P,
369
369
  me as p
370
370
  };
371
- //# sourceMappingURL=patient-details-DQTxSWY4.js.map
371
+ //# sourceMappingURL=patient-details-D0PjzALT.js.map
@@ -23,7 +23,7 @@ import { C as ue } from "./country-select-BPISkYVU.js";
23
23
  import { D as me } from "./date-picker-BmVBVpVu.js";
24
24
  import { E as pe } from "./email-input-DxwbREpx.js";
25
25
  import { F as fe } from "./fiscal-code-input-DZlpaMGg.js";
26
- import { N as ge } from "./number-input-DUSvP7Dq.js";
26
+ import { N as ge } from "./number-input-Bi5Yk6PX.js";
27
27
  import { P as he } from "./phone-input-DRKcJUi4.js";
28
28
  import { P as ye } from "./postal-code-input-dJdSAVkP.js";
29
29
  import { P as be } from "./province-select-D-iY9bQG.js";
@@ -805,4 +805,4 @@ export {
805
805
  Dt as r,
806
806
  St as u
807
807
  };
808
- //# sourceMappingURL=patient-field-row-CXuWQeQJ.js.map
808
+ //# sourceMappingURL=patient-field-row-DlpIModg.js.map
@@ -14,7 +14,7 @@ import { T as Ke } from "./transaction-chip-CkYd-3ky.js";
14
14
  import { T as je } from "./tooltip-uEBdD1-5.js";
15
15
  import { H as G } from "./hover-card-CuRIA4wN.js";
16
16
  import { i as de } from "./is-safe-url-CEy9CEml.js";
17
- import { u as qe, r as We, a as He, b as Je, F as Qe, S as Xe, A as Ye, N as Ze } from "./patient-field-row-CXuWQeQJ.js";
17
+ import { u as qe, r as We, a as He, b as Je, F as Qe, S as Xe, A as Ye, N as Ze } from "./patient-field-row-DlpIModg.js";
18
18
  import { u as Oe } from "./registry-DvAUVLHh.js";
19
19
  import { M as ea } from "./mail-BqXVF2zH.js";
20
20
  import { P as aa } from "./phone-FceYcIFQ.js";
@@ -548,4 +548,4 @@ export {
548
548
  Ca as P,
549
549
  ma as p
550
550
  };
551
- //# sourceMappingURL=patient-summary-card-j5u7c5Us.js.map
551
+ //# sourceMappingURL=patient-summary-card-BP_K7g_q.js.map
@@ -7,7 +7,7 @@ import { R as u } from "./radio-BZQs6_36.js";
7
7
  import { R as j } from "./radio-group-ChIKyeSJ.js";
8
8
  import { F as f } from "./form-field-CyHfOVKF.js";
9
9
  import { D as V } from "./date-picker-BmVBVpVu.js";
10
- import { N as H } from "./number-input-DUSvP7Dq.js";
10
+ import { N as H } from "./number-input-Bi5Yk6PX.js";
11
11
  import { S as Ce } from "./select-Bm8s3q-X.js";
12
12
  import { S as je } from "./switch-DO6uC4HJ.js";
13
13
  import { C as ie } from "./card-n6W6LW-N.js";
@@ -767,4 +767,4 @@ Ue.displayName = "PregnancyDating";
767
767
  export {
768
768
  Ue as P
769
769
  };
770
- //# sourceMappingURL=pregnancy-dating-C-3NLI6K.js.map
770
+ //# sourceMappingURL=pregnancy-dating-a6WIg4oy.js.map
@@ -6,7 +6,7 @@ import { u as Z } from "./registry-DvAUVLHh.js";
6
6
  import { R as M } from "./radio-BZQs6_36.js";
7
7
  import { R as ee } from "./radio-group-ChIKyeSJ.js";
8
8
  import { F as P } from "./form-field-CyHfOVKF.js";
9
- import { N as I } from "./number-input-DUSvP7Dq.js";
9
+ import { N as I } from "./number-input-Bi5Yk6PX.js";
10
10
  import { C as B } from "./card-n6W6LW-N.js";
11
11
  import { B as E } from "./badge-BUk4RjTS.js";
12
12
  import { I as te } from "./insert-result-CDMMt7q8.js";
@@ -550,4 +550,4 @@ export {
550
550
  ie as p,
551
551
  oe as r
552
552
  };
553
- //# sourceMappingURL=pregnancy-weight-gain-DkGcEc_l.js.map
553
+ //# sourceMappingURL=pregnancy-weight-gain-DmrVHk9y.js.map