@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.
- package/dist/_chunks/{anamnesis-summary-rows-BgfBnjp0.js → anamnesis-summary-rows-YJGs2uWD.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-CRrIv2hy.js → balance-badge-cell-CRStPNDd.js} +2 -2
- package/dist/_chunks/{bill-line-table-DCqxhode.js → bill-line-table-DTqXdBED.js} +2 -2
- package/dist/_chunks/{bmi-calculator-rri5vvMt.js → bmi-calculator-rq3ZsKp0.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-GdnaPIOV.js → calendar-appointment-editor-dialog-BBrJlmyd.js} +4 -4
- package/dist/_chunks/{calendar-waiting-list-panel-CkZBAv_E.js → calendar-waiting-list-panel-Cdg9YssA.js} +2 -2
- package/dist/_chunks/{calendar.sheets-B0jP2Yt0.js → calendar.sheets-DbMOO7YV.js} +2 -2
- package/dist/_chunks/{cycle-calculator-WFhMfJHt.js → cycle-calculator-Cb66X2Pf.js} +2 -2
- package/dist/_chunks/{data-grid-bQ6iFm10.js → data-grid-CRUSZcVT.js} +2 -2
- package/dist/_chunks/{default-tabs-Dm_vk6hd.js → default-tabs-CRbVCDSU.js} +3 -3
- package/dist/_chunks/{due-date-calculator-CALlODZe.js → due-date-calculator-Dlqegxx9.js} +2 -2
- package/dist/_chunks/{fetal-weight-D0KofJJw.js → fetal-weight-DWj-_ME8.js} +2 -2
- package/dist/_chunks/{hcg-doubling-Dhdt3Jyd.js → hcg-doubling-Dqbj6PQj.js} +2 -2
- package/dist/_chunks/{invoice-upload-list-Dz3CXHPP.js → invoice-upload-list-BR6vycF7.js} +3 -3
- package/dist/_chunks/{kit-extensions-BB_ksnVl.js → kit-extensions-QddOSnIq.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-CSA0KKPe.js → link-cell-renderer-hAJplRFF.js} +2 -2
- package/dist/_chunks/medication-line-BohqbCYD.js +238 -0
- package/dist/_chunks/{number-input-DUSvP7Dq.js → number-input-Bi5Yk6PX.js} +135 -133
- package/dist/_chunks/{optical-prescription-C4jpDFOE.js → optical-prescription-GzeK_2cf.js} +2 -2
- package/dist/_chunks/{patient-details-DQTxSWY4.js → patient-details-D0PjzALT.js} +2 -2
- package/dist/_chunks/{patient-field-row-CXuWQeQJ.js → patient-field-row-DlpIModg.js} +2 -2
- package/dist/_chunks/{patient-summary-card-j5u7c5Us.js → patient-summary-card-BP_K7g_q.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-C-3NLI6K.js → pregnancy-dating-a6WIg4oy.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DkGcEc_l.js → pregnancy-weight-gain-DmrVHk9y.js} +2 -2
- package/dist/_chunks/prescription-history-Bp_JHhdF.js +1719 -0
- package/dist/_chunks/{print-sheet-CSeqkM3_.js → print-sheet-gaxObGcm.js} +110 -100
- package/dist/_chunks/{toolbar-Dz_hAUIZ.js → toolbar-B7UHCMSr.js} +2 -2
- package/dist/_chunks/{unit-converter-CBy7S4Tl.js → unit-converter-OBhSDXee.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-CBSpX4DI.js → use-appointment-details-read-DeQnmmZw.js} +2 -2
- package/dist/agent-catalog.json +8 -14
- package/dist/agent-i18n/en.json +3 -3
- package/dist/appointment-editor-panel/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/medication-line/index.js +1 -1
- package/dist/components/medication-line/medication-line.d.ts +6 -0
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/print-sheet/index.js +1 -1
- package/dist/components/print-sheet/print-sheet.d.ts +7 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +6 -1
- package/dist/i18n/locales/ar.d.ts +27 -10
- package/dist/i18n/locales/ar.js +32 -15
- package/dist/i18n/locales/de.d.ts +27 -10
- package/dist/i18n/locales/de.js +32 -15
- package/dist/i18n/locales/el.d.ts +27 -10
- package/dist/i18n/locales/el.js +32 -15
- package/dist/i18n/locales/en.d.ts +27 -10
- package/dist/i18n/locales/en.js +32 -15
- package/dist/i18n/locales/es.d.ts +27 -10
- package/dist/i18n/locales/es.js +32 -15
- package/dist/i18n/locales/fr.d.ts +27 -10
- package/dist/i18n/locales/fr.js +32 -15
- package/dist/i18n/locales/hi.d.ts +27 -10
- package/dist/i18n/locales/hi.js +32 -15
- package/dist/i18n/locales/it.d.ts +27 -10
- package/dist/i18n/locales/it.js +32 -15
- package/dist/i18n/locales/ja.d.ts +27 -10
- package/dist/i18n/locales/ja.js +32 -15
- package/dist/i18n/locales/nl.d.ts +27 -10
- package/dist/i18n/locales/nl.js +32 -15
- package/dist/i18n/locales/pl.d.ts +27 -10
- package/dist/i18n/locales/pl.js +32 -15
- package/dist/i18n/locales/pt.d.ts +27 -10
- package/dist/i18n/locales/pt.js +32 -15
- package/dist/i18n/locales/ro.d.ts +27 -10
- package/dist/i18n/locales/ro.js +32 -15
- package/dist/i18n/locales/ru.d.ts +27 -10
- package/dist/i18n/locales/ru.js +32 -15
- package/dist/i18n/locales/sq.d.ts +27 -10
- package/dist/i18n/locales/sq.js +32 -15
- package/dist/i18n/locales/sv.d.ts +27 -10
- package/dist/i18n/locales/sv.js +32 -15
- package/dist/i18n/locales/tr.d.ts +27 -10
- package/dist/i18n/locales/tr.js +32 -15
- package/dist/i18n/locales/zh.d.ts +27 -10
- package/dist/i18n/locales/zh.js +32 -15
- package/dist/index.js +27 -27
- package/dist/locales/ar.json +32 -15
- package/dist/locales/de.json +32 -15
- package/dist/locales/el.json +32 -15
- package/dist/locales/en.json +32 -15
- package/dist/locales/es.json +32 -15
- package/dist/locales/fr.json +32 -15
- package/dist/locales/hi.json +32 -15
- package/dist/locales/it.json +32 -15
- package/dist/locales/ja.json +32 -15
- package/dist/locales/nl.json +32 -15
- package/dist/locales/pl.json +32 -15
- package/dist/locales/pt.json +32 -15
- package/dist/locales/ro.json +32 -15
- package/dist/locales/ru.json +32 -15
- package/dist/locales/sq.json +32 -15
- package/dist/locales/sv.json +32 -15
- package/dist/locales/tr.json +32 -15
- package/dist/locales/zh.json +32 -15
- package/dist/online-bookings-panel/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +2 -2
- package/dist/patterns/prescription/index.d.ts +1 -1
- package/dist/patterns/prescription/index.js +1 -1
- package/dist/patterns/prescription/prescription-composer-item.d.ts +8 -1
- package/dist/patterns/prescription/prescription-composer.d.ts +14 -9
- package/dist/patterns/prescription/prescription-sheet.d.ts +23 -4
- package/dist/patterns/prescription/prescription-types.d.ts +35 -10
- package/dist/patterns/prescription/prescription-validation.d.ts +17 -11
- package/dist/tokens.css +1 -1
- package/dist/waiting-list-panel/index.js +2 -2
- package/package.json +1 -1
- package/dist/_chunks/medication-line-CHdlh-F7.js +0 -222
- package/dist/_chunks/prescription-history-748qDVwZ.js +0 -1544
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as ot, jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { c as
|
|
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
|
|
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 =
|
|
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,
|
|
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 = ((
|
|
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 = "",
|
|
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
|
|
131
|
-
if (
|
|
130
|
+
const B = Mt(f);
|
|
131
|
+
if (B !== null) {
|
|
132
132
|
if (!T && d(h)) return NaN;
|
|
133
|
-
if (
|
|
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
|
-
|
|
139
|
+
w = !1, b = !1, T = !0, g += B, p || (v += 1);
|
|
140
140
|
} else if (f === s) {
|
|
141
|
-
if (p ||
|
|
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 ||
|
|
145
|
+
if (T || p || F || d(h))
|
|
146
146
|
return NaN;
|
|
147
|
-
|
|
148
|
-
} else T ? (
|
|
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) ? (
|
|
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
|
|
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),
|
|
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) : "",
|
|
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:
|
|
206
|
-
decimalSeparator:
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
313
|
-
return i > e ?
|
|
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 =
|
|
317
|
-
return i < e ?
|
|
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 :
|
|
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:
|
|
336
|
+
locale: F,
|
|
337
337
|
size: p = "md",
|
|
338
338
|
tone: T,
|
|
339
339
|
variant: h = "stepper",
|
|
340
|
-
unit:
|
|
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:
|
|
347
|
-
minimumFractionDigits:
|
|
346
|
+
maximumFractionDigits: B,
|
|
347
|
+
minimumFractionDigits: pe,
|
|
348
348
|
onFocus: Q,
|
|
349
349
|
onBlur: Y,
|
|
350
350
|
onKeyDown: Z,
|
|
351
|
-
"aria-invalid":
|
|
351
|
+
"aria-invalid": ve,
|
|
352
352
|
"aria-describedby": Be,
|
|
353
353
|
...Ve
|
|
354
354
|
}, Pe) => {
|
|
355
|
-
const { t:
|
|
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 =
|
|
359
|
-
minimumFractionDigits:
|
|
360
|
-
maximumFractionDigits:
|
|
361
|
-
}), u = ke(d) ?
|
|
362
|
-
decimalSeparator:
|
|
363
|
-
groupingSeparator:
|
|
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:
|
|
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,
|
|
371
|
-
|
|
372
|
-
const
|
|
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 =
|
|
376
|
-
Ce(r).replace(".",
|
|
375
|
+
return u !== void 0 && (r = M(r, u)), At(
|
|
376
|
+
Ce(r).replace(".", x),
|
|
377
377
|
te
|
|
378
378
|
);
|
|
379
379
|
},
|
|
380
|
-
[d,
|
|
381
|
-
),
|
|
380
|
+
[d, x, u, te]
|
|
381
|
+
), I = L(
|
|
382
382
|
(t) => t == null || Number.isNaN(t) ? "" : re(t),
|
|
383
383
|
[re]
|
|
384
|
-
), [
|
|
385
|
-
() =>
|
|
386
|
-
),
|
|
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 ===
|
|
390
|
+
return r >= 1632 && r <= 1641 || r >= 1776 && r <= 1785 ? !0 : t === x || t === he || t === "-" || t === "−";
|
|
391
391
|
},
|
|
392
|
-
[
|
|
393
|
-
), Ge =
|
|
392
|
+
[x, he]
|
|
393
|
+
), Ge = L(
|
|
394
394
|
(t) => {
|
|
395
395
|
let r = "";
|
|
396
396
|
for (const a of t)
|
|
397
|
-
|
|
397
|
+
oe(a) && (r += a);
|
|
398
398
|
return r;
|
|
399
399
|
},
|
|
400
|
-
[
|
|
401
|
-
),
|
|
400
|
+
[oe]
|
|
401
|
+
), ue = L(
|
|
402
402
|
(t) => {
|
|
403
|
-
const r = t.indexOf(
|
|
403
|
+
const r = t.indexOf(x);
|
|
404
404
|
if (r === -1) return 0;
|
|
405
405
|
let a = 0;
|
|
406
|
-
for (const
|
|
407
|
-
Re(
|
|
406
|
+
for (const y of t.slice(r + x.length))
|
|
407
|
+
Re(y) && (a += 1);
|
|
408
408
|
return a;
|
|
409
409
|
},
|
|
410
|
-
[
|
|
411
|
-
), qe =
|
|
410
|
+
[x]
|
|
411
|
+
), qe = L(
|
|
412
412
|
(t) => {
|
|
413
413
|
if (u === void 0) return t;
|
|
414
|
-
const r = t.indexOf(
|
|
414
|
+
const r = t.indexOf(x);
|
|
415
415
|
if (r === -1) return t;
|
|
416
|
-
const a = t.slice(0, r +
|
|
417
|
-
let
|
|
418
|
-
for (const X of t.slice(r +
|
|
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 (
|
|
421
|
-
|
|
420
|
+
if (y >= u) continue;
|
|
421
|
+
y += 1;
|
|
422
422
|
}
|
|
423
|
-
|
|
423
|
+
C += X;
|
|
424
424
|
}
|
|
425
|
-
return a +
|
|
425
|
+
return a + C;
|
|
426
426
|
},
|
|
427
|
-
[
|
|
427
|
+
[x, u]
|
|
428
428
|
);
|
|
429
|
-
|
|
430
|
-
!
|
|
431
|
-
}, [l,
|
|
432
|
-
const ye = (t) => t === null ? !1 : o !== void 0 && t < o ? "below-min" : c !== void 0 && t > c ? "above-max" : !1, $ =
|
|
433
|
-
|
|
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]),
|
|
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 =
|
|
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 ?
|
|
444
|
+
t !== null && u !== void 0 ? M(t, u) : t
|
|
445
445
|
);
|
|
446
|
-
},
|
|
447
|
-
if (
|
|
448
|
-
const r = l === null ? 0 : u !== void 0 ?
|
|
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
|
-
|
|
455
|
-
|
|
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 :
|
|
459
|
-
|
|
460
|
-
|
|
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 ||
|
|
463
|
+
if (Z == null || Z(t), t.defaultPrevented || j || N) return;
|
|
464
464
|
const { key: r, shiftKey: a } = t;
|
|
465
|
-
r === "ArrowUp" ? (t.preventDefault(),
|
|
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 (
|
|
470
|
-
|
|
469
|
+
if (D(r), r.trim() === "") {
|
|
470
|
+
S(null), k(!1), G(!1);
|
|
471
471
|
return;
|
|
472
472
|
}
|
|
473
|
-
const a =
|
|
473
|
+
const a = ie(r);
|
|
474
474
|
if (Number.isNaN(a)) {
|
|
475
|
-
|
|
475
|
+
se.current !== null && S(null);
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
|
-
|
|
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 (!
|
|
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,
|
|
488
|
-
|
|
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),
|
|
490
|
+
if (Q == null || Q(t), V.current = !0, !N)
|
|
491
491
|
if (l != null) {
|
|
492
|
-
const r =
|
|
493
|
-
H.current = 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),
|
|
498
|
-
|
|
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 &&
|
|
503
|
-
l !== null &&
|
|
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 (
|
|
507
|
-
|
|
506
|
+
if (K.trim() === "") {
|
|
507
|
+
S(null), k(!1), G(!1), D("");
|
|
508
508
|
return;
|
|
509
509
|
}
|
|
510
|
-
const a =
|
|
510
|
+
const a = ie(K);
|
|
511
511
|
if (Number.isNaN(a)) {
|
|
512
|
-
|
|
512
|
+
G(!0), k(!1), S(null);
|
|
513
513
|
return;
|
|
514
514
|
}
|
|
515
|
-
|
|
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 = () =>
|
|
520
|
+
}, Ze = () => U(1), et = () => U(-1), tt = de(
|
|
519
521
|
() => ({
|
|
520
|
-
getValue: () =>
|
|
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 || (
|
|
524
|
-
t === null ? "" :
|
|
525
|
+
N || (S(t), D(
|
|
526
|
+
t === null ? "" : V.current ? _(t) : I(t)
|
|
525
527
|
));
|
|
526
528
|
},
|
|
527
529
|
clear: () => {
|
|
528
|
-
N || (
|
|
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
|
-
[
|
|
540
|
+
[_, I, N]
|
|
539
541
|
);
|
|
540
542
|
bt(yt, tt, R);
|
|
541
|
-
const nt =
|
|
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__ */
|
|
560
|
+
h === "stepper" ? /* @__PURE__ */ E(
|
|
559
561
|
"button",
|
|
560
562
|
{
|
|
561
563
|
type: "button",
|
|
562
564
|
tabIndex: -1,
|
|
563
|
-
"aria-label":
|
|
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__ */
|
|
570
|
+
children: /* @__PURE__ */ E(ht, { "aria-hidden": "true", className: "ds:size-4" })
|
|
569
571
|
}
|
|
570
572
|
) : null,
|
|
571
|
-
/* @__PURE__ */
|
|
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:
|
|
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":
|
|
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: !!
|
|
599
|
+
className: Bt({ variant: h, hasUnit: !!w, inline: b }),
|
|
598
600
|
...Ve
|
|
599
601
|
}
|
|
600
602
|
),
|
|
601
|
-
|
|
602
|
-
h === "stepper" ? /* @__PURE__ */
|
|
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":
|
|
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__ */
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
770
|
+
//# sourceMappingURL=pregnancy-dating-a6WIg4oy.js.map
|
package/dist/_chunks/{pregnancy-weight-gain-DkGcEc_l.js → pregnancy-weight-gain-DmrVHk9y.js}
RENAMED
|
@@ -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-
|
|
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-
|
|
553
|
+
//# sourceMappingURL=pregnancy-weight-gain-DmrVHk9y.js.map
|